[Intel-gfx] [PATCH v2] drm/i915: Store preemption capability in engine->flags

Daniele Ceraolo Spurio daniele.ceraolospurio at intel.com
Tue Apr 3 21:52:35 UTC 2018



On 03/04/18 11:35, Chris Wilson wrote:
> Let's avoid having to delve down the pointer chain to see if the i915
> device has support for preemption and store that on the engine, which
> made the decision in the first place!
> 
> v2: Refactor common preemption policy between execlists/guc.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tomasz Lis <tomasz.lis at intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: MichaƂ Winiarski <michal.winiarski at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>

<snip>

> +static inline bool
> +__execlists_need_preempt(int prio, int last)

Nitpick: this fits on a single line

Daniele

> +{
> +	return prio > max(0, last);
> +}
> +
>   static inline void
>   execlists_set_active(struct intel_engine_execlists *execlists,
>   		     unsigned int bit)
> 


More information about the Intel-gfx mailing list