From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260425165751.1716569-1-zhengxingda@iscas.ac.cn> References: <20260425165751.1716569-1-zhengxingda@iscas.ac.cn> <20260425165751.1716569-1-zhengxingda@iscas.ac.cn> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 =3D 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 &=3D ~MIPI_DSI_MODE_LPM; ``` Before this patch, the flag was never restored. The `unprepare` function (l= ine 947) doesn't issue any DSI commands =E2=80=94 it only toggles GPIOs and= regulators =E2=80=94 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 |=3D 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 = =E2=80=94 the disable commands that need HS mode have already been sent, an= d 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 th= at would be affected by the mode flag). **Consistency with existing code:** The backlight functions in the same fil= e (`hx83102_bl_update_status` at lines 1064-1070 and `hx83102_bl_get_bright= ness` at lines 1081-1087) use the exact same clear-before/restore-after pat= tern. 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 t= he 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