public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
@ 2026-05-03  9:17 Icenowy Zheng
  2026-05-04  6:48 ` Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Icenowy Zheng @ 2026-05-03  9:17 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Cong Yang
  Cc: David Airlie, Simona Vetter, Jitao Shi, 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 error messages shown in kernel log when unblanking on
mt8183-kukui-kodama-sku32 device.

Cc: stable@vger.kernel.org
Fixes: a869b9db7adf ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel")
Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
---
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index d5fe105bdbdde..658ce64c71eb2 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -1324,6 +1324,8 @@ static int boe_panel_disable(struct drm_panel *panel)
 	mipi_dsi_dcs_set_display_off_multi(&ctx);
 	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
+	boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
 	mipi_dsi_msleep(&ctx, 150);
 
 	return ctx.accum_err;
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
  2026-05-03  9:17 [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Icenowy Zheng
@ 2026-05-04  6:48 ` Neil Armstrong
  2026-05-04 22:45 ` Claude review: " Claude Code Review Bot
  2026-05-04 22:45 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2026-05-04  6:48 UTC (permalink / raw)
  To: Icenowy Zheng, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Cong Yang
  Cc: David Airlie, Simona Vetter, Jitao Shi, Douglas Anderson,
	dri-devel, linux-kernel, stable

On 5/3/26 11:17, 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 error messages shown in kernel log when unblanking on
> mt8183-kukui-kodama-sku32 device.
> 
> Cc: stable@vger.kernel.org
> Fixes: a869b9db7adf ("drm/panel: support for boe tv101wum-nl6 wuxga dsi video mode panel")
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
> ---
>   drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> index d5fe105bdbdde..658ce64c71eb2 100644
> --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> @@ -1324,6 +1324,8 @@ static int boe_panel_disable(struct drm_panel *panel)
>   	mipi_dsi_dcs_set_display_off_multi(&ctx);
>   	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
>   
> +	boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
> +
>   	mipi_dsi_msleep(&ctx, 150);
>   
>   	return ctx.accum_err;

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Claude review: drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
  2026-05-03  9:17 [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Icenowy Zheng
  2026-05-04  6:48 ` Neil Armstrong
  2026-05-04 22:45 ` Claude review: " Claude Code Review Bot
@ 2026-05-04 22:45 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 22:45 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
Author: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Patches: 2
Reviewed: 2026-05-05T08:45:16.029688

---

This is a single-patch fix for the `panel-boe-tv101wum-nl6` driver. The problem is real and well-understood: `boe_panel_disable()` clears `MIPI_DSI_MODE_LPM` so that the display-off and enter-sleep-mode commands are sent in HS mode, but it never restores the flag. On the next enable/prepare cycle, the init commands are sent without LPM set on `dsi->mode_flags`, which causes errors because the panel expects LP mode for initialization commands.

The fix is correct in principle — other panel drivers (e.g., `panel-boe-bf060y8m-aj0`, `panel-boe-td4320`, `panel-himax-hx83112b`) follow the same pattern of clearing LPM for disable commands and restoring it afterward.

**Verdict: The fix addresses a real bug and should be accepted, with one placement concern worth discussing.**

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Claude review: drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds
  2026-05-03  9:17 [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Icenowy Zheng
  2026-05-04  6:48 ` Neil Armstrong
@ 2026-05-04 22:45 ` Claude Code Review Bot
  2026-05-04 22:45 ` Claude Code Review Bot
  2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-05-04 22:45 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**The bug:** In `boe_panel_disable()` (line 1322 of the current tree), the driver clears `MIPI_DSI_MODE_LPM`:

```c
boe->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
```

This is intentional — the display-off and sleep-enter DCS commands should be sent in HS mode. However, the flag is never restored, so on the next prepare/init cycle (which doesn't independently set LPM), commands are sent in HS mode when LP mode is expected.

**The fix is correct.** The patch adds:

```c
boe->dsi->mode_flags |= MIPI_DSI_MODE_LPM;
```

This matches the established pattern in other panel drivers. The `Fixes:` tag and `Cc: stable` are appropriate since this is a clear regression-fix for the original driver commit.

**Minor placement concern:** The restore is inserted *between* `mipi_dsi_dcs_enter_sleep_mode_multi()` and the `mipi_dsi_msleep(&ctx, 150)` delay. Most other drivers that follow this pattern (e.g., `panel-boe-bf060y8m-aj0` at line 102) restore LPM *after* the final delay in the off sequence. In this driver the `mipi_dsi_msleep` is a multi-context sleep, which checks `ctx.accum_err` but doesn't issue DSI commands, so the placement is functionally harmless. Still, placing the restore **after** the `mipi_dsi_msleep()` and before the `return` would be slightly cleaner — it keeps all HS-mode operations (including the sleep delay that's part of the disable sequence) grouped together, and restores LPM only once the disable sequence is truly complete. This is a style nit, not a correctness issue.

**Commit message:** Clear, explains the problem, the fix, and the real-world impact (error messages on mt8183-kukui-kodama-sku32). Well written.

**Overall: Looks good.** Reviewed-by worthy, optionally with the minor suggestion to move the restore after the msleep.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-04 22:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-03  9:17 [PATCH] drm/panel: boe-tv101wum-nl6: restore MODE_LPM after sending disable cmds Icenowy Zheng
2026-05-04  6:48 ` Neil Armstrong
2026-05-04 22:45 ` Claude review: " Claude Code Review Bot
2026-05-04 22:45 ` 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