Re: [PATCH v2] drm/panel: boe-bf060y8m-aj0: transition to mipi_dsi wrapped functions

From: Dmitry Baryshkov
Date: Mon Mar 31 2025 - 16:28:26 EST


On Mon, Mar 31, 2025 at 08:06:36AM -0700, Doug Anderson wrote:
> Hi,
>
> On Sun, Mar 30, 2025 at 11:18 PM Tejas Vipin <tejasvipin76@xxxxxxxxx> wrote:
> >
> > @@ -157,7 +137,6 @@ static int boe_bf060y8m_aj0_prepare(struct drm_panel *panel)
> >
> > ret = boe_bf060y8m_aj0_on(boe);
> > if (ret < 0) {
> > - dev_err(dev, "Failed to initialize panel: %d\n", ret);
> > gpiod_set_value_cansleep(boe->reset_gpio, 1);
> > return ret;
>
> It's not new, but the error handling here looks wrong to me. Instead
> of just returning after setting the GPIO, this should be turning off
> the regulators, shouldn't it? That would mean adding a new error label
> for turning off "BF060Y8M_VREG_VCI" and then jumping to that.

We should not be turning off the regulator in _prepare(), there will be
an unmatched regulator disable call happening in _unprepare(). Of course
it can be handled by adding a boolean, etc, but I think keeping them on
is a saner thing.

>
> Given that we're already squeezing an error handling fix into this
> patch, maybe it would make sense to add this one too (and, of course,
> mention it in the commit message).
>
> -Doug

--
With best wishes
Dmitry