Being unable to find a hole in the mappable aperture, should only be
possible if the entire aperture is *pinned*. Our pins are shortlived,
only taken while binding and constructing batches/mappings, so if we
find no room try again. There are a few semi-permanent pins for rings,
contexts, page tables which take a little longer to be released, but for
our Haswell failure case, should not be the issue.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111530
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c 
b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e0bfc021ec6f..3c046803fc61 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -280,7 +280,9 @@ vm_fault_t i915_gem_fault(struct vm_fault *vmf)
                }
 
                /* The entire mappable GGTT is pinned? Unexpected! */
-               GEM_BUG_ON(vma == ERR_PTR(-ENOSPC));
+               if (unlikely(vma == ERR_PTR(-ENOSPC)))
+                       /* Pins *should* be transient, so try again */
+                       vma = ERR_PTR(-EAGAIN);
        }
        if (IS_ERR(vma)) {
                ret = PTR_ERR(vma);
-- 
2.23.0

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

Reply via email to