[Intel-gfx] [PATCH] drm/i915: Prune the reservation shared fence array

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Nov 15 14:38:19 UTC 2016


On ma, 2016-11-14 at 08:53 +0000, Chris Wilson wrote:
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -53,6 +53,12 @@ i915_vma_retire(struct i915_gem_active *active,
>  	if (--obj->active_count)
>  		return;
>  
> +	/* Prune the shared fence arrays iff completely idle (inc. external) */
> +	ww_mutex_lock(&obj->resv->lock, NULL);
> +	if (reservation_object_test_signaled_rcu(obj->resv, true))
> +		reservation_object_add_excl_fence(obj->resv, NULL);
> +	ww_mutex_unlock(&obj->resv->lock);
> +

This is not the first instance of "resv->lock" usage, but I think we
should not be doing that, and add reservation_* functions instead...

Regards, Joonas

-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list