[PATCH] drm/i915: Fix assert_forcewake_active consideration of timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The timer only runs if there are no active users of the fw_domain
remain, that is if the current value of domain->active is *false*.
Fix the logical inversion in the assert!

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
Stop flip-flopping long enough to tell me is the last fix required!
-Chris
---
 drivers/gpu/drm/i915/intel_uncore.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 5f0367fd3200..05f86bceaf83 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -764,7 +764,8 @@ void assert_forcewakes_active(struct intel_uncore *uncore,
 		unsigned int actual = READ_ONCE(domain->wake_count);
 		unsigned int expect = 1;
 
-		if (hrtimer_active(&domain->timer) && READ_ONCE(domain->active))
+		if (hrtimer_active(&domain->timer) &&
+		    !READ_ONCE(domain->active))
 			expect++; /* pending automatic release */
 
 		if (WARN(actual < expect,
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux