From: Brajesh Gupta <brajesh.gupta@imgtec.com>
To: Frank Binns <frank.binns@imgtec.com>,
Matt Coster <matt.coster@imgtec.com>,
Alessio Belle <alessio.belle@imgtec.com>,
"Alexandru Dadu" <alexandru.dadu@imgtec.com>,
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>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"Brajesh Gupta" <brajesh.gupta@imgtec.com>
Subject: [PATCH 2/4] drm/imagination: Don't timeout job if its fence has been signaled
Date: Tue, 12 May 2026 12:17:04 +0530 [thread overview]
Message-ID: <20260512-b4-context_reset-v1-2-439bee96ed83@imgtec.com> (raw)
In-Reply-To: <20260512-b4-context_reset-v1-0-439bee96ed83@imgtec.com>
Check for job's fence in timedout handler and report NO HANG if its
is signaled
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
*/
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 */
+ 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
next prev parent reply other threads:[~2026-05-12 6:47 UTC|newest]
Thread overview: 5+ 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-12 6:47 ` Brajesh Gupta [this message]
2026-05-12 6:47 ` [PATCH 3/4] drm/imagination: Rename FW booted to FW initialised Brajesh Gupta
2026-05-12 6:47 ` [PATCH 4/4] drm/imagination: Access FW initialised state with READ/WRITE_ONCE 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=20260512-b4-context_reset-v1-2-439bee96ed83@imgtec.com \
--to=brajesh.gupta@imgtec.com \
--cc=airlied@gmail.com \
--cc=alessio.belle@imgtec.com \
--cc=alexandru.dadu@imgtec.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matt.coster@imgtec.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