[PATCH 1/7] drm/gma500: Use managed drmm_mode_config_init()
Patrik Jakobsson
patrik.r.jakobsson at gmail.com
Tue Mar 22 22:42:29 UTC 2022
On Tue, Mar 22, 2022 at 8:32 PM Thomas Zimmermann <tzimmermann at suse.de> wrote:
>
>
>
> Am 22.03.22 um 20:30 schrieb Thomas Zimmermann:
> > Hi Patrik
> >
> > Am 22.03.22 um 14:17 schrieb Patrik Jakobsson:
> >> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson at gmail.com>
> >> ---
> >> drivers/gpu/drm/gma500/framebuffer.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/gma500/framebuffer.c
> >> b/drivers/gpu/drm/gma500/framebuffer.c
> >> index 45df9de22007..2b99c996fdc2 100644
> >> --- a/drivers/gpu/drm/gma500/framebuffer.c
> >> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> >> @@ -514,7 +514,8 @@ void psb_modeset_init(struct drm_device *dev)
> >> struct pci_dev *pdev = to_pci_dev(dev->dev);
> >> int i;
> >> - drm_mode_config_init(dev);
> >> + if (drmm_mode_config_init(dev))
> >> + return;
> >
> > This will fail without any notice. I suggest to return an error here or
> > at let psb_driver_load() fail.
>
> 'and let psb_driver_load() fail'
Hi Thomas,
I did consider it but there are more places where psb_driver_load()
can fail so I think it deserves its own patch.
I'll send a follow-up.
-Patrik
>
> >
> > Best regards
> > Thomas
> >
> >> dev->mode_config.min_width = 0;
> >> dev->mode_config.min_height = 0;
> >> @@ -546,6 +547,5 @@ void psb_modeset_cleanup(struct drm_device *dev)
> >> if (dev_priv->modeset) {
> >> drm_kms_helper_poll_fini(dev);
> >> psb_fbdev_fini(dev);
> >> - drm_mode_config_cleanup(dev);
> >> }
> >> }
> >
>
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev
More information about the dri-devel
mailing list