Subject: Re: [PATCH 6/7] drm/mediatek: mtk_dsi: Use the drm_panel_bridge API

From: Sam Ravnborg <[email-masked]>
Date: Sun, 12 Apr 2020 21:52:53 +0200

Hi Enric.

Just a "drive-by" comment.
I browsed all the patches - and nothing jumped at me.
But then I did not follow all the changes.

> @@ -1202,10 +1055,19 @@ static int mtk_dsi_probe(struct platform_device *pdev)
>  	}
>  
>  	ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0,
> -					  &dsi->panel, &dsi->next_bridge);
> +					  &panel, &dsi->next_bridge);
>  	if (ret)
>  		goto err_unregister_host;
>  
> +	if (panel) {
> +		panel->connector_type = DRM_MODE_CONNECTOR_DSI;
This assignment of panel->connector_type is wrong.
We should let the panel tell the type of connector.

And if the panel fails to do so - then fix it in the panel.

One day, when I get sufficiently bored/motivated I plan to go through
all panels to make sure they all update connector_type.

	Sam

> +		dsi->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
> +		if (IS_ERR(dsi->panel_bridge)) {
> +			ret = PTR_ERR(dsi->panel_bridge);
> +			goto err_unregister_host;
> +		}
> +	}
> +
>  	dsi->driver_data = of_device_get_match_data(dev);
>  
>  	dsi->engine_clk = devm_clk_get(dev, "engine");
> -- 
> 2.25.1
> 
> _______________________________________________
> dri-devel mailing list
> [email-masked]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel