Hi, On Mon, Oct 12, 2026 at 9:35 PM Akash Sukhavasi <[email protected]> wrote: > > The mipi_dsi_dcs_*() and mipi_dsi_generic_write() functions used by > this driver are deprecated in favour of their _multi() counterparts, > as noted in Documentation/gpu/todo.rst. The _multi() variants record > the first error in a context structure and skip subsequent calls once > an error is set, removing the need to check the return value after > each command. They also log failures internally, making the per-call > dev_err() calls redundant. > > Convert prepare(), disable(), and unprepare() to use the _multi() > equivalents. > > In prepare(), use mipi_dsi_msleep() and mipi_dsi_usleep_range() instead > of plain msleep()/usleep_range() for delays between DSI commands, so > they are skipped on prior error since the function will clean up via the > existing poweroff label anyway. > > In unprepare(), keep plain msleep() since the hardware delay must execute > regardless of any prior DSI error. This also fixes a bug where a failure > in enter_sleep_mode would return early, skipping the T15 delay, GPIO > deassertion, and regulator disable, leaving the panel stuck in a > prepared state. Because drm_panel_unprepare() does not clear > panel->prepared when the callback returns an error, drm_panel_prepare() > would return early on the next call, leaving the panel unable to be > re-initialised. > > For the same reason, stop returning the regulator_disable() error from > unprepare(). Returning it would leave the panel in the same stuck state. > > Signed-off-by: Akash Sukhavasi <[email protected]> > --- > Compile tested only, no hardware available. checkpatch and a W=1 > build are clean. > --- > drivers/gpu/drm/panel/panel-kingdisplay-kd097d04.c | 53 > ++++++++-------------- > 1 file changed, 18 insertions(+), 35 deletions(-)
Reviewed-by: Douglas Anderson <[email protected]>
