Re: [PATCH 6/9] drm/panel: novatek-nt36672a: Add 3 panels used in Xiaomi phones
From: Alexey Minnekhanov <hidden>
Date: 2026-09-14 12:41:20
Also in:
dri-devel, sashiko-reviews
On 13.09.2026 09:34, sashiko-bot@kernel.org wrote:
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. --quoted
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[ ... ]quoted
@@ -361,6 +361,90 @@ static void tianma_fhd_video_send_deinit_cmds(struct mipi_dsi_multi_context *dsi[ ... ]quoted
+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.
Hmm right, I should perhaps move tianma-beryllium specific deinit sequence out from common nt36672a_panel_unprepare() to its own tianma_fhd_video_send_deinit_cmds(), so each panel can use their own deinit sequence if it's needed. Will be done in v2 -- Regards, Alexey Minnekhanov