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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

Reviewed-by: Michał Winiarski <michal.winiarski@xxxxxxxxx>

-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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux