[PATCH 19/37] drm/i915: Remove one level of indention from wait-for-execute

Chris Wilson chris at chris-wilson.co.uk
Sat Dec 3 20:45:44 UTC 2016


Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_request.c | 29 +++++++++++++----------------
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index 4f1ffa6dd3a0..3f1ce7f0c7a9 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -1070,26 +1070,23 @@ long i915_wait_request(struct drm_i915_gem_request *req,
 		add_wait_queue(errq, &reset);
 
 restart:
-	if (!req->global_seqno) {
-		do {
-			set_current_state(state);
-			if (req->global_seqno)
-				break;
+	do {
+		set_current_state(state);
+		if (req->global_seqno)
+			break;
 
-			if (flags & I915_WAIT_LOCKED &&
-			    __i915_reset_request(req))
-				continue;
+		if (flags & I915_WAIT_LOCKED && __i915_reset_request(req))
+			continue;
 
-			if (signal_pending_state(state, current)) {
-				timeout = -ERESTARTSYS;
-				goto complete;
-			}
+		if (signal_pending_state(state, current)) {
+			timeout = -ERESTARTSYS;
+			goto complete;
+		}
 
-			timeout = io_schedule_timeout(timeout);
-		} while (timeout);
+		timeout = io_schedule_timeout(timeout);
+	} while (timeout);
 
-		GEM_BUG_ON(!req->global_seqno);
-	}
+	GEM_BUG_ON(!req->global_seqno);
 	GEM_BUG_ON(!i915_sw_fence_done(&req->submit));
 
 	/* Optimistic short spin before touching IRQs */
-- 
2.10.2



More information about the Intel-gfx-trybot mailing list