As talked about in commit d2aacaf07395 ("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: Jitao Shi <jitao....@mediatek.com>
Cc: Cong Yang <yangco...@huaqin.corp-partner.google.com>
Signed-off-by: Douglas Anderson <diand...@chromium.org>
---

Changes in v2:
- Only handle 1 panel per patch.
- Split removal of prepared/enabled from handling of remove/shutdown.

 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c 
b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 0ffe8f8c01de..667e1bb4a58b 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -50,8 +50,6 @@ struct boe_panel {
        struct regulator *avee;
        struct regulator *avdd;
        struct gpio_desc *enable_gpio;
-
-       bool prepared;
 };
 
 enum dsi_cmd_type {
@@ -1450,9 +1448,6 @@ static int boe_panel_unprepare(struct drm_panel *panel)
 {
        struct boe_panel *boe = to_boe_panel(panel);
 
-       if (!boe->prepared)
-               return 0;
-
        if (boe->desc->discharge_on_disable) {
                regulator_disable(boe->avee);
                regulator_disable(boe->avdd);
@@ -1471,8 +1466,6 @@ static int boe_panel_unprepare(struct drm_panel *panel)
                regulator_disable(boe->pp3300);
        }
 
-       boe->prepared = false;
-
        return 0;
 }
 
@@ -1481,9 +1474,6 @@ static int boe_panel_prepare(struct drm_panel *panel)
        struct boe_panel *boe = to_boe_panel(panel);
        int ret;
 
-       if (boe->prepared)
-               return 0;
-
        gpiod_set_value(boe->enable_gpio, 0);
        usleep_range(1000, 1500);
 
@@ -1523,8 +1513,6 @@ static int boe_panel_prepare(struct drm_panel *panel)
                goto poweroff;
        }
 
-       boe->prepared = true;
-
        return 0;
 
 poweroff:
-- 
2.45.0.rc1.225.g2a3ae87e7f-goog

Reply via email to