[Intel-gfx] [PATCH] drm/i915/ppgtt: Defer request freeing on reset

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 1 09:57:54 CET 2014


On Tue, Dec 31, 2013 at 11:47:13PM -0800, Ben Widawsky wrote:
>  drivers/gpu/drm/i915/i915_gem.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7ba12b4..4bd7057 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2389,6 +2389,16 @@ static void i915_gem_reset_ring_status(struct drm_i915_private *dev_priv,
>  static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
>  					struct intel_ring_buffer *ring)
>  {
> +	while (!list_empty(&ring->active_list)) {
> +		struct drm_i915_gem_object *obj;
> +
> +		obj = list_first_entry(&ring->active_list,
> +				       struct drm_i915_gem_object,
> +				       ring_list);
> +
> +		i915_gem_object_move_to_inactive(obj);
> +	}
> +
>  	while (!list_empty(&ring->request_list)) {
>  		struct drm_i915_gem_request *request;
>  
> @@ -2399,15 +2409,7 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
>  		i915_gem_free_request(request);
>  	}
>  
> -	while (!list_empty(&ring->active_list)) {
> -		struct drm_i915_gem_object *obj;
>  
Adds stray whitespace.

> -		obj = list_first_entry(&ring->active_list,
> -				       struct drm_i915_gem_object,
> -				       ring_list);
> -
> -		i915_gem_object_move_to_inactive(obj);
> -	}
>  }
>  
>  void i915_gem_restore_fences(struct drm_device *dev)

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list