On Thu, Mar 24, 2016 at 01:32:53PM +0000, Chris Wilson wrote: > If we arm the release timer on acquiring the forcewake, we will release > the forcewake on the jiffie afterwards. If we only arm the release timer > on the final put, we will release the forcewake slightly later instead. > > Much, much worse, we did not acquire a refcount for the armed timing > during the get(), and so unbalanced our forcewake counting. > > Reported-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_uncore.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c > index 96799392c2c7..d857168c6c9b 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.c > +++ b/drivers/gpu/drm/i915/intel_uncore.c > @@ -60,6 +60,7 @@ fw_domain_reset(const struct intel_uncore_forcewake_domain *d) > static inline void > fw_domain_arm_timer(struct intel_uncore_forcewake_domain *d) > { > + d->wake_count++; > mod_timer_pinned(&d->timer, jiffies + 1); Which raise the obvious issue that we double increment the counter if the timer was pending (where we would only then release it once). -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx