* [PATCH] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
@ 2026-04-25 16:57 Icenowy Zheng
2026-04-27 7:46 ` Neil Armstrong
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Icenowy Zheng @ 2026-04-25 16:57 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Cong Yang
Cc: David Airlie, Simona Vetter, Douglas Anderson, dri-devel,
linux-kernel, Icenowy Zheng, stable
When preparing the panel, it seems that it always expects commands to be
transferred in LP mode. However, the disable function removes the
MIPI_DSI_MODE_LPM flag, and no other function re-adds it.
As the unprepare function contains no DSI commands, re-adding the flag
just after disabling the panel should be safe. Add the code re-adding
the flag after the two commands for disabling the panel are sent.
This fixes screen unblanking (after blanking once) on
mt8188-geralt-ciri-sku1 device.
Cc: stable@vger.kernel.org # 6.11+
Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c
index 8b2a68ee851e3..a5e5c9ea7a73f 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx83102.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
@@ -937,6 +937,8 @@ static int hx83102_disable(struct drm_panel *panel)
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
mipi_dsi_msleep(&dsi_ctx, 150);
return dsi_ctx.accum_err;
--
2.52.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
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
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2026-04-27 7:46 UTC (permalink / raw)
To: Icenowy Zheng, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Cong Yang
Cc: David Airlie, Simona Vetter, Douglas Anderson, dri-devel,
linux-kernel, stable
On 4/25/26 18:57, Icenowy Zheng wrote:
> When preparing the panel, it seems that it always expects commands to be
> transferred in LP mode. However, the disable function removes the
> MIPI_DSI_MODE_LPM flag, and no other function re-adds it.
>
> As the unprepare function contains no DSI commands, re-adding the flag
> just after disabling the panel should be safe. Add the code re-adding
> the flag after the two commands for disabling the panel are sent.
>
> This fixes screen unblanking (after blanking once) on
> mt8188-geralt-ciri-sku1 device.
>
> Cc: stable@vger.kernel.org # 6.11+
> Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver")
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
> drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-himax-hx83102.c b/drivers/gpu/drm/panel/panel-himax-hx83102.c
> index 8b2a68ee851e3..a5e5c9ea7a73f 100644
> --- a/drivers/gpu/drm/panel/panel-himax-hx83102.c
> +++ b/drivers/gpu/drm/panel/panel-himax-hx83102.c
> @@ -937,6 +937,8 @@ static int hx83102_disable(struct drm_panel *panel)
> mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
> mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
>
> + dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +
> mipi_dsi_msleep(&dsi_ctx, 150);
>
> return dsi_ctx.accum_err;
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
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
3 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2026-04-27 18:24 UTC (permalink / raw)
To: Icenowy Zheng
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Cong Yang, David Airlie, Simona Vetter,
dri-devel, linux-kernel, stable
Hi,
On Sat, Apr 25, 2026 at 9:58 AM Icenowy Zheng <zhengxingda@iscas.ac.cn> wrote:
>
> When preparing the panel, it seems that it always expects commands to be
> transferred in LP mode. However, the disable function removes the
> MIPI_DSI_MODE_LPM flag, and no other function re-adds it.
>
> As the unprepare function contains no DSI commands, re-adding the flag
> just after disabling the panel should be safe. Add the code re-adding
> the flag after the two commands for disabling the panel are sent.
>
> This fixes screen unblanking (after blanking once) on
> mt8188-geralt-ciri-sku1 device.
>
> Cc: stable@vger.kernel.org # 6.11+
> Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver")
This "Fixes" looks wrong. The bug was still there even before the
driver was broken out. ...and it looks like the driver that this was
broken out of (panel-boe-tv101wum-nl6.c) still has the same bug?
-Doug
^ permalink raw reply [flat|nested] 5+ messages in thread* Claude review: drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
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 Code Review Bot
2026-04-28 5:33 ` Claude Code Review Bot
3 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 5:33 UTC (permalink / raw)
To: dri-devel-reviews
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
^ permalink raw reply [flat|nested] 5+ messages in thread* Claude review: drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
2026-04-25 16:57 [PATCH] drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds Icenowy Zheng
` (2 preceding siblings ...)
2026-04-28 5:33 ` Claude review: " Claude Code Review Bot
@ 2026-04-28 5:33 ` Claude Code Review Bot
3 siblings, 0 replies; 5+ messages in thread
From: Claude Code Review Bot @ 2026-04-28 5:33 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/panel: himax-hx83102: restore MODE_LPM after sending disable cmds
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Patches: 3
Reviewed: 2026-04-28T15:33:35.192871
---
This is a single-patch fix for the `panel-himax-hx83102` driver. The bug is straightforward: `hx83102_disable()` clears `MIPI_DSI_MODE_LPM` to send the display-off and enter-sleep-mode commands in HS (high-speed) mode, but never restores the flag afterward. When the panel is later re-prepared, the init sequence runs without `MIPI_DSI_MODE_LPM`, causing the prepare to fail and breaking screen unblanking.
The fix is correct and follows the exact same pattern already used by `hx83102_bl_update_status()` and `hx83102_bl_get_brightness()` in the same file — clear LPM before the commands, restore it after.
**Verdict: Looks good.** This is a clean, minimal bug fix suitable for stable backport.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-28 5:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox