diff mbox series

[v3,7/8] drm/sched: use trace_dma_fence_used_as_dependency

Message ID 20240216151006.475077-8-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
drm_sched_job_add_dependency adds dependencies so use the new
trace event.

Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
---
 drivers/gpu/drm/scheduler/sched_main.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 7e90c9f95611..6ee49f70d319 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -84,6 +84,8 @@ 
 #include <drm/gpu_scheduler.h>
 #include <drm/spsc_queue.h>
 
+#include <trace/events/dma_fence.h>
+
 #define CREATE_TRACE_POINTS
 #include "gpu_scheduler_trace.h"
 
@@ -879,6 +881,8 @@  int drm_sched_job_add_dependency(struct drm_sched_job *job,
 		if (entry->context != fence->context)
 			continue;
 
+		trace_dma_fence_used_as_dependency(fence, __func__);
+
 		if (dma_fence_is_later(fence, entry)) {
 			dma_fence_put(entry);
 			xa_store(&job->dependencies, index, fence, GFP_KERNEL);