drm: Fix application of color vs range restriction when scanning drm_mm
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:32 +0000 (08:36 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 28 Dec 2016 10:50:42 +0000 (11:50 +0100)
commit268c6498fba2f6555d215408ae4de3ca1a08fb77
treed2e3ed7fef057aa6fc28b7f4a20cc03f4a9a29ca
parent2c4b389518fbe552188928aadcd3815d5116a05c
drm: Fix application of color vs range restriction when scanning drm_mm

The range restriction should be applied after the color adjustment, or
else we may inadvertently apply the color adjustment to the restricted
hole (and not against its neighbours).

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-30-chris@chris-wilson.co.uk
drivers/gpu/drm/drm_mm.c