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

From: Boris Brezillon
Date: Fri May 12 2017 - 04:18:06 EST


On Thu, 11 May 2017 11:31:26 -0700
Eric Anholt <eric@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
>

[...]

> @@ -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);
> }
>