Re: [PATCH] drm/msm: add trace_dma_fence_emit to msm_gpu_submit

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

 



Am 08.04.22 um 23:12 schrieb Chia-I Wu:
In practice, trace_dma_fence_init is good enough and almost no driver
calls trace_dma_fence_emit.  But this is still more correct in theory.

Well, the reason why basically no driver is calling this is because it is pretty much deprecated.

We do have a case in the GPU scheduler where it makes sense to distinct between init and emit, but it doesn't really matter for drivers.

So I'm not sure if it's a good idea to add that here.

Regards,
Christian.


Signed-off-by: Chia-I Wu <olvaffe@xxxxxxxxx>
Cc: Rob Clark <robdclark@xxxxxxxxxxxx>
---
  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;




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux