[Intel-gfx] [PATCH] drm/i915/execlists: Remove the ring advancement under preemption
Michel Thierry
michel.thierry at intel.com
Wed Feb 21 17:25:54 UTC 2018
On 21/02/18 05:32, Chris Wilson wrote:
> Load an empty ringbuffer for preemption, ignoring the lite-restore
> workaround as we know the preempt context is always idle before preemption.
>
True, injecting the preempt context shouldn't cause a lite-restore.
And the restriction was to always have Head!=Tail when attempting lite
restore.
> Note that after some digging by Michal Winiarski, we found that
> RING_HEAD is no longer being updated (due to inhibiting context save
> restore) so this patch is already in effect!
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Michal Winiarski <michal.winiarski at intel.com>
> Cc: Michel Thierry <michel.thierry at intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at intel.com>
Reviewed-by: Michel Thierry <michel.thierry at intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 9b6d781b22ec..e2d5e19b8a5e 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -449,13 +449,6 @@ static void inject_preempt_context(struct intel_engine_cs *engine)
>
> GEM_BUG_ON(engine->execlists.preempt_complete_status !=
> upper_32_bits(ce->lrc_desc));
> - GEM_BUG_ON(!IS_ALIGNED(ce->ring->size, WA_TAIL_BYTES));
> -
> - memset(ce->ring->vaddr + ce->ring->tail, 0, WA_TAIL_BYTES);
> - ce->ring->tail += WA_TAIL_BYTES;
> - ce->ring->tail &= (ce->ring->size - 1);
> - ce->lrc_reg_state[CTX_RING_TAIL+1] = ce->ring->tail;
> -
> GEM_BUG_ON((ce->lrc_reg_state[CTX_CONTEXT_CONTROL + 1] &
> _MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT |
> CTX_CTRL_ENGINE_CTX_SAVE_INHIBIT)) !=
>
More information about the Intel-gfx
mailing list