6b7acd8e4a44313bb64ce72f027486e89de4ed09
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.15 / 950-0572-drm-vc4-Don-t-try-disabling-SCDC-on-Pi0-3.patch
1 From e1ee82fdfdba0b210974cf3ccc0048c5aeb83bc6 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 16 Nov 2021 10:34:34 +0000
4 Subject: [PATCH] drm/vc4: Don't try disabling SCDC on Pi0-3.
5
6 The code that set the scdc_enabled flag to ensure it was
7 disabled at boot time also ran on Pi0-3 where there is no
8 SCDC support. This lead to a warning in vc4_hdmi_encoder_post_crtc_disable
9 due to vc4_hdmi_disable_scrambling being called and trying to
10 read (and write) register HDMI_SCRAMBLER_CTL which doesn't
11 exist on those platforms.
12
13 Only set the flag should the interface be configured to support
14 more than HDMI 1.4.
15
16 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
17 ---
18 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
19 1 file changed, 2 insertions(+), 1 deletion(-)
20
21 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
22 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
23 @@ -2557,7 +2557,8 @@ static int vc4_hdmi_bind(struct device *
24 * vc4_hdmi_disable_scrambling() will thus run at boot, make
25 * sure it's disabled, and avoid any inconsistency.
26 */
27 - vc4_hdmi->scdc_enabled = true;
28 + if (variant->max_pixel_clock > HDMI_14_MAX_TMDS_CLK)
29 + vc4_hdmi->scdc_enabled = true;
30
31 ret = variant->init_resources(vc4_hdmi);
32 if (ret)