intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] drm/i915: kill intel_display_power_well_is_enabled()
@ 2018-08-20 23:31 Paulo Zanoni
  2018-08-20 23:31 ` [PATCH 2/5] drm/i915: WARN() if we can't lookup_power_well() Paulo Zanoni
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Paulo Zanoni @ 2018-08-20 23:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

Use the same coding pattern as we use in the other functions of the
same file: just call lookup_power_well() directly in the only caller.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/intel_runtime_pm.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index ff3fd8dbd2b4..f75837e45144 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -49,9 +49,6 @@
  * present for a given platform.
  */
 
-bool intel_display_power_well_is_enabled(struct drm_i915_private *dev_priv,
-					 enum i915_power_well_id power_well_id);
-
 static struct i915_power_well *
 lookup_power_well(struct drm_i915_private *dev_priv,
 		  enum i915_power_well_id power_well_id);
@@ -654,8 +651,9 @@ static void assert_csr_loaded(struct drm_i915_private *dev_priv)
 
 static void assert_can_enable_dc5(struct drm_i915_private *dev_priv)
 {
-	bool pg2_enabled = intel_display_power_well_is_enabled(dev_priv,
-					SKL_DISP_PW_2);
+	struct i915_power_well *pg2 = lookup_power_well(dev_priv,
+							SKL_DISP_PW_2);
+	bool pg2_enabled = pg2->desc->ops->is_enabled(dev_priv, pg2);
 
 	WARN_ONCE(pg2_enabled, "PG2 not disabled to enable DC5.\n");
 
@@ -2278,18 +2276,6 @@ static const struct i915_power_well_desc chv_power_wells[] = {
 	},
 };
 
-bool intel_display_power_well_is_enabled(struct drm_i915_private *dev_priv,
-					 enum i915_power_well_id power_well_id)
-{
-	struct i915_power_well *power_well;
-	bool ret;
-
-	power_well = lookup_power_well(dev_priv, power_well_id);
-	ret = power_well->desc->ops->is_enabled(dev_priv, power_well);
-
-	return ret;
-}
-
 static const struct i915_power_well_desc skl_power_wells[] = {
 	{
 		.name = "always-on",
-- 
2.14.4

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-08-23 13:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-20 23:31 [PATCH 1/5] drm/i915: kill intel_display_power_well_is_enabled() Paulo Zanoni
2018-08-20 23:31 ` [PATCH 2/5] drm/i915: WARN() if we can't lookup_power_well() Paulo Zanoni
2018-08-23 13:41   ` Imre Deak
2018-08-20 23:31 ` [PATCH 3/5] drm/i915: use for_each_power_well in lookup_power_well() Paulo Zanoni
2018-08-20 23:31 ` [PATCH 4/5] drm/i915: move lookup_power_well() up Paulo Zanoni
2018-08-23 13:44   ` Imre Deak
2018-08-20 23:31 ` [PATCH 5/5] drm/i915: use the SW-based pw->hw_enabled check instead of reading registers Paulo Zanoni
2018-08-23 13:48   ` Imre Deak
2018-08-20 23:37 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: kill intel_display_power_well_is_enabled() Patchwork
2018-08-20 23:55 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-21  0:45 ` ✓ Fi.CI.IGT: " Patchwork

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).