From: sashiko-bot@kernel.org
To: "Svyatoslav Ryhel" <clamor95@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/1] gpu/drm: bridge: tc358768: Add delay after PLL setup
Date: Thu, 25 Jun 2026 08:39:56 +0000 [thread overview]
Message-ID: <20260625083956.B861A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260625082507.57703-2-clamor95@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Preexisting calls to sleeping functions in atomic context callback paths.
--
commit e9444612d599575c476a8af0ea940cddf9416e28
Author: Svyatoslav Ryhel <clamor95@gmail.com>
gpu/drm: bridge: tc358768: Add delay after PLL setup
This commit adds a 20ms delay after tc358768_setup_pll() in
tc358768_bridge_atomic_pre_enable() to allow the PLL to settle, fixing an
issue where the bridge claims PLL lock but produces no DSI video output.
> diff --git a/drivers/gpu/drm/bridge/tc358768.c b/drivers/gpu/drm/bridge/tc358768.c
> index 0f2820b373029..ea358c8da0e99 100644
> --- a/drivers/gpu/drm/bridge/tc358768.c
> +++ b/drivers/gpu/drm/bridge/tc358768.c
> @@ -824,6 +824,9 @@ static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge,
> return;
> }
[Severity: High]
This isn't a bug introduced by this patch, but does calling
tc358768_setup_pll() and tc358768_hw_enable() from the atomic pre_enable
callback risk sleeping in atomic context?
Looking at tc358768_setup_pll() in drivers/gpu/drm/bridge/tc358768.c, it
calls usleep_range():
tc358768_setup_pll()
/* wait for lock */
usleep_range(1000, 2000);
Additionally, earlier in tc358768_bridge_atomic_pre_enable(), there is a
call to tc358768_hw_enable() which also contains sleeping functions:
tc358768_hw_enable()
gpiod_set_value_cansleep(priv->reset_gpio, 0);
/* wait for encoder clocks to stabilize */
usleep_range(1000, 2000);
A similar issue exists in tc358768_bridge_atomic_disable(), which directly
calls msleep(50):
tc358768_bridge_atomic_disable()
/* wait at least for one frame */
msleep(50);
Since the drm bridge atomic pre_enable and disable callbacks run in atomic
context during non-blocking commits, can these sleeping calls cause kernel
warnings or deadlocks?
>
> + /* Allow the PLL to settle */
> + mdelay(20);
> +
> drm_display_mode_to_videomode(mode, &vm);
>
> dsiclk = priv->dsiclk;
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260625082507.57703-2-clamor95@gmail.com?part=1
next prev parent reply other threads:[~2026-06-25 8:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 8:25 [PATCH v2 0/1] gpu/drm: bridge: tc358768: Add delay after PLL setup Svyatoslav Ryhel
2026-06-25 8:25 ` [PATCH v2 1/1] " Svyatoslav Ryhel
2026-06-25 8:39 ` sashiko-bot [this message]
2026-08-19 9:52 ` Luca Ceresoli
2026-08-19 9:14 ` [PATCH v2 0/1] " Svyatoslav Ryhel
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=20260625083956.B861A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=clamor95@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/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