From: "Adrián Larumbe" <adrian.larumbe@collabora.com>
To: Joshua Crofts <joshua.crofts1@gmail.com>
Cc: Boris Breyillon <boris.brezillon@collabora.com>,
Rob Herring <robh@kernel.org>,
Steven Price <steven.price@arm.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Dave Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/panfrost: add missing pm_runtime_dont_use_autosuspend() calls
Date: Mon, 2 Nov 2026 18:58:45 +0000 [thread overview]
Message-ID: <aujdLAyik6MT6TxN@sobremesa> (raw)
In-Reply-To: <20260916075051.1353-1-joshua.crofts1@gmail.com>
Hi Joshua, thanks for the patch.
However, a fix for the same issue had been in the making for some time. It's already been upstreamed:
e9672bf9382f ("drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove")
Kind Regards,
Adrian
On 16.09.2026 07:50, Joshua Crofts wrote:
> panfrost_remove() and panfrost_probe() disable PM runtime on teardown or
> failure but don't call the pm_runtime_dont_use_autosuspend() function,
> causing potential resource leaks.
>
> Add the missing function calls.
>
> Found using Coccinelle.
>
> Fixes: 5c0c825ae4c6 ("drm/panfrost: Replace DRM driver allocation method with newer one")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 36cc2e67a308..74e8e5783f9b 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);
> pm_runtime_disable(pfdev->base.dev);
> panfrost_device_fini(pfdev);
> pm_runtime_set_suspended(pfdev->base.dev);
> @@ -1027,6 +1028,7 @@ static void panfrost_remove(struct platform_device *pdev)
> panfrost_gem_shrinker_cleanup(&pfdev->base);
>
> pm_runtime_get_sync(pfdev->base.dev);
> + pm_runtime_dont_use_autosuspend(pfdev->base.dev);
> pm_runtime_disable(pfdev->base.dev);
> panfrost_device_fini(pfdev);
> pm_runtime_set_suspended(pfdev->base.dev);
> --
> 2.47.3
prev parent reply other threads:[~2026-11-02 18:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 7:50 Joshua Crofts
2026-09-16 9:27 ` Johan Hovold
2026-11-02 18:58 ` Adrián Larumbe [this message]
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=aujdLAyik6MT6TxN@sobremesa \
--to=adrian.larumbe@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=joshua.crofts1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=steven.price@arm.com \
--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®