[PATCHv2 06/31] drm/omap: Init fbdev emulation only when we have displays
Daniel Vetter
daniel at ffwll.ch
Sat Mar 25 21:23:22 UTC 2017
On Fri, Mar 24, 2017 at 11:40:27AM +0200, Tomi Valkeinen wrote:
> From: Peter Ujfalusi <peter.ujfalusi at ti.com>
>
> Do not try to init the fbdev if either num_crtcs or num_connectors is 0.
> In this case we do not have display so the fbdev init would fail anyways.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>
Should be made obselete by Thierry's delayed fbdev setup series. Please
help get that one landed instead.
-Daniel
> ---
> drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 4e89dd537862..73619e201c0c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -250,6 +250,9 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
> struct drm_fb_helper *helper;
> int ret = 0;
>
> + if (!priv->num_crtcs || !priv->num_connectors)
> + return NULL;
> +
> fbdev = kzalloc(sizeof(*fbdev), GFP_KERNEL);
> if (!fbdev)
> goto fail;
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dri-devel
mailing list