drm/i915/selftests: Flush the active callbacks
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 22 Nov 2019 13:24:04 +0000 (13:24 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 22 Nov 2019 17:54:12 +0000 (17:54 +0000)
commite8e61f105af43f33a60069b5b6a13356862ffb67
treef805ca10643333430f8df404b77f32b84a6f52b3
parentcfd821b2439c7eaf56ac473b1233b66dbe342c12
drm/i915/selftests: Flush the active callbacks

Before checking the current i915_active state for the asynchronous work
we submitted, flush any ongoing callback. This ensures that our sampling
is robust and does not sporadically fail due to bad timing as the work
is running on another cpu.

v2: Drop the fence callback sync, retiring under the lock should be good
enough to synchronize with engine_retire() and the
intel_gt_retire_requests() background worker.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191122132404.690440-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_context.c