Re: [PATCH v2] drm: shmobile: Fix blank screen after resume when LCDC is stopped
From: Geert Uytterhoeven
Date: Thu Feb 26 2026 - 03:12:34 EST
Hi Phucduc,
On Thu, 26 Feb 2026 at 06:40, <phucduc.bui@xxxxxxxxx> wrote:
> From: bui duc phuc <phucduc.bui@xxxxxxxxx>
>
> The LCDC controller on R8A7740 loses its register state during
> deep sleep. Upon resume, the driver's Mirror Register mechanism
> (MRS) fails to update active registers because the controller is
> stopped (DO=0).
>
> According to the datasheet (Section 38.7.1, Figure 38.13), the
> Two-Set Register Switching logic only triggers a change between
> Set A and Set B when a Frame End Interrupt occurs at the
> completion of a display frame. During resume, as the LCDC is
> stopped, no frame is processed and no Frame End pulse is
> generated. This leaves the Display Data Start Address (SA)
> pending in the standby set, while the active register (Side A)
> remains at 0x00000000, preventing the display engine from
> starting.Debug logs collected during resume confirm this
> behavior, showing the start address written to the standby set
> while the active register remains unchanged.
>
> Prime both register sets when the LCDC is stopped:
>
> If DO=0: Use lcdc_write() to force the Start Address (SA)
> into both Set A and Set B registers. This bypasses the
> switching logic and ensures the engine has a valid base
> address immediately upon being enabled.
>
> If DO=1: Maintain the standard Mirror mechanism and MRS
> toggle for normal, tear-free operation.
>
> Verified on R8A7740.
>
> Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
Thanks for your patch!
What do you mean by "deep sleep"? s2ram? In upstream, s2ram behaves
the same as s2idle, and the LCD works fine after resume from s2ram on
my Amadillo, with and without your patch,
What am I missing?
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds