Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] Unintended short-circuiting of the panel power-down sequence on error. --
--- Patch [1]: [PATCH v2] drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions --- commit dccc547d72f30cdc8106a575cdc689ca0fbc4142 Author: Akash Sukhavasi <[email protected]> drm/panel: tdo-tl070wsh30: Use mipi_dsi_*_multi() functions This commit converts the tdo-tl070wsh30 panel driver to use the mipi_dsi_*_multi() API. It also updates unprepare() to disable the regulator unconditionally and return 0. Link: https://lore.kernel.org/r/[email protected] > diff --git a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c > b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c > index 13cfe252a838d..cd846e5ab2e7e 100644 > --- a/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c > +++ b/drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c [ ... ] > static int tdo_tl070wsh30_panel_unprepare(struct drm_panel *panel) > { > struct tdo_tl070wsh30_panel *tdo_tl070wsh30 = > to_tdo_tl070wsh30_panel(panel); > - int err; > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = tdo_tl070wsh30->link }; > > - err = mipi_dsi_dcs_set_display_off(tdo_tl070wsh30->link); > - if (err < 0) > - dev_err(panel->dev, "failed to set display off: %d\n", err); > + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx); > > - usleep_range(10000, 11000); > + mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000); > > - err = mipi_dsi_dcs_enter_sleep_mode(tdo_tl070wsh30->link); > - if (err < 0) { > - dev_err(panel->dev, "failed to enter sleep mode: %d\n", err); > - return err; > - } > + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); > > - usleep_range(10000, 11000); > + mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000); > > regulator_disable(tdo_tl070wsh30->supply); [Severity: Medium] Does this unintentionally short-circuit the panel power-down sequence on error? In the original code, if mipi_dsi_dcs_set_display_off fails, the error is logged but execution continues. This ensures the 10ms delays and the enter_sleep_mode command are still processed before disabling the regulator. With the multi API, if mipi_dsi_dcs_set_display_off_multi fails, it sets dsi_ctx.accum_err. The subsequent mipi_dsi_usleep_range and mipi_dsi_dcs_enter_sleep_mode_multi calls will check this accumulated error and skip their execution entirely. Could this immediate jump to regulator_disable violate the panel's power-down timing requirements by skipping the mandatory delays? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
