[PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup

Thomas Zimmermann tzimmermann at suse.de
Wed Apr 6 09:07:53 UTC 2022



Am 28.03.22 um 17:36 schrieb Maxime Ripard:
> 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 at cerno.tech>
> ---
>   drivers/gpu/drm/vc4/vc4_kms.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
> index 94c58ec37a27..d94f78eac936 100644
> --- a/drivers/gpu/drm/vc4/vc4_kms.c
> +++ b/drivers/gpu/drm/vc4/vc4_kms.c
> @@ -286,6 +286,9 @@ static void vc5_hvs_pv_muxing_commit(struct vc4_dev *vc4,
>   
>   		switch (vc4_crtc->data->hvs_output) {
>   		case 2:
> +			WARN_ON(VC4_GET_FIELD(HVS_READ(SCALER_DISPCTRL),
> +					      SCALER_DISPCTRL_DSP3_MUX) == channel);
> +

Should be drm_WARN_ON().

Is that something that could be detected during atomic-check steps?

Best regards
Thomas

>   			mux = (channel == 2) ? 0 : 1;
>   			reg = HVS_READ(SCALER_DISPECTRL);
>   			HVS_WRITE(SCALER_DISPECTRL,

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220406/09166d7b/attachment.sig>


More information about the dri-devel mailing list