[Intel-gfx] [PATCH 14/56] drm/i915: Make retire condition check for requests not objects

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Thu Jun 4 11:23:14 PDT 2015


From: John Harrison <John.C.Harrison at Intel.com>

A previous patch (read-read optimisation) changed the early exit
condition in i915_gem_retire_requests_ring() from checking the request
list to checking the active list. This assumes that all requests have
objects associated with them which are placed on the active list. The
removal of the OLR means that non-batch buffer work is no longer
tagged onto the nearest batch buffer submission and thus there are
requests going through the system which do not have objects associated
with them. This can therefore lead to the situation where an
outstanding request never gets retired.

This change reverts the early exit condition to check for requests.
Given that the purpose of the function is to retire requests, this
does seem to make much more sense.

For: VIZ-5190
Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 7117659..4c5a6cd 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2859,7 +2859,7 @@ i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
 {
 	WARN_ON(i915_verify_lists(ring->dev));
 
-	if (list_empty(&ring->active_list))
+	if (list_empty(&ring->request_list))
 		return;
 
 	/* Retire requests first as we use it above for the early return.
-- 
1.7.9.5



More information about the Intel-gfx mailing list