bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0626-drm-vc4-hdmi-Move-XBAR-setup-to-csc_setup.patch
1 From 9d59b54f5b608a823f01982a1aabac76a364556d Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 13 Jan 2021 11:07:48 +0100
4 Subject: [PATCH] drm/vc4: hdmi: Move XBAR setup to csc_setup
5
6 On the BCM2711, the HDMI_VEC_INTERFACE_XBAR register configuration
7 depends on whether we're using an RGB or YUV output. Let's move that
8 configuration to the CSC setup.
9
10 Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
11 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
12 ---
13 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
17 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
18 @@ -791,6 +791,8 @@ static void vc5_hdmi_csc_setup(struct vc
19
20 spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
21
22 + HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021);
23 +
24 if (!vc4_hdmi_is_full_range_rgb(vc4_hdmi, mode)) {
25 /* CEA VICs other than #1 requre limited range RGB
26 * output unless overridden by an AVI infoframe.
27 @@ -905,7 +907,6 @@ static void vc5_hdmi_set_timings(struct
28
29 spin_lock_irqsave(&vc4_hdmi->hw_lock, flags);
30
31 - HDMI_WRITE(HDMI_VEC_INTERFACE_XBAR, 0x354021);
32 HDMI_WRITE(HDMI_HORZA,
33 (vsync_pos ? VC5_HDMI_HORZA_VPOS : 0) |
34 (hsync_pos ? VC5_HDMI_HORZA_HPOS : 0) |