Hi,

On Thu, Jul 30, 2026 at 5:11 PM Akash Sukhavasi
<[email protected]> wrote:
>
> The mipi_dsi_dcs_*() functions used by this driver are deprecated in
> favor of their _multi() counterparts, as noted in
> Documentation/gpu/todo.rst. The _multi() variants record the first
> error in a context structure and skip every later call once an error
> is set, so the return value no longer has to be checked after each
> command. They also log their own failures, which makes the per-call
> dev_err() calls redundant.
>
> Convert prepare() and unprepare(). prepare() uses mipi_dsi_msleep()
> for the delays between DSI commands. unprepare() uses plain
> usleep_range() so the delays run unconditionally after the
> accumulated error is cleared. The delays in the GPIO reset sequence
> stay as plain msleep() and usleep_range(), since they run before any
> DSI transaction.
>
> unprepare() now disables the regulator unconditionally and returns 0.
> Previously a failure of set_display_off() was logged and the sequence
> continued, while a failure of enter_sleep_mode() returned early,
> leaving the regulator enabled and the panel unable to be brought back
> up, since drm_panel_unprepare() skips panel->prepared = false on
> error. The accumulated error from set_display_off() is cleared so
> that the delay and enter_sleep_mode() are still attempted, preserving
> the original fall-through behavior. Both drm_panel_prepare() and
> drm_panel_unprepare() return void, so the error was never propagated
> to a caller in any case.
>
> Signed-off-by: Akash Sukhavasi <[email protected]>
> ---
> Changes in v3:
> - Update subject line to reflect the minor bugfixes, per Doug's review.
> - Pack blank lines in both functions per Doug's review.
> - Preserve the original fall-through behavior in unprepare(): clear
>   accum_err after set_display_off() so the delay and enter_sleep_mode()
>   are still attempted even if display off fails.
> - Link to v2: 
> https://lore.kernel.org/r/[email protected]
>
> Compile tested only, no hardware available. checkpatch and a W=1 build
> are clean.
>
> Changes in v2:
> - unprepare() disables the regulator unconditionally and returns 0,
>   per Sashiko's review on v1. Returning an error left panel->prepared
>   set, so the panel could not be prepared again.
> - Link to v1: 
> https://lore.kernel.org/r/[email protected]
> ---
>  drivers/gpu/drm/panel/panel-tdo-tl070wsh30.c | 40 
> +++++++++-------------------
>  1 file changed, 12 insertions(+), 28 deletions(-)

Looks good to me.

Reviewed-by: Douglas Anderson <[email protected]>

Even though it has some minor fixes, I'll still probably put it in
"drm-misc-next" rather than "drm-misc-fixes". That gives us extra bake
time, which is especially good since the fixes are all based on code
inspection.

I'll plan to apply in ~1 week unless something comes up.

-Doug

Reply via email to