From: Maxime Ripard <maxime@cerno.tech>
To: dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel.vetter@intel.com>,
Maxime Ripard <maxime@cerno.tech>,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup
Date: Mon, 28 Mar 2022 17:36:58 +0200 [thread overview]
Message-ID: <20220328153659.2382206-6-maxime@cerno.tech> (raw)
In-Reply-To: <20220328153659.2382206-1-maxime@cerno.tech>
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);
+
mux = (channel == 2) ? 0 : 1;
reg = HVS_READ(SCALER_DISPECTRL);
HVS_WRITE(SCALER_DISPECTRL,
--
2.35.1
next prev parent reply other threads:[~2022-03-28 15:37 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 ` Maxime Ripard [this message]
2022-04-06 9:07 ` [PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup Thomas Zimmermann
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=20220328153659.2382206-6-maxime@cerno.tech \
--to=maxime@cerno.tech \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
/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.