public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH v2] drm: shmobile: Fix blank screen after resume when LCDC is stopped
Date: Fri, 27 Feb 2026 12:34:03 +1000	[thread overview]
Message-ID: <review-overall-CAMuHMdXrYTGQkjC1Sr4NjOcsRyOw3_eEj9m5MVVo1GWUuCxo3Q@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdXrYTGQkjC1Sr4NjOcsRyOw3_eEj9m5MVVo1GWUuCxo3Q@mail.gmail.com>

Overall Series Review

Subject: Re: [PATCH v2] drm: shmobile: Fix blank screen after resume when LCDC is stopped
Author: Geert Uytterhoeven <geert@linux-m68k.org>
Patches: 3
Reviewed: 2026-02-27T12:34:03.437511

---

This mbox contains two versions of the same patch: v1 (`[PATCH]`) and v2 (`[PATCH v2]`), where v2 supersedes v1. The fix addresses a real issue with the SH Mobile LCDC driver where the display start address (SA) is written via the mirror register mechanism during resume, but the controller is stopped (DO=0) so no Frame End interrupt fires to transfer the mirrored value into the active register set.

The analysis is sound and well-supported by the hardware architecture:

- `lcdc_write_mirror()` writes to `reg + LCDC_MIRROR_OFFSET (0x2000)`, the standby/mirror register
- The MRS toggle requests the hardware to switch sets on the next Frame End
- When DO=0, no frames are processed, so the switch never occurs
- `lcdc_write()` writes directly to both Set A (`reg`) and Set B (`reg + LCDC_SIDE_B_OFFSET (0x1000)`) for banked registers (LDSA1R and LDSA2R are both banked per `lcdc_is_banked()`)

The commit ordering confirms the scenario: since shmobile uses the default `drm_atomic_helper_commit_tail()` (no custom `commit_tail` override), the sequence during a modeset/resume is:
1. `drm_atomic_helper_commit_planes()` → `shmob_drm_primary_plane_setup()` (DO=0 at this point)
2. `drm_atomic_helper_commit_modeset_enables()` → `shmob_drm_crtc_atomic_enable()` → `shmob_drm_crtc_start_stop(scrtc, true)` (sets DO=1)

So when the plane setup runs, the LCDC is indeed stopped and the mirror mechanism cannot work.

---
Generated by Claude Code Patch Reviewer

      reply	other threads:[~2026-02-27  2:34 UTC|newest]

Thread overview: 4+ 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  2:34     ` Claude Code Review Bot [this message]

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=review-overall-CAMuHMdXrYTGQkjC1Sr4NjOcsRyOw3_eEj9m5MVVo1GWUuCxo3Q@mail.gmail.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /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