]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Wrap a timer into a i915_sw_fence
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Oct 2017 12:57:25 +0000 (13:57 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 12 Oct 2017 20:06:26 +0000 (21:06 +0100)
commit7f6095efc3464265de743c6c07db7f42e585b5c4
treea877956c4bccc32cc11b974600976716145188ce
parentc43b2f3d3d9ba926f22780ed19bb72a05e583ac0
drm/i915/selftests: Wrap a timer into a i915_sw_fence

For some selftests, we want to issue requests but delay them going to
hardware. Furthermore, we don't want those requests to block
indefinitely (or else we may hang the driver and block testing) so we
want to employ a timeout. So naturally we want a fence that is
automatically signaled by a timer.

v2: Add kselftests.
v3: Limit the API available to selftests; there isn't an overwhelming
reason to export it universally.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171012125726.14736-2-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_sw_fence.c
drivers/gpu/drm/i915/selftests/i915_sw_fence.c
drivers/gpu/drm/i915/selftests/lib_sw_fence.c [new file with mode: 0644]
drivers/gpu/drm/i915/selftests/lib_sw_fence.h [new file with mode: 0644]