aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/805-display-0032-drm-hdmi-imx8-fix-wrong-hdmi-type-with-non-SCDC-HDMI.patch
blob: 43b590da5e7bd3ca728544622f771c0027e86da2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 94f34486d678f01378f539dee843a74eb476320e Mon Sep 17 00:00:00 2001
From: Sandor Yu <Sandor.yu@nxp.com>
Date: Fri, 29 Nov 2019 15:00:59 +0800
Subject: [PATCH] drm: hdmi: imx8: fix wrong hdmi type with non-SCDC HDMI sinks

hdmi type is uninitialized with non-SCDC HDMI sinks.
And hdmi ctrl will work in DVI mode that is not ecpected.
Set hdmi type to HDMI1.4 before SCDC support check to fix it.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
---
 drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
@@ -29,7 +29,10 @@
 static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)
 {
 	struct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;
-	u8 buff;
+	u8 buff = 0;
+
+	/* Default work in HDMI1.4 */
+	mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
 
 	/* check sink support SCDC or not */
 	if (scdc->supported != true) {
@@ -51,11 +54,7 @@ static void hdmi_sink_config(struct cdns
 		 */
 		buff = SCDC_SCRAMBLING_ENABLE;
 		mhdp->hdmi.hdmi_type = MODE_HDMI_2_0;
-	} else {
-		/* Default work in HDMI1.4 */
-		buff = 0;
-		mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
-	 }
+	}
 
 	/* TMDS config */
 	cdns_hdmi_scdc_write(mhdp, 0x20, buff);