[Intel-gfx] [PATCH 42/53] drm/i915/bdw: Make sure gpu reset still works with Execlists

Daniel Vetter daniel at ffwll.ch
Wed Jun 18 22:50:24 CEST 2014


On Fri, Jun 13, 2014 at 04:38:00PM +0100, oscar.mateo at intel.com wrote:
> From: Oscar Mateo <oscar.mateo at intel.com>
> 
> If we reset a ring after a hang, we have to make sure that we clear
> out all queued Execlists requests.
> 
> v2: The ring is, at this point, already being correctly re-programmed
> for Execlists, and the hangcheck counters cleared.
> 
> Signed-off-by: Oscar Mateo <oscar.mateo at intel.com>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 7c10540..86bfb8a 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2546,6 +2546,19 @@ static void i915_gem_reset_ring_cleanup(struct drm_i915_private *dev_priv,
>  		i915_gem_free_request(request);
>  	}
>  
> +	if (intel_enable_execlists(dev_priv->dev)) {
> +		while (!list_empty(&ring->execlist_queue)) {

the execlist_queu should be emtpy for legacy mode, i.e. you can ditch teh
if here, it's redundant. If not move the INIT_LIST_HEAD ;-)
-Daniel

> +			struct intel_ctx_submit_request *submit_req;
> +
> +			submit_req = list_first_entry(&ring->execlist_queue,
> +					struct intel_ctx_submit_request,
> +					execlist_link);
> +			list_del(&submit_req->execlist_link);
> +			i915_gem_context_unreference(submit_req->ctx);
> +			kfree(submit_req);
> +		}
> +	}
> +
>  	/* These may not have been flush before the reset, do so now */
>  	kfree(ring->preallocated_lazy_request);
>  	ring->preallocated_lazy_request = NULL;
> -- 
> 1.9.0
> 
> _______________________________________________
> 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