Re: [PATCH v2 3/8] drm/bridge/synopsys: dsi: defer probing if panel not available in bridge-attach

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

 



Hi Heiko,

On 06/18/2018 12:28 PM, Heiko Stuebner wrote:
> When the panel-driver is build as a module it currently fails hard as the
> panel cannot be probed directly:
> 
> dw_mipi_dsi_bind()
>    __dw_mipi_dsi_probe()
>      creates dsi bus
>      creates panel device
>      triggers panel module load
>      panel not probed (module not loaded or panel probe slow)
>    drm_bridge_attach
>      fails with -EINVAL due to empty panel_bridge
> 
> So emit a -EPROBE_DEFER in that case to give the driver another
> chance at getting the display later.
> 
> Signed-off-by: Heiko Stuebner <heiko@xxxxxxxxx>
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> index bb4aeca5c0f9..bd503f000ed5 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
> @@ -835,6 +835,9 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge)
>   		return -ENODEV;
>   	}
>   
> +	if (!dsi->panel_bridge)
> +		return -EPROBE_DEFER;
> +

Thank you for your patch,

Reviewed-by: Philippe Cornu <philippe.cornu@xxxxxx>
Tested-by: Philippe Cornu <philippe.cornu@xxxxxx>

Philippe :-)

>   	/* Set the encoder type as caller does not know it */
>   	bridge->encoder->encoder_type = DRM_MODE_ENCODER_DSI;
>   
> 
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux