From: Alessio Belle <Alessio.Belle@imgtec.com>
To: Brajesh Gupta <Brajesh.Gupta@imgtec.com>
Cc: Luigi Santivetti <Luigi.Santivetti@imgtec.com>,
"opensource@mtcoster.net" <opensource@mtcoster.net>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"imagination@lists.freedesktop.org"
<imagination@lists.freedesktop.org>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Frank Binns <Frank.Binns@imgtec.com>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
"mripard@kernel.org" <mripard@kernel.org>
Subject: Re: [PATCH v3] drm/imagination: Update the trace point pvr_job_submit_fw()
Date: Tue, 28 Jul 2026 18:04:18 +0000 [thread overview]
Message-ID: <ce5568dc8bad2c21a172a515dd3813dbf5b99ca3.camel@imgtec.com> (raw)
In-Reply-To: <20260724-b4-tracepoint-fix-v3-1-8f8e5e8179d3@imgtec.com>
On Fri, 2026-07-24 at 20:12 +0530, Brajesh Gupta wrote:
> Trace point pvr_job_submit_fw() is used to trace job submission to
> the FW. Currently it is recorded when a command is written to the Client
> circular buffer.
>
> Move trace recording after writing command to the Kernel circular buffer to
> better represent command submission to the FW.
>
> Fixes: c1079aebb4de ("drm/imagination: Add support for trace points")
> Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
>
> Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
Reviewed-by: Alessio Belle <alessio.belle@imgtec.com>
(I'll drop the second Signed-off-by when applying this)
Thanks,
Alessio
> ---
> Changes in v3:
> - Reverted back to v1 version as per issue flagged by AI-bot.
> - v1 version is proper as mentioned in v2 update and correctly mark
> the submission of job to the Firmware.
> - Link to v2: https://lore.kernel.org/r/20260724-b4-tracepoint-fix-v2-1-e6a81a348394@imgtec.com
>
> Changes in v2:
> - Updated safer trace point recording for fragment job to handle
> Sashiko-bot reported possible use-after-free case.
> - Due to depenedency between grometry and fragment jobs, fragment job
> will not be scheduled till geometry is scheduled so even V1 solution is safe.
> - Link to v1: https://lore.kernel.org/r/20260722-b4-tracepoint-fix-v1-1-f75747fa591a@imgtec.com
> ---
> drivers/gpu/drm/imagination/pvr_queue.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
> index 941c017399fc..d13726401d92 100644
> --- a/drivers/gpu/drm/imagination/pvr_queue.c
> +++ b/drivers/gpu/drm/imagination/pvr_queue.c
> @@ -726,8 +726,6 @@ static void pvr_queue_submit_job_to_cccb(struct pvr_job *job)
> cmd->partial_render_geom_frag_fence.value = job->done_fence->seqno - 1;
> }
>
> - trace_pvr_job_submit_fw(job);
> -
> /* Submit job to FW */
> pvr_cccb_write_command_with_header(cccb, job->fw_ccb_cmd_type, job->cmd_len, job->cmd,
> job->id, job->id);
> @@ -802,6 +800,9 @@ static struct dma_fence *pvr_queue_run_job(struct drm_sched_job *sched_job)
> job->hwrt,
> frag_job->fw_ccb_cmd_type ==
> ROGUE_FWIF_CCB_CMD_TYPE_FRAG_PR);
> +
> + trace_pvr_job_submit_fw(geom_job);
> + trace_pvr_job_submit_fw(frag_job);
> } else {
> struct pvr_queue *queue = container_of(job->base.sched,
> struct pvr_queue, scheduler);
> @@ -809,6 +810,8 @@ static struct dma_fence *pvr_queue_run_job(struct drm_sched_job *sched_job)
> pvr_cccb_send_kccb_kick(pvr_dev, &queue->cccb,
> pvr_context_get_fw_addr(job->ctx) + queue->ctx_offset,
> job->hwrt);
> +
> + trace_pvr_job_submit_fw(job);
> }
>
> return dma_fence_get(job->done_fence);
>
> ---
> base-commit: e5320be8a585a9286f231305d0d443d59c24e46c
> change-id: 20260722-b4-tracepoint-fix-0fc961d7023d
>
> Best regards,
next prev parent reply other threads:[~2026-07-28 18:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 14:42 Brajesh Gupta
2026-07-28 18:04 ` Alessio Belle [this message]
2026-07-29 14:56 ` Alessio Belle
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=ce5568dc8bad2c21a172a515dd3813dbf5b99ca3.camel@imgtec.com \
--to=alessio.belle@imgtec.com \
--cc=Alexandru.Dadu@imgtec.com \
--cc=Brajesh.Gupta@imgtec.com \
--cc=Frank.Binns@imgtec.com \
--cc=Luigi.Santivetti@imgtec.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imagination@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=opensource@mtcoster.net \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®