Commit b605f257 authored by Douglas Anderson's avatar Douglas Anderson

drm/panel: novatek-nt36672a: 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: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Benni Steini <bennisteinir@gmail.com>
Cc: Marijn Suijten <marijn.suijten@somainline.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMaxime Ripard <mripard@kernel.org>
Tested-by: default avatarJoel Selvaraj <jo@jsfamily.in>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.18.I13a06b9e6f5920659b1e5d12543b3cd9066383b8@changeid
parent 3357f6f4
...@@ -72,8 +72,6 @@ struct nt36672a_panel { ...@@ -72,8 +72,6 @@ struct nt36672a_panel {
struct regulator_bulk_data supplies[ARRAY_SIZE(nt36672a_regulator_names)]; struct regulator_bulk_data supplies[ARRAY_SIZE(nt36672a_regulator_names)];
struct gpio_desc *reset_gpio; struct gpio_desc *reset_gpio;
bool prepared;
}; };
static inline struct nt36672a_panel *to_nt36672a_panel(struct drm_panel *panel) static inline struct nt36672a_panel *to_nt36672a_panel(struct drm_panel *panel)
...@@ -119,9 +117,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel) ...@@ -119,9 +117,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel)
struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
int ret; int ret;
if (!pinfo->prepared)
return 0;
/* send off cmds */ /* send off cmds */
ret = nt36672a_send_cmds(panel, pinfo->desc->off_cmds, ret = nt36672a_send_cmds(panel, pinfo->desc->off_cmds,
pinfo->desc->num_off_cmds); pinfo->desc->num_off_cmds);
...@@ -147,8 +142,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel) ...@@ -147,8 +142,6 @@ static int nt36672a_panel_unprepare(struct drm_panel *panel)
if (ret < 0) if (ret < 0)
dev_err(panel->dev, "power_off failed ret = %d\n", ret); dev_err(panel->dev, "power_off failed ret = %d\n", ret);
pinfo->prepared = false;
return ret; return ret;
} }
...@@ -179,9 +172,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel) ...@@ -179,9 +172,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel)
struct nt36672a_panel *pinfo = to_nt36672a_panel(panel); struct nt36672a_panel *pinfo = to_nt36672a_panel(panel);
int err; int err;
if (pinfo->prepared)
return 0;
err = nt36672a_panel_power_on(pinfo); err = nt36672a_panel_power_on(pinfo);
if (err < 0) if (err < 0)
goto poweroff; goto poweroff;
...@@ -221,8 +211,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel) ...@@ -221,8 +211,6 @@ static int nt36672a_panel_prepare(struct drm_panel *panel)
msleep(120); msleep(120);
pinfo->prepared = true;
return 0; return 0;
poweroff: poweroff:
......
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