From: "Siluvery, Arun" <arun.siluv...@intel.com>

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.siluv...@intel.com>
---
 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to