[Intel-gfx] [PATCH 10/12] drm/i915: Rename helpers used for unwinding, use macro for can_preempt

Chris Wilson chris at chris-wilson.co.uk
Mon Oct 9 15:12:57 UTC 2017


Quoting MichaƂ Winiarski (2017-10-09 15:52:56)
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 9a7aec2c1771..4f9f12e3c7f6 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -354,7 +354,7 @@ static void unwind_wa_tail(struct drm_i915_gem_request *rq)
>         assert_ring_tail_valid(rq->ring, rq->tail);
>  }
>  
> -static void unwind_incomplete_requests(struct intel_engine_cs *engine)
> +static void intel_engine_unwind_incomplete_requests(struct intel_engine_cs *engine)

Hmm, but it only applies to execlists and shouldn't be called for
legacy. I'd cheat pass execlists and then
engine = container_of(execlists, typeof(*engine), execlists)

Then whilst you are there pull &engine->timeline->requests into a local.
That should be break even, if not a net gain in smaller code.
-Chris


More information about the Intel-gfx mailing list