diff mbox series

[v3,2/8] dma-buf/fence-chain: use trace_dma_fence_sync_to

Message ID 20240216151006.475077-3-pierre-eric.pelloux-prayer@amd.com (mailing list archive)
State New, archived
Headers show
Series dma-fence, drm, amdgpu new trace events | expand

Commit Message

Pierre-Eric Pelloux-Prayer Feb. 16, 2024, 3:09 p.m. UTC
To inform tools about the relationship between the fences.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
 drivers/dma-buf/dma-fence-chain.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Christian König Feb. 16, 2024, 3:30 p.m. UTC | #1
Am 16.02.24 um 16:09 schrieb Pierre-Eric Pelloux-Prayer:
> To inform tools about the relationship between the fences.
>
> Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/dma-fence-chain.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
> index 9663ba1bb6ac..3435078c45b7 100644
> --- a/drivers/dma-buf/dma-fence-chain.c
> +++ b/drivers/dma-buf/dma-fence-chain.c
> @@ -9,6 +9,8 @@
>   
>   #include <linux/dma-fence-chain.h>
>   
> +#include "trace/events/dma_fence.h"
> +
>   static bool dma_fence_chain_enable_signaling(struct dma_fence *fence);
>   
>   /**
> @@ -251,6 +253,8 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
>   	chain->fence = fence;
>   	chain->prev_seqno = 0;
>   
> +	trace_dma_fence_used_as_dependency(fence, __func__);
> +
>   	/* Try to reuse the context of the previous chain node. */
>   	if (prev_chain && __dma_fence_is_later(seqno, prev->seqno, prev->ops)) {
>   		context = prev->context;
diff mbox series

Patch

diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
index 9663ba1bb6ac..3435078c45b7 100644
--- a/drivers/dma-buf/dma-fence-chain.c
+++ b/drivers/dma-buf/dma-fence-chain.c
@@ -9,6 +9,8 @@ 
 
 #include <linux/dma-fence-chain.h>
 
+#include "trace/events/dma_fence.h"
+
 static bool dma_fence_chain_enable_signaling(struct dma_fence *fence);
 
 /**
@@ -251,6 +253,8 @@  void dma_fence_chain_init(struct dma_fence_chain *chain,
 	chain->fence = fence;
 	chain->prev_seqno = 0;
 
+	trace_dma_fence_used_as_dependency(fence, __func__);
+
 	/* Try to reuse the context of the previous chain node. */
 	if (prev_chain && __dma_fence_is_later(seqno, prev->seqno, prev->ops)) {
 		context = prev->context;