[PATCH 12/12] drm/v3d: add DMA-buf user fence support

Christian König ckoenig.leichtzumerken at gmail.com
Tue May 4 13:27:29 UTC 2021


Just add the call before taking locks.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/v3d/v3d_gem.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index 4eb354226972..7c45292c641c 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -345,6 +345,12 @@ v3d_lookup_bos(struct drm_device *dev,
 	}
 	spin_unlock(&file_priv->table_lock);
 
+	for (i = 0; i < job->bo_count; i++) {
+		ret = dma_resv_sync_user_fence(job->bo[i]->resv);
+		if (ret)
+			break;
+	}
+
 fail:
 	kvfree(handles);
 	return ret;
-- 
2.25.1



More information about the dri-devel mailing list