[Intel-gfx] [PATCH] drm/i915: Assert that the request is indeed complete when signaled from irq

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Mar 5 11:12:45 UTC 2018


On 05/03/2018 10:41, Chris Wilson wrote:
> After we call dma_fence_signal(), confirm that the request was indeed
> complete.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>   drivers/gpu/drm/i915/i915_irq.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index ce16003ef048..633c18785c1e 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -1123,6 +1123,7 @@ static void notify_ring(struct intel_engine_cs *engine)
>   
>   	if (rq) {
>   		dma_fence_signal(&rq->fence);
> +		GEM_BUG_ON(!i915_request_completed(rq));
>   		i915_request_put(rq);
>   	}
>   
> 

What's the motivation? There is a i915_seqno_passed check a few lines 
above. So there would have to be a confusion in internal breadcrumbs 
state for this to be possible. In which case I'd rather put the assert 
in breadcrumbs code. For instance in intel_wait_check_request, asserting 
that the seqno in wait matches the seqno in wait->request.

Regards,

Tvrtko


More information about the Intel-gfx mailing list