All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 05/13] drm/i915/pps: rename edp_panel_* to intel_pps_*_unlocked
Date: Tue, 22 Dec 2020 16:49:45 +0200	[thread overview]
Message-ID: <4fc39e47c1f66a8cfc4a4bb6b8f15b9156cad05f.1608648128.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1608648128.git.jani.nikula@intel.com>

Follow the usual naming pattern for functions, both for the prefix and
the _unlocked suffix for functions that expect the lock to be held when
calling.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c  | 16 +++++++--------
 drivers/gpu/drm/i915/display/intel_pps.c | 26 ++++++++++++------------
 drivers/gpu/drm/i915/display/intel_pps.h | 10 ++++-----
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 2052ee228077..f2794cc4292a 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1038,7 +1038,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
 	 * to turn it off. But for eg. i2c-dev access we need to turn it on/off
 	 * ourselves.
 	 */
-	vdd = edp_panel_vdd_on(intel_dp);
+	vdd = intel_pps_vdd_on_unlocked(intel_dp);
 
 	/* dp aux is extremely sensitive to irq latency, hence request the
 	 * lowest possible wakeup latency and so prevent the cpu from going into
@@ -1180,7 +1180,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
 	cpu_latency_qos_update_request(&i915->pm_qos, PM_QOS_DEFAULT_VALUE);
 
 	if (vdd)
-		edp_panel_vdd_off(intel_dp, false);
+		intel_pps_vdd_off_unlocked(intel_dp, false);
 
 	intel_pps_unlock(intel_dp, pps_wakeref);
 	intel_display_power_put_async(i915, aux_domain, aux_wakeref);
@@ -3159,9 +3159,9 @@ static void intel_enable_dp(struct intel_atomic_state *state,
 
 		intel_dp_enable_port(intel_dp, pipe_config);
 
-		edp_panel_vdd_on(intel_dp);
-		edp_panel_on(intel_dp);
-		edp_panel_vdd_off(intel_dp, true);
+		intel_pps_vdd_on_unlocked(intel_dp);
+		intel_pps_on_unlocked(intel_dp);
+		intel_pps_vdd_off_unlocked(intel_dp, true);
 	}
 
 	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
@@ -5818,7 +5818,7 @@ void intel_dp_encoder_flush_work(struct drm_encoder *encoder)
 		 * Make sure vdd is actually turned off here.
 		 */
 		with_intel_pps_lock(intel_dp, wakeref)
-			edp_panel_vdd_off_sync(intel_dp);
+			intel_pps_vdd_off_sync_unlocked(intel_dp);
 	}
 
 	intel_dp_aux_fini(intel_dp);
@@ -5846,7 +5846,7 @@ void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder)
 	 */
 	cancel_delayed_work_sync(&intel_dp->panel_vdd_work);
 	with_intel_pps_lock(intel_dp, wakeref)
-		edp_panel_vdd_off_sync(intel_dp);
+		intel_pps_vdd_off_sync_unlocked(intel_dp);
 }
 
 void intel_dp_encoder_shutdown(struct intel_encoder *intel_encoder)
@@ -6706,7 +6706,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	 * Make sure vdd is actually turned off here.
 	 */
 	with_intel_pps_lock(intel_dp, wakeref)
-		edp_panel_vdd_off_sync(intel_dp);
+		intel_pps_vdd_off_sync_unlocked(intel_dp);
 
 	return false;
 }
diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
index 1f8ea3c41440..01c9e69f4e3a 100644
--- a/drivers/gpu/drm/i915/display/intel_pps.c
+++ b/drivers/gpu/drm/i915/display/intel_pps.c
@@ -559,11 +559,11 @@ static  u32 ilk_get_pp_control(struct intel_dp *intel_dp)
 }
 
 /*
- * Must be paired with edp_panel_vdd_off().
+ * Must be paired with intel_pps_vdd_off_unlocked().
  * Must hold pps_mutex around the whole on/off sequence.
  * Can be nested with intel_pps_vdd_{on,off}() calls.
  */
-bool edp_panel_vdd_on(struct intel_dp *intel_dp)
+bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
@@ -635,13 +635,13 @@ void intel_pps_vdd_on(struct intel_dp *intel_dp)
 
 	vdd = false;
 	with_intel_pps_lock(intel_dp, wakeref)
-		vdd = edp_panel_vdd_on(intel_dp);
+		vdd = intel_pps_vdd_on_unlocked(intel_dp);
 	I915_STATE_WARN(!vdd, "[ENCODER:%d:%s] VDD already requested on\n",
 			dp_to_dig_port(intel_dp)->base.base.base.id,
 			dp_to_dig_port(intel_dp)->base.base.name);
 }
 
-void edp_panel_vdd_off_sync(struct intel_dp *intel_dp)
+void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 	struct intel_digital_port *dig_port =
@@ -691,7 +691,7 @@ void edp_panel_vdd_work(struct work_struct *__work)
 
 	with_intel_pps_lock(intel_dp, wakeref) {
 		if (!intel_dp->want_panel_vdd)
-			edp_panel_vdd_off_sync(intel_dp);
+			intel_pps_vdd_off_sync_unlocked(intel_dp);
 	}
 }
 
@@ -713,7 +713,7 @@ static void edp_panel_vdd_schedule_off(struct intel_dp *intel_dp)
  * Must hold pps_mutex around the whole on/off sequence.
  * Can be nested with intel_pps_vdd_{on,off}() calls.
  */
-void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
+void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 
@@ -729,12 +729,12 @@ void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync)
 	intel_dp->want_panel_vdd = false;
 
 	if (sync)
-		edp_panel_vdd_off_sync(intel_dp);
+		intel_pps_vdd_off_sync_unlocked(intel_dp);
 	else
 		edp_panel_vdd_schedule_off(intel_dp);
 }
 
-void edp_panel_on(struct intel_dp *intel_dp)
+void intel_pps_on_unlocked(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 	u32 pp;
@@ -791,10 +791,10 @@ void intel_pps_on(struct intel_dp *intel_dp)
 		return;
 
 	with_intel_pps_lock(intel_dp, wakeref)
-		edp_panel_on(intel_dp);
+		intel_pps_on_unlocked(intel_dp);
 }
 
-void edp_panel_off(struct intel_dp *intel_dp)
+void intel_pps_off_unlocked(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
 	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
@@ -843,7 +843,7 @@ void intel_pps_off(struct intel_dp *intel_dp)
 		return;
 
 	with_intel_pps_lock(intel_dp, wakeref)
-		edp_panel_off(intel_dp);
+		intel_pps_off_unlocked(intel_dp);
 }
 
 /* Enable backlight in the panel power control. */
@@ -934,7 +934,7 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
 	if (drm_WARN_ON(&dev_priv->drm, pipe != PIPE_A && pipe != PIPE_B))
 		return;
 
-	edp_panel_vdd_off_sync(intel_dp);
+	intel_pps_vdd_off_sync_unlocked(intel_dp);
 
 	/*
 	 * VLV seems to get confused when multiple power sequencers
@@ -1249,7 +1249,7 @@ intel_dp_init_panel_power_sequencer_registers(struct intel_dp *intel_dp,
 	 * hooked up to any port. This would mess up the
 	 * power domain tracking the first time we pick
 	 * one of these power sequencers for use since
-	 * edp_panel_vdd_on() would notice that the VDD was
+	 * intel_pps_vdd_on_unlocked() would notice that the VDD was
 	 * already on and therefore wouldn't grab the power
 	 * domain reference. Disable VDD first to avoid this.
 	 * This also avoids spuriously turning the VDD on as
diff --git a/drivers/gpu/drm/i915/display/intel_pps.h b/drivers/gpu/drm/i915/display/intel_pps.h
index 69f670678d0e..e7f0473be9a7 100644
--- a/drivers/gpu/drm/i915/display/intel_pps.h
+++ b/drivers/gpu/drm/i915/display/intel_pps.h
@@ -27,11 +27,11 @@ void intel_pps_backlight_on(struct intel_dp *intel_dp);
 void intel_pps_backlight_off(struct intel_dp *intel_dp);
 void intel_pps_backlight_power(struct intel_connector *connector, bool enable);
 
-bool edp_panel_vdd_on(struct intel_dp *intel_dp);
-void edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
-void edp_panel_vdd_off_sync(struct intel_dp *intel_dp);
-void edp_panel_on(struct intel_dp *intel_dp);
-void edp_panel_off(struct intel_dp *intel_dp);
+bool intel_pps_vdd_on_unlocked(struct intel_dp *intel_dp);
+void intel_pps_vdd_off_unlocked(struct intel_dp *intel_dp, bool sync);
+void intel_pps_vdd_off_sync_unlocked(struct intel_dp *intel_dp);
+void intel_pps_on_unlocked(struct intel_dp *intel_dp);
+void intel_pps_off_unlocked(struct intel_dp *intel_dp);
 void edp_panel_vdd_work(struct work_struct *__work);
 
 void intel_pps_vdd_sanitize(struct intel_dp *intel_dp);
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-12-22 14:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22 14:49 [Intel-gfx] [PATCH 00/13] drm/i915/dp: split out pps and aux Jani Nikula
2020-12-22 14:49 ` [Intel-gfx] [PATCH 01/13] drm/i915/pps: abstract panel power sequencer from intel_dp.c Jani Nikula
2020-12-28 11:22   ` Gupta, Anshuman
2021-01-04 14:46     ` Jani Nikula
2021-01-08 17:44       ` Jani Nikula
2020-12-22 14:49 ` [Intel-gfx] [PATCH 02/13] drm/i915/pps: rename pps_{, un}lock -> intel_pps_{, un}lock Jani Nikula
2020-12-28 10:57   ` Gupta, Anshuman
2020-12-22 14:49 ` [Intel-gfx] [PATCH 03/13] drm/i915/pps: rename intel_edp_backlight_* to intel_pps_backlight_* Jani Nikula
2020-12-29  6:12   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 04/13] drm/i915/pps: rename intel_edp_panel_* to intel_pps_* Jani Nikula
2020-12-29  6:15   ` Anshuman Gupta
2021-01-08 17:45     ` Jani Nikula
2020-12-22 14:49 ` Jani Nikula [this message]
2020-12-29  6:35   ` [Intel-gfx] [PATCH 05/13] drm/i915/pps: rename edp_panel_* to intel_pps_*_unlocked Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 06/13] drm/i915/pps: abstract intel_pps_vdd_off_sync Jani Nikula
2020-12-29  6:47   ` Anshuman Gupta
2021-01-08 17:46     ` Jani Nikula
2020-12-22 14:49 ` [Intel-gfx] [PATCH 07/13] drm/i915/pps: add higher level intel_pps_init() call Jani Nikula
2020-12-29  6:53   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 08/13] drm/i915/pps: abstract intel_pps_reinit() Jani Nikula
2020-12-29  6:59   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 09/13] drm/i915/pps: rename intel_dp_check_edp to intel_pps_check_power_unlocked Jani Nikula
2020-12-29  7:04   ` Anshuman Gupta
2021-01-08 10:33     ` Jani Nikula
2021-01-08 10:59       ` Gupta, Anshuman
2020-12-22 14:49 ` [Intel-gfx] [PATCH 10/13] drm/i915/pps: rename intel_power_sequencer_reset to intel_pps_reset_all Jani Nikula
2020-12-29  7:53   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 11/13] drm/i915/pps: add locked intel_pps_wait_power_cycle Jani Nikula
2020-12-29  7:59   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 12/13] drm/i915/pps: rename vlv_init_panel_power_sequencer to vlv_pps_init Jani Nikula
2020-12-29  8:01   ` Anshuman Gupta
2020-12-22 14:49 ` [Intel-gfx] [PATCH 13/13] drm/i915/dp: split out aux functionality to intel_dp_aux.c Jani Nikula
2020-12-22 15:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: split out pps and aux Patchwork
2020-12-22 16:26 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-12-22 21:02 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

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=4fc39e47c1f66a8cfc4a4bb6b8f15b9156cad05f.1608648128.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.