Re: [Intel-gfx] [PATCH 33/34] drm: Fix drm_mm search and insertion

2016-12-15 Thread Chris Wilson
On Thu, Dec 15, 2016 at 02:28:32PM +0200, Joonas Lahtinen wrote: > On ma, 2016-12-12 at 11:53 +, Chris Wilson wrote: > > @@ -799,7 +706,7 @@ bool drm_mm_scan_add_block(struct drm_mm_scan *scan, > >   if (adj_end <= adj_start || adj_end - adj_start < scan->size) > >   return false; >

Re: [Intel-gfx] [PATCH 33/34] drm: Fix drm_mm search and insertion

2016-12-15 Thread Joonas Lahtinen
On ma, 2016-12-12 at 11:53 +, Chris Wilson wrote: > The drm_mm range manager claimed to support top-down insertion, but it > was neither searching for the top-most hole that could fit the > allocation request nor fitting the request to the hole correctly. > > In order to search the range effic

[Intel-gfx] [PATCH 33/34] drm: Fix drm_mm search and insertion

2016-12-12 Thread Chris Wilson
The drm_mm range manager claimed to support top-down insertion, but it was neither searching for the top-most hole that could fit the allocation request nor fitting the request to the hole correctly. In order to search the range efficiently, we create a secondary index for the holes using either t