dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>,
	 Stephen Boyd <swboyd@chromium.org>,
	 yangcong <yangcong5@huaqin.corp-partner.google.com>,
	 Jitao Shi <jitao.shi@mediatek.com>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	 David Airlie <airlied@gmail.com>,
	Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] drm/panel: boe-tv101wum-nl6: Drop surplus prepare tracking
Date: Thu, 15 Jun 2023 22:21:38 +0200	[thread overview]
Message-ID: <20230615-fix-boe-tv101wum-nl6-v1-2-8ac378405fb7@linaro.org> (raw)
In-Reply-To: <20230615-fix-boe-tv101wum-nl6-v1-0-8ac378405fb7@linaro.org>

The DRM panel core already keeps track of if the panel is already
prepared so do not reimplement this.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 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 d19d30e134dd..412d4d99aec6 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;
 };
 
 static int boe_tv110c9m_init(struct mipi_dsi_device *dsi)
@@ -1286,9 +1284,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);
@@ -1307,8 +1302,6 @@ static int boe_panel_unprepare(struct drm_panel *panel)
 		regulator_disable(boe->pp3300);
 	}
 
-	boe->prepared = false;
-
 	return 0;
 }
 
@@ -1317,9 +1310,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);
 
@@ -1357,8 +1347,6 @@ static int boe_panel_prepare(struct drm_panel *panel)
 		}
 	}
 
-	boe->prepared = true;
-
 	return 0;
 
 poweroff:

-- 
2.34.1


  parent reply	other threads:[~2023-06-15 20:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 20:21 [PATCH 0/2] Fix up the boe-tv101wum-nl6 panel driver Linus Walleij
2023-06-15 20:21 ` [PATCH 1/2] drm/panel: boe-tv101wum-nl6: Drop macros and open code sequences Linus Walleij
2023-06-15 22:10   ` kernel test robot
2023-06-16 16:42   ` Sam Ravnborg
2023-06-15 20:21 ` Linus Walleij [this message]
2023-06-16 16:44   ` [PATCH 2/2] drm/panel: boe-tv101wum-nl6: Drop surplus prepare tracking Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230615-fix-boe-tv101wum-nl6-v1-2-8ac378405fb7@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jitao.shi@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=sam@ravnborg.org \
    --cc=swboyd@chromium.org \
    --cc=yangcong5@huaqin.corp-partner.google.com \
    --cc=zhouruihai@huaqin.corp-partner.google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).