[RFC PATCH 10/10] drm/syncobj: Warn on long running dma-fences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Long running dma-fences are not allowed to be exported, a drm_syncobj is
designed to be exported to the user, so add a warn if drm_syncobj
install long running dna-fences as this is not allowed.

Signed-off-by: Matthew Brost <matthew.brsot@xxxxxxxxx>
---
 drivers/gpu/drm/drm_syncobj.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 0c2be8360525..7c304cd7d037 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -291,6 +291,7 @@ void drm_syncobj_add_point(struct drm_syncobj *syncobj,
 	struct syncobj_wait_entry *cur, *tmp;
 	struct dma_fence *prev;
 
+	WARN_ON_ONCE(dma_fence_is_lr(fence));
 	dma_fence_get(fence);
 
 	spin_lock(&syncobj->lock);
@@ -325,8 +326,10 @@ void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
 	struct dma_fence *old_fence;
 	struct syncobj_wait_entry *cur, *tmp;
 
-	if (fence)
+	if (fence) {
+		WARN_ON_ONCE(dma_fence_is_lr(fence));
 		dma_fence_get(fence);
+	}
 
 	spin_lock(&syncobj->lock);
 
-- 
2.34.1




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux