1
0
Fork 0
alistair23-linux/drivers/gpu/drm/selftests
Chris Wilson 83bc4ec372 drm/mm: Add a search-by-address variant to only inspect a single hole
Searching for an available hole by address is slow, as there no
guarantee that a hole will be available and so we must walk over all
nodes in the rbtree before we determine the search was futile. In many
cases, the caller doesn't strictly care for the highest available hole
and was just opportunistically laying out the address space in a
preferred order. In such cases, the caller can accept any address and
would rather do so then do a slow walk.

To be able to mix search strategies, the caller wants to tell the drm_mm
how long to spend on the search. Without a good guide for what should be
the best split, start with a request to try once at most. That is return
the top-most (or lowest) hole if it fulfils the alignment and size
requirements.

v2: Documentation, by why of example (selftests) and kerneldoc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180521082131.13744-2-chris@chris-wilson.co.uk
2018-05-24 15:04:30 +01:00
..
Makefile drm/selftests: Add drm helper selftest 2018-05-04 11:36:45 +02:00
drm_helper_selftests.h drm/selftests: Add drm helper selftest 2018-05-04 11:36:45 +02:00
drm_mm_selftests.h drm/mm: Add a search-by-address variant to only inspect a single hole 2018-05-24 15:04:30 +01:00
drm_selftest.c drm: Add some kselftests for the DRM range manager (struct drm_mm) 2016-12-27 12:34:39 +01:00
drm_selftest.h drm: Add some kselftests for the DRM range manager (struct drm_mm) 2016-12-27 12:34:39 +01:00
test-drm-helper.c drm/selftests: Add drm helper selftest 2018-05-04 11:36:45 +02:00
test-drm_mm.c drm/mm: Add a search-by-address variant to only inspect a single hole 2018-05-24 15:04:30 +01:00