From: Andre Przywara <andre.przywara@arm.com>
To: John Watts <contact@jookia.org>
Cc: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Samuel Holland <samuel@sholland.org>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/sun4i: Workaround TCON TOP conflict between DE0 and DE1
Date: Fri, 8 Nov 2024 11:53:57 +0000 [thread overview]
Message-ID: <20241108115357.691b77b0@donnerap.manchester.arm.com> (raw)
In-Reply-To: <20241108-tcon_fix-v1-1-616218cc0d5f@jookia.org>
On Fri, 08 Nov 2024 12:40:16 +1100
John Watts <contact@jookia.org> wrote:
Hi John,
thanks for taking care and sending a patch!
> On the D1 and T113 the TCON TOP cannot handle setting both DEs to a
> single output, even if the outputs are disabled. As a workaround assign
> DE1 to TVE0 by default.
Can you say *why* this patch is needed? Is there something broken that
needs fixing? Where does this show and why wasn't this a problem before?
> A full fix for this would include logic that makes sure both DEs never
> share the same output.
To be honest, given the isolation on this patch, I'd rather wait for this
full fledged solution, especially if there is no pressing need (see above).
> Signed-off-by: John Watts <contact@jookia.org>
> ---
> drivers/gpu/drm/sun4i/sun8i_tcon_top.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
> index a1ca3916f42bcc63b9ac7643e788d962ef360ca8..543311ffb1509face3fbfd069ded10933f254b9d 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
> +++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c
> @@ -179,7 +179,7 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master,
> * At least on H6, some registers have some bits set by default
> * which may cause issues. Clear them here.
> */
> - writel(0, regs + TCON_TOP_PORT_SEL_REG);
> + writel(0x20, regs + TCON_TOP_PORT_SEL_REG);
Sorry, but that looks weird:
First, please explain the 0x20. Is it bit 5? If yes, what does that bit
mean? The commit message suggests you know that?
And second: the comment above clearly states that those two writes just
*clear* some registers, to have some sane base line. So please adjust this
comment, and copy in some of the rationale from the commit message.
Explaining things in the commit message is good (so thanks for that!), but
having at least some terse technical explanations near the code, in a
comment, is better.
Cheers,
Andre
> writel(0, regs + TCON_TOP_GATE_SRC_REG);
>
> /*
>
> ---
> base-commit: 98f7e32f20d28ec452afb208f9cffc08448a2652
> change-id: 20241108-tcon_fix-f0585ac9bae0
>
> Best regards,
next prev parent reply other threads:[~2024-11-08 11:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 1:40 [PATCH] drm/sun4i: Workaround TCON TOP conflict between DE0 and DE1 John Watts
2024-11-08 11:53 ` Andre Przywara [this message]
2024-11-08 13:29 ` John Watts
2024-11-08 14:06 ` Parthiban
2024-11-08 14:15 ` John Watts
2024-11-12 11:57 ` John Watts
2024-11-12 17:13 ` Parthiban
2024-11-12 23:33 ` John Watts
2024-11-13 6:10 ` Parthiban
2024-11-13 8:15 ` John Watts
2024-11-29 4:13 ` Parthiban
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=20241108115357.691b77b0@donnerap.manchester.arm.com \
--to=andre.przywara@arm.com \
--cc=airlied@gmail.com \
--cc=contact@jookia.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=tzimmermann@suse.de \
--cc=wens@csie.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox