mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
drm/panel: osd-osd101t2587-53ts: Stop tracking prepared/enabled
As talked about in commit d2aacaf073
("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: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240604172305.v3.7.Ic7f6b4ae48027668940a756090cfc454645d3da4@changeid
This commit is contained in:
parent
16661a0dd5
commit
9a3f7eb781
@ -21,9 +21,6 @@ struct osd101t2587_panel {
|
||||
|
||||
struct regulator *supply;
|
||||
|
||||
bool prepared;
|
||||
bool enabled;
|
||||
|
||||
const struct drm_display_mode *default_mode;
|
||||
};
|
||||
|
||||
@ -37,13 +34,8 @@ static int osd101t2587_panel_disable(struct drm_panel *panel)
|
||||
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
|
||||
int ret;
|
||||
|
||||
if (!osd101t2587->enabled)
|
||||
return 0;
|
||||
|
||||
ret = mipi_dsi_shutdown_peripheral(osd101t2587->dsi);
|
||||
|
||||
osd101t2587->enabled = false;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -51,11 +43,7 @@ static int osd101t2587_panel_unprepare(struct drm_panel *panel)
|
||||
{
|
||||
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
|
||||
|
||||
if (!osd101t2587->prepared)
|
||||
return 0;
|
||||
|
||||
regulator_disable(osd101t2587->supply);
|
||||
osd101t2587->prepared = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -63,16 +51,8 @@ static int osd101t2587_panel_unprepare(struct drm_panel *panel)
|
||||
static int osd101t2587_panel_prepare(struct drm_panel *panel)
|
||||
{
|
||||
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
|
||||
int ret;
|
||||
|
||||
if (osd101t2587->prepared)
|
||||
return 0;
|
||||
|
||||
ret = regulator_enable(osd101t2587->supply);
|
||||
if (!ret)
|
||||
osd101t2587->prepared = true;
|
||||
|
||||
return ret;
|
||||
return regulator_enable(osd101t2587->supply);
|
||||
}
|
||||
|
||||
static int osd101t2587_panel_enable(struct drm_panel *panel)
|
||||
@ -80,15 +60,10 @@ static int osd101t2587_panel_enable(struct drm_panel *panel)
|
||||
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
|
||||
int ret;
|
||||
|
||||
if (osd101t2587->enabled)
|
||||
return 0;
|
||||
|
||||
ret = mipi_dsi_turn_on_peripheral(osd101t2587->dsi);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
osd101t2587->enabled = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user