Commit 598dc42f authored by Douglas Anderson's avatar Douglas Anderson

drm/panel: raydium-rm692e5: Stop tracking prepared

As talked about in commit d2aacaf0 ("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.

Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Tested-by: default avatarLuca Weiss <luca.weiss@fairphone.com>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.1.I784238de4810658212a5786b219f128460562a37@changeid
parent 74bde758
...@@ -23,7 +23,6 @@ struct rm692e5_panel { ...@@ -23,7 +23,6 @@ struct rm692e5_panel {
struct drm_dsc_config dsc; struct drm_dsc_config dsc;
struct regulator_bulk_data supplies[3]; struct regulator_bulk_data supplies[3];
struct gpio_desc *reset_gpio; struct gpio_desc *reset_gpio;
bool prepared;
}; };
static inline struct rm692e5_panel *to_rm692e5_panel(struct drm_panel *panel) static inline struct rm692e5_panel *to_rm692e5_panel(struct drm_panel *panel)
...@@ -171,9 +170,6 @@ static int rm692e5_prepare(struct drm_panel *panel) ...@@ -171,9 +170,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
struct device *dev = &ctx->dsi->dev; struct device *dev = &ctx->dsi->dev;
int ret; int ret;
if (ctx->prepared)
return 0;
ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
if (ret < 0) { if (ret < 0) {
dev_err(dev, "Failed to enable regulators: %d\n", ret); dev_err(dev, "Failed to enable regulators: %d\n", ret);
...@@ -213,8 +209,6 @@ static int rm692e5_prepare(struct drm_panel *panel) ...@@ -213,8 +209,6 @@ static int rm692e5_prepare(struct drm_panel *panel)
mipi_dsi_generic_write_seq(ctx->dsi, 0xfe, 0x00); mipi_dsi_generic_write_seq(ctx->dsi, 0xfe, 0x00);
ctx->prepared = true;
return 0; return 0;
} }
...@@ -222,13 +216,9 @@ static int rm692e5_unprepare(struct drm_panel *panel) ...@@ -222,13 +216,9 @@ static int rm692e5_unprepare(struct drm_panel *panel)
{ {
struct rm692e5_panel *ctx = to_rm692e5_panel(panel); struct rm692e5_panel *ctx = to_rm692e5_panel(panel);
if (!ctx->prepared)
return 0;
gpiod_set_value_cansleep(ctx->reset_gpio, 1); gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
ctx->prepared = false;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment