[Intel-gfx] [RFC 2/4] drm/i915/execlists: Keep request->priority for its lifetime

Michał Winiarski michal.winiarski at intel.com
Wed Jul 19 14:25:51 UTC 2017


On Mon, Jul 17, 2017 at 09:42:33AM +0100, Chris Wilson wrote:
> With preemption, we will want to "unsubmit" a request, taking it back
> from the hw and returning it to the priority sorted execution list. In
> order to know where to insert it into that list, we need to remember
> its adjust priority (which may change even as it was being executed).
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski at intel.com>

We should also change GuC dequeue/irq_handler.

With that:

Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 1b2f0e3d383a..8ab0c4b76c98 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -552,8 +552,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>  			}
>  
>  			INIT_LIST_HEAD(&rq->priotree.link);
> -			rq->priotree.priority = INT_MAX;
> -
>  			__i915_gem_request_submit(rq);
>  			trace_i915_gem_request_in(rq, port_index(port, engine));
>  			last = rq;
> @@ -687,6 +685,7 @@ static void intel_lrc_irq_handler(unsigned long data)
>  				execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
>  
>  				trace_i915_gem_request_out(rq);
> +				rq->priotree.priority = INT_MAX;
>  				i915_gem_request_put(rq);
>  
>  				port[0] = port[1];
> -- 
> 2.13.2
> 


More information about the Intel-gfx mailing list