[PATCHv2 26/31] drm/omap: Create fbdev emulation only for the first DRM connector

Daniel Vetter daniel at ffwll.ch
Sat Mar 25 21:22:38 UTC 2017


On Fri, Mar 24, 2017 at 11:40:47AM +0200, Tomi Valkeinen wrote:
> From: Peter Ujfalusi <peter.ujfalusi at ti.com>
> 
> Add fbdev emulation only for the first DRM connector.
> When the fbdev emulation was created for all connectors with different
> resolution, the lower res display would only be able to show part of the
> framebuffer.
> By creating the fbdev emulation only for the first connector we can avoid
> this.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at ti.com>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at ti.com>

Why this driver-specific behavior? This is how it works everywhere.

If this doesn't work in some case, then we need to fix this in the fbdev
helper. Or have a modparam for that. But definitely not diverging
behaviour between drivers.
-Daniel

> ---
>  drivers/gpu/drm/omapdrm/omap_fbdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index 73619e201c0c..58c0c5bccc8c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -269,7 +269,9 @@ struct drm_fb_helper *omap_fbdev_init(struct drm_device *dev)
>  		goto fail;
>  	}
>  
> -	ret = drm_fb_helper_single_add_all_connectors(helper);
> +	drm_modeset_lock_all(dev);
> +	ret = drm_fb_helper_add_one_connector(helper, priv->connectors[0]);
> +	drm_modeset_unlock_all(dev);
>  	if (ret)
>  		goto fini;
>  
> -- 
> 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