All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 4/4] drm/i915: move lookup_power_well() up
Date: Wed,  8 Aug 2018 15:16:14 -0700	[thread overview]
Message-ID: <20180808221614.15486-4-paulo.r.zanoni@intel.com> (raw)
In-Reply-To: <20180808221614.15486-1-paulo.r.zanoni@intel.com>

There's no need for that forward declaration.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index eabf98d153f7..d9c7062ffc95 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -49,10 +49,6 @@
  * present for a given platform.
  */
 
-static struct i915_power_well *
-lookup_power_well(struct drm_i915_private *dev_priv,
-		  enum i915_power_well_id power_well_id);
-
 const char *
 intel_display_power_domain_str(enum intel_display_power_domain domain)
 {
@@ -673,6 +669,20 @@ static void assert_csr_loaded(struct drm_i915_private *dev_priv)
 	WARN_ONCE(!I915_READ(CSR_HTP_SKL), "CSR HTP Not fine\n");
 }
 
+static struct i915_power_well *
+lookup_power_well(struct drm_i915_private *dev_priv,
+		  enum i915_power_well_id power_well_id)
+{
+	struct i915_power_well *power_well;
+
+	for_each_power_well(dev_priv, power_well)
+		if (power_well->desc->id == power_well_id)
+			return power_well;
+
+	/* Tried to lookup a power well that doesn't exist for the platform. */
+	BUG();
+}
+
 static void assert_can_enable_dc5(struct drm_i915_private *dev_priv)
 {
 	struct i915_power_well *pg2 = lookup_power_well(dev_priv,
@@ -1105,20 +1115,6 @@ static void vlv_dpio_cmn_power_well_disable(struct drm_i915_private *dev_priv,
 
 #define POWER_DOMAIN_MASK (GENMASK_ULL(POWER_DOMAIN_NUM - 1, 0))
 
-static struct i915_power_well *
-lookup_power_well(struct drm_i915_private *dev_priv,
-		  enum i915_power_well_id power_well_id)
-{
-	struct i915_power_well *power_well;
-
-	for_each_power_well(dev_priv, power_well)
-		if (power_well->desc->id == power_well_id)
-			return power_well;
-
-	/* Tried to lookup a power well that doesn't exist for the platform. */
-	BUG();
-}
-
 #define BITS_SET(val, bits) (((val) & (bits)) == (bits))
 
 static void assert_chv_phy_status(struct drm_i915_private *dev_priv)
-- 
2.14.4

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

  parent reply	other threads:[~2018-08-08 22:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08 22:16 [PATCH 1/4] drm/i915: kill intel_display_power_well_is_enabled() Paulo Zanoni
2018-08-08 22:16 ` [PATCH 2/4] drm/i915: BUG() if we can't lookup_power_well() Paulo Zanoni
2018-08-08 22:16 ` [PATCH 3/4] drm/i915: use for_each_power_well in lookup_power_well() Paulo Zanoni
2018-08-08 22:50   ` Souza, Jose
2018-08-08 22:16 ` Paulo Zanoni [this message]
2018-08-08 22:22 ` [PATCH 1/4] drm/i915: kill intel_display_power_well_is_enabled() Souza, Jose
2018-08-08 22:55   ` Paulo Zanoni
2018-08-08 22:22 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork
2018-08-08 22:58   ` Paulo Zanoni
2018-08-09  6:29     ` Michal Wajdeczko
2018-08-09 17:15       ` Paulo Zanoni
2018-08-08 22:38 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-09  1:16 ` ✓ Fi.CI.IGT: " Patchwork
2018-08-15 20:27 ` [PATCH 1/4] " Imre Deak
2018-08-17 23:41   ` Paulo Zanoni
2018-08-20 23:11     ` Paulo Zanoni
2018-08-21 11:12       ` Imre Deak
2018-08-21 19:54         ` Paulo Zanoni
2018-08-22 10:21           ` Imre Deak

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=20180808221614.15486-4-paulo.r.zanoni@intel.com \
    --to=paulo.r.zanoni@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.