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: drm: shmobile: Fix white screen after resume when LCDC is stopped
Date: Sun, 22 Mar 2026 04:28:52 +1000	[thread overview]
Message-ID: <review-patch1-20260319083207.17195-1-phucduc.bui@gmail.com> (raw)
In-Reply-To: <20260319083207.17195-1-phucduc.bui@gmail.com>

Patch Review

**Correctness: Good.** The logic correctly distinguishes between the running and stopped states:

```c
ldcnt2r = lcdc_read(sdev, LDCNT2R);

if (ldcnt2r & LDCNT2R_DO) {
    lcdc_write_mirror(sdev, LDSA1R, sstate->dma[0]);
    ...
    lcdc_write(sdev, LDRCNTR, lcdc_read(sdev, LDRCNTR) ^ LDRCNTR_MRS);
} else {
    lcdc_write(sdev, LDSA1R, sstate->dma[0]);
    ...
}
```

When DO=0, `lcdc_write()` is used which writes to both the base register and `reg + LCDC_SIDE_B_OFFSET` (since LDSA1R and LDSA2R are banked registers per `lcdc_is_banked()`). This primes both register sets, avoiding the white screen.

When DO=1, the existing mirror-write + MRS toggle path is preserved, maintaining the correct double-buffered update behavior during normal operation.

**Minor observations:**
- The `LDRCNTR` toggle is correctly omitted in the DO=0 path since there's no need to request a register set switch when the controller is stopped.
- The YUV handling (LDSA2R) is consistently handled in both branches.
- No concerns about atomicity — in the DO=0 case the controller is stopped so there's no race with hardware reading registers.

**Commit message:** Clear, well-written, explains the root cause and the fix. The changelog for v2/v3 is properly formatted below the `---` separator.

**Verdict: No issues found.** This is a clean, correct, and well-tested fix.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-21 18:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  8:31 [PATCH v3] drm: shmobile: Fix white screen after resume when LCDC is stopped phucduc.bui
2026-03-21 18:28 ` Claude Code Review Bot [this message]
2026-03-21 18:28 ` Claude review: " Claude Code Review Bot

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-patch1-20260319083207.17195-1-phucduc.bui@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