Skip to contentSkip to conversation

drm/mxsfb: Switch to drmm_mode_config_init

PATCH Superseded Marek Vasut 2 participants 2 messages Nov 25, 2023 – Nov 27, 2023

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Marek Vasut

author maintainer
#0 lore raw

PATCH 1/1 drm/mxsfb: 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/mxsfb_drv.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +5 -1
index 3bfa369b2507e..9f746852b8ff2 100644
@@ -248,7 +248,11 @@ static int mxsfb_load(struct drm_device *drm,
 	pm_runtime_enable(drm->dev);
 
 	/* 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");
+		goto err_vblank;
+	}
 
 	ret = mxsfb_kms_init(mxsfb);
 	if (ret < 0) {
Signature · 1 line
2.42.0
#1 lore raw

Hi

Am 25.11.23 um 23:25 schrieb Marek Vasut:

Quoted 27 lines

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/mxsfb_drv.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -0
index 3bfa369b2507e..9f746852b8ff2 100644

drivers/gpu/drm/mxsfb/mxsfb_drv.c static int mxsfb_load(struct drm_device *drm, · line 251

Quoted 4 lines
drivers/gpu/drm/mxsfb/mxsfb_drv.c +0 -1
@@ -248,7 +248,11 @@ static int mxsfb_load(struct drm_device *drm,
  	pm_runtime_enable(drm->dev);
 
  	/* Modeset init */
-	drm_mode_config_init(drm);

The corresponding call to drm_mode_config_cleanup() needs to be removed as well.

Best regards
Thomas

Quoted 8 lines
drivers/gpu/drm/mxsfb/mxsfb_drv.c +5 -0
+	ret = drmm_mode_config_init(drm);
+	if (ret) {
+		dev_err(drm->dev, "Failed to initialize mode config\n");
+		goto err_vblank;
+	}
 
  	ret = mxsfb_kms_init(mxsfb);
  	if (ret < 0) {
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)