From: Denis Arefev <arefev@swemel.ru>
To: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Cc: "Lucas Stach" <l.stach@pengutronix.de>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>, "Frank Li" <Frank.Li@nxp.com>,
"Sascha Hauer" <s.hauer@pengutronix.de>,
"Pengutronix Kernel Team" <kernel@pengutronix.de>,
"Fabio Estevam" <festevam@gmail.com>,
"Guido Günther" <agx@sigxcpu.org>,
dri-devel@lists.freedesktop.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org,
stable@vger.kernel.org
Subject: [PATCH] drm: imx-dcss: Check return value of drm_mode_config_helper_suspend()
Date: Thu, 19 Nov 2026 14:30:29 +0300 [thread overview]
Message-ID: <20261119113031.36945-1-arefev@swemel.ru> (raw)
dcss_dev_suspend() ignores the return value of
drm_mode_config_helper_suspend(). On failure that helper rolls back its
partial work (re-enables fbdev and polling) and leaves
mode_config.suspend_state unset, i.e. the DRM side is not suspended.
Continuing to suspend the context loader and disable the clocks then
leaves the device in an inconsistent state.
Check the return value and propagate the error to the PM core, as the
other DRM drivers calling this helper do.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Arefev <arefev@swemel.ru>
---
drivers/gpu/drm/imx/dcss/dcss-dev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/imx/dcss/dcss-dev.c b/drivers/gpu/drm/imx/dcss/dcss-dev.c
index 45a91e43bab1..0b12ce2498f0 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-dev.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-dev.c
@@ -253,7 +253,9 @@ static int dcss_dev_suspend(struct device *dev)
struct drm_device *ddev = dcss_drv_dev_to_drm(dev);
int ret;
- drm_mode_config_helper_suspend(ddev);
+ ret = drm_mode_config_helper_suspend(ddev);
+ if (ret)
+ return ret;
if (pm_runtime_suspended(dev))
return 0;
--
2.43.0
next reply other threads:[~2026-11-19 11:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 11:30 Denis Arefev [this message]
2026-11-25 8:28 ` Laurentiu Palcu
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=20261119113031.36945-1-arefev@swemel.ru \
--to=arefev@swemel.ru \
--cc=Frank.Li@nxp.com \
--cc=agx@sigxcpu.org \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--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®