public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Handle ENOSPC after failing to insert a mappable node
@ 2016-07-16 17:42 Chris Wilson
  2016-07-17  5:22 ` ✗ Ro.CI.BAT: failure for " Patchwork
  2016-07-19  6:55 ` [PATCH] " Daniel Vetter
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Wilson @ 2016-07-16 17:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ankitprasad Sharma

Even after adding individual page support for GTT mmaping, we can still
fail to find any space within the mappable region, and
drm_mm_insert_node() will then report ENOSPC. We have to then handle
this error by using the shmem access to the pages.

Fixes: b50a53715f09 ("drm/i915: Support for pread/pwrite ... objects")
Testcase: igt/gem_concurrent_blit
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ankitprasad Sharma <ankitprasad.r.sharma@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4644a7e67cf6..e37f73d3965c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1306,7 +1306,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
 		 * textures). Fallback to the shmem path in that case. */
 	}
 
-	if (ret == -EFAULT) {
+	if (ret == -EFAULT || ret == -ENOSPC) {
 		if (obj->phys_handle)
 			ret = i915_gem_phys_pwrite(obj, args, file);
 		else if (i915_gem_object_has_struct_page(obj))
-- 
2.8.1

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

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

end of thread, other threads:[~2016-07-19 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-16 17:42 [PATCH] drm/i915: Handle ENOSPC after failing to insert a mappable node Chris Wilson
2016-07-17  5:22 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-07-19  6:55 ` [PATCH] " Daniel Vetter
2016-07-19  7:09   ` Chris Wilson
2016-07-19  8:28   ` Chris Wilson
2016-07-19 14:33     ` Daniel Vetter

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