Hi, On Sat, Mar 15, 2025 at 9:50 PM Tejas Vipin <tejasvipin76@xxxxxxxxx> wrote: > > @@ -62,93 +62,66 @@ static void s6d7aa0_reset(struct s6d7aa0 *ctx) > msleep(50); > } > > -static int s6d7aa0_lock(struct s6d7aa0 *ctx, bool lock) > +static void s6d7aa0_lock(struct s6d7aa0 *ctx, struct mipi_dsi_multi_context *dsi_ctx, bool lock) > { > - struct mipi_dsi_device *dsi = ctx->dsi; > + if (dsi_ctx->accum_err) > + return; nit: I don't think you need this extra check, do you? The entire function is "multi" calls so just let them be no-ops. It may seem like an optimization to have the extra check at the start of the function, but it's better to optimize for the "no error" case and let the "error" case be a little slower. > static int s6d7aa0_on(struct s6d7aa0 *ctx) > { > struct mipi_dsi_device *dsi = ctx->dsi; > - struct device *dev = &dsi->dev; > - int ret; > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; > > - ret = ctx->desc->init_func(ctx); > - if (ret < 0) { > - dev_err(dev, "Failed to initialize panel: %d\n", ret); > + ctx->desc->init_func(ctx, &dsi_ctx); > + if (dsi_ctx.accum_err < 0) > gpiod_set_value_cansleep(ctx->reset_gpio, 1); > - return ret; > - } > > - ret = mipi_dsi_dcs_set_display_on(dsi); > - if (ret < 0) { > - dev_err(dev, "Failed to set display on: %d\n", ret); > - return ret; > - } > + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); > > - return 0; > + return dsi_ctx.accum_err; Not something new to your patch, I wonder if the setting of the reset GPIO should actually be _below_ the call to turn the display on. Seems like if that fails you should also be setting the reset GPIO. That would be a change in behavior but seems more correct? Given that it's a change in behavior, I'd be OK w/ leaving it as-is or changing it (and mentioning it in the commit message). I'd be curious if anyone else has opinions here. ...oh, actually, you should just delete the reset GPIO stuff from this function. The one caller of this function is already setting the reset GPIO, right? Everything else looks good to me. -DOug