[Intel-gfx] [PATCH] drm/i915: avoid false fence signaling when enabling preemption

Min He min.he at intel.com
Mon Mar 12 06:17:10 UTC 2018

In i915_request_wait(), it adds a local intel_wait variable into rb tree
of waiters. However, when the corresponding request is preempted, the
seqno of this wait will not be updated, which will lead to a false
signaling to the request and cause the i915_request_wait() to return
early before the request is really completed.

In this patch, we check if the seqno in wait is same as the request
before we signal the fence, and thus fix the above issue.

Signed-off-by: Min He <min.he at intel.com>
 drivers/gpu/drm/i915/i915_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 828f310..1ef961d 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1121,7 +1121,7 @@ static void notify_ring(struct intel_engine_cs *engine)
-	if (rq) {
+	if (rq && intel_wait_check_request(wait, rq)) {

More information about the Intel-gfx mailing list