]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Extract random_offset() for use with a prng
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Oct 2019 12:24:30 +0000 (13:24 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Oct 2019 14:30:44 +0000 (15:30 +0100)
commite8d10865c12c95860474940f59c0795971dfa9ee
tree639ee1e19db8928a78e87ebfe106a09bf8f95169
parent742a94578400b927595e69a216ce2e9af72980f4
drm/i915/selftests: Extract random_offset() for use with a prng

For selftests, we desire repeatability and so prefer using a prng with
known seed over true randomness. Extract random_offset() as a selftest
utility that can take the prng state.

Suggested-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191002122430.23205-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
drivers/gpu/drm/i915/selftests/i915_random.c
drivers/gpu/drm/i915/selftests/i915_random.h