As a final check, after checking the various alignment and placement,
check that we exist in the right binding alias.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_vma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 80050f6a0893..adecd7e16647 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -473,7 +473,7 @@ bool i915_vma_misplaced(const struct i915_vma *vma,
            vma->node.start != (flags & PIN_OFFSET_MASK))
                return true;
 
-       return false;
+       return (vma->flags & flags & I915_VMA_BIND_MASK) == 0;
 }
 
 void __i915_vma_set_map_and_fenceable(struct i915_vma *vma)
-- 
2.20.1

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

Reply via email to