mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: neil.armstrong@linaro.org
To: Theo Debrouwere <theo.debrouwere@gmail.com>,
	linux-amlogic@lists.infradead.org
Cc: Theo Debrouwere <theo.debrouwere@faytech.de>
Subject: Re: [PATCH v2] drm/meson: disable line encoder before programming the gamma table
Date: Tue, 17 Sep 2024 09:07:13 +0200	[thread overview]
Message-ID: <1d668177-eafb-4c6f-9746-b62b74a5458e@linaro.org> (raw)
In-Reply-To: <20240916133530.25498-1-theo.debrouwere@faytech.de>

On 16/09/2024 15:32, Theo Debrouwere wrote:
> There is a very rare bug, where the gamma table can't be written correctly.
> It is possible to write some entries into the gamma data port, after which
> the WR_RDY bit isn't set anymore. This causes a timeout in the code, and more
> entries will be written into the table. (each having their own timeout)
> There will be an image produced, but the colors will be completely off.
> The number of entries that can be written seems random.
> 
> The issue seems to be solved if the line encoder is disabled before the table
> is programmed.
> 
> Fixes: 42dcf15f901c ("drm/meson: add DSI encoder")
> Signed-off-by: Theo Debrouwere <theo.debrouwere@faytech.de>
> ---
> Added Fixes tag.
> 
>   drivers/gpu/drm/meson/meson_encoder_dsi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/meson/meson_encoder_dsi.c b/drivers/gpu/drm/meson/meson_encoder_dsi.c
> index 7816902f59075..15fd9df58ae4e 100644
> --- a/drivers/gpu/drm/meson/meson_encoder_dsi.c
> +++ b/drivers/gpu/drm/meson/meson_encoder_dsi.c
> @@ -66,10 +66,11 @@ static void meson_encoder_dsi_atomic_enable(struct drm_bridge *bridge,
>   	/* ENCL clock setup is handled by CCF */
> 
>   	meson_venc_mipi_dsi_mode_set(priv, &crtc_state->adjusted_mode);
> -	meson_encl_load_gamma(priv);
> 
>   	writel_relaxed(0, priv->io_base + _REG(ENCL_VIDEO_EN));
> 
> +	meson_encl_load_gamma(priv);
> +
>   	writel_bits_relaxed(ENCL_VIDEO_MODE_ADV_VFIFO_EN, ENCL_VIDEO_MODE_ADV_VFIFO_EN,
>   			    priv->io_base + _REG(ENCL_VIDEO_MODE_ADV));
>   	writel_relaxed(0, priv->io_base + _REG(ENCL_TST_EN));
> --
> 2.45.2
> 
> _______________________________________________
> linux-amlogic mailing list
> linux-amlogic@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-amlogic

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

      reply	other threads:[~2024-09-17  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 13:32 Theo Debrouwere
2024-09-17  7:07 ` neil.armstrong [this message]

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=1d668177-eafb-4c6f-9746-b62b74a5458e@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=theo.debrouwere@faytech.de \
    --cc=theo.debrouwere@gmail.com \
    /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

all inboxes | Powered by JetHome®