Skip to contentSkip to conversation

drm: lcdif: Switch to drmm_mode_config_init

PATCH In review Marek Vasut 2 participants 2 messages Nov 27, 2023 – Nov 28, 2023

Subsystems (4)
lore
Share & tools
lore

Marek Vasut

author maintainer
#0 lore raw

PATCH 1/1 drm: lcdif: Switch to drmm_mode_config_init

Switch from deprecated unmanaged drm_mode_config_init() to managed drmm_mode_config_init(). No functional change.

---
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected]

---
 drivers/gpu/drm/mxsfb/lcdif_drv.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_drv.c +5 -2
index 18de2f17e2491..ea10bf81582e9 100644
@@ -167,7 +167,11 @@ static int lcdif_load(struct drm_device *drm)
 		return ret;
 
 	/* Modeset init */
-	drm_mode_config_init(drm);
+	ret = drmm_mode_config_init(drm);
+	if (ret) {
+		dev_err(drm->dev, "Failed to initialize mode config\n");
+		return ret;
+	}
 
 	ret = lcdif_kms_init(lcdif);
 	if (ret < 0) {
@@ -227,7 +231,6 @@ static void lcdif_unload(struct drm_device *drm)
 	drm_crtc_vblank_off(&lcdif->crtc);
 
 	drm_kms_helper_poll_fini(drm);
-	drm_mode_config_cleanup(drm);
 
 	pm_runtime_put_sync(drm->dev);
 	pm_runtime_disable(drm->dev);
Signature · 1 line
2.42.0
maintainer Acked-by on v1 1/1
#1 lore raw

Am 27.11.23 um 22:26 schrieb Marek Vasut:

Quoted 4 lines

Switch from deprecated unmanaged drm_mode_config_init() to managed drmm_mode_config_init(). No functional change.

Quoted 14 lines

---
Cc: Daniel Vetter <[email protected]>
Cc: David Airlie <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: NXP Linux Team <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected]

Quoted 29 lines
---
  drivers/gpu/drm/mxsfb/lcdif_drv.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/mxsfb/lcdif_drv.c +5 -2
index 18de2f17e2491..ea10bf81582e9 100644
@@ -167,7 +167,11 @@ static int lcdif_load(struct drm_device *drm)
  		return ret;
 
  	/* Modeset init */
-	drm_mode_config_init(drm);
+	ret = drmm_mode_config_init(drm);
+	if (ret) {
+		dev_err(drm->dev, "Failed to initialize mode config\n");
+		return ret;
+	}
 
  	ret = lcdif_kms_init(lcdif);
  	if (ret < 0) {
@@ -227,7 +231,6 @@ static void lcdif_unload(struct drm_device *drm)
  	drm_crtc_vblank_off(&lcdif->crtc);
 
  	drm_kms_helper_poll_fini(drm);
-	drm_mode_config_cleanup(drm);
 
  	pm_runtime_put_sync(drm->dev);
  	pm_runtime_disable(drm->dev);
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)