[Intel-gfx] [PATCH v4 37/38] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-28 Thread Daniel Vetter
On Wed, Dec 28, 2016 at 02:48:52PM +0100, Daniel Vetter wrote: > On Thu, Dec 22, 2016 at 08:36:40AM +, 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

[Intel-gfx] [PATCH v4 37/38] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-28 Thread Daniel Vetter
On Thu, Dec 22, 2016 at 08:36:40AM +, 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

[PATCH v4 37/38] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-28 Thread Chris Wilson
On Thu, Dec 22, 2016 at 08:36:40AM +, Chris Wilson wrote: > /** > * drm_mm_for_each_hole - iterator to walk over all holes > * @entry: drm_mm_node used internally to track progress > @@ -274,57 +263,27 @@ static inline u64 drm_mm_hole_node_end(const struct > drm_mm_node *hole_node) > *

[PATCH v4 37/38] drm: Improve drm_mm search (and fix topdown allocation) with rbtrees

2016-12-22 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