mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brajesh Gupta <Brajesh.Gupta@imgtec.com>
To: Matt Coster <Matt.Coster@imgtec.com>
Cc: "tzimmermann@suse.de" <tzimmermann@suse.de>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	Frank Binns <Frank.Binns@imgtec.com>,
	Alessio Belle <Alessio.Belle@imgtec.com>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	Alexandru Dadu <Alexandru.Dadu@imgtec.com>,
	"mripard@kernel.org" <mripard@kernel.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: Tue, 19 May 2026 08:30:06 +0000	[thread overview]
Message-ID: <e4252a9a0f66beba26782dc73d71470dbd0c8d7b.camel@imgtec.com> (raw)
In-Reply-To: <1d579aba-af9a-4d31-889e-9582a362468f@imgtec.com>

On Mon, 2026-05-18 at 15:01 +0000, Matt Coster wrote:
> 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/
> 
Updated

> > 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.
> 
Updated

> > 
> > 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.
> 
Updated

> >   */
> >  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.
> 
Dropped

> 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
> > 
> 
> 
Thanks,
Brajesh

  reply	other threads:[~2026-05-19  8:30 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
2026-05-19  8:30     ` Brajesh Gupta [this message]
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=e4252a9a0f66beba26782dc73d71470dbd0c8d7b.camel@imgtec.com \
    --to=brajesh.gupta@imgtec.com \
    --cc=Alessio.Belle@imgtec.com \
    --cc=Alexandru.Dadu@imgtec.com \
    --cc=Frank.Binns@imgtec.com \
    --cc=Matt.Coster@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®