4c02efe88fcb885e725eaf24bbbf4510d5e63c6f
[openwrt/staging/neocturne.git] /
1 From 87157f42cd40d9302ad2ebae582768b52c46c8e0 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Fri, 4 Mar 2022 15:59:08 +0100
4 Subject: [PATCH] drm/vc4: kms: Warn if we have an incompatible muxing
5 setup
6
7 The documentation explicitly states we must prevent the output
8 2 and 3 from feeding from the same HVS channel.
9
10 Let's add a warning to make some noise if we ever find ourselves in such
11 a case.
12
13 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
14 ---
15 drivers/gpu/drm/vc4/vc4_kms.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18 --- a/drivers/gpu/drm/vc4/vc4_kms.c
19 +++ b/drivers/gpu/drm/vc4/vc4_kms.c
20 @@ -293,6 +293,9 @@ static void vc5_hvs_pv_muxing_commit(str
21
22 switch (vc4_crtc->data->hvs_output) {
23 case 2:
24 + WARN_ON(VC4_GET_FIELD(HVS_READ(SCALER_DISPCTRL),
25 + SCALER_DISPCTRL_DSP3_MUX) == channel);
26 +
27 mux = (channel == 2) ? 0 : 1;
28 reg = HVS_READ(SCALER_DISPECTRL);
29 HVS_WRITE(SCALER_DISPECTRL,