ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 805-display-0032-drm-hdmi-imx8-fix-wrong-hdmi-type-with-non-SCDC-HDMI.patch
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
5
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.
9
10 Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
11 ---
12  drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c | 11 +++++------
13  1 file changed, 5 insertions(+), 6 deletions(-)
14
15 --- a/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
16 +++ b/drivers/gpu/drm/bridge/cadence/cdns-hdmi-core.c
17 @@ -29,7 +29,10 @@
18  static void hdmi_sink_config(struct cdns_mhdp_device *mhdp)
19  {
20         struct drm_scdc *scdc = &mhdp->connector.base.display_info.hdmi.scdc;
21 -       u8 buff;
22 +       u8 buff = 0;
23 +
24 +       /* Default work in HDMI1.4 */
25 +       mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
26  
27         /* check sink support SCDC or not */
28         if (scdc->supported != true) {
29 @@ -51,11 +54,7 @@ static void hdmi_sink_config(struct cdns
30                  */
31                 buff = SCDC_SCRAMBLING_ENABLE;
32                 mhdp->hdmi.hdmi_type = MODE_HDMI_2_0;
33 -       } else {
34 -               /* Default work in HDMI1.4 */
35 -               buff = 0;
36 -               mhdp->hdmi.hdmi_type = MODE_HDMI_1_4;
37 -        }
38 +       }
39  
40         /* TMDS config */
41         cdns_hdmi_scdc_write(mhdp, 0x20, buff);