1 From 94f34486d678f01378f539dee843a74eb476320e Mon Sep 17 00:00:00 2001
2 From: Sandor Yu <Sandor.yu@nxp.com>
3 Date: Fri, 29 Nov 2019 15:00:59 +0800
4 Subject: [PATCH] drm: hdmi: imx8: fix wrong hdmi type with non-SCDC HDMI sinks
6 hdmi type is uninitialized with non-SCDC HDMI sinks.
7 And hdmi ctrl will work in DVI mode that is not ecpected.
8 Set hdmi type to HDMI1.4 before SCDC support check to fix it.
10 Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
12 drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 11 +++++------
13 1 file changed, 5 insertions(+), 6 deletions(-)
15 --- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
16 +++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
18 static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)
20 struct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;
24 + /* Default work in HDMI1.4 */
25 + mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
27 /* check sink support SCDC or not */
28 if (scdc->supported != true) {
29 @@ -51,11 +54,7 @@ static void hdmi_sink_config(struct cdns
31 buff = SCDC_SCRAMBLING_ENABLE;
32 mhdp->hdmi.hdmi_type = MODE_HDMI_2_0;
34 - /* Default work in HDMI1.4 */
36 - mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
41 cdns_hdmi_scdc_write(mhdp, 0x20, buff);