OSDN Git Service

drm/i915/selftests: Synchronize checking active status with retirement
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Oct 2019 11:21:11 +0000 (12:21 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Oct 2019 20:12:23 +0000 (21:12 +0100)
commitf79520bb333792fb23a32352f83d8d59a525cec9
tree59b94f3dba064ea10a63d15d0b83d29a8b847a69
parent905da43c6a02b57232c1f087b94bc606f6376632
drm/i915/selftests: Synchronize checking active status with retirement

If retirement is running on another thread, we may inspect the status of
the i915_active before its retirement callback is complete. As we expect
it to be running synchronously, we can wait for any callback to complete
by acquiring the i915_active.mutex.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191022112111.9317-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c