Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit
@ 2022-04-12 21:25 Chia-I Wu
  2022-04-26 16:32 ` Chia-I Wu
  0 siblings, 1 reply; 13+ messages in thread
From: Chia-I Wu @ 2022-04-12 21:25 UTC (permalink / raw)
  To: freedreno
  Cc: dri-devel, Sean Paul, Abhinav Kumar, David Airlie, Sumit Semwal,
	Christian König, linux-arm-msm, Daniel Vetter, Rob Clark,
	Dmitry Baryshkov

In practice, trace_dma_fence_init called from dma_fence_init is good
enough and almost no driver calls trace_dma_fence_emit.  But drm_sched
and virtio both have cases where trace_dma_fence_init and
trace_dma_fence_emit can be apart.  It is easier for visualization tools
to always use the more correct trace_dma_fence_emit when visualizing
fence timelines.

v2: improve commit message (Dmitry)

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Cc: Rob Clark <robdclark@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/gpu/drm/msm/msm_gpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
index faf0c242874e..a82193f41ea2 100644
--- a/drivers/gpu/drm/msm/msm_gpu.c
+++ b/drivers/gpu/drm/msm/msm_gpu.c
@@ -15,6 +15,7 @@
 #include <linux/string_helpers.h>
 #include <linux/devcoredump.h>
 #include <linux/sched/task.h>
+#include <trace/events/dma_fence.h>
 
 /*
  * Power Management:
@@ -769,6 +770,7 @@ void msm_gpu_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
 	gpu->active_submits++;
 	mutex_unlock(&gpu->active_lock);
 
+	trace_dma_fence_emit(submit->hw_fence);
 	gpu->funcs->submit(gpu, submit);
 	gpu->cur_ctx_seqno = submit->queue->ctx->seqno;
 
-- 
2.35.1.1178.g4f1659d476-goog


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-04-27 17:56 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-12 21:25 [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit Chia-I Wu
2022-04-26 16:32 ` Chia-I Wu
2022-04-26 16:42   ` Christian König
2022-04-26 17:05     ` Rob Clark
2022-04-26 17:08       ` Christian König
2022-04-26 17:16         ` Rob Clark
2022-04-26 17:20           ` Christian König
2022-04-26 17:40             ` Chia-I Wu
2022-04-26 18:02               ` Christian König
2022-04-26 18:50                 ` Chia-I Wu
2022-04-27  6:19                   ` Christian König
2022-04-27 16:07                     ` Rob Clark
2022-04-27 17:55                       ` Chia-I Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox