diff mbox

[v2] drm/i915: Bring UP Power Wells before disabling RC6.

Message ID 1389275907-22354-1-git-send-email-deepak.s@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

deepak.s@intel.com Jan. 9, 2014, 1:58 p.m. UTC
From: Deepak S <deepak.s@intel.com>

We need do forcewake before Disabling RC6, This is what the BIOS
expects while going into suspend.

v2: updated commit message. (Daniel)

Signed-off-by: Deepak S <deepak.s@intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Chris Wilson Jan. 9, 2014, 2:02 p.m. UTC | #1
On Thu, Jan 09, 2014 at 07:28:27PM +0530, deepak.s@intel.com wrote:
> From: Deepak S <deepak.s@intel.com>
> 
> We need do forcewake before Disabling RC6, This is what the BIOS
> expects while going into suspend.

What suspend are we talking about? When does the BIOS run, how is that
serialised with the get/put of forcewake?
-Chris
deepak.s@intel.com Jan. 9, 2014, 3:16 p.m. UTC | #2
Hi Chris,

During the development of runtime power management we faced some random issue around RC6 during the suspend. After some analyzing, we found by following the  flow of doing Forcewake Get before the RC6 Disable and forcewake Put after we enable the RC6 solved most of the issues. 
This patch adds the Forcewake get before disabling the RC6

My commit message was to generic I guess :) I will change the commit message. 
The flow is between the driver and punit. :)

Thanks
Deepak

-----Original Message-----
From: Chris Wilson [mailto:chris@chris-wilson.co.uk] 
Sent: Thursday, January 9, 2014 7:32 PM
To: S, Deepak
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: Bring UP Power Wells before disabling RC6.

On Thu, Jan 09, 2014 at 07:28:27PM +0530, deepak.s@intel.com wrote:
> From: Deepak S <deepak.s@intel.com>
> 
> We need do forcewake before Disabling RC6, This is what the BIOS 
> expects while going into suspend.

What suspend are we talking about? When does the BIOS run, how is that serialised with the get/put of forcewake?
-Chris

--
Chris Wilson, Intel Open Source Technology Centre
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 469170c..bd68eb4 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3135,8 +3135,14 @@  static void valleyview_disable_rps(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	/* we're doing forcewake before Disabling RC6,
+	 * This what the BIOS expects when going into suspend */
+	gen6_gt_force_wake_get(dev_priv, FORCEWAKE_ALL);
+
 	I915_WRITE(GEN6_RC_CONTROL, 0);
 
+	gen6_gt_force_wake_put(dev_priv, FORCEWAKE_ALL);
+
 	gen6_disable_rps_interrupts(dev);
 
 	if (dev_priv->vlv_pctx) {