[PATCH v2 5/7] drm/ltdc: Use the panel-bridge helper.

Boris Brezillon boris.brezillon at free-electrons.com
Fri May 12 08:17:46 UTC 2017


On Thu, 11 May 2017 11:31:26 -0700
Eric Anholt <eric at anholt.net> wrote:

> Another 100 lines of boilerplate gone.  Bridges aren't supported yet,
> but will be trivial to add later.
> 
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
> 

[...]

> @@ -1082,28 +993,13 @@ int ltdc_load(struct drm_device *ddev)
>  
>  	DRM_INFO("ltdc hw version 0x%08x - ready\n", ldev->caps.hw_version);
>  
> -	if (ldev->panel) {
> +	if (ldev->bridge) {
>  		encoder = ltdc_rgb_encoder_create(ddev);
>  		if (!encoder) {
>  			DRM_ERROR("Failed to create RGB encoder\n");
>  			ret = -EINVAL;
>  			goto err;
>  		}

You should have a call to drm_bridge_attach() somewhere, otherwise your
panel (and its connector) will not be registered.

> -
> -		connector = ltdc_rgb_connector_create(ddev);
> -		if (!connector) {
> -			DRM_ERROR("Failed to create RGB connector\n");
> -			ret = -EINVAL;
> -			goto err;
> -		}
> -
> -		ret = drm_mode_connector_attach_encoder(connector, encoder);
> -		if (ret) {
> -			DRM_ERROR("Failed to attach connector to encoder\n");
> -			goto err;
> -		}
> -
> -		drm_panel_attach(ldev->panel, connector);
>  	}
>  



More information about the dri-devel mailing list