All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: dri-devel@lists.freedesktop.org
Cc: thierry.reding@gmail.com
Subject: [PATCH v3 04/12] drm/panel: vvx10f034n00: Remove enabled/prepared state
Date: Tue, 17 Oct 2017 17:13:07 -0400	[thread overview]
Message-ID: <20171017211321.7992-5-seanpaul@chromium.org> (raw)
In-Reply-To: <20171017211321.7992-1-seanpaul@chromium.org>

They're not necessary for atomic drivers, and drm_panel will WARN if
the calls are unbalanced.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
No changes since v1

 .../gpu/drm/panel/panel-panasonic-vvx10f034n00.c   | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
index 7f915f706fa6..e7efa097151c 100644
--- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
+++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c
@@ -44,9 +44,6 @@ struct wuxga_nt_panel {
 	struct backlight_device *backlight;
 	struct regulator *supply;
 
-	bool prepared;
-	bool enabled;
-
 	ktime_t earliest_wake;
 
 	const struct drm_display_mode *mode;
@@ -73,9 +70,6 @@ static int wuxga_nt_panel_disable(struct drm_panel *panel)
 {
 	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
 
-	if (!wuxga_nt->enabled)
-		return 0;
-
 	mipi_dsi_shutdown_peripheral(wuxga_nt->dsi);
 
 	if (wuxga_nt->backlight) {
@@ -84,8 +78,6 @@ static int wuxga_nt_panel_disable(struct drm_panel *panel)
 		backlight_update_status(wuxga_nt->backlight);
 	}
 
-	wuxga_nt->enabled = false;
-
 	return 0;
 }
 
@@ -93,12 +85,8 @@ static int wuxga_nt_panel_unprepare(struct drm_panel *panel)
 {
 	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
 
-	if (!wuxga_nt->prepared)
-		return 0;
-
 	regulator_disable(wuxga_nt->supply);
 	wuxga_nt->earliest_wake = ktime_add_ms(ktime_get_real(), MIN_POFF_MS);
-	wuxga_nt->prepared = false;
 
 	return 0;
 }
@@ -109,9 +97,6 @@ static int wuxga_nt_panel_prepare(struct drm_panel *panel)
 	int ret;
 	s64 enablewait;
 
-	if (wuxga_nt->prepared)
-		return 0;
-
 	/*
 	 * If the user re-enabled the panel before the required off-time then
 	 * we need to wait the remaining period before re-enabling regulator
@@ -141,8 +126,6 @@ static int wuxga_nt_panel_prepare(struct drm_panel *panel)
 		goto poweroff;
 	}
 
-	wuxga_nt->prepared = true;
-
 	return 0;
 
 poweroff:
@@ -155,17 +138,12 @@ static int wuxga_nt_panel_enable(struct drm_panel *panel)
 {
 	struct wuxga_nt_panel *wuxga_nt = to_wuxga_nt_panel(panel);
 
-	if (wuxga_nt->enabled)
-		return 0;
-
 	if (wuxga_nt->backlight) {
 		wuxga_nt->backlight->props.power = FB_BLANK_UNBLANK;
 		wuxga_nt->backlight->props.state &= ~BL_CORE_FBBLANK;
 		backlight_update_status(wuxga_nt->backlight);
 	}
 
-	wuxga_nt->enabled = true;
-
 	return 0;
 }
 
-- 
2.15.0.rc1.287.g2b38de12cc-goog

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-10-17 21:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 21:13 [PATCH v3 00/12] drm/panel: Remove unnecessary enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 01/12] drm/panel: Fix typo in drm_panel_unprepare docs Sean Paul
2017-10-17 21:13 ` [PATCH v3 02/12] drm/panel: Move [un]prepare and [dis|en]able functions Sean Paul
2017-10-18  8:16   ` Daniel Vetter
2017-10-17 21:13 ` [PATCH v3 03/12] drm/panel: Keep track of enabled/prepared Sean Paul
2017-10-18  7:54   ` Andrzej Hajda
2017-10-17 21:13 ` Sean Paul [this message]
2017-10-17 21:13 ` [PATCH v3 05/12] drm/panel: lt070me05000: Remove enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 06/12] drm/panel: lq101r1sx01: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 07/12] drm/panel: otm8009a: Remove enabled state Sean Paul
2017-10-17 21:13 ` [PATCH v3 08/12] drm/panel: otm8009a: Properly sequence [un]prepare with backlight Sean Paul
2017-10-17 21:13 ` [PATCH v3 09/12] drm/panel: 43wvf1g: Remove enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 10/12] drm/panel: simple: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 11/12] drm/panel: p079zca: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 12/12] drm/panel: ls043t1le01: " Sean Paul

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=20171017211321.7992-5-seanpaul@chromium.org \
    --to=seanpaul@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=thierry.reding@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.