From: Matt Coster <Matt.Coster@imgtec.com>
To: Brajesh Gupta <Brajesh.Gupta@imgtec.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Frank Binns <Frank.Binns@imgtec.com>,
Alessio Belle <Alessio.Belle@imgtec.com>,
Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] drm/imagination: Don't timeout job if its fence has been signaled
Date: Mon, 18 May 2026 15:01:52 +0000 [thread overview]
Message-ID: <1d579aba-af9a-4d31-889e-9582a362468f@imgtec.com> (raw)
In-Reply-To: <20260512-b4-context_reset-v1-2-439bee96ed83@imgtec.com>
[-- Attachment #1.1: Type: text/plain, Size: 2215 bytes --]
Hi Brajesh,
On 12/05/2026 07:47, Brajesh Gupta wrote:
> Check for job's fence in timedout handler and report NO HANG if its
Nit: s/its/it/
> is signaled
This could use more explanation: _why_ is returning NO_HANG in this
instance the correct behaviour? See the kernel docs section "Describe
your changes"[1] for inspiration.
>
> Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com>
> ---
> drivers/gpu/drm/imagination/pvr_queue.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/imagination/pvr_queue.c b/drivers/gpu/drm/imagination/pvr_queue.c
> index d10a13173f0f..073478919b22 100644
> --- a/drivers/gpu/drm/imagination/pvr_queue.c
> +++ b/drivers/gpu/drm/imagination/pvr_queue.c
> @@ -851,7 +851,8 @@ static void pvr_queue_start(struct pvr_queue *queue)
> * the scheduler, and re-assign parent fences in the middle.
> *
> * Return:
> - * * DRM_GPU_SCHED_STAT_RESET.
> + * * Fence signaled : DRM_GPU_SCHED_STAT_NO_HANG
> + * * otherwise : DRM_GPU_SCHED_STAT_RESET
The formatting here is off (and won't render nicely in the docs). I
believe it should be something like:
* Return:
* * %DRM_GPU_SCHED_STAT_NO_HANG if the job fence has already been
* signaled, or
* * %DRM_gPU_SCHED_STAT_RESET otherwise.
> */
> static enum drm_gpu_sched_stat
> pvr_queue_timedout_job(struct drm_sched_job *s_job)
> @@ -862,6 +863,10 @@ pvr_queue_timedout_job(struct drm_sched_job *s_job)
> struct pvr_job *job;
> u32 job_count = 0;
>
> + /* If fence is already signaled then return no hang */
I don't think this comment really adds anything, the function name and
return value are fairly descriptive already.
Cheers,
Matt
[1]: https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-your-changes
> + if (dma_fence_is_signaled(s_job->s_fence->parent))
> + return DRM_GPU_SCHED_STAT_NO_HANG;
> +
> dev_err(sched->dev, "Job timeout\n");
>
> /* Before we stop the scheduler, make sure the queue is out of any list, so
>
> --
> 2.43.0
>
--
Matt Coster
E: matt.coster@imgtec.com
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2026-05-18 15:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 6:47 [PATCH 0/4] drm/imagination: Multiple enhancement Brajesh Gupta
2026-05-12 6:47 ` [PATCH 1/4] drm/imagination: Populate FW common context ID before passing to the FW Brajesh Gupta
2026-05-18 15:01 ` Matt Coster
2026-05-19 8:27 ` Brajesh Gupta
2026-05-12 6:47 ` [PATCH 2/4] drm/imagination: Don't timeout job if its fence has been signaled Brajesh Gupta
2026-05-18 15:01 ` Matt Coster [this message]
2026-05-19 8:30 ` Brajesh Gupta
2026-05-12 6:47 ` [PATCH 3/4] drm/imagination: Rename FW booted to FW initialised Brajesh Gupta
2026-05-18 15:01 ` Matt Coster
2026-05-19 8:31 ` Brajesh Gupta
2026-05-12 6:47 ` [PATCH 4/4] drm/imagination: Access FW initialised state with READ/WRITE_ONCE Brajesh Gupta
2026-05-18 15:02 ` Matt Coster
2026-05-19 8:35 ` Brajesh Gupta
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=1d579aba-af9a-4d31-889e-9582a362468f@imgtec.com \
--to=matt.coster@imgtec.com \
--cc=Alessio.Belle@imgtec.com \
--cc=Alexandru.Dadu@imgtec.com \
--cc=Brajesh.Gupta@imgtec.com \
--cc=Frank.Binns@imgtec.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--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®