drm/mm: Fix search for smallest hole satisfying constraints
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 19 Mar 2014 08:37:14 +0000 (17:37 +0900)
committerDave Airlie <airlied@redhat.com>
Fri, 4 Apr 2014 00:12:21 +0000 (10:12 +1000)
commit145bccd2397b53f2163c37e73413d80bfcbb8e35
tree2dd49386d2a4a2a500badc1f9dedc41c0c3d2b95
parent740c22ae516c22f07ac275713d684581df08a386
drm/mm: Fix search for smallest hole satisfying constraints

entry->size is the size of the node, not the size of the hole after it.
So the code would actually find the hole which can satisfy the
constraints and which is preceded by the smallest node, not the smallest
hole satisfying the constraints.

Reported-by: "Huang, FrankR" <FrankR.Huang@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_mm.c