[Intel-gfx] [PATCH] drm/i915: Assert that the engine hasn't run backwards

Michał Winiarski michal.winiarski at intel.com
Thu Mar 30 15:45:28 UTC 2017


On Thu, Mar 30, 2017 at 04:05:58PM +0100, Chris Wilson wrote:
> One invariant on the order of requests on an engine is that they are
> monotonically increasing. Assert that when we check retirement on the
> ring that no request is more recent than the last submit request.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Michał Winiarski <michal.winiarski at intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/i915_gem_request.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index 2cb2206b2f6b..2ce37e25f623 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -1246,6 +1246,8 @@ static void engine_retire_requests(struct intel_engine_cs *engine)
>  	u32 seqno = intel_engine_get_seqno(engine);
>  	LIST_HEAD(retire);
>  
> +	GEM_BUG_ON(!i915_seqno_passed(intel_engine_last_submit(engine), seqno));
> +
>  	spin_lock_irq(&engine->timeline->lock);
>  	list_for_each_entry_safe(request, next,
>  				 &engine->timeline->requests, link) {
> -- 
> 2.11.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list