From: sashiko-bot@kernel.org
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 12/13] drm/bridge: tc358762: Set DE_POL and DCLK_POL properly
Date: Mon, 07 Sep 2026 11:44:22 +0000 [thread overview]
Message-ID: <20260907114423.49BAD1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-tc358762-fixes-v4-12-e3fc3ab5cd83@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Sleeping function msleep() is called in an atomic context path (bridge enable callback).
--
commit 12b0c322f22c1997a91fce2069aabdcb2f3f31cf
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drm/bridge: tc358762: Set DE_POL and DCLK_POL properly
This commit updates the tc358762 bridge driver to dynamically set the
LCDCTRL_DCLK_POL and LCDCTRL_DE_POL polarities. Instead of hardcoding these
values, it now reads them from the output bus configuration flags to match
the panel's requirements.
> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> index ad3a2620ce476..25b719cd66fec 100644
> --- a/drivers/gpu/drm/bridge/tc358762.c
> +++ b/drivers/gpu/drm/bridge/tc358762.c
> @@ -186,12 +186,15 @@ static void tc358762_enable(struct drm_bridge *bridge,
> {
> struct tc358762 *ctx = bridge_to_tc358762(bridge);
> struct drm_connector_state *conn_state;
> + struct drm_bridge_state *bridge_state;
[Severity: High]
This isn't a bug introduced by this patch, but does this function sleep in
atomic context?
Looking at tc358762_enable() in drivers/gpu/drm/bridge/tc358762.c, there are
two instances where msleep() is called:
drivers/gpu/drm/bridge/tc358762.c:tc358762_enable() {
...
tc358762_write(ctx, SYSCTRL,
FIELD_PREP(SYSCTRL_DPIDATA_IO_MASK, SYSCTRL_DPIDATA_IO_4MA) |
FIELD_PREP(SYSCTRL_DPISTB_IO_MASK, SYSCTRL_DPISTB_IO_4MA) |
FIELD_PREP(SYSCTRL_PCLKDIV_MASK, SYSCTRL_PCLKDIV_DIV_3));
msleep(100);
...
tc358762_write(ctx, PPI_STARTPPI, PPI_STARTPPI_STARTPPI);
tc358762_write(ctx, DSI_STARTDSI, DSI_STARTDSI_STARTDSI);
msleep(100);
...
}
This function is registered as the bridge's atomic enable callback. According
to DRM subsystem guidelines, encoder and bridge atomic enable callbacks run in
atomic context during non-blocking commits where sleeping is forbidden.
Can calling msleep() from this atomic context cause kernel warnings, system
instability, or potential deadlocks when the display pipeline is enabled?
> struct drm_crtc_state *crtc_state;
> struct drm_connector *connector;
> struct drm_display_mode *mode;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-tc358762-fixes-v4-0-e3fc3ab5cd83@ideasonboard.com?part=12
next prev parent reply other threads:[~2026-09-07 11:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 11:27 [PATCH v4 00/13] drm/bridge: tc358762: Various small fixes Tomi Valkeinen
2026-09-07 11:27 ` [PATCH v4 01/13] drm/bridge: tc358762: Clean up register defines Tomi Valkeinen
2026-09-07 11:27 ` [PATCH v4 02/13] drm/bridge: tc358762: Improve SYSCTRL " Tomi Valkeinen
2026-09-07 11:27 ` [PATCH v4 03/13] drm/bridge: tc358762: Improve LCDCTRL defines Tomi Valkeinen
2026-09-07 11:27 ` [PATCH v4 04/13] drm/bridge: tc358762: Configure SYSCTRL first Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 05/13] drm/bridge: tc358762: Drop SPICMR write Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 06/13] drm/bridge: tc358762: Improve DPI enable handling Tomi Valkeinen
2026-09-07 11:36 ` sashiko-bot
2026-09-07 11:28 ` [PATCH v4 07/13] drm/bridge: tc358762: Update comment about the number of lanes Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 08/13] drm/bridge: tc358762: Support VTG Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 09/13] drm/bridge: tc358762: Fix sync polarities Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 10/13] drm/bridge: tc358762: Move tc358762_init() into tc358762_enable() Tomi Valkeinen
2026-09-07 11:38 ` sashiko-bot
2026-09-07 11:28 ` [PATCH v4 11/13] drm/bridge: tc358762: Drop drm_bridge_funcs.mode_set Tomi Valkeinen
2026-09-07 11:28 ` [PATCH v4 12/13] drm/bridge: tc358762: Set DE_POL and DCLK_POL properly Tomi Valkeinen
2026-09-07 11:44 ` sashiko-bot [this message]
2026-09-07 11:28 ` [PATCH v4 13/13] drm/panel-simple: Fix powertip,ph800480t013-idf02 timings Tomi Valkeinen
2026-09-10 12:20 ` [PATCH v4 00/13] drm/bridge: tc358762: Various small fixes Andreas Kemnade
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=20260907114423.49BAD1F00A3A@smtp.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox