From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH] drm/i915: Only request PM interrupts for the events we handled Date: Sun, 08 Jul 2012 09:10:57 -0700 Message-ID: <4FF9B111.3090205@virtuousgeek.org> References: <1341496937-5666-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy6-pub.bluehost.com (oproxy6-pub.bluehost.com [67.222.54.6]) by gabe.freedesktop.org (Postfix) with SMTP id 4AFB49E77E for ; Sun, 8 Jul 2012 09:10:59 -0700 (PDT) In-Reply-To: <1341496937-5666-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky , Eugeni Dodonov List-Id: intel-gfx@lists.freedesktop.org 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 > Cc: Jesse Barnes > Cc: Eugeni Dodonov > Cc: Ben Widawsky > --- > 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