drm: Apply range restriction after color adjustment when allocation
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Dec 2016 08:36:38 +0000 (08:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:39:13 +0000 (08:39 +0000)
commitd20e8c81d4445ead70f686e5f1195d928b24d2c3
treed39eb94e47659ac7a7bc86208ecfdab15c482983
parent86aa023fa68178d22bd90098da84165140673c7f
drm: Apply range restriction after color adjustment when allocation

[ Upstream commit 3db93756b501e5f0a3951c79cfa9ed43c26d3455 ]

mm->color_adjust() compares the hole with its neighbouring nodes. They
only abutt before we restrict the hole, so we have to apply color_adjust
before we apply the range restriction.

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-36-chris@chris-wilson.co.uk
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_mm.c