diff mbox series

drm/imx: dw_hdmi-imx: use imx_drm_encoder_parse_of

Message ID 20200721130710.28254-1-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series drm/imx: dw_hdmi-imx: use imx_drm_encoder_parse_of | expand

Commit Message

Philipp Zabel July 21, 2020, 1:07 p.m. UTC
This is the same code and comment that is already shared by imx-ldb,
imx-tve, and parallel-display in imx_drm_encoder_parse_of().

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

Comments

Sam Ravnborg Aug. 10, 2020, 8:06 p.m. UTC | #1
On Tue, Jul 21, 2020 at 03:07:10PM +0200, Philipp Zabel wrote:
> This is the same code and comment that is already shared by imx-ldb,
> imx-tve, and parallel-display in imx_drm_encoder_parse_of().
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Looks OK:
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
> index 87869b9997a6..a4f178c1d9bc 100644
> --- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
> +++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
> @@ -217,15 +217,9 @@ static int dw_hdmi_imx_bind(struct device *dev, struct device *master,
>  	hdmi->dev = &pdev->dev;
>  	encoder = &hdmi->encoder;
>  
> -	encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
> -	/*
> -	 * If we failed to find the CRTC(s) which this encoder is
> -	 * supposed to be connected to, it's because the CRTC has
> -	 * not been registered yet.  Defer probing, and hope that
> -	 * the required CRTC is added later.
> -	 */
> -	if (encoder->possible_crtcs == 0)
> -		return -EPROBE_DEFER;
> +	ret = imx_drm_encoder_parse_of(drm, encoder, dev->of_node);
> +	if (ret)
> +		return ret;
>  
>  	ret = dw_hdmi_imx_parse_dt(hdmi);
>  	if (ret < 0)
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index 87869b9997a6..a4f178c1d9bc 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -217,15 +217,9 @@  static int dw_hdmi_imx_bind(struct device *dev, struct device *master,
 	hdmi->dev = &pdev->dev;
 	encoder = &hdmi->encoder;
 
-	encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, dev->of_node);
-	/*
-	 * If we failed to find the CRTC(s) which this encoder is
-	 * supposed to be connected to, it's because the CRTC has
-	 * not been registered yet.  Defer probing, and hope that
-	 * the required CRTC is added later.
-	 */
-	if (encoder->possible_crtcs == 0)
-		return -EPROBE_DEFER;
+	ret = imx_drm_encoder_parse_of(drm, encoder, dev->of_node);
+	if (ret)
+		return ret;
 
 	ret = dw_hdmi_imx_parse_dt(hdmi);
 	if (ret < 0)