From patchwork Mon Aug 1 09:10:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9253923 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 978D16077C for ; Mon, 1 Aug 2016 09:12:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E3A28405 for ; Mon, 1 Aug 2016 09:12:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DE54284A3; Mon, 1 Aug 2016 09:12:19 +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 3610928405 for ; Mon, 1 Aug 2016 09:12:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D98AF6E240; Mon, 1 Aug 2016 09:12:03 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C6DD6E208 for ; Mon, 1 Aug 2016 09:11:46 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id q128so25279609wma.1 for ; Mon, 01 Aug 2016 02:11:46 -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=x07oD0PBUl+e6Nbrfyh8QPyEn5qESGl0B2++Xq//69w=; b=oYb0k5a9pER/FBf80EtwX52MvJR2NM4vFkGrlmOMceNiiLpxqf4S6RkADrDCgC4Za4 8PyUWrfXU1Ydiqm5hKC2TzRZd8giitWq+30l3Pq/7cDtc0Dk1tR/GqY4+p2ZIQ65w3a8 TkE9uhRqB+FYvKpfZvyRWxB2HSvjWIOwKuJn003+adwJkOUoqV+zEolY47TMj2LcUyH3 lWGtizWYoFyOjwDl9cscspIpC2cG2KhHHizASYS2cKcES7J51Kqx8BR1W8sG+jj7m0Jq /2txTNKg954Jgu1rBEBL4qXV9I2CWdJ7VwVoUnGpTsiy4Zb2cVzKyuceaGYhbV32hyl3 dOvQ== 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=x07oD0PBUl+e6Nbrfyh8QPyEn5qESGl0B2++Xq//69w=; b=OeXpD2tliBnqnTlJRrCBkTbhKyhR1+tCmdD4Mk6E70c4WHJdXl8eetvjcH6DEMNrKU dL/DyrMbEZbr9YiFVWF693wagBtBn1aiyZbMp2k/r4Hj/+fZw5BqiuZARiAaHhZmznwR /eqSuKmsxgLtjmAJEck7HezFm98CUwXDHktsg29vmWqz6z2zRY+aNhqwKcYRzPiNAbWE xnmXY46ey6by/1pxK4OdLFLxrdJIzTIJvkdk3wdZGRiGD2GYgN5iZzckd9G09AJrD8x+ SUM5FjjKbglndjvkPkbIxhmh/gLw4dgFqNRjeMluuYD1iPH+LqR79VKP/bpL4sUfCYDW PtvQ== X-Gm-Message-State: AEkoouu+tFWKqCHDtLn7s3lUituQGECzovjEfmdsdxn3ApaP2RA0ZN4sA1YTnqgq8x1u/w== X-Received: by 10.28.71.197 with SMTP id m66mr57453516wmi.26.1470042703307; Mon, 01 Aug 2016 02:11:43 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id e10sm29514511wjc.21.2016.08.01.02.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Aug 2016 02:11:42 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 1 Aug 2016 10:10:19 +0100 Message-Id: <1470042681-25318-12-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1470042681-25318-1-git-send-email-chris@chris-wilson.co.uk> References: <1470042681-25318-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH 11/73] drm/i915: Remove intel_ring_get_tail() 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 Joonas doesn't like the tiny function, especially if I go around making it more complicated and using it elsewhere. To remove that temptation, remove the function! Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-21-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem_request.c | 8 ++++---- drivers/gpu/drm/i915/intel_ringbuffer.h | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index f4e6c40ac4e3..606b0b8a5f91 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -419,7 +419,7 @@ void __i915_add_request(struct drm_i915_gem_request *request, * should already have been reserved in the ring buffer. Let the ring * know that it is time to use that space up. */ - request_start = intel_ring_get_tail(ring); + request_start = ring->tail; reserved_tail = request->reserved_space; request->reserved_space = 0; @@ -464,19 +464,19 @@ void __i915_add_request(struct drm_i915_gem_request *request, * GPU processing the request, we never over-estimate the * position of the head. */ - request->postfix = intel_ring_get_tail(ring); + request->postfix = ring->tail; if (i915.enable_execlists) { ret = engine->emit_request(request); } else { ret = engine->add_request(request); - request->tail = intel_ring_get_tail(ring); + request->tail = ring->tail; } /* Not allowed to fail! */ WARN(ret, "emit|add_request failed: %d!\n", ret); /* Sanity check that the reserved size was large enough. */ - ret = intel_ring_get_tail(ring) - request_start; + ret = ring->tail - request_start; if (ret < 0) ret += ring->size; WARN_ONCE(ret > reserved_tail, diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 45ba29c0b20e..0c3c7185d9ad 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h @@ -490,11 +490,6 @@ static inline u32 intel_engine_get_seqno(struct intel_engine_cs *engine) int init_workarounds_ring(struct intel_engine_cs *engine); -static inline u32 intel_ring_get_tail(struct intel_ring *ring) -{ - return ring->tail; -} - /* * Arbitrary size for largest possible 'add request' sequence. The code paths * are complex and variable. Empirical measurement shows that the worst case