[Intel-gfx] [PATCH 16/39] drm/i915: Execute signal callbacks from no-op i915_request_wait
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Fri Jun 14 10:45:52 UTC 2019
On 14/06/2019 08:10, Chris Wilson wrote:
> If we enter i915_request_wait() with an already completed request, but
> unsignaled dma-fence, signal the fence before returning. This allows us
> to execute any of the signal callbacks at the earliest opportunity.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_request.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index ead68a2ffeac..a82f3ff82b39 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -1392,7 +1392,7 @@ long i915_request_wait(struct i915_request *rq,
> might_sleep();
> GEM_BUG_ON(timeout < 0);
>
> - if (i915_request_completed(rq))
> + if (dma_fence_is_signaled(&rq->fence))
> return timeout;
>
> if (!timeout)
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Regards,
Tvrtko
More information about the Intel-gfx
mailing list