Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Wentao Liang <vulab@iscas.ac.cn>
To: airlied@gmail.com
Cc: alexandre.torgue@foss.st.com, benjamin.gaignard@linaro.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	maarten.lankhorst@linux.intel.com, mcoquelin.stm32@gmail.com,
	mripard@kernel.org, philippe.cornu@foss.st.com,
	raphael.gallais-pou@foss.st.com, simona@ffwll.ch,
	tzimmermann@suse.de, yannick.fertre@foss.st.com,
	yannick.fertre@st.com, Wentao Liang <vulab@iscas.ac.cn>,
	stable@vger.kernel.org
Subject: [PATCH] drm/stm: Fix runtime PM leak in ltdc_crtc_mode_set_nofb()
Date: Wed, 16 Sep 2026 18:21:59 +0000	[thread overview]
Message-ID: <20260916182159.2091530-1-vulab@iscas.ac.cn> (raw)

pm_runtime_get_sync() increments the usage counter even when it fails,
so the early return on a failed resume leaves the counter elevated
forever.  Drop it again with pm_runtime_put_noidle() on that path.

Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/gpu/drm/stm/ltdc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index f7e847cfa38f..a95ca3c3df76 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -945,6 +945,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
 		ret = pm_runtime_get_sync(ddev->dev);
 		if (ret) {
 			drm_err(crtc->dev, "Failed to set mode, cannot get sync\n");
+			pm_runtime_put_noidle(ddev->dev);
 			return;
 		}
 	}
-- 
2.34.1



                 reply	other threads:[~2026-09-16 18:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260916182159.2091530-1-vulab@iscas.ac.cn \
    --to=vulab@iscas.ac.cn \
    --cc=airlied@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mripard@kernel.org \
    --cc=philippe.cornu@foss.st.com \
    --cc=raphael.gallais-pou@foss.st.com \
    --cc=simona@ffwll.ch \
    --cc=stable@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=yannick.fertre@foss.st.com \
    --cc=yannick.fertre@st.com \
    /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