lede/target/linux/bcm27xx/patches-6.12/950-0659-drm-vc4-Drop-panic-priority-for-writeback-connector.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

54 lines
1.9 KiB
Diff

From 58397c19bbdf4e56582cb4149d254bbdde428167 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Mon, 9 Sep 2024 17:38:45 +0100
Subject: [PATCH] drm/vc4: Drop panic priority for writeback connector
As the writeback connector doesn't have the same realtime
constraints of a live display, drop the panic priority for it.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_kms.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -221,7 +221,7 @@ static void vc4_hvs_pv_muxing_commit(str
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc_state);
u32 dispctrl;
- u32 dsp3_mux;
+ u32 dsp3_mux_pri;
if (!crtc_state->active)
continue;
@@ -238,15 +238,22 @@ static void vc4_hvs_pv_muxing_commit(str
* enabled. In this case, FIFO 2 is directly accessed by the
* TXP IP, and we need to disable the FIFO2 -> pixelvalve1
* route.
+ *
+ * TXP can also run with a lower panic level than a live display,
+ * as it doesn't have the same real-time constraint.
*/
- if (vc4_crtc->feeds_txp)
- dsp3_mux = VC4_SET_FIELD(3, SCALER_DISPCTRL_DSP3_MUX);
- else
- dsp3_mux = VC4_SET_FIELD(2, SCALER_DISPCTRL_DSP3_MUX);
+ if (vc4_crtc->feeds_txp) {
+ dsp3_mux_pri = VC4_SET_FIELD(3, SCALER_DISPCTRL_DSP3_MUX);
+ dsp3_mux_pri |= VC4_SET_FIELD(0, SCALER_DISPCTRL_PANIC2);
+ } else {
+ dsp3_mux_pri = VC4_SET_FIELD(2, SCALER_DISPCTRL_DSP3_MUX);
+ dsp3_mux_pri |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2);
+ }
dispctrl = HVS_READ(SCALER_DISPCTRL) &
- ~SCALER_DISPCTRL_DSP3_MUX_MASK;
- HVS_WRITE(SCALER_DISPCTRL, dispctrl | dsp3_mux);
+ ~(SCALER_DISPCTRL_DSP3_MUX_MASK |
+ SCALER_DISPCTRL_PANIC2_MASK);
+ HVS_WRITE(SCALER_DISPCTRL, dispctrl | dsp3_mux_pri);
}
}