Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Duplicate execution of DCS display off and enter sleep mode commands, causing redundant panel instructions and excess delay. --
commit 84de747d38c5834c233f3124ad401f35b9b4af2b Author: Alexey Minnekhanov <[email protected]> drm/panel: novatek-nt36672a: Add 3 panels used in Xiaomi phones This commit adds support for three new DSI video mode panels based on the Novatek NT36672A controller, used in Xiaomi Redmi Note 6 Pro and Note 7. It introduces shared initialization and de-initialization sequences for these variants to minimize code duplication. > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > --- a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c [ ... ] > @@ -361,6 +361,90 @@ static void tianma_fhd_video_send_deinit_cmds(struct > mipi_dsi_multi_context *dsi [ ... ] > +static void lavender_tulip_deinit_cmds(struct mipi_dsi_multi_context > *dsi_ctx) > +{ > + dsi_ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM; > + > + mipi_dsi_dcs_set_display_off_multi(dsi_ctx); > + mipi_dsi_msleep(dsi_ctx, 20); > + mipi_dsi_dcs_enter_sleep_mode_multi(dsi_ctx); > + mipi_dsi_msleep(dsi_ctx, 120); > +} [Severity: Medium] Could this result in redundant panel instructions and an excess delay? When the panel is disabled, lavender_tulip_deinit_cmds() is called as the panel-specific deinit sequence by nt36672a_panel_unprepare(). However, nt36672a_panel_unprepare() already unconditionally executes these exact same display off and sleep commands, along with their corresponding delays, immediately after the panel-specific sequence completes. This appears to result in turning off the screen twice, incurring an unnecessary 140ms sleep and redundant DCS commands being sent to the panel during every power down operation. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=6
