Re: [PATCH 16/39] drm/i915: Execute signal callbacks from no-op i915_request_wait

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

 




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

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux