diff mbox

[v3] drm/i915: Force GPU Freq to lowest while suspending.

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

Commit Message

deepak.s@linux.intel.com June 20, 2014, 11:59 a.m. UTC
From: Deepak S <deepak.s@linux.intel.com>

We might be leaving the GPU Frequency (and thus vnn) high during the suspend.
Force gt to move to lowest freq while suspending.

v2: Fixed typo in commit message (Deepak)

v3: Force gt to lowest freq in suspend_gt_powersave (Daniel)

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

Comments

Daniel Vetter June 19, 2014, 12:34 p.m. UTC | #1
On Fri, Jun 20, 2014 at 1:59 PM,  <deepak.s@linux.intel.com> wrote:
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 2043c4b..6bbb90b 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4881,6 +4881,9 @@ void intel_suspend_gt_powersave(struct drm_device *dev)
>         /* Interrupts should be disabled already to avoid re-arming. */
>         WARN_ON(dev->irq_enabled);
>
> +       /* Force GPU to min freq during suspend */
> +       gen6_rps_idle(dev_priv);
> +

Shouldn't this be _after_ we've cancelled the rps works? Otherwise the
work item might sneak in and undo the idling between the idle and work
cancelling.
-Daniel
deepak.s@linux.intel.com June 20, 2014, 2:25 p.m. UTC | #2
On Thursday 19 June 2014 06:04 PM, Daniel Vetter wrote:
> On Fri, Jun 20, 2014 at 1:59 PM,  <deepak.s@linux.intel.com> wrote:
>> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
>> index 2043c4b..6bbb90b 100644
>> --- a/drivers/gpu/drm/i915/intel_pm.c
>> +++ b/drivers/gpu/drm/i915/intel_pm.c
>> @@ -4881,6 +4881,9 @@ void intel_suspend_gt_powersave(struct drm_device *dev)
>>          /* Interrupts should be disabled already to avoid re-arming. */
>>          WARN_ON(dev->irq_enabled);
>>
>> +       /* Force GPU to min freq during suspend */
>> +       gen6_rps_idle(dev_priv);
>> +
> Shouldn't this be _after_ we've cancelled the rps works? Otherwise the
> work item might sneak in and undo the idling between the idle and work
> cancelling.
> -Daniel

My mistake sending updated patch, -Deepak
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 2043c4b..6bbb90b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4881,6 +4881,9 @@  void intel_suspend_gt_powersave(struct drm_device *dev)
 	/* Interrupts should be disabled already to avoid re-arming. */
 	WARN_ON(dev->irq_enabled);
 
+	/* Force GPU to min freq during suspend */
+	gen6_rps_idle(dev_priv);
+
 	flush_delayed_work(&dev_priv->rps.delayed_resume_work);
 
 	cancel_work_sync(&dev_priv->rps.work);