From: sashiko-bot@kernel.org
To: "Joshua Crofts" <joshua.crofts1@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/panfrost: add missing pm_runtime_dont_use_autosuspend() calls
Date: Wed, 16 Sep 2026 08:01:36 +0000 [thread overview]
Message-ID: <20260916080136.849081F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260916075051.1353-1-joshua.crofts1@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/panfrost: fatal SError crash in probe error path due to synchronous suspend
--
commit 0a02f30e746f195b71331259b1584b0eadbe399f
Author: Joshua Crofts <joshua.crofts1@gmail.com>
drm/panfrost: add missing pm_runtime_dont_use_autosuspend() calls
This commit adds missing pm_runtime_dont_use_autosuspend() calls in
panfrost_remove() and panfrost_probe() to prevent potential resource leaks
on teardown or failure.
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 96a66d673ba60..67652f6c8647d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -1012,6 +1012,7 @@ static int panfrost_probe(struct platform_device *pdev)
> err_out2:
> drm_dev_unregister(&pfdev->base);
> err_out1:
> + pm_runtime_dont_use_autosuspend(pfdev->base.dev);
[Severity: High]
Does calling pm_runtime_dont_use_autosuspend() here cause a synchronous
suspend of the hardware?
Since pm_runtime_get_sync() wasn't called in this error path (unlike in
panfrost_remove()), the usage count is 0. Clearing the autosuspend flag
triggers a synchronous rpm_idle(), which executes the runtime suspend
callback and disables the GPU clocks and power domains.
Right after this, panfrost_device_fini() is called, which touches MMIO
registers when attempting to power off the GPU:
panfrost_probe() ->
err_out1:
pm_runtime_dont_use_autosuspend()
...
panfrost_device_fini() ->
panfrost_gpu_fini() ->
panfrost_gpu_power_off()
Will accessing these MMIO registers while the device clocks are disabled
trigger a bus abort (SError) and cause a kernel panic?
Would it be safer to call pm_runtime_get_sync() before
pm_runtime_dont_use_autosuspend() in this error path, similar to how it is
handled in panfrost_remove(), or perhaps move the call after
pm_runtime_disable()?
> pm_runtime_disable(pfdev->base.dev);
> panfrost_device_fini(pfdev);
> pm_runtime_set_suspended(pfdev->base.dev);
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916075051.1353-1-joshua.crofts1@gmail.com?part=1
next prev parent reply other threads:[~2026-09-16 8:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 7:50 [PATCH] drm/panfrost: add missing pm_runtime_dont_use_autosuspend() calls Joshua Crofts
2026-09-16 8:01 ` sashiko-bot [this message]
2026-09-16 9:27 ` Johan Hovold
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=20260916080136.849081F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=joshua.crofts1@gmail.com \
--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.