All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arun Iyengar" <aiyengar1990@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/7] drm/panfrost: Don't resume a soft-stopped job after a GPU reset
Date: Tue, 10 Nov 2026 07:58:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-206548@kernel.org> (raw)
In-Reply-To: <20261110-panfrost-long-jobs-v1-4-24508939ae8d@gmail.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Critical] drm/panfrost: missing PM runtime reference in
  panfrost_reset_work() [1]
--

commit 8ce48d8d6cacef2958a594210836f127d449cef8
Author: Arun Iyengar <aiyengar1990@gmail.com>

drm/panfrost: Don't resume a soft-stopped job after a GPU reset

This commit tracks GPU resets and fails soft-stopped jobs with -ECANCELED in
panfrost_job_run() if a GPU reset occurred after the job was stopped.

> diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c
> index 3a46dd61cf87f..e1f3e5d717976 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_job.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_job.c

[ ... ]

> @@ -728,6 +741,7 @@ panfrost_reset(struct panfrost_device *pfdev,
>  			panfrost_devfreq_record_idle(&pfdev->pfdevfreq);
>  		}
>  	}
> +	pfdev->reset.count++;
>  	memset(pfdev->jobs, 0, sizeof(pfdev->jobs));
>  	spin_unlock(&pfdev->js->job_lock);

[Severity: Critical]
This problem wasn't introduced by this patch, but can panfrost_reset() access
hardware registers while the GPU is runtime suspended [1]?

Between panfrost_device_schedule_reset() queueing reset.work and the
workqueue executing panfrost_reset_work(), the active context can complete
and drop its runtime PM reference, allowing the GPU to suspend and gate its
clocks and power domains.  panfrost_reset_work() then calls panfrost_reset()
without holding a runtime PM reference:

drivers/gpu/drm/panfrost/panfrost_job.c:panfrost_reset_work() {
	struct panfrost_device *pfdev;

	pfdev = container_of(work, struct panfrost_device, reset.work);
	panfrost_reset(pfdev, NULL);
}

When panfrost_reset() writes to MMIO registers such as JOB_INT_MASK on the
powered-down device, it triggers a synchronous external abort.

[1] https://sashiko.dev/#/bug/linux-57c30678-e800-4756-b926-145408a6717d

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110-panfrost-long-jobs-v1-0-24508939ae8d@gmail.com?part=4

  reply	other threads:[~2026-11-10  7:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  7:44 [PATCH 0/7] drm/panfrost: Resume long jobs instead of resetting, and mapping error path fixes Arun Iyengar
2026-11-10  7:44 ` Arun Iyengar via B4 Relay
2026-11-10  7:44 ` [PATCH 1/7] drm/panfrost: Don't WARN when a GEM mapping cannot get its pages Arun Iyengar
2026-11-10  7:44   ` Arun Iyengar via B4 Relay
2026-11-10  7:44 ` [PATCH 2/7] drm/panfrost: Unwind a failed GPU mapping without dropping " Arun Iyengar
2026-11-10  7:44   ` Arun Iyengar via B4 Relay
2026-11-10  7:44 ` [PATCH 3/7] drm/panfrost: Give back the pages of a heap chunk that failed to map Arun Iyengar via B4 Relay
2026-11-10  7:44   ` Arun Iyengar
2026-11-10  8:03   ` sashiko-bot
2026-11-10  7:44 ` [PATCH 4/7] drm/panfrost: Don't resume a soft-stopped job after a GPU reset Arun Iyengar
2026-11-10  7:44   ` Arun Iyengar via B4 Relay
2026-11-10  7:58   ` sashiko-bot [this message]
2026-11-10  7:45 ` [PATCH 5/7] drm/panfrost: Wait for the soft-stopped slots with the live slot status Arun Iyengar via B4 Relay
2026-11-10  7:45   ` Arun Iyengar
2026-11-10  7:45 ` [PATCH 6/7] drm/panfrost: Soft-stop and resume a job that outlives the timeout Arun Iyengar
2026-11-10  7:45   ` Arun Iyengar via B4 Relay
2026-11-10  8:14   ` sashiko-bot
2026-11-10  7:45 ` [PATCH 7/7] drm/panfrost: Name the BOs around an unhandled page fault Arun Iyengar
2026-11-10  7:45   ` Arun Iyengar via B4 Relay
2026-11-10  8:10   ` sashiko-bot

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=sashiko-outbox-206548@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=aiyengar1990@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 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.