[Intel-gfx] [PATCH 2/2] drm/i915/execlists: Notify context-out for lost requests

Mika Kuoppala mika.kuoppala at linux.intel.com
Tue Sep 26 10:17:02 UTC 2017


Chris Wilson <chris at chris-wilson.co.uk> writes:

> When cancelling requests, also send the notification to any listeners
> (gvt) that the request is no longer scheduler on hw. They may require to

s/scheduler/scheduled.

lgtm
-Mika

> keep the in/out exactly balanced, and so the reuse after the reset may
> confuse the listener.
>
> Fixes: 221ab9719bf3 ("drm/i915/execlists: Unwind incomplete requests on resets")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: "Zhenyu Wang" <zhenyuw at linux.intel.com>
> Cc: "Wang, Zhi A" <zhi.a.wang at intel.com>
> Cc: MichaƂ Winiarski <michal.winiarski at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index c07da6af58cd..e7d9f49128f5 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -590,7 +590,11 @@ execlist_cancel_port_requests(struct intel_engine_execlists *execlists)
>  	unsigned int num_ports = ARRAY_SIZE(execlists->port);
>  
>  	while (num_ports-- && port_isset(port)) {
> -		i915_gem_request_put(port_request(port));
> +		struct drm_i915_gem_request *rq = port_request(port);
> +
> +		execlists_context_schedule_out(rq);
> +		i915_gem_request_put(rq);
> +
>  		memset(port, 0, sizeof(*port));
>  		port++;
>  	}
> -- 
> 2.14.1


More information about the Intel-gfx mailing list