[PATCH v6 2/7] drm/panel: himax-hx83102: Break out as separate driver
Doug Anderson
dianders at chromium.org
Mon May 13 16:49:31 UTC 2024
Hi,
On Fri, May 10, 2024 at 7:13 PM Cong Yang
<yangcong5 at huaqin.corp-partner.google.com> wrote:
>
> +static int hx83102_prepare(struct drm_panel *panel)
> +{
> + struct hx83102 *ctx = panel_to_hx83102(panel);
> + struct mipi_dsi_device *dsi = ctx->dsi;
> + struct device *dev = &dsi->dev;
> + int ret;
> +
> + gpiod_set_value(ctx->enable_gpio, 0);
> + usleep_range(1000, 1500);
> +
> + ret = regulator_enable(ctx->pp1800);
> + if (ret < 0)
> + return ret;
> +
> + usleep_range(3000, 5000);
> +
> + ret = regulator_enable(ctx->avdd);
> + if (ret < 0)
> + goto poweroff1v8;
> + ret = regulator_enable(ctx->avee);
> + if (ret < 0)
> + goto poweroffavdd;
> +
> + usleep_range(10000, 11000);
> +
> + mipi_dsi_dcs_nop(ctx->dsi);
> + usleep_range(1000, 2000);
> +
> + gpiod_set_value(ctx->enable_gpio, 1);
> + usleep_range(1000, 2000);
> + gpiod_set_value(ctx->enable_gpio, 0);
> + usleep_range(1000, 2000);
> + gpiod_set_value(ctx->enable_gpio, 1);
> + usleep_range(6000, 10000);
> +
> + ret = ctx->desc->init(ctx);
> + if (ret < 0)
> + goto poweroff;
> +
> + ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
> + if (ret) {
> + dev_err(dev, "Failed to exit sleep mode: %d\n", ret);
> + return ret;
> + }
The above should have been "goto poweroff", not "return ret".
> + msleep(120);
> +
> + ret = mipi_dsi_dcs_set_display_on(dsi);
> + if (ret) {
> + dev_err(dev, "Failed to turn on the display: %d\n", ret);
> + return ret;
> + }
The above should have been "goto poweroff", not "return ret".
Other than that:
Reviewed-by: Douglas Anderson <dianders at chromium.org>
More information about the dri-devel
mailing list