Philippe CORNU <[email protected]> writes:

> Add the bridge support, used by DSI host and HDMI/LVDS bridges.
>
> Signed-off-by: Philippe CORNU <[email protected]>

> @@ -987,19 +1024,36 @@ static struct drm_panel *ltdc_get_panel(struct 
> drm_device *ddev)
>  
>               port = of_graph_get_remote_port_parent(entity);
>               if (port) {
> +                     struct drm_bridge *bridge;
> +                     struct drm_panel *panel;
> +
> +                     bridge = of_drm_find_bridge(port);
>                       panel = of_drm_find_panel(port);
> -                     of_node_put(port);
> +                     if (!bridge && !panel) {
> +                             of_node_put(entity);
> +                             return -EPROBE_DEFER;
> +                     }
> +
> +                     if (bridge) {
> +                             if (!ldev->bridge) {
> +                                     ldev->bridge = bridge;
> +                                     DRM_INFO("remote bridge %s\n",
> +                                              port->full_name);
> +                             }
> +                     }
> +
>                       if (panel) {
> -                             DRM_DEBUG_DRIVER("remote panel %s\n",
> +                             if (!ldev->panel) {
> +                                     ldev->panel = panel;
> +                                     DRM_INFO("remote panel %s\n",
>                                                port->full_name);
> -                     } else {
> -                             DRM_DEBUG_DRIVER("panel missing\n");
> -                             of_node_put(entity);
> +                             }
>                       }
> +                     of_node_put(port);

Is it possible to use drm_of_find_panel_or_bridge() instead?  I don't
think it makes sense to have both a bridge and a panel for the same
node, does it?

Attachment: signature.asc
Description: PGP signature

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to