drm: Simplify drm_mm scan-list manipulation
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:35 +0000 (08:36 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 28 Dec 2016 12:22:56 +0000 (13:22 +0100)
commitf29051f12f33078b81ac710bee9ebd7a85ee1849
tree9fab038cb5dce0e3c1426036490362173acad361
parent9a956b1548794033d5b893d6d6fcc00b197cfc9b
drm: Simplify drm_mm scan-list manipulation

Since we mandate a strict reverse-order of drm_mm_scan_remove_block()
after drm_mm_scan_add_block() we can further simplify the list
manipulations when generating the temporary scan-hole.

v2: Highlight the games being played with the lists to track the scan
holes without allocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-33-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_mm.c
include/drm/drm_mm.h