All of lore.kernel.org
 help / color / mirror / Atom feed
From: phucduc.bui@gmail.com
To: geert@linux-m68k.org
Cc: airlied@gmail.com, dri-devel@lists.freedesktop.org,
	laurent.pinchart@ideasonboard.com, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	phucduc.bui@gmail.com, simona@ffwll.ch, tzimmermann@suse.de
Subject: Re: [PATCH v2] drm: shmobile: Fix blank screen after resume when LCDC is stopped
Date: Fri, 27 Feb 2026 16:57:42 +0700	[thread overview]
Message-ID: <20260227095742.4449-1-phucduc.bui@gmail.com> (raw)
In-Reply-To: <CAMuHMdXrYTGQkjC1Sr4NjOcsRyOw3_eEj9m5MVVo1GWUuCxo3Q@mail.gmail.com>

Hi Geert,

> 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!

Thank you for your feedback.

To clarify the "deep sleep" context, I have tested both s2idle and deep 
states using:
- echo freeze > /sys/power/state
- echo mem > /sys/power/state

On my hardware, the issue is consistently reproducible in both cases, 
resulting in a completely white screen after resume.

Testing on Stable and Upstream:
I have verified this behavior on both the stable and latest upstream 
kernels. While the patch was originally developed on a stable branch, I 
have confirmed that it applies cleanly to the current upstream tree and 
successfully resolves the issue there as well.

Context and Environment Difference:
I first tested several Armadillo-800 EVA boards more than 10 years ago, 
and this specific resume failure was already a known, persistent 
issue back then. After 10 years, I am returning to this platform and 
testing with my current hardware, and I can confirm the behavior 
remains exactly the same.

Regarding why it works on your side: I cannot be certain about the 
specific differences in our hardware configurations. However, on my 
setup, the debug traces clearly confirm that the LDSA1R register is 
reset to 0 after resume.

Video demonstration:
I have recorded a short video demonstrating the bug (white screen after 
pressing "Switch 3" to resume):

https://youtu.be/0n9NHeZ7MWU

Detailed Logs and Configuration:
I have uploaded the kernel config and dmesg logs (including debug 
traces for LDSA1R) to this Gist:

https://gist.github.com/BuiDucPhuc/b31fc7ee784e65d192b2f49a406c3326

Technical Analysis:
I focused my debug traces on the LDSA1R register. The logs confirm that 
during resume, LDSA1R is reset to 0. When the driver updates the 
registers:
1. It writes the correct address to Side B (Mirror).
2. However, according to Figure 38.13 ("Two-set register switching 
timing") in the R8A7740 Group Hardware Manual, the transfer from Side B 
to Side A requires a Frame End interrupt.
3. Since the controller is currently stopped (DO=0), no frame is 
processed and no Frame End pulse is generated. Consequently, Side A 
remains 0x00000000, leading to the DMA fetch error and white screen.

This priming patch ensures Side A is explicitly initialized while the 
switching logic is idle, making the driver robust against register 
context loss.

Best regards,
Bui Duc Phuc

  reply	other threads:[~2026-02-27  9:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  5:13 [PATCH] drm: shmobile: Fix blank screen after resume when LCDC is stopped phucduc.bui
2026-02-26  5:40 ` [PATCH v2] " phucduc.bui
2026-02-26  8:09   ` Geert Uytterhoeven
2026-02-27  9:57     ` phucduc.bui [this message]
2026-03-13  8:37       ` Geert Uytterhoeven
2026-03-13  8:42         ` Geert Uytterhoeven
2026-03-16 11:25           ` phucduc.bui
2026-03-16 13:14             ` Geert Uytterhoeven
2026-03-17  7:17               ` [PATCH v2] drm: shmobile: Fix blank screen after resume when phucduc.bui

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=20260227095742.4449-1-phucduc.bui@gmail.com \
    --to=phucduc.bui@gmail.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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.