From patchwork Mon Jul 25 17:31:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9246139 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 CCCB760757 for ; Mon, 25 Jul 2016 17:34:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF58F20499 for ; Mon, 25 Jul 2016 17:34:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3FC0212D6; Mon, 25 Jul 2016 17:34:45 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59A0020499 for ; Mon, 25 Jul 2016 17:34:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 798536E3A0; Mon, 25 Jul 2016 17:34:39 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6F7C6E39C for ; Mon, 25 Jul 2016 17:34:13 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id i5so17709523wmg.2 for ; Mon, 25 Jul 2016 10:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=bISns5RtPNUCVK7zdMqR5QaQAMFPJ1i2I3GuM40QFNU=; b=zfF/lFsB3PQxBQLZKrAs9mr2Ra/R1Irz5DZcwFEWO8t9lToKw/7EBTEMMfKa56AhZj VfHrEr9vCUhXSkB+cBu02IZzgF79GOeLG4W/chcCubLuz9kQIz++3qWAqtReR+fkxxIR 1S3cnazyDJCQ9U9qGrC3+HcB9g7KqmuW94JQLj2AeL7QJE3brLqcILgqe/z5bh0jcr6L ARAxyvSLgHEcN7yahzTLy0YkALoFiU4+Zks5mzDlSfYRR/VPwCMXL5j7spvfkdMakpa5 fU25997xKnziy8QL+y8qQYDygfpeXG9tqEpj2bRwrYVKmYhWtFAYELi12vP0AaC0tfnM FkTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=bISns5RtPNUCVK7zdMqR5QaQAMFPJ1i2I3GuM40QFNU=; b=k7EJ69L+ygfQPdhr0d4F4ErzZSv+n/OrbY+Rspr2rgSabv1D0CKsWrOzGzDou3zZZ/ ekUbBU3YCb5LJI3uJMWyKt57EjVFcxRNAAjkssx5dLAFTuZP24om5GsQvr3NxrhLPHWp qHBrDu/B7nHQbrGHyfRGf5KuOVsjxaodQbDhaFnWXKBTszGbY44l8T445QgG2oY/LGR2 i9QXd+S25CAmD1e8aMjwc7SxW6CAXyJF/ZqF98fkjD/kBflvBEG0Y72MwjWjyoi95qsI dkc2E96GRmfXjscCuKQyEKBCYVY0n5gKf8ssbuvOiBFJhijRiDANhqLIS2oapfZJ/7kz u2Fg== X-Gm-Message-State: AEkoouvaspt/Pd1RD3ThzETlGX1gx2bYfuv3jfTCUj8gmw6CQ9VXGpsLOfVzh1jBPjIrPA== X-Received: by 10.194.200.129 with SMTP id js1mr16690578wjc.167.1469468051268; Mon, 25 Jul 2016 10:34:11 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id 190sm20531746wmk.13.2016.07.25.10.34.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jul 2016 10:34:03 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 25 Jul 2016 18:31:47 +0100 Message-Id: <1469467954-3920-9-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1469467954-3920-1-git-send-email-chris@chris-wilson.co.uk> References: <1469467954-3920-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 08/55] drm/i915: Remove stray intel_engine_cs ring identifiers from i915_gem.c 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 A few places we use ring when referring to the struct intel_engine_cs. An anachronism we are pruning out. Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-9-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtien --- drivers/gpu/drm/i915/i915_gem.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index e155e8dd28ed..7bfce1d5c61b 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -46,7 +46,7 @@ static void i915_gem_object_flush_cpu_write_domain(struct drm_i915_gem_object *o static void i915_gem_object_retire__write(struct drm_i915_gem_object *obj); static void -i915_gem_object_retire__read(struct drm_i915_gem_object *obj, int ring); +i915_gem_object_retire__read(struct drm_i915_gem_object *obj, int engine); static bool cpu_cache_is_coherent(struct drm_device *dev, enum i915_cache_level level) @@ -1385,10 +1385,10 @@ static void i915_gem_object_retire_request(struct drm_i915_gem_object *obj, struct drm_i915_gem_request *req) { - int ring = req->engine->id; + int idx = req->engine->id; - if (obj->last_read_req[ring] == req) - i915_gem_object_retire__read(obj, ring); + if (obj->last_read_req[idx] == req) + i915_gem_object_retire__read(obj, idx); else if (obj->last_write_req == req) i915_gem_object_retire__write(obj); @@ -2381,20 +2381,20 @@ i915_gem_object_retire__write(struct drm_i915_gem_object *obj) } static void -i915_gem_object_retire__read(struct drm_i915_gem_object *obj, int ring) +i915_gem_object_retire__read(struct drm_i915_gem_object *obj, int idx) { struct i915_vma *vma; - GEM_BUG_ON(obj->last_read_req[ring] == NULL); - GEM_BUG_ON(!(obj->active & (1 << ring))); + GEM_BUG_ON(obj->last_read_req[idx] == NULL); + GEM_BUG_ON(!(obj->active & (1 << idx))); - list_del_init(&obj->engine_list[ring]); - i915_gem_request_assign(&obj->last_read_req[ring], NULL); + list_del_init(&obj->engine_list[idx]); + i915_gem_request_assign(&obj->last_read_req[idx], NULL); - if (obj->last_write_req && obj->last_write_req->engine->id == ring) + if (obj->last_write_req && obj->last_write_req->engine->id == idx) i915_gem_object_retire__write(obj); - obj->active &= ~(1 << ring); + obj->active &= ~(1 << idx); if (obj->active) return; @@ -4599,7 +4599,7 @@ int i915_gem_init(struct drm_device *dev) ret = i915_gem_init_hw(dev); if (ret == -EIO) { - /* Allow ring initialisation to fail by marking the GPU as + /* Allow engine initialisation to fail by marking the GPU as * wedged. But we only want to do this where the GPU is angry, * for all other failure, such as an allocation failure, bail. */