[PATCH 2/2] drm/i915: Mark bonded requests as non-preemptable

Chris Wilson chris at chris-wilson.co.uk
Wed May 20 13:30:10 UTC 2020


Quoting Tvrtko Ursulin (2020-05-20 14:24:13)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Once bonded requests are executing in parallel it is at least sub-
> optimal to preempt one of them and could even lead to GPU hangs with
> media workloads.
> 
> Mark the bonded pairs as non-preemptable so once running they remain in
> lock-step.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Suggested-by: Xiaogang Li <xiaogang.li at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 3e367f6e4963..ec3c25abd07c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -458,6 +458,9 @@ static inline bool need_preempt(const struct intel_engine_cs *engine,
>         if (!intel_engine_has_semaphores(engine))
>                 return false;
>  
> +       if (test_bit(I915_FENCE_FLAG_NOPREEMPT, &rq->fence.flags))
> +               return false;

See effective_prio().
-Chris


More information about the Intel-gfx-trybot mailing list