mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Marek Vasut <marex@denx.de>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH v6 06/13] drm/bridge: tc358762: Improve DPI enable handling
Date: Tue, 24 Nov 2026 11:40:23 +0100	[thread overview]
Message-ID: <20261124114023.241993e7@kemnade.info> (raw)
In-Reply-To: <20261124-tc358762-fixes-v6-6-bd38fed6460f@ideasonboard.com>

On Tue, 24 Nov 2026 12:07:57 +0200
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:

> The HW reset defaults has DPIENABLE bit as set. In the current driver we
> configure and enable various things while DPIENABLE is set. This results
> in a temporary DPI output with wrong timings, which may cause artifacts
> on the panel.
> 
> Fix this by clearing DPIEANBLE as the first thing when we start to
> enable the display. DPIENABLE is set later with the rest of the LCDCTRL
> configuration, and at that time we have done all the other
> configurations.
> 
> Also, for symmetry and possibly improving the DPI output at disable
> time, explicitly disable DPIENABLE when disabling the bridge.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Andreas Kemnade <andreas@kemnade.info>
> ---
>  drivers/gpu/drm/bridge/tc358762.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> index 91bc79d36a74..0933fc974a7c 100644
> --- a/drivers/gpu/drm/bridge/tc358762.c
> +++ b/drivers/gpu/drm/bridge/tc358762.c
> @@ -134,6 +134,12 @@ static int tc358762_init(struct tc358762 *ctx)
>  {
>  	u32 lcdctrl;
>  
> +	/*
> +	 * DPIENABLE has reset default of 1. Make sure we don't output on
> +	 * DPI until we have finished the coniguration.
> +	 */
> +	tc358762_write(ctx, LCDCTRL, 0);
> +
>  	tc358762_write(ctx, SYSCTRL,
>  		       FIELD_PREP(SYSCTRL_DPIDATA_IO_MASK, SYSCTRL_DPIDATA_IO_4MA) |
>  		       FIELD_PREP(SYSCTRL_DPISTB_IO_MASK, SYSCTRL_DPISTB_IO_4MA) |
> @@ -185,6 +191,13 @@ static void tc358762_post_disable(struct drm_bridge *bridge,
>  
>  	ctx->pre_enabled = false;
>  
> +	/* Turn off the DPI output */
> +	tc358762_write(ctx, LCDCTRL, 0);
> +
> +	ret = tc358762_clear_error(ctx);
> +	if (ret < 0)
> +		dev_err(ctx->dev, "error disabling DPI output (%d)\n", ret);
> +
>  	if (ctx->reset_gpio)
>  		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
>  
> 


  reply	other threads:[~2026-11-24 10:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 10:07 [PATCH v6 00/13] drm/bridge: tc358762: Various small fixes Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 01/13] drm/bridge: tc358762: Clean up register defines Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 02/13] drm/bridge: tc358762: Improve SYSCTRL " Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 03/13] drm/bridge: tc358762: Improve LCDCTRL defines Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 04/13] drm/bridge: tc358762: Configure SYSCTRL first Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 05/13] drm/bridge: tc358762: Drop SPICMR write Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 06/13] drm/bridge: tc358762: Improve DPI enable handling Tomi Valkeinen
2026-11-24 10:40   ` Andreas Kemnade [this message]
2026-11-24 10:07 ` [PATCH v6 07/13] drm/bridge: tc358762: Update comment about the number of lanes Tomi Valkeinen
2026-11-24 10:07 ` [PATCH v6 08/13] drm/bridge: tc358762: Support VTG Tomi Valkeinen
2026-11-24 10:08 ` [PATCH v6 09/13] drm/bridge: tc358762: Fix sync polarities Tomi Valkeinen
2026-11-24 10:08 ` [PATCH v6 10/13] drm/bridge: tc358762: Move tc358762_init() into tc358762_enable() Tomi Valkeinen
2026-11-24 10:08 ` [PATCH v6 11/13] drm/bridge: tc358762: Drop drm_bridge_funcs.mode_set Tomi Valkeinen
2026-11-24 10:08 ` [PATCH v6 12/13] drm/bridge: tc358762: Set DE_POL and DCLK_POL properly Tomi Valkeinen
2026-11-24 10:08 ` [PATCH v6 13/13] drm/panel-simple: Fix powertip,ph800480t013-idf02 timings Tomi Valkeinen

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=20261124114023.241993e7@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marex@denx.de \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --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 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®