intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Only request PM interrupts for the events we handled
@ 2012-07-05 14:02 Chris Wilson
  2012-07-05 20:33 ` Ben Widawsky
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2012-07-05 14:02 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Widawsky, Eugeni Dodonov

There is little point waking up every 10ms to service an interrupt which
we then promptly ignore. So only program the the PMIER to enable
interrupts for those events which we do handle, not all of them!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/intel_pm.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 0e27e95..53df531 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2491,14 +2491,7 @@ static void gen6_enable_rps(struct drm_device *dev)
 	gen6_set_rps(dev_priv->dev, (gt_perf_status & 0xff00) >> 8);
 
 	/* requires MSI enabled */
-	I915_WRITE(GEN6_PMIER,
-		   GEN6_PM_MBOX_EVENT |
-		   GEN6_PM_THERMAL_EVENT |
-		   GEN6_PM_RP_DOWN_TIMEOUT |
-		   GEN6_PM_RP_UP_THRESHOLD |
-		   GEN6_PM_RP_DOWN_THRESHOLD |
-		   GEN6_PM_RP_UP_EI_EXPIRED |
-		   GEN6_PM_RP_DOWN_EI_EXPIRED);
+	I915_WRITE(GEN6_PMIER, GEN6_PM_DEFERRED_EVENTS);
 	spin_lock_irq(&dev_priv->rps_lock);
 	WARN_ON(dev_priv->pm_iir != 0);
 	I915_WRITE(GEN6_PMIMR, 0);
-- 
1.7.10

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

* Re: [PATCH] drm/i915: Only request PM interrupts for the events we handled
  2012-07-05 14:02 [PATCH] drm/i915: Only request PM interrupts for the events we handled Chris Wilson
@ 2012-07-05 20:33 ` Ben Widawsky
  2012-07-08 16:10 ` Jesse Barnes
  2012-07-08 17:35 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Widawsky @ 2012-07-05 20:33 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, Eugeni Dodonov

On Thu,  5 Jul 2012 15:02:17 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:

> There is little point waking up every 10ms to service an interrupt which
> we then promptly ignore. So only program the the PMIER to enable
> interrupts for those events which we do handle, not all of them!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>

Agreed, although some of these events do sound interesting.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>

> ---
>  drivers/gpu/drm/i915/intel_pm.c |    9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0e27e95..53df531 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2491,14 +2491,7 @@ static void gen6_enable_rps(struct drm_device *dev)
>  	gen6_set_rps(dev_priv->dev, (gt_perf_status & 0xff00) >> 8);
>  
>  	/* requires MSI enabled */
> -	I915_WRITE(GEN6_PMIER,
> -		   GEN6_PM_MBOX_EVENT |
> -		   GEN6_PM_THERMAL_EVENT |
> -		   GEN6_PM_RP_DOWN_TIMEOUT |
> -		   GEN6_PM_RP_UP_THRESHOLD |
> -		   GEN6_PM_RP_DOWN_THRESHOLD |
> -		   GEN6_PM_RP_UP_EI_EXPIRED |
> -		   GEN6_PM_RP_DOWN_EI_EXPIRED);
> +	I915_WRITE(GEN6_PMIER, GEN6_PM_DEFERRED_EVENTS);
>  	spin_lock_irq(&dev_priv->rps_lock);
>  	WARN_ON(dev_priv->pm_iir != 0);
>  	I915_WRITE(GEN6_PMIMR, 0);



-- 
Ben Widawsky, Intel Open Source Technology Center

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

* Re: [PATCH] drm/i915: Only request PM interrupts for the events we handled
  2012-07-05 14:02 [PATCH] drm/i915: Only request PM interrupts for the events we handled Chris Wilson
  2012-07-05 20:33 ` Ben Widawsky
@ 2012-07-08 16:10 ` Jesse Barnes
  2012-07-08 17:35 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2012-07-08 16:10 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, Ben Widawsky, Eugeni Dodonov

On 7/5/2012 7:02 AM, Chris Wilson wrote:
> There is little point waking up every 10ms to service an interrupt which
> we then promptly ignore. So only program the the PMIER to enable
> interrupts for those events which we do handle, not all of them!
>
> Signed-off-by: Chris Wilson<chris@chris-wilson.co.uk>
> Cc: Jesse Barnes<jbarnes@virtuousgeek.org>
> Cc: Eugeni Dodonov<eugeni.dodonov@intel.com>
> Cc: Ben Widawsky<ben@bwidawsk.net>
> ---
>   drivers/gpu/drm/i915/intel_pm.c |    9 +--------
>   1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 0e27e95..53df531 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -2491,14 +2491,7 @@ static void gen6_enable_rps(struct drm_device *dev)
>   	gen6_set_rps(dev_priv->dev, (gt_perf_status&  0xff00)>>  8);
>
>   	/* requires MSI enabled */
> -	I915_WRITE(GEN6_PMIER,
> -		   GEN6_PM_MBOX_EVENT |
> -		   GEN6_PM_THERMAL_EVENT |
> -		   GEN6_PM_RP_DOWN_TIMEOUT |
> -		   GEN6_PM_RP_UP_THRESHOLD |
> -		   GEN6_PM_RP_DOWN_THRESHOLD |
> -		   GEN6_PM_RP_UP_EI_EXPIRED |
> -		   GEN6_PM_RP_DOWN_EI_EXPIRED);
> +	I915_WRITE(GEN6_PMIER, GEN6_PM_DEFERRED_EVENTS);
>   	spin_lock_irq(&dev_priv->rps_lock);
>   	WARN_ON(dev_priv->pm_iir != 0);
>   	I915_WRITE(GEN6_PMIMR, 0);

Yeah looks good to me, though like Ben said these other ones could be 
fun at some point.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

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

* Re: [PATCH] drm/i915: Only request PM interrupts for the events we handled
  2012-07-05 14:02 [PATCH] drm/i915: Only request PM interrupts for the events we handled Chris Wilson
  2012-07-05 20:33 ` Ben Widawsky
  2012-07-08 16:10 ` Jesse Barnes
@ 2012-07-08 17:35 ` Daniel Vetter
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2012-07-08 17:35 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, Ben Widawsky, Eugeni Dodonov

On Thu, Jul 05, 2012 at 03:02:17PM +0100, Chris Wilson wrote:
> There is little point waking up every 10ms to service an interrupt which
> we then promptly ignore. So only program the the PMIER to enable
> interrupts for those events which we do handle, not all of them!
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
> Cc: Ben Widawsky <ben@bwidawsk.net>
Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

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

end of thread, other threads:[~2012-07-08 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-05 14:02 [PATCH] drm/i915: Only request PM interrupts for the events we handled Chris Wilson
2012-07-05 20:33 ` Ben Widawsky
2012-07-08 16:10 ` Jesse Barnes
2012-07-08 17:35 ` Daniel Vetter

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