All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/panfrost: fix stuck reset.pending on JOB_BUS_FAULT
@ 2026-11-19 19:10 ThePedroo
  2026-11-19 19:28 ` sashiko-bot
  0 siblings, 1 reply; 2+ messages in thread
From: ThePedroo @ 2026-11-19 19:10 UTC (permalink / raw)
  To: dri-devel
  Cc: Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
	linux-kernel

From: Pedro Olímpio <pedro@performanc.org>

panfrost_job_handle_err() signals job->done_fence and then calls
drm_sched_fault(), which just queues the scheduler timeout work.
panfrost_job_timedout() bails with DRM_GPU_SCHED_STAT_NO_HANG when it
sees the already-signaled fence:

	if (dma_fence_is_signaled(job->done_fence))
		return DRM_GPU_SCHED_STAT_NO_HANG;

so the reset never runs and reset.pending stays stuck at 1. Every
later job is then enqueued in pfdev->jobs but never started ian
panfrost_job_hw_submit(), until it hits the 500ms timeout.

Queue the existing ordered reset work instead, which runs
panfrost_reset() unconditionally (when pending is set), even though
the fence was already signaled.

Fixes: 030761e097b4 ("drm/panfrost: Queue jobs on the hardware")
Signed-off-by: Pedro Olímpio <pedro@performanc.org>
---
 drivers/gpu/drm/panfrost/panfrost_job.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
index d59b4863b8ad..8c45ffec1107 100644
--- a/drivers/gpu/drm/panfrost/panfrost_job.c
+++ b/drivers/gpu/drm/panfrost/panfrost_job.c
@@ -497,10 +497,8 @@ static void panfrost_job_handle_err(struct panfrost_device *pfdev,
 
 	pm_runtime_put_autosuspend(pfdev->base.dev);
 
-	if (panfrost_exception_needs_reset(pfdev, js_status)) {
-		atomic_set(&pfdev->reset.pending, 1);
-		drm_sched_fault(&pfdev->js->queue[js].sched);
-	}
+	if (panfrost_exception_needs_reset(pfdev, js_status))
+		panfrost_device_schedule_reset(pfdev);
 }
 
 static void panfrost_jm_handle_done(struct panfrost_device *pfdev,
-- 
2.53.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 19:10 [PATCH] drm/panfrost: fix stuck reset.pending on JOB_BUS_FAULT ThePedroo
2026-11-19 19:28 ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.