[Intel-gfx] [PATCH v2 11/14] drm/i915: Rename helpers used for unwinding, use macro for can_preempt

Chris Wilson chris at chris-wilson.co.uk
Thu Oct 19 19:18:55 UTC 2017


Quoting MichaƂ Winiarski (2017-10-19 19:36:16)
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index f9852c422ea0..dd4708904c85 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -354,8 +354,11 @@ 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 execlists_unwind_incomplete_requests(
> +               const struct intel_engine_execlists * const execlists)
>  {
> +       struct intel_engine_cs *engine =
> +               container_of(execlists, typeof(*engine), execlists);

We can't really say its const if we immediately cast it away. We have to
be careful as the compiler may believe us in the caller when we say it's
const...
-Cris


More information about the Intel-gfx mailing list