drivers: display: stm32_ltdc: display breaks when the SoC enters Stop
Describe the bug
With CONFIG_PM=y, nothing keeps the PM policy from putting an STM32F4 into Stop while the LTDC scans out the frame buffer. In Stop all clocks in the 1.2 V domain are stopped and the PLLs are off (RM0090 Rev 22 section 5.3.5, RM0386 Rev 6 section 5.5.5), so the panel is no longer refreshed whenever the system is idle. On an STM32F429I-DISC1 the screen becomes unusable: vertical stripes, ghosting and fading to white, in turn.
With CONFIG_PM_DEVICE_SYSTEM_MANAGED=y as well, the LTDC is suspended and resumed around every Stop entry: suspend resets it, resume initializes it again, and the picture comes back shifted up.
Frames the LTDC scans out (line interrupt) and Stop entries (pm_notifier) per 2 s of sleep:
| Frames per 2 s | Stop entries per 2 s | |
|---|---|---|
| PM off | 132 to 133 | 0 |
CONFIG_PM=y |
2 | 1 |
Regression
- This is a regression.
Steps to reproduce
- Build an app for
stm32f429i_disc1withCONFIG_PM=ythat draws a test pattern withdisplay_write(), then sleeps in 2 s steps (k_sleep(K_SECONDS(2))). - Flash it and watch the panel: stripes, ghosting and fading to white. With PM off the pattern stays.
Relevant log output
*** Booting Zephyr OS build v4.4.0-16713-gf976662aa5f4 ***
lcd-pm: PM=1 PM_DEVICE=0 SYSTEM_MANAGED=0 lock_states=0 fb=0xd0000000 240x320
lcd-pm: drawn, fixed rows crc 628fdfcf
lcd-pm: step 1 t=2223 ms vsync=2 stop=1 fb=same
lcd-pm: step 2 t=4260 ms vsync=2 stop=1 fb=sameImpact
Functional Limitation – Some features not working as expected, but system usable.
Environment
- OS: Ubuntu 24.04 (VM on macOS 26.6)
- Toolchain: Zephyr SDK 1.0.1
- Commit: f976662aa5f
- Board: STM32F429I-DISC1 (MB1075 rev E)
Additional Context
The L4, U5 and H5 series also have an LTDC and system PM; I have only tested F4. #120405 locks the power states listed in the node's zephyr,disabling-power-states while the LTDC runs, and lists Stop there in stm32f429.dtsi.
Source: zephyrproject-rtos/zephyr