From patchwork Thu Feb 23 07:44:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9587867 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E011604A2 for ; Thu, 23 Feb 2017 07:44:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AC1E28621 for ; Thu, 23 Feb 2017 07:44:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FDF0286A7; Thu, 23 Feb 2017 07:44:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 04F3928621 for ; Thu, 23 Feb 2017 07:44:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7BE46E99C; Thu, 23 Feb 2017 07:44:49 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E0326E993 for ; Thu, 23 Feb 2017 07:44:43 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id 89so2929621wrr.1 for ; Wed, 22 Feb 2017 23:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=7B3FgspSAGHzdVd+gIdUBV4HRyNSEbuxIVOb9fNfG9A=; b=V6C9y4NvERmt6hRT15KaAqanwcItqCCBgZLQYlHxEKEDxiSq4FPURXOGJNLGpCkz4o Z+8qcneXhRKc8UjKcfmvYK+ji0ZGG0BCGcbzLWZtpEPuxVYxIDLdKZj3XXqaW9GqkjC/ q4EM2tMivM5cDBCpYpPbSZnBgNaawZfLqHsHU9jUAdpvZXeqLLSVAm4I/mgI5/fwLusg 6A4AYcbNamTboym7824OSIH0UxxAhJ/QcERviI7v5MNZJY8Rj4s4FOQajhEvCHZfU5Er HKrdxpz8ufQOYAOP1UIcBeZsMcGta9q6ltWXhyRMvSU5S7WDtUBg3abe/yGO98SD3Syo 4Qjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=7B3FgspSAGHzdVd+gIdUBV4HRyNSEbuxIVOb9fNfG9A=; b=LfMCH5POcqqos/AFP9VDk94IQ075gjhJN4hx5EW5dzABSyp9Fpe5R2JFxqRJjyr2SY tpx51S7nG1I7yqW9ixVaysc9BAGJ88gRrNRmjgaBVBxNUniY2JDBzeWHIOmfYda2tin4 H8IDC0VF0uwYUDe34bBTcsecrqiaBNU1Wds5mFFlPo0XXrb6RhIt6ntT42w7R4ZvUBtG LsGsMOaYRfpFpR0A3WrkzvDDo3f9wtTe90WIpvi9TvInor9PrJ9s0Zn54ZQGRmoiwX07 /Lp1A63UIZ7INEQKsPDvbL1gS1UHQhoCiyCH8qsZe03LAxKUwVx67NZfEOEWR3ZBYyQS oTQg== X-Gm-Message-State: AMke39mfLDmLI9TGqwlL7oNZx+4hTq/50mDrcfHI5H+GIAHrZpoBzxd/iiL5K4PW68CxjA== X-Received: by 10.223.146.2 with SMTP id 2mr15425006wrj.85.1487835881876; Wed, 22 Feb 2017 23:44:41 -0800 (PST) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id 186sm5655906wmw.24.2017.02.22.23.44.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Feb 2017 23:44:41 -0800 (PST) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 23 Feb 2017 07:44:22 +0000 Message-Id: <20170223074422.4125-17-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170223074422.4125-1-chris@chris-wilson.co.uk> References: <20170223074422.4125-1-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH v4 16/16] drm/i915: Remove one level of indention from wait-for-execute X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Now that the code is getting simpler, we can reduce the indentation when waiting for the global_seqno. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_gem_request.c | 39 +++++++++++++++------------------ 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index eaa333a35f7c..bb29255dd3a1 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -1089,32 +1089,29 @@ long i915_wait_request(struct drm_i915_gem_request *req, intel_wait_init(&wait); restart: - if (!intel_wait_update_request(&wait, req)) { - do { - set_current_state(state); - - if (intel_wait_update_request(&wait, req)) - break; + do { + set_current_state(state); + if (intel_wait_update_request(&wait, req)) + break; - if (flags & I915_WAIT_LOCKED && - __i915_wait_request_check_and_reset(req)) - continue; + if (flags & I915_WAIT_LOCKED && + __i915_wait_request_check_and_reset(req)) + continue; - if (signal_pending_state(state, current)) { - timeout = -ERESTARTSYS; - goto complete; - } + if (signal_pending_state(state, current)) { + timeout = -ERESTARTSYS; + goto complete; + } - if (!timeout) { - timeout = -ETIME; - goto complete; - } + if (!timeout) { + timeout = -ETIME; + goto complete; + } - timeout = io_schedule_timeout(timeout); - } while (1); + timeout = io_schedule_timeout(timeout); + } while (1); - GEM_BUG_ON(!intel_wait_has_seqno(&wait)); - } + GEM_BUG_ON(!intel_wait_has_seqno(&wait)); GEM_BUG_ON(!i915_sw_fence_signaled(&req->submit)); /* Optimistic short spin before touching IRQs */