From: sashiko-bot@kernel.org
To: "Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] drm/bridge: cdns-dsi: Fix stop-state at enable time
Date: Mon, 07 Sep 2026 11:27:59 +0000 [thread overview]
Message-ID: <20260907112800.5D52E1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260907-cdns-dsi-fixes-v2-2-96d9b116e9bc@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [High] The patch introduces a sleeping delay (`usleep_range`) in an atomic context path, violating DRM display driver guidelines.
Pre-existing issues:
- [High] Pre-existing use of a sleeping poll macro (`readl_poll_timeout`) in an atomic context path.
--
commit 831dd94ae2ea6c134a442329e348bfa99f691859
Author: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drm/bridge: cdns-dsi: Fix stop-state at enable time
This patch addresses an initialization failure with the Xilinx D-PHY RX by
ensuring the clock and data lanes are kept in a stop-state during the D-PHY
power up and init sequence. It adds FORCE_STOP flags and a delay to allow
the stop-state to take effect.
> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> index 4b7a3bf582551..b9c87f13177af 100644
> --- a/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
> +++ b/drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
[ ... ]
> @@ -661,6 +668,13 @@ static void cdns_dsi_hs_init(struct cdns_dsi *dsi)
> writel(DPHY_CMN_PSO | DPHY_ALL_D_PDN | DPHY_C_PDN | DPHY_CMN_PDN |
> DPHY_D_RSTB(output->dev->lanes) | DPHY_C_RSTB,
> dsi->regs + MCTL_DPHY_CFG0);
> +
> + /* Keep stop state for at least 100 us */
> + usleep_range(100, 200);
[Severity: High]
Is it safe to introduce a sleeping delay in an atomic context path here?
Looking at the call chain:
drm_atomic_helper_commit_tail()
drm_atomic_helper_commit_modeset_enables()
cdns_dsi_bridge_atomic_pre_enable()
cdns_dsi_hs_init()
The DRM guide specifies drm_atomic_helper_commit_tail() as an atomic
context path where sleeping is forbidden. Introducing usleep_range() here
might lead to kernel warnings, system instability, or regressions during a
non-blocking modeset request.
[Severity: High]
This is a pre-existing issue, but are the readl_poll_timeout() calls in this
path also sleeping in an atomic context?
For example, earlier in cdns_dsi_hs_init():
cdns_dsi_hs_init() {
...
WARN_ON_ONCE(readl_poll_timeout(dsi->regs + MCTL_MAIN_STS, status,
status & PLL_LOCKED, 100, 100));
...
}
There is also a similar call in cdns_dsi_bridge_atomic_pre_enable():
cdns_dsi_bridge_atomic_pre_enable() {
...
if (readl_poll_timeout(dsi->regs + MCTL_MAIN_STS, status,
(tmp == (status & tmp)), 100, 500000))
...
}
Since readl_poll_timeout() internally calls usleep_range(), could these
similarly cause regressions in the atomic commit path?
> +
> + val &= ~(DATA_FORCE_STOP | CLK_FORCE_STOP);
> + writel(val, dsi->regs + MCTL_MAIN_EN);
> +
> dsi->phy_initialized = true;
> }
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260907-cdns-dsi-fixes-v2-0-96d9b116e9bc@ideasonboard.com?part=2
next prev parent reply other threads:[~2026-09-07 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 11:13 [PATCH v2 0/3] drm/bridge: cdns-dsi: A few fixes Tomi Valkeinen
2026-09-07 11:13 ` [PATCH v2 1/3] drm/bridge: cdns-dsi: Add clk debug print Tomi Valkeinen
2026-09-07 11:13 ` [PATCH v2 2/3] drm/bridge: cdns-dsi: Fix stop-state at enable time Tomi Valkeinen
2026-09-07 11:27 ` sashiko-bot [this message]
2026-09-07 11:13 ` [PATCH v2 3/3] drm/bridge: cdns-dsi: Fix mode and bus flags 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=20260907112800.5D52E1F00A3A@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 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.