Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] drm/tilcdc: Fix the driver data used in suspend and resume
@ 2026-12-01  9:10 Màxim Pedraza Padilla
  2026-12-01  9:29 ` Kory Maincent
  0 siblings, 1 reply; 3+ messages in thread
From: Màxim Pedraza Padilla @ 2026-12-01  9:10 UTC (permalink / raw)
  To: Jyri Sarha, Tomi Valkeinen
  Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Luca Ceresoli, Kory Maincent, dri-devel,
	linux-kernel, stable

The probe stores the driver private structure as driver data, but the
suspend and resume callbacks read it back as a struct drm_device. Since
the DRM device is embedded in the private structure, but not at its
start, they pass a wrong pointer to drm_mode_config_helper_suspend() and
drm_mode_config_helper_resume(), and suspend oopses:

  Unable to handle kernel paging request at virtual address 3bd8be0c

Get the private structure and use the DRM device embedded in it.

Fixes: 3301302060da ("drm/tilcdc: Modernize driver initialization and cleanup paths")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Màxim Pedraza Padilla <maximpedraza@gmail.com>
---
 drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
index 1d6c9a423a41..e82cb2686c5f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c
@@ -235,7 +235,8 @@ static const struct drm_driver tilcdc_driver = {
 
 static int tilcdc_pm_suspend(struct device *dev)
 {
-	struct drm_device *ddev = dev_get_drvdata(dev);
+	struct tilcdc_drm_private *priv = dev_get_drvdata(dev);
+	struct drm_device *ddev = &priv->ddev;
 	int ret = 0;
 
 	ret = drm_mode_config_helper_suspend(ddev);
@@ -248,7 +249,8 @@ static int tilcdc_pm_suspend(struct device *dev)
 
 static int tilcdc_pm_resume(struct device *dev)
 {
-	struct drm_device *ddev = dev_get_drvdata(dev);
+	struct tilcdc_drm_private *priv = dev_get_drvdata(dev);
+	struct drm_device *ddev = &priv->ddev;
 
 	/* Select default pin state */
 	pinctrl_pm_select_default_state(dev);

base-commit: 5ce32a0c94a827ff44ee60898c28060714dcff75
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-01  9:10 [PATCH] drm/tilcdc: Fix the driver data used in suspend and resume Màxim Pedraza Padilla
2026-12-01  9:29 ` Kory Maincent
2026-12-01  9:32   ` Màxim Pedraza Padilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox