Message ID | 1394233524-3522-2-git-send-email-przanoni@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Mar 07, 2014 at 08:05:19PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni <paulo.r.zanoni@intel.com> > > So far force_wake_timer was only used by gen6_gt_force_wake_put. Since > we always had balanced gen6_gt_force_wake_get/put calls, we could > guarantee balanced calls to intel_runtime_pm_get/put. I'm sure you can think of a trivial way to put things back into balance. -Chris
On Sat, Mar 08, 2014 at 09:36:01AM +0000, Chris Wilson wrote: > On Fri, Mar 07, 2014 at 08:05:19PM -0300, Paulo Zanoni wrote: > > From: Paulo Zanoni <paulo.r.zanoni@intel.com> > > > > So far force_wake_timer was only used by gen6_gt_force_wake_put. Since > > we always had balanced gen6_gt_force_wake_get/put calls, we could > > guarantee balanced calls to intel_runtime_pm_get/put. > > I'm sure you can think of a trivial way to put things back into balance. Yeah, I think a __force_wake_timer which doesn't do the runtime put should be good enough. Chris, can I sign you up for this since Paulo is now on vacation for 2 weeks? No real hurry since we need to stall for QA to hit this anyway - if they still fail to properly run the runtime pm tests then I need to go into full maintainer beserk mode ;-) Cheers, Daniel
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 7861d97..c91c0c2 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -504,11 +504,12 @@ gen6_read##x(struct drm_i915_private *dev_priv, off_t reg, bool trace) { \ NEEDS_FORCE_WAKE((dev_priv), (reg))) { \ dev_priv->uncore.funcs.force_wake_get(dev_priv, \ FORCEWAKE_ALL); \ - dev_priv->uncore.forcewake_count++; \ - mod_timer_pinned(&dev_priv->uncore.force_wake_timer, \ - jiffies + 1); \ + val = __raw_i915_read##x(dev_priv, reg); \ + dev_priv->uncore.funcs.force_wake_put(dev_priv, \ + FORCEWAKE_ALL); \ + } else { \ + val = __raw_i915_read##x(dev_priv, reg); \ } \ - val = __raw_i915_read##x(dev_priv, reg); \ REG_READ_FOOTER; \ }