All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Maxime Ripard <maxime@cerno.tech>, dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup
Date: Wed, 6 Apr 2022 11:07:53 +0200	[thread overview]
Message-ID: <c290853e-f0e2-ceed-b53c-859bec1fbce3@suse.de> (raw)
In-Reply-To: <20220328153659.2382206-6-maxime@cerno.tech>


[-- Attachment #1.1: Type: text/plain, Size: 1295 bytes --]



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@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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2022-04-06  9:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 15:36 [PATCH 0/6] drm/vc4: Fixes for the writeback Maxime Ripard
2022-03-28 15:36 ` [PATCH 1/6] drm/vc4: hvs: Reset muxes at probe time Maxime Ripard
2022-03-28 15:36 ` [PATCH 2/6] drm/vc4: txp: Don't set TXP_VSTART_AT_EOF Maxime Ripard
2022-03-28 15:36 ` [PATCH 3/6] drm/vc4: txp: Force alpha to be 0xff if it's disabled Maxime Ripard
2022-04-06  9:02   ` Thomas Zimmermann
2022-03-28 15:36 ` [PATCH 4/6] drm/vc4: kms: Store channel in local variable Maxime Ripard
2022-03-28 15:36 ` [PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup Maxime Ripard
2022-04-06  9:07   ` Thomas Zimmermann [this message]
2022-04-08 11:41     ` Maxime Ripard
2022-03-28 15:36 ` [PATCH 6/6] drm/vc4: kms: Improve logging Maxime Ripard
2022-04-06  9:10 ` [PATCH 0/6] drm/vc4: Fixes for the writeback Thomas Zimmermann
2022-04-08 11:41   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c290853e-f0e2-ceed-b53c-859bec1fbce3@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime@cerno.tech \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.