Skip to content

Commit

Permalink
drm/panel: xinpeng-xpp055c272: Stop tracking prepared
Browse files Browse the repository at this point in the history
As talked about in commit d2aacaf ("drm/panel: Check for already
prepared/enabled in drm_panel"), we want to remove needless code from
panel drivers that was storing and double-checking the
prepared/enabled state. Even if someone was relying on the
double-check before, that double-check is now in the core and not
needed in individual drivers.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.30.I2145be78ce28327f4588c2c21370f22fd79d28b8@changeid
  • Loading branch information
Douglas Anderson committed May 28, 2024
1 parent bc62654 commit 4e5e6fa
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/gpu/drm/panel/panel-xinpeng-xpp055c272.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ struct xpp055c272 {
struct gpio_desc *reset_gpio;
struct regulator *vci;
struct regulator *iovcc;
bool prepared;
};

static inline struct xpp055c272 *panel_to_xpp055c272(struct drm_panel *panel)
Expand Down Expand Up @@ -136,9 +135,6 @@ static int xpp055c272_unprepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;

if (!ctx->prepared)
return 0;

ret = mipi_dsi_dcs_set_display_off(dsi);
if (ret < 0)
dev_err(ctx->dev, "failed to set display off: %d\n", ret);
Expand All @@ -152,8 +148,6 @@ static int xpp055c272_unprepare(struct drm_panel *panel)
regulator_disable(ctx->iovcc);
regulator_disable(ctx->vci);

ctx->prepared = false;

return 0;
}

Expand All @@ -163,9 +157,6 @@ static int xpp055c272_prepare(struct drm_panel *panel)
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
int ret;

if (ctx->prepared)
return 0;

dev_dbg(ctx->dev, "Resetting the panel\n");
ret = regulator_enable(ctx->vci);
if (ret < 0) {
Expand Down Expand Up @@ -209,8 +200,6 @@ static int xpp055c272_prepare(struct drm_panel *panel)

msleep(50);

ctx->prepared = true;

return 0;

disable_iovcc:
Expand Down

0 comments on commit 4e5e6fa

Please sign in to comment.