]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add a simple generator of random permutations
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:08 +0000 (08:36 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Dec 2016 11:34:00 +0000 (12:34 +0100)
commitbc19d6025c2303d5395ff3fc9f239899b3e0f1ba
treea2d74a1f6f6e31bdf0788d24c66feee224056003
parent680fdeda5fb8f8254ecb034ed7a1c444df984d77
drm: Add a simple generator of random permutations

When testing, we want a random but yet reproducible order in which to
process elements. Here we create an array which is a random (using the
Tausworthe PRNG) permutation of the order in which to execute.

Note these are simple helpers intended to be merged upstream in lib/

v2: Tidier code by David Herrmann
v3: Add reminder that this code is intended to be temporary, with at
least the bulk of the prandom changes going to lib/

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161222083641.2691-6-chris@chris-wilson.co.uk
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/lib/drm_random.c [new file with mode: 0644]
drivers/gpu/drm/lib/drm_random.h [new file with mode: 0644]