[Intel-gfx] [PATCH] drm/i915: fix i915_gem_evict_something corner case

Owain Ainsworth zerooa at googlemail.com
Sat Sep 12 00:20:00 CEST 2009


On Fri, Sep 11, 2009 at 02:30:28PM -0700, Jesse Barnes wrote:
> Owain pointed out a potential bug in i915_gem_evict_something.  In the
> case where we get there without any buffers on the inactive list, we
> may end up waiting on an outstanding request to finish.  If a request
> does finish but doesn't end up on the inactive list, we can't assume
> that a buffer has been freed and that space is available, since that
> path doesn't actually free space (and since we're holding the struct
> mutex at that point, no one else will have freed it either).
> 
> So remove the break, fixup the comment, and try flushing something
> instead when we hit that case (looping back up to the top as necessary).

I also note that the DRM_ERROR at the end of that function is really
worrying. whenever (must be rare or never) someone fails to pin all
buffers in execbuffer they'll get that worrying error print out, even
though it's technically normal operation.

I'd suggest removing it.

-0-
-- 
Cleaning your house while your kids are still growing is like
shoveling the walk before it stops snowing.
		-- Phyllis Diller



More information about the Intel-gfx mailing list