[Intel-gfx] [PATCH 02/14] drm/i915: Decouple the object from the unbound list before freeing pages

Daniel Vetter daniel at ffwll.ch
Mon Dec 3 17:16:54 CET 2012


On Mon, Dec 03, 2012 at 11:49:00AM +0000, Chris Wilson wrote:
> As we may actually allocate in order to save the physical swizzling bits
> during the free, we have to be careful not to trigger the shrinker on
> the same object.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Since this one here smells like a potential OOPS fixer on relevant
machines, I've applied it to 3.8-fixes. Since it's tricky, I'll add a
small comment. Thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 726bfc2..59202e4 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1700,10 +1700,11 @@ i915_gem_object_put_pages(struct drm_i915_gem_object *obj)
>  	if (obj->pages_pin_count)
>  		return -EBUSY;
>  
> +	list_del(&obj->gtt_list);
> +
>  	ops->put_pages(obj);
>  	obj->pages = NULL;
>  
> -	list_del(&obj->gtt_list);
>  	if (i915_gem_object_is_purgeable(obj))
>  		i915_gem_object_truncate(obj);
>  
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list