Commit 7c9526e5 authored by Douglas Anderson's avatar Douglas Anderson Committed by Neil Armstrong
Browse files

drm/panel: tdo-tl070wsh30: 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: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240604172305.v3.9.I5025ab14adc2efeef1be1843648547fb725106be@changeid


Signed-off-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.9.I5025ab14adc2efeef1be1843648547fb725106be@changeid
parent c99e387a
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@ struct tdo_tl070wsh30_panel {

	struct regulator *supply;
	struct gpio_desc *reset_gpio;

	bool prepared;
};

static inline
@@ -39,9 +37,6 @@ static int tdo_tl070wsh30_panel_prepare(struct drm_panel *panel)
	struct tdo_tl070wsh30_panel *tdo_tl070wsh30 = to_tdo_tl070wsh30_panel(panel);
	int err;

	if (tdo_tl070wsh30->prepared)
		return 0;

	err = regulator_enable(tdo_tl070wsh30->supply);
	if (err < 0)
		return err;
@@ -74,8 +69,6 @@ static int tdo_tl070wsh30_panel_prepare(struct drm_panel *panel)

	msleep(20);

	tdo_tl070wsh30->prepared = true;

	return 0;
}

@@ -84,9 +77,6 @@ static int tdo_tl070wsh30_panel_unprepare(struct drm_panel *panel)
	struct tdo_tl070wsh30_panel *tdo_tl070wsh30 = to_tdo_tl070wsh30_panel(panel);
	int err;

	if (!tdo_tl070wsh30->prepared)
		return 0;

	err = mipi_dsi_dcs_set_display_off(tdo_tl070wsh30->link);
	if (err < 0)
		dev_err(panel->dev, "failed to set display off: %d\n", err);
@@ -103,8 +93,6 @@ static int tdo_tl070wsh30_panel_unprepare(struct drm_panel *panel)

	regulator_disable(tdo_tl070wsh30->supply);

	tdo_tl070wsh30->prepared = false;

	return 0;
}