summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-16 17:07:07 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-04-16 19:21:17 +0300
commit4aa2c102b933d11cc85e0dc6fe607924e248b652 (patch)
tree10704d2fff44e7a5aefc6f31098ea979e41411ec /lib
parent43c2ed758fea849d666af519cd2382d6d6bc6607 (diff)
lib: Fix assert failure in ring stop code
The assert in igt_set_stop_rings() is a bit bogus. Suppsoedly it was meant to assure that the caller always restores the rings to running state after stopping them. But in its current form it will trigger any time someone calls the function and the rings were already stopped. So you can't even restore the rings to running state w/o the assert triggering. Fix it up so that it'll ignore the current ring state when we're trying to restore the rings back to running state. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 0996666a..52b8e2fe 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -714,7 +714,7 @@ void igt_set_stop_rings(enum stop_ring_flags flags)
STOP_RING_ALLOW_ERRORS)) == 0);
current = igt_get_stop_rings();
- igt_assert_f(current == 0,
+ igt_assert_f(flags == 0 || current == 0,
"previous i915_ring_stop is still 0x%x\n", current);
stop_rings_write(flags);