From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
Date: Tue, 28 Apr 2026 15:33:35 +1000 [thread overview]
Message-ID: <review-patch1-20260425165751.1716569-1-zhengxingda@iscas.ac.cn> (raw)
In-Reply-To: <20260425165751.1716569-1-zhengxingda@iscas.ac.cn>
Patch Review
**Analysis of the bug:**
At probe time (line 1173-1174), `mode_flags` is initialized with `MIPI_DSI_MODE_LPM` set:
```c
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
MIPI_DSI_MODE_LPM;
```
In `hx83102_disable()`, `MIPI_DSI_MODE_LPM` is cleared at line 935:
```c
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
```
Before this patch, the flag was never restored. The `unprepare` function (line 947) doesn't issue any DSI commands — it only toggles GPIOs and regulators — so the missing flag persists into the next `prepare`/`init` cycle. Since the init sequences send many DSI commands expecting LP mode, this breaks the second panel enable.
**The fix** (line 940):
```c
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
```
This is placed after the two DSI DCS commands (`set_display_off` and `enter_sleep_mode`) and before the `mipi_dsi_msleep()`. The placement is correct — the disable commands that need HS mode have already been sent, and restoring LPM before the sleep is harmless (the sleep helper only touches the error accumulator and calls `msleep`, it doesn't send a DSI command that would be affected by the mode flag).
**Consistency with existing code:** The backlight functions in the same file (`hx83102_bl_update_status` at lines 1064-1070 and `hx83102_bl_get_brightness` at lines 1081-1087) use the exact same clear-before/restore-after pattern. This patch makes `hx83102_disable` consistent with those.
**Minor observation:** The commit message and `Fixes:` tag are well-formed. The `Cc: stable@vger.kernel.org # 6.11+` annotation is appropriate since the bug was introduced by the refactoring in commit `0ef94554dc40`.
**No issues found.**
Reviewed-by tag recommendation: This patch is ready to be applied as-is.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-28 5:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-25 16:57 [PATCH] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds Icenowy Zheng
2026-04-27 7:46 ` Neil Armstrong
2026-04-27 18:24 ` Doug Anderson
2026-04-28 5:33 ` Claude review: " Claude Code Review Bot
2026-04-28 5:33 ` 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-patch1-20260425165751.1716569-1-zhengxingda@iscas.ac.cn \
--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