Skip to content

Commit 34880b1

Browse files
committed
drm/i915/selftests: wait for active idle event in i915_active_unlock_wait
After i915_active_unlock_wait i915_active can be still non-idle due to barrier async handling in signal_irq_work. As a result one can observe following errors: bcs0: heartbeat pulse did not flush idle tasks *ERROR* pulse active pulse_active [i915]:pulse_retire [i915] *ERROR* pulse count: 0 *ERROR* pulse preallocated barriers? no To prevent it let's wait explicitly for idleness. v2: wait only in live_idle tests Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231205-selftest_wait_for_active_idle_event-v2-1-1437d0bf9829@intel.com
1 parent cf9cb02 commit 34880b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static struct pulse *pulse_create(void)
8484

8585
static void pulse_unlock_wait(struct pulse *p)
8686
{
87-
i915_active_unlock_wait(&p->active);
87+
wait_var_event_timeout(&p->active, i915_active_is_idle(&p->active), HZ);
8888
}
8989

9090
static int __live_idle_pulse(struct intel_engine_cs *engine,

0 commit comments

Comments
 (0)