We detected if objects should be moved to the lower parts when 48-bit
support flag was not set, but not the other way around.

This handles the case in which an object was allocated in the 32-bit
address range, but it has been marked as safe to move above it, which
theoretically would help to keep the lower addresses available for
objects which really need to be there.

Cc: Daniele Ceraolo Spurio <[email protected]>
Signed-off-by: Michel Thierry <[email protected]>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c 
b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 8df5b96..a83916e 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -696,6 +696,11 @@ eb_vma_misplaced(struct i915_vma *vma)
            (vma->node.start + vma->node.size - 1) >> 32)
                return true;
 
+       /* keep the lower addresses free of unnecessary objects */
+       if ((entry->flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) &&
+           !((vma->node.start + vma->node.size - 1) >> 32))
+               return true;
+
        return false;
 }
 
-- 
2.6.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to