From patchwork Sun Mar 23 14:18:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3879051 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84A4BBF540 for ; Sun, 23 Mar 2014 14:19:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5CD6201B4 for ; Sun, 23 Mar 2014 14:19:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DFD2C2018E for ; Sun, 23 Mar 2014 14:19:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 893876E695; Sun, 23 Mar 2014 07:19:29 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id CE2136E684 for ; Sun, 23 Mar 2014 07:19:20 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id b57so3487812eek.7 for ; Sun, 23 Mar 2014 07:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mMwDEdAGeYiu+TyX+FtJmEHnCogD3LWGqVpPZFtF83Q=; b=SIKJ8DJ0kmxnDrr4U2obg1pFzGcVAGul09+VimFW1OAh75ApdkqHGpO791x2R3Krit oJLaOZmG3Sx+EHsIccWAQKqwSzZRYS/rodXPQWXjqLjU3iRdfrTcXlN58OfkaDiXTcwA T8uTs5e+t6/TLHwU2uaePh38jz6nT72mrisnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=mMwDEdAGeYiu+TyX+FtJmEHnCogD3LWGqVpPZFtF83Q=; b=J/CnedjSvsV0w2C88lkBF6g209wyvOiWv+OYGMMrmjTXsjl+SsPK6zXtNB/5SGpFSZ Vk9fOXGTN2q+KKSFnJ6C/6drFdTtufChlZBl4UO34pQQ0njOlkxtg/Fx6DUGzdc6ku4J Xg00CJMWKdVqN/So/Gpy9I1K/k2DGuOmpp+Nj1ydytJ4HnY63DNKF6LSPlcitn3zkvLq EKktgR0E2ZhqZ/xS1A3XnBUHNTf5UHKpx/DOsWr40Zl5rj4inTIF22CSHcr8yrjOo+PI 4VKxbAsz+v+jLtJ5jE69h9W7w8FB7W5A5V0+mK7wmjoJFZeMaYyuaZ+YWCbgm5tO81M5 NjIA== X-Gm-Message-State: ALoCoQka3OKrEgV6FiaXWAnud6q5zcz2NXlirNAOaK6Yl377SnBABUzaon7ywsla9o0EE61gUWtI X-Received: by 10.15.31.70 with SMTP id x46mr11669170eeu.26.1395584360120; Sun, 23 Mar 2014 07:19:20 -0700 (PDT) Received: from phenom.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id cb5sm26392589eeb.18.2014.03.23.07.19.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 23 Mar 2014 07:19:19 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 23 Mar 2014 15:18:41 +0100 Message-Id: <1395584342-11812-8-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1395584342-11812-1-git-send-email-daniel.vetter@ffwll.ch> References: <1395584342-11812-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 07/28] lib/intel_batchbuffer: un-inline buf_height/width X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gtkdoc won't pick them up otherwise. Signed-off-by: Daniel Vetter --- lib/intel_batchbuffer.c | 10 ++++++++++ lib/intel_batchbuffer.h | 11 ++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c index 29740bd93bd3..235c1d1d8310 100644 --- a/lib/intel_batchbuffer.c +++ b/lib/intel_batchbuffer.c @@ -387,6 +387,16 @@ intel_copy_bo(struct intel_batchbuffer *batch, 4096/4, size/4096, 32); } +unsigned buf_width(struct scratch_buf *buf) +{ + return buf->stride/sizeof(uint32_t); +} + +unsigned buf_height(struct scratch_buf *buf) +{ + return buf->size/buf->stride; +} + render_copyfunc_t get_render_copyfunc(int devid) { render_copyfunc_t copy = NULL; diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index 4b183122f6c0..26c5e6c34c89 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -206,15 +206,8 @@ struct scratch_buf { unsigned num_tiles; }; -static inline unsigned buf_width(struct scratch_buf *buf) -{ - return buf->stride/sizeof(uint32_t); -} - -static inline unsigned buf_height(struct scratch_buf *buf) -{ - return buf->size/buf->stride; -} +unsigned buf_width(struct scratch_buf *buf); +unsigned buf_height(struct scratch_buf *buf); typedef void (*render_copyfunc_t)(struct intel_batchbuffer *batch, drm_intel_context *context,