[PATCH] drm/i915: Wait and retry if there is no space in the aperture mappable area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Siluvery, Arun" <arun.siluvery@xxxxxxxxx>

When a mapping is requested and if there is no space the mapping fails
and the region is not physically backed. This results in
signal 7(SIGBUS), code 2 (BUS_ADRERR) when it is actually accessed.
This patch handles this error, continues to wait and retries to find space.

Signed-off-by: Siluvery, Arun <arun.siluvery@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e7b39d7..927a27b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3275,6 +3275,10 @@ search_free:
 					       obj->cache_level,
 					       map_and_fenceable,
 					       nonblocking);
+
+		if (ret == -ENOSPC)
+			ret = i915_gem_evict_everything(dev);
+
 		if (ret == 0)
 			goto search_free;
 
-- 
1.8.4


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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux