gpu/drm: bridge: tc358768: Add delay after PLL setup
Subsystems (3)
v2 cover gpu/drm: bridge: tc358768: Add delay after PLL setup
After tc358768_setup_pll() enables PLL_CKEN and the lock indicator comes up, the DSI register sequence runs near immediately. On TF700T this results in the bridge claiming PLL lock but producing no DSI video output:
the panel powers up, the backlight comes on, but the framebuffer is never scanned out.
Insert a small settling delay between PLL setup and the rest of the attach.
---
- switched sleep() > delay() since *_pre_enable() is atomic
---
Svyatoslav Ryhel (1):
gpu/drm: bridge: tc358768: Add delay after PLL setup
drivers/gpu/drm/bridge/tc358768.c | 3 +++ 1 file changed, 3 insertions(+)
Signature · 1 line
2.53.0
PATCH v2 1/1 gpu/drm: bridge: tc358768: Add delay after PLL setup
After tc358768_setup_pll() enables PLL_CKEN and the lock indicator comes up, the DSI register sequence runs near immediately. On TF700T this results in the bridge claiming PLL lock but producing no DSI video output:
the panel powers up, the backlight comes on, but the framebuffer is never scanned out.
Insert a small settling delay between PLL setup and the rest of the attach.
--- drivers/gpu/drm/bridge/tc358768.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/bridge/tc358768.c +3 -0
@@ -824,6 +824,9 @@ static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge,return ; } +/* Allow the PLL to settle */ +mdelay (20 ); +drm_display_mode_to_videomode (mode, &vm); dsiclk = priv->dsiclk;
Signature · 1 line
2.53.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
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 <[email protected]>
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.
drivers/gpu/drm/bridge/tc358768.c static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge, · line 825
Quoted 7 lines
drivers/gpu/drm/bridge/tc358768.c +0
-0@@ -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?
Quoted 7 lines
drivers/gpu/drm/bridge/tc358768.c +3
-0+/* Allow the PLL to settle */ +mdelay (20 ); +drm_display_mode_to_videomode (mode, &vm); dsiclk = priv->dsiclk;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Luca Ceresoli
reviewerHello Svyatoslav,
Quoted 2 lines · Svyatoslav Ryhel
After
tc358768_setup_pll()enablesPLL_CKENand the lock indicator comes up, the DSI register sequence runs near immediately. On TF700T this
Do you refer to the Asus Transformer Pad TF700T here? Please add the full name of the device.
Quoted 19 lines
results in the bridge claiming PLL lock but producing no DSI video output:
the panel powers up, the backlight comes on, but the framebuffer is never scanned out.Insert a small settling delay between PLL setup and the rest of the attach.
Suggested-by Michele Brocco <[email protected]>Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/gpu/drm/bridge/tc358768.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/bridge/tc358768.c +0
-0
drivers/gpu/drm/bridge/tc358768.c static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge, · line 828
Quoted 5 lines
drivers/gpu/drm/bridge/tc358768.c +2
-0@@ -824,6 +824,9 @@ static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge,return ; } +/* Allow the PLL to settle */ +mdelay (20 );
Why 20 ms, and not another amount? Is it backed by some datasheet? Or just "it's what fixed my usecase"?
The extra delay is a panel requirement maybe, and definitely specific to the specific hardware pipeline of the TF700T. Would it make sense to add a DT property so only hardware needing a delay can add it, and add as much as needed?
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
ср, 19 серп. 2026 р. о 12:53 Luca Ceresoli <[email protected]> пише:
Quoted 10 lines
Hello Svyatoslav,
Quoted 2 lines · Svyatoslav Ryhel
After
tc358768_setup_pll()enablesPLL_CKENand the lock indicator comes up, the DSI register sequence runs near immediately. On TF700T thisDo you refer to the Asus Transformer Pad TF700T here? Please add the full name of the device.
Yes, I am referring to Asus Transformer Pad TF700T. Sure, my bad.
Quoted 28 lines
Quoted 19 lines
results in the bridge claiming PLL lock but producing no DSI video output:
the panel powers up, the backlight comes on, but the framebuffer is never scanned out.Insert a small settling delay between PLL setup and the rest of the attach.
Suggested-by Michele Brocco <[email protected]>Signed-off-by Svyatoslav Ryhel <[email protected]>--- drivers/gpu/drm/bridge/tc358768.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/bridge/tc358768.c +0
-0drivers/gpu/drm/bridge/tc358768.c static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge, · line 828
Quoted 5 lines
drivers/gpu/drm/bridge/tc358768.c +2
-0@@ -824,6 +824,9 @@ static void tc358768_bridge_atomic_pre_enable(struct drm_bridge *bridge,return ; } +/* Allow the PLL to settle */ +mdelay (20 );Why 20 ms, and not another amount? Is it backed by some datasheet? Or just "it's what fixed my usecase"?
Quoted 5 lines
The extra delay is a panel requirement maybe, and definitely specific to the specific hardware pipeline of the TF700T. Would it make sense to add a DT property so only hardware needing a delay can add it, and add as much as needed?
This is a fair point. Thank you Luca. I will experiment a bit more to see how this can be arranged differently.
Quoted 6 lines
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
чт, 25 черв. 2026 р. о 11:25 Svyatoslav Ryhel <[email protected]> пише:
Quoted 14 lines
After
tc358768_setup_pll()enablesPLL_CKENand the lock indicator comes up, the DSI register sequence runs near immediately. On TF700T this results in the bridge claiming PLL lock but producing no DSI video output:
the panel powers up, the backlight comes on, but the framebuffer is never scanned out.Insert a small settling delay between PLL setup and the rest of the attach.
---
- switchedsleep()>delay()since*_pre_enable()is atomic
---
Quoted 9 lines
Svyatoslav Ryhel (1):
gpu/drm: bridge: tc358768: Add delay after PLL setupdrivers/gpu/drm/bridge/tc358768.c | 3 +++ 1 file changed, 3 insertions(+)--
2.53.0
Hello there! If no one objects, may this patch be applied? It is quite important for ASUS TF700T to work properly. Thank you!