All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v5 06/13] drm/bridge: tc358762: Improve DPI enable handling
Date: Thu, 15 Oct 2026 11:25:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-172742@kernel.org> (raw)
In-Reply-To: <20261015-tc358762-fixes-v5-6-7cd721a6451b@ideasonboard.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/bridge: tc358762: Error state leak in post_disable breaks next enable
--

commit d2e59cf65b7853d5bbc77858afb718b43405bd7b
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>

drm/bridge: tc358762: Improve DPI enable handling

This commit clears the DPIENABLE bit at the start of display enablement to
avoid temporary wrong timings, and sets it later with the rest of the LCDCTRL
configuration. It also explicitly disables DPIENABLE when disabling the bridge.

> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> index 91bc79d36a744..19f328b6e7980 100644
> --- a/drivers/gpu/drm/bridge/tc358762.c
> +++ b/drivers/gpu/drm/bridge/tc358762.c

[ ... ]

> @@ -185,6 +191,9 @@ static void tc358762_post_disable(struct drm_bridge *bridge,
>  
>  	ctx->pre_enabled = false;
>  
> +	/* Turn off the DPI output */
> +	tc358762_write(ctx, LCDCTRL, 0);
> +

[Severity: High]
Can this leak an error state that breaks the next enable cycle?

If this newly added tc358762_write() fails during the post_disable phase
(for example, due to a transient DSI timeout or host teardown state), it
will set ctx->error to a negative error code.

Unlike the initialization path which calls tc358762_clear_error(),
tc358762_post_disable() does not clear ctx->error.

When the display is later re-enabled, all subsequent hardware configuration
writes in tc358762_init() will be silently skipped because tc358762_write()
checks this cached error state:

tc358762_write() {
        if (ctx->error)
                return;
        ...
}

Will this leave the hardware uninitialized and the display persistently
broken until the module is reloaded?

>  	if (ctx->reset_gpio)
>  		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015-tc358762-fixes-v5-0-7cd721a6451b@ideasonboard.com?part=6

  reply	other threads:[~2026-10-15 11:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 11:15 [PATCH v5 00/13] drm/bridge: tc358762: Various small fixes Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 01/13] drm/bridge: tc358762: Clean up register defines Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 02/13] drm/bridge: tc358762: Improve SYSCTRL " Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 03/13] drm/bridge: tc358762: Improve LCDCTRL defines Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 04/13] drm/bridge: tc358762: Configure SYSCTRL first Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 05/13] drm/bridge: tc358762: Drop SPICMR write Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 06/13] drm/bridge: tc358762: Improve DPI enable handling Tomi Valkeinen
2026-10-15 11:25   ` sashiko-bot [this message]
2026-10-15 11:15 ` [PATCH v5 07/13] drm/bridge: tc358762: Update comment about the number of lanes Tomi Valkeinen
2026-10-15 11:15 ` [PATCH v5 08/13] drm/bridge: tc358762: Support VTG Tomi Valkeinen
2026-10-15 11:16 ` [PATCH v5 09/13] drm/bridge: tc358762: Fix sync polarities Tomi Valkeinen
2026-10-15 11:16 ` [PATCH v5 10/13] drm/bridge: tc358762: Move tc358762_init() into tc358762_enable() Tomi Valkeinen
2026-10-15 11:16 ` [PATCH v5 11/13] drm/bridge: tc358762: Drop drm_bridge_funcs.mode_set Tomi Valkeinen
2026-10-15 11:16 ` [PATCH v5 12/13] drm/bridge: tc358762: Set DE_POL and DCLK_POL properly Tomi Valkeinen
2026-10-15 11:16 ` [PATCH v5 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=sashiko-outbox-172742@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=tomi.valkeinen@ideasonboard.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 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.