]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/panel: boe-tv101wum-nl6: Stop tracking prepared
authorDouglas Anderson <dianders@chromium.org>
Fri, 3 May 2024 21:32:45 +0000 (14:32 -0700)
committerDouglas Anderson <dianders@chromium.org>
Tue, 28 May 2024 20:09:10 +0000 (13:09 -0700)
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.shi@mediatek.com>
Cc: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503143327.RFT.v2.4.Ib501f2eceb62016e09cfb17bca29bde0f605a567@changeid
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c

index f7beace455c3e658bc541fa88da834e09ecbd138..8ab8cab83d5c5459d5e5db53036592b821f7da8c 100644 (file)
@@ -52,8 +52,6 @@ struct boe_panel {
        struct regulator *avee;
        struct regulator *avdd;
        struct gpio_desc *enable_gpio;
-
-       bool prepared;
 };
 
 static int boe_tv110c9m_init(struct boe_panel *boe)
@@ -1399,9 +1397,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);
@@ -1420,8 +1415,6 @@ static int boe_panel_unprepare(struct drm_panel *panel)
                regulator_disable(boe->pp3300);
        }
 
-       boe->prepared = false;
-
        return 0;
 }
 
@@ -1430,9 +1423,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);
 
@@ -1474,8 +1464,6 @@ static int boe_panel_prepare(struct drm_panel *panel)
        if (ret < 0)
                goto poweroff;
 
-       boe->prepared = true;
-
        return 0;
 
 poweroff: