public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Force relocations via cpu if we run out of idle aperture
@ 2016-10-06  7:41 Chris Wilson
  2016-10-06  8:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
  2016-10-06 12:28 ` [PATCH] " Joonas Lahtinen
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2016-10-06  7:41 UTC (permalink / raw)
  To: intel-gfx

If we run out of enough aperture space to fit the entire object, we
fallback to trying to insert a single page. However, if that also fails,
we currently fail to userspace with an unexpected ENOSPC. (ENOSPC means
to userspace that their batch could not be fitted within the GTT.) Prior
to commit e8cb909ac3ab ("drm/i915: Fallback to single page GTT
mmappings for relocations") the approach is to fallback to using the
slow CPU relocation path in case of iomapping failure, and that is the
behaviour we need to restore.

Fixes: e8cb909ac3ab ("drm/i915: Fallback to single page GTT mmappings...")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98101
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 8c0cf1417e79..cdcdab2b0370 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -461,8 +461,8 @@ static void *reloc_iomap(struct drm_i915_gem_object *obj,
 				 0, ggtt->mappable_end,
 				 DRM_MM_SEARCH_DEFAULT,
 				 DRM_MM_CREATE_DEFAULT);
-			if (ret)
-				return ERR_PTR(ret);
+			if (ret) /* no inactive aperture space, use cpu reloc */
+				return NULL;
 		} else {
 			ret = i915_vma_put_fence(vma);
 			if (ret) {
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ Fi.CI.BAT: warning for drm/i915: Force relocations via cpu if we run out of idle aperture
  2016-10-06  7:41 [PATCH] drm/i915: Force relocations via cpu if we run out of idle aperture Chris Wilson
@ 2016-10-06  8:19 ` Patchwork
  2016-10-06 12:28 ` [PATCH] " Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-10-06  8:19 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Force relocations via cpu if we run out of idle aperture
URL   : https://patchwork.freedesktop.org/series/13368/
State : warning

== Summary ==

Series 13368v1 drm/i915: Force relocations via cpu if we run out of idle aperture
https://patchwork.freedesktop.org/api/1.0/series/13368/revisions/1/mbox/

Test kms_busy:
        Subgroup basic-flip-default-a:
                pass       -> DMESG-WARN (fi-byt-n2820)
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                pass       -> DMESG-WARN (fi-skl-6700hq)

fi-bdw-5557u     total:244  pass:229  dwarn:0   dfail:0   fail:0   skip:15 
fi-bsw-n3050     total:244  pass:202  dwarn:0   dfail:0   fail:0   skip:42 
fi-bxt-t5700     total:244  pass:214  dwarn:0   dfail:0   fail:0   skip:30 
fi-byt-j1900     total:244  pass:210  dwarn:2   dfail:0   fail:1   skip:31 
fi-byt-n2820     total:244  pass:207  dwarn:1   dfail:0   fail:1   skip:35 
fi-hsw-4770      total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-hsw-4770r     total:244  pass:222  dwarn:0   dfail:0   fail:0   skip:22 
fi-ilk-650       total:244  pass:182  dwarn:0   dfail:0   fail:2   skip:60 
fi-ivb-3520m     total:244  pass:219  dwarn:0   dfail:0   fail:0   skip:25 
fi-ivb-3770      total:244  pass:207  dwarn:0   dfail:0   fail:0   skip:37 
fi-kbl-7200u     total:244  pass:220  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6260u     total:244  pass:230  dwarn:0   dfail:0   fail:0   skip:14 
fi-skl-6700hq    total:244  pass:221  dwarn:1   dfail:0   fail:0   skip:22 
fi-skl-6700k     total:244  pass:219  dwarn:1   dfail:0   fail:0   skip:24 
fi-skl-6770hq    total:244  pass:228  dwarn:1   dfail:0   fail:1   skip:14 
fi-snb-2520m     total:244  pass:208  dwarn:0   dfail:0   fail:0   skip:36 
fi-snb-2600      total:244  pass:207  dwarn:0   dfail:0   fail:0   skip:37 

Results at /archive/results/CI_IGT_test/Patchwork_2636/

2dff18acaa95a26b882a5f9910d7ded514f18415 drm-intel-nightly: 2016y-10m-05d-13h-58m-08s UTC integration manifest
a6bf9e7 drm/i915: Force relocations via cpu if we run out of idle aperture

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: Force relocations via cpu if we run out of idle aperture
  2016-10-06  7:41 [PATCH] drm/i915: Force relocations via cpu if we run out of idle aperture Chris Wilson
  2016-10-06  8:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
@ 2016-10-06 12:28 ` Joonas Lahtinen
  1 sibling, 0 replies; 3+ messages in thread
From: Joonas Lahtinen @ 2016-10-06 12:28 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On to, 2016-10-06 at 08:41 +0100, Chris Wilson wrote:
> If we run out of enough aperture space to fit the entire object, we
> fallback to trying to insert a single page. However, if that also fails,
> we currently fail to userspace with an unexpected ENOSPC. (ENOSPC means
> to userspace that their batch could not be fitted within the GTT.) Prior
> to commit e8cb909ac3ab ("drm/i915: Fallback to single page GTT
> mmappings for relocations") the approach is to fallback to using the
> slow CPU relocation path in case of iomapping failure, and that is the
> behaviour we need to restore.
> 
> Fixes: e8cb909ac3ab ("drm/i915: Fallback to single page GTT mmappings...")
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98101
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-06 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-06  7:41 [PATCH] drm/i915: Force relocations via cpu if we run out of idle aperture Chris Wilson
2016-10-06  8:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
2016-10-06 12:28 ` [PATCH] " Joonas Lahtinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox