From: Chia-I Wu <olvaffe@gmail.com>
To: freedreno@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, "Sean Paul" <sean@poorly.run>,
"Abhinav Kumar" <quic_abhinavk@quicinc.com>,
"David Airlie" <airlied@linux.ie>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
linux-arm-msm@vger.kernel.org, "Daniel Vetter" <daniel@ffwll.ch>,
"Rob Clark" <robdclark@chromium.org>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>
Subject: [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit
Date: Tue, 12 Apr 2022 14:25:58 -0700 [thread overview]
Message-ID: <20220412212558.827289-1-olvaffe@gmail.com> (raw)
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
next reply other threads:[~2022-04-12 23:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 21:25 Chia-I Wu [this message]
2022-04-26 16:32 ` [PATCH v2] drm/msm: add trace_dma_fence_emit to msm_gpu_submit 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220412212558.827289-1-olvaffe@gmail.com \
--to=olvaffe@gmail.com \
--cc=airlied@linux.ie \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@chromium.org \
--cc=sean@poorly.run \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox