[Intel-gfx] [PATCH 099/190] drm/i915: Check for request completion before choosing CS flips
Chris Wilson
chris at chris-wilson.co.uk
Mon Jan 11 02:44:43 PST 2016
Only queue a CS flip if the outstanding request is not complete, and in
particular do not rely on the request tracking being fresh (since it is
only updated when requests are retired).
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/intel_display.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eef858d5376f..f227cdaf38ec 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11309,8 +11309,11 @@ static bool use_mmio_flip(struct intel_engine_cs *ring,
!reservation_object_test_signaled_rcu(obj->base.dma_buf->resv,
false))
return true;
+ else if (!obj->last_write.request ||
+ i915_gem_request_completed(obj->last_write.request))
+ return true;
else
- return ring != i915_gem_request_get_engine(obj->last_write.request);
+ return ring != obj->last_write.request->engine;
}
static void skl_do_mmio_flip(struct intel_crtc *intel_crtc,
--
2.7.0.rc3
More information about the Intel-gfx
mailing list