[PATCH 5/7] drm/vmwgfx: rework questionable enable_signaling implementation

Christian König ckoenig.leichtzumerken at gmail.com
Wed Sep 11 08:59:01 UTC 2024


The implementation just tests if the fence is signaled or not and
doesn't enable any further handling. On the other hand the callback
to test if a fence is signaled or not is missing.

So remove the enable_signaling callback and implement the signaled
callback instead.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 588d50ababf6..255ef677c712 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -143,7 +143,7 @@ static const char *vmw_fence_get_timeline_name(struct dma_fence *f)
 	return "svga";
 }
 
-static bool vmw_fence_enable_signaling(struct dma_fence *f)
+static bool vmw_fence_signaled(struct dma_fence *f)
 {
 	struct vmw_fence_obj *fence =
 		container_of(f, struct vmw_fence_obj, base);
@@ -153,9 +153,9 @@ static bool vmw_fence_enable_signaling(struct dma_fence *f)
 
 	u32 seqno = vmw_fence_read(dev_priv);
 	if (seqno - fence->base.seqno < VMW_FENCE_WRAP)
-		return false;
+		return true;
 
-	return true;
+	return false;
 }
 
 struct vmwgfx_wait_cb {
@@ -251,7 +251,7 @@ static long vmw_fence_wait(struct dma_fence *f, bool intr, signed long timeout)
 static const struct dma_fence_ops vmw_fence_ops = {
 	.get_driver_name = vmw_fence_get_driver_name,
 	.get_timeline_name = vmw_fence_get_timeline_name,
-	.enable_signaling = vmw_fence_enable_signaling,
+	.signaled = vmw_fence_signaled,
 	.wait = vmw_fence_wait,
 	.release = vmw_fence_obj_destroy,
 };
-- 
2.34.1



More information about the dri-devel mailing list