From a28f918866095d2944603b3f682f64f78d5e9dbf Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Wed, 15 Jul 2020 17:28:01 +0200
Subject: drm/imx: dw_hdmi-imx: use imx_drm_encoder_parse_of
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
Reviewed-by: Sam Ravnborg
---
drivers/gpu/drm/imx/dw_hdmi-imx.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
(limited to 'drivers/gpu/drm/imx/dw_hdmi-imx.c')
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index 71d84c7a5378..6debe87cc160 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -219,15 +219,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)
--
cgit v1.2.3
From 23a6502b076ba31d36467ddfa50d449bc62db231 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Wed, 15 Jul 2020 15:36:33 +0200
Subject: drm/imx: dw_hdmi-imx: remove empty encoder_disable callback
This has not been required since commit 75229eca569f ("drm: Make
drm_encoder_helper_funcs optional").
Signed-off-by: Philipp Zabel
---
drivers/gpu/drm/imx/dw_hdmi-imx.c | 5 -----
1 file changed, 5 deletions(-)
(limited to 'drivers/gpu/drm/imx/dw_hdmi-imx.c')
diff --git a/drivers/gpu/drm/imx/dw_hdmi-imx.c b/drivers/gpu/drm/imx/dw_hdmi-imx.c
index 6debe87cc160..d07b39b8afd2 100644
--- a/drivers/gpu/drm/imx/dw_hdmi-imx.c
+++ b/drivers/gpu/drm/imx/dw_hdmi-imx.c
@@ -111,10 +111,6 @@ static int dw_hdmi_imx_parse_dt(struct imx_hdmi *hdmi)
return 0;
}
-static void dw_hdmi_imx_encoder_disable(struct drm_encoder *encoder)
-{
-}
-
static void dw_hdmi_imx_encoder_enable(struct drm_encoder *encoder)
{
struct imx_hdmi *hdmi = enc_to_imx_hdmi(encoder);
@@ -140,7 +136,6 @@ static int dw_hdmi_imx_atomic_check(struct drm_encoder *encoder,
static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = {
.enable = dw_hdmi_imx_encoder_enable,
- .disable = dw_hdmi_imx_encoder_disable,
.atomic_check = dw_hdmi_imx_atomic_check,
};
--
cgit v1.2.3