Re: [PATCH v1 1/3] drm/stm: ltdc: Add bridge support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Philippe CORNU <philippe.cornu@xxxxxx> writes:

> Add the bridge support, used by DSI host and HDMI/LVDS bridges.
>
> Signed-off-by: Philippe CORNU <philippe.cornu@xxxxxx>

> @@ -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


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux