Skip to content

Commit 7192bac

Browse files
6by9popcornmix
authored andcommitted
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>
1 parent 41dce59 commit 7192bac

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

drivers/gpu/drm/vc4/vc4_kms.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static void vc4_hvs_pv_muxing_commit(struct vc4_dev *vc4,
221221
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
222222
struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(crtc_state);
223223
u32 dispctrl;
224-
u32 dsp3_mux;
224+
u32 dsp3_mux_pri;
225225

226226
if (!crtc_state->active)
227227
continue;
@@ -238,15 +238,22 @@ static void vc4_hvs_pv_muxing_commit(struct vc4_dev *vc4,
238238
* enabled. In this case, FIFO 2 is directly accessed by the
239239
* TXP IP, and we need to disable the FIFO2 -> pixelvalve1
240240
* route.
241+
*
242+
* TXP can also run with a lower panic level than a live display,
243+
* as it doesn't have the same real-time constraint.
241244
*/
242-
if (vc4_crtc->feeds_txp)
243-
dsp3_mux = VC4_SET_FIELD(3, SCALER_DISPCTRL_DSP3_MUX);
244-
else
245-
dsp3_mux = VC4_SET_FIELD(2, SCALER_DISPCTRL_DSP3_MUX);
245+
if (vc4_crtc->feeds_txp) {
246+
dsp3_mux_pri = VC4_SET_FIELD(3, SCALER_DISPCTRL_DSP3_MUX);
247+
dsp3_mux_pri |= VC4_SET_FIELD(0, SCALER_DISPCTRL_PANIC2);
248+
} else {
249+
dsp3_mux_pri = VC4_SET_FIELD(2, SCALER_DISPCTRL_DSP3_MUX);
250+
dsp3_mux_pri |= VC4_SET_FIELD(2, SCALER_DISPCTRL_PANIC2);
251+
}
246252

247253
dispctrl = HVS_READ(SCALER_DISPCTRL) &
248-
~SCALER_DISPCTRL_DSP3_MUX_MASK;
249-
HVS_WRITE(SCALER_DISPCTRL, dispctrl | dsp3_mux);
254+
~(SCALER_DISPCTRL_DSP3_MUX_MASK |
255+
SCALER_DISPCTRL_PANIC2_MASK);
256+
HVS_WRITE(SCALER_DISPCTRL, dispctrl | dsp3_mux_pri);
250257
}
251258
}
252259

0 commit comments

Comments
 (0)