All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] CHV PM fix & Improvements
@ 2015-03-28  9:53 deepak.s
  2015-03-28  9:53 ` [PATCH v3 1/5] drm/i915/chv: Remove Wait for a previous gfx force-off deepak.s
                   ` (4 more replies)
  0 siblings, 5 replies; 39+ messages in thread
From: deepak.s @ 2015-03-28  9:53 UTC (permalink / raw)
  To: intel-gfx

From: Deepak S <deepak.s@linux.intel.com>

Adding few of PM fixes and Improvements for CHV/VLV.
Addressed few comments.

Deepak S (5):
  drm/i915/chv: Remove Wait for a previous gfx force-off
  drm/i915: Re-adjusting rc6 promotional timer for chv
  drm/i915/chv: Set min freq to efficient frequency on chv
  drm/i915/chv: Remove unused rps min function
  drm/i915: Setup static bias for GPU

 drivers/gpu/drm/i915/i915_drv.c |  6 ++++--
 drivers/gpu/drm/i915/i915_reg.h |  5 +++++
 drivers/gpu/drm/i915/intel_pm.c | 37 ++++++++++++++++---------------------
 3 files changed, 25 insertions(+), 23 deletions(-)

-- 
1.9.1

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

^ permalink raw reply	[flat|nested] 39+ messages in thread
* [PATCH v2 1/2] drm/i915/vlv: Remove wait for for punit to updates freq.
@ 2015-05-08 15:13 deepak.s
  2015-05-08 15:13 ` [PATCH v4] drm/i915/chv: Set min freq to efficient frequency on chv deepak.s
  0 siblings, 1 reply; 39+ messages in thread
From: deepak.s @ 2015-05-08 15:13 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

From: Deepak S <deepak.s@linux.intel.com>

When GPU is idle on VLV, Request freq to punit should be good enough to
get the voltage back to VNN. Also, make sure gfx clock force applies
before requesting the freq fot vlv.

v2: Do forcewake before setting idle frequency (ville)
    Update function comments to match the code (Deepak)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75244
suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 41 +++++++++++------------------------------
 1 file changed, 11 insertions(+), 30 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index a7516ed..3df929a 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4043,51 +4043,32 @@ static void valleyview_set_rps(struct drm_device *dev, u8 val)
 	trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
 }
 
-/* vlv_set_rps_idle: Set the frequency to Rpn if Gfx clocks are down
+/* vlv_set_rps_idle: Set the frequency to idle, if Gfx clocks are down
  *
  * * If Gfx is Idle, then
- * 1. Mask Turbo interrupts
- * 2. Bring up Gfx clock
- * 3. Change the freq to Rpn and wait till P-Unit updates freq
- * 4. Clear the Force GFX CLK ON bit so that Gfx can down
- * 5. Unmask Turbo interrupts
+ * 1. Forcewake Media well.
+ * 2. Request idle freq.
+ * 3. Release Forcewake of Media well.
 */
 static void vlv_set_rps_idle(struct drm_i915_private *dev_priv)
 {
 	struct drm_device *dev = dev_priv->dev;
 	u32 val = dev_priv->rps.idle_freq;
 
-	/* CHV and latest VLV don't need to force the gfx clock */
-	if (IS_CHERRYVIEW(dev) || dev->pdev->revision >= 0xd) {
+	/* CHV don't need to force the gfx clock */
+	if (IS_CHERRYVIEW(dev)) {
 		valleyview_set_rps(dev_priv->dev, val);
 		return;
 	}
 
-	/*
-	 * When we are idle.  Drop to min voltage state.
-	 */
-
 	if (dev_priv->rps.cur_freq <= val)
 		return;
 
-	/* Mask turbo interrupt so that they will not come in between */
-	I915_WRITE(GEN6_PMINTRMSK,
-		   gen6_sanitize_rps_pm_mask(dev_priv, ~0));
-
-	vlv_force_gfx_clock(dev_priv, true);
-
-	dev_priv->rps.cur_freq = val;
-
-	vlv_punit_write(dev_priv, PUNIT_REG_GPU_FREQ_REQ, val);
-
-	if (wait_for(((vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS))
-				& GENFREQSTATUS) == 0, 100))
-		DRM_ERROR("timed out waiting for Punit\n");
-
-	gen6_set_rps_thresholds(dev_priv, val);
-	vlv_force_gfx_clock(dev_priv, false);
-
-	I915_WRITE(GEN6_PMINTRMSK, gen6_rps_pm_mask(dev_priv, val));
+	/* Wake up the media well, as that takes a lot less
+	 * power than the Render well. */
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_MEDIA);
+	valleyview_set_rps(dev_priv->dev, val);
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_MEDIA);
 }
 
 void gen6_rps_busy(struct drm_i915_private *dev_priv)
-- 
1.9.1

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

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

end of thread, other threads:[~2015-05-11 11:06 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-28  9:53 [PATCH v3 0/5] CHV PM fix & Improvements deepak.s
2015-03-28  9:53 ` [PATCH v3 1/5] drm/i915/chv: Remove Wait for a previous gfx force-off deepak.s
2015-03-30 10:07   ` Ville Syrjälä
2015-03-30 14:32     ` Deepak S
2015-03-30 15:41     ` Daniel Vetter
2015-03-28  9:53 ` [PATCH v3 2/5] drm/i915: Re-adjusting rc6 promotional timer for chv deepak.s
2015-04-16 15:26   ` Daniel Vetter
2015-03-28  9:53 ` [PATCH v3 3/5] drm/i915/chv: Set min freq to efficient frequency on chv deepak.s
2015-04-29  2:53   ` [PATCH v4] " deepak.s
2015-04-29 15:31     ` Ville Syrjälä
2015-04-29 19:53       ` Ville Syrjälä
2015-04-30 10:12         ` Deepak S
2015-04-30 11:19           ` Ville Syrjälä
2015-04-30 14:05             ` Ville Syrjälä
2015-05-02  7:26               ` Deepak S
2015-04-30  2:42     ` shuang.he
2015-05-04  8:04     ` Daniel Vetter
2015-03-28  9:53 ` [PATCH v3 4/5] drm/i915/chv: Remove unused rps min function deepak.s
2015-03-28  9:53 ` [PATCH v3 5/5] drm/i915: Setup static bias for GPU deepak.s
2015-03-28 12:20   ` shuang.he
2015-03-30  9:56   ` Ville Syrjälä
2015-04-29  2:51     ` [PATCH v2] " deepak.s
2015-04-29  3:06       ` [PATCH v3] " deepak.s
2015-04-29  9:29         ` Ville Syrjälä
2015-05-04  5:28           ` Deepak S
2015-05-04  8:12             ` Daniel Vetter
2015-05-04 15:28               ` Ville Syrjälä
2015-05-05  7:42                 ` Deepak S
2015-05-06  9:02                   ` Daniel Vetter
2015-05-08 15:06                     ` Deepak S
2015-04-30  6:56         ` shuang.he
2015-04-29 23:00       ` [PATCH v2] " shuang.he
2015-05-08 15:13 [PATCH v2 1/2] drm/i915/vlv: Remove wait for for punit to updates freq deepak.s
2015-05-08 15:13 ` [PATCH v4] drm/i915/chv: Set min freq to efficient frequency on chv deepak.s
2015-05-08 15:24   ` shuang.he
2015-05-08 16:39   ` Ville Syrjälä
2015-05-09  5:34     ` Deepak S
2015-05-09 12:45       ` deepak.s
2015-05-11 10:23         ` Daniel Vetter
2015-05-11 11:06       ` Ville Syrjälä

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.