[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <21719805-0c85-45e4-be33-c9d3851ebf1d@imgtec.com>
Date: Fri, 16 Jan 2026 10:03:55 +0000
From: Matt Coster <Matt.Coster@...tec.com>
To: Brajesh Gupta <Brajesh.Gupta@...tec.com>
CC: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard
<mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie
<airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Frank Binns
<Frank.Binns@...tec.com>,
Alessio Belle <Alessio.Belle@...tec.com>,
Alexandru
Dadu <Alexandru.Dadu@...tec.com>,
"dri-devel@...ts.freedesktop.org"
<dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/imagination: Wait for FW trace update command
completion
On 08/01/2026 04:09, Brajesh Gupta wrote:
> Possibility of no FW trace available after update in the fw_trace_mask due
> to asynchronous mode of command consumption in the FW.
>
> To ensure FW trace is available after update, wait for FW trace log update
> command completion from the FW.
>
> Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support")
> Signed-off-by: Brajesh Gupta <brajesh.gupta@...tec.com>
Reviewed-by: Matt Coster <matt.coster@...tec.com>
I'll apply this to drm-misc-fixes later today if there are no
objections.
Cheers,
Matt
> ---
> drivers/gpu/drm/imagination/pvr_fw_trace.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
> index 8a56952f6730..99d681413eff 100644
> --- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
> +++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
> @@ -137,6 +137,7 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
> struct rogue_fwif_kccb_cmd cmd;
> int idx;
> int err;
> + int slot;
>
> if (group_mask)
> fw_trace->tracebuf_ctrl->log_type = ROGUE_FWIF_LOG_TYPE_TRACE | group_mask;
> @@ -154,8 +155,13 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
> cmd.cmd_type = ROGUE_FWIF_KCCB_CMD_LOGTYPE_UPDATE;
> cmd.kccb_flags = 0;
>
> - err = pvr_kccb_send_cmd(pvr_dev, &cmd, NULL);
> + err = pvr_kccb_send_cmd(pvr_dev, &cmd, &slot);
> + if (err)
> + goto err_drm_dev_exit;
> +
> + err = pvr_kccb_wait_for_completion(pvr_dev, slot, HZ, NULL);
>
> +err_drm_dev_exit:
> drm_dev_exit(idx);
>
> err_up_read:
> --
> 2.43.0
>
--
Matt Coster
E: matt.coster@...tec.com
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists