On Thu, Jul 2, 2026 at 7:06 PM Laxman Acharya Padhya
<[email protected]> wrote:

> If enabling tearing mode or exiting sleep mode fails after the
> regulator is enabled, s6d16d0_prepare() returns without asserting
> reset or disabling the supply. Since the DRM panel core leaves the
> panel unprepared, a later unprepare call skips the driver callback
> and the supply remains enabled.
>
> Assert reset and disable the supply before returning the DSI command error.
>
> Fixes: ac1d6d74884e ("drm/panel: Add driver for Samsung S6D16D0 panel")
> Assisted-by: Codex:gpt-5
> Signed-off-by: Laxman Acharya <[email protected]>
(...)
>   if (ret) {
>   dev_err(s6->dev, "failed to enable vblank TE (%d)\n", ret);
> - return ret;
> + goto err_power_off;
>   }
>   /* Exit sleep mode and power on */
>   ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
>   if (ret) {
>   dev_err(s6->dev, "failed to exit sleep mode (%d)\n", ret);
> - return ret;
> + goto err_power_off;
>   }
>
>   return 0;
> +
> +err_power_off:
> + gpiod_set_value_cansleep(s6->reset_gpio, 1);
> + regulator_disable(s6->supply);
> +
> + return ret;

What's with the indentation in this patch?

It seems whitespace-mangled.

Please fix up and resend, the patch as such looks good!

Yours,
Linus Walleij

Reply via email to