[PATCH v2] drm/mxsfb: Switch to drmm_mode_config_init

Thomas Zimmermann tzimmermann at suse.de
Tue Nov 28 07:53:10 UTC 2023



Am 27.11.23 um 22:25 schrieb Marek Vasut:
> Switch from deprecated unmanaged drm_mode_config_init() to
> managed drmm_mode_config_init(). No functional change.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: David Airlie <airlied at gmail.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Maxime Ripard <mripard at kernel.org>
> Cc: NXP Linux Team <linux-imx at nxp.com>
> Cc: Pengutronix Kernel Team <kernel at pengutronix.de>
> Cc: Sascha Hauer <s.hauer at pengutronix.de>
> Cc: Shawn Guo <shawnguo at kernel.org>
> Cc: Stefan Agner <stefan at agner.ch>
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: dri-devel at lists.freedesktop.org
> Cc: linux-arm-kernel at lists.infradead.org

Acked-by: Thomas Zimmermann <tzimmermann at suse.de>

> ---
> V2: Drop matching drm_mode_config_cleanup
> ---
>   drivers/gpu/drm/mxsfb/mxsfb_drv.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 3bfa369b2507e..cfa3176ebe2c2 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -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) {
> @@ -311,7 +315,6 @@ static int mxsfb_load(struct drm_device *drm,
>   static void mxsfb_unload(struct drm_device *drm)
>   {
>   	drm_kms_helper_poll_fini(drm);
> -	drm_mode_config_cleanup(drm);
>   
>   	pm_runtime_get_sync(drm->dev);
>   	mxsfb_irq_uninstall(drm);

-- 
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20231128/0eb5b454/attachment-0001.sig>


More information about the dri-devel mailing list