[PATCH] drm: Only evict the blocks required to create the requested hole

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 18 02:37:06 PST 2012


On Sun, 16 Dec 2012 17:51:41 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Avoid clobbering adjacent blocks if they happen to expire earlier and
> amalgamate together to form the requested hole.
> 
> In passing this fixes a regression from
> commit ea7b1dd44867e9cd6bac67e7c9fc3f128b5b255c
> Author: Daniel Vetter <daniel.vetter at ffwll.ch>
> Date:   Fri Feb 18 17:59:12 2011 +0100
> 
>     drm: mm: track free areas implicitly
> 
> which swaps the end address for size (with a potential overflow) and
> effectively causes the eviction code to clobber almost all earlier
> buffers above the evictee.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>

On IRC I mentioned that I feared there be dragon lurking here. They
turned out to be figments of my own code - a later patch to adjust the
allocation of nodes was incomplete.

Please review and consider this patch.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list