From: Liviu Dudau <liviu.dudau@arm.com>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, simona@ffwll.ch, tzimmermann@suse.de,
stable@vger.kernel.org
Subject: Re: [PATCH] drm/mali-dp: Fix runtime PM leak in malidp_crtc_atomic_enable()
Date: Wed, 16 Sep 2026 13:47:22 +0100 [thread overview]
Message-ID: <aqqP2ruyA6jSsIIy@e142607> (raw)
In-Reply-To: <20260916102112.2018372-1-vulab@iscas.ac.cn>
On Wed, Sep 16, 2026 at 10:21:12AM +0000, Wentao Liang wrote:
> malidp_crtc_atomic_enable() resumes the device with
> pm_runtime_get_sync() and returns early when the resume fails. The
> runtime PM usage count is incremented by pm_runtime_get_sync() even
> when the resume fails, so returning without dropping the reference
> leaks it and, once the error has been hit, prevents the device from
> ever suspending again.
>
> Drop the runtime PM reference with pm_runtime_put_noidle() on the
> resume failure path before returning.
>
> Fixes: 85f6421889ec ("drm: mali-dp: Enable power management for the device.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
I will push the patch to drm-misc-fixes.
Best regards,
Liviu
> ---
> drivers/gpu/drm/arm/malidp_crtc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
> index 18e6157b1047..a2c6e536c55d 100644
> --- a/drivers/gpu/drm/arm/malidp_crtc.c
> +++ b/drivers/gpu/drm/arm/malidp_crtc.c
> @@ -56,6 +56,7 @@ static void malidp_crtc_atomic_enable(struct drm_crtc *crtc,
>
> if (err < 0) {
> DRM_DEBUG_DRIVER("Failed to enable runtime power management: %d\n", err);
> + pm_runtime_put_noidle(crtc->dev->dev);
> return;
> }
>
> --
> 2.34.1
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
prev parent reply other threads:[~2026-09-16 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 10:21 Wentao Liang
2026-09-16 12:47 ` Liviu Dudau [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=aqqP2ruyA6jSsIIy@e142607 \
--to=liviu.dudau@arm.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=tzimmermann@suse.de \
--cc=vulab@iscas.ac.cn \
/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®