mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 v2 2/4] drm/imagination: Don't timeout job if its fence has been signaled
Date: Tue, 19 May 2026 13:55:27 +0530	[thread overview]
Message-ID: <20260519-b4-context_reset-v2-2-931018a7131d@imgtec.com> (raw)
In-Reply-To: <20260519-b4-context_reset-v2-0-931018a7131d@imgtec.com>

Verify the job’s fence in the timeout handler; if the firmware has since
signaled completion, then report NO HANG.

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..822e6259674f 100644
--- a/drivers/gpu/drm/imagination/pvr_queue.c
+++ b/drivers/gpu/drm/imagination/pvr_queue.c
@@ -851,7 +851,9 @@ 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.
+ *  *%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 +864,9 @@ pvr_queue_timedout_job(struct drm_sched_job *s_job)
 	struct pvr_job *job;
 	u32 job_count = 0;
 
+	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


  parent reply	other threads:[~2026-05-19  8:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19  8:25 [PATCH v2 0/4] drm/imagination: Multiple enhancement Brajesh Gupta
2026-05-19  8:25 ` [PATCH v2 1/4] drm/imagination: Populate FW common context ID before passing to the FW Brajesh Gupta
2026-05-19  8:25 ` Brajesh Gupta [this message]
2026-05-19  8:25 ` [PATCH v2 3/4] drm/imagination: Rename FW booted to FW initialised Brajesh Gupta
2026-05-19 13:16   ` Javier Martinez Canillas
2026-05-19 15:08     ` [EXTERNAL] " Brajesh Gupta
2026-05-19  8:25 ` [PATCH v2 4/4] drm/imagination: Access FW initialised state with READ/WRITE_ONCE Brajesh Gupta
2026-05-19 11:32 ` [PATCH v2 0/4] drm/imagination: Multiple enhancement Matt Coster
2026-05-19 12:03 ` Matt Coster

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=20260519-b4-context_reset-v2-2-931018a7131d@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

all inboxes | Powered by JetHome®