diff options
author | Maxime Ripard <maxime@cerno.tech> | 2022-03-28 18:36:58 +0300 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2022-04-08 14:38:06 +0300 |
commit | 457e5184b9e0e14b26044c7fed5940bcbe7698a7 (patch) | |
tree | efc29daf49401d550da3d7a8b7eeaa951c1208f7 /drivers/gpu/drm/vc4 | |
parent | f47d37a91e60990f0ee3006004639487906e3125 (diff) | |
download | linux-457e5184b9e0e14b26044c7fed5940bcbe7698a7.tar.xz |
drm/vc4: kms: Warn if we have an incompatible muxing setup
The documentation explicitly states we must prevent the output
2 and 3 from feeding from the same HVS channel.
Let's add a warning to make some noise if we ever find ourselves in such
a case.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20220328153659.2382206-6-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_kms.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 0c6a5197d376..ffd54aab7759 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -290,6 +290,10 @@ static void vc5_hvs_pv_muxing_commit(struct vc4_dev *vc4, switch (vc4_crtc->data->hvs_output) { case 2: + drm_WARN_ON(&vc4->base, + VC4_GET_FIELD(HVS_READ(SCALER_DISPCTRL), + SCALER_DISPCTRL_DSP3_MUX) == channel); + mux = (channel == 2) ? 0 : 1; reg = HVS_READ(SCALER_DISPECTRL); HVS_WRITE(SCALER_DISPECTRL, |