Just add the call before taking locks.

Signed-off-by: Christian König <christian.koe...@amd.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 
b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 5964e67c7d36..24c575d762db 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -872,6 +872,12 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
                        goto err;
                }
 
+               err = dma_resv_sync_user_fence(vma->obj->base.resv);
+               if (unlikely(err)) {
+                       i915_vma_put(vma);
+                       goto err;
+               }
+
                eb_add_vma(eb, i, batch, vma);
 
                if (i915_gem_object_is_userptr(vma->obj)) {
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to