Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1862459yba; Thu, 25 Apr 2019 06:58:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoOBdyMLXLvGOH+Oq9al8BvlO9r4alGeKpVGlzj+Jba2voH+2MpF266EgZMvd75OU0RTwV X-Received: by 2002:a63:b48:: with SMTP id a8mr35280149pgl.368.1556200729795; Thu, 25 Apr 2019 06:58:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556200729; cv=none; d=google.com; s=arc-20160816; b=ww5Iw0nXyRumVojeRb3tJ4Xd3e4iy85W3C6u1mP7rueUfl3fs3tHw2Atr9vtMU8/b4 vc/ueUoSnjlkztAxJbDZcmNtWdD2sVxVfXBflgXVhJPLDuLXYigO9Ug1Mf7SxtKZT/wq LF7XUxukV6MrsNtmcJPN0itytM9rO7AHeUSkIruOAdQw/WMk6w5OaU0dndC6+I9Rhn+4 YnRHc8OB0AJ/NcFp3LN59BADBcILUifqaZwfjemcKrmkZn/1NUPP47MfYMXcqCX7/Qbr 6yWH0EqeHMBg9FCqp4RX8uW/Jk9KoBQfyOkRLVYohp/xStkvaewjt06G42SUDzlwiZmS YKPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vrIpRiDTuoSY1Nn2Fa70eY0uGSH/dfGsHCmUpj5EUGs=; b=mo7/3+eTsmq51+G+WkZ2sPwdYoK0pj1mjXVTA+zywKWv2Bu8OQVRBQiUBHkJGwDaoR //sv4YutJZEJ2ipTF4mC+S0ZdlR7ossfzblrqlAi2PSBBAYfPy9KfdceyBzqf1unkOAE 1vA6I+RGaEdNzXPCIyfMTeDCNiEu00uTdvWAmEbXJrw653jnPWtBaxKZ/xPOXAsoYDiY Z8ZJ+pi3aRb00KcLSDhHnFJ3S+gmfwW6t7Ae+3d+n7nv3xaeY5RGGIiwYtDtLReaMWJE rdRsh6yFW8LUi2ZK0DhbLill/FHsaUz5THJ3oi8lQwzbiIVzkLkXc3T8jMYGbVJSlOAt PSEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si8272967plr.71.2019.04.25.06.58.34; Thu, 25 Apr 2019 06:58:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729919AbfDYM3t (ORCPT + 99 others); Thu, 25 Apr 2019 08:29:49 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44815 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726067AbfDYM3s (ORCPT ); Thu, 25 Apr 2019 08:29:48 -0400 X-Originating-IP: 90.88.147.33 Received: from localhost.localdomain (aaubervilliers-681-1-27-33.w90-88.abo.wanadoo.fr [90.88.147.33]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 4C87F240007; Thu, 25 Apr 2019 12:29:43 +0000 (UTC) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Eric Anholt , David Airlie , Daniel Vetter , Maxime Ripard , Eben Upton , Paul Kocialkowski Subject: [PATCH v7 1/4] drm/vc4: Reformat and the binner bo allocation helper Date: Thu, 25 Apr 2019 14:29:14 +0200 Message-Id: <20190425122917.26536-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190425122917.26536-1-paul.kocialkowski@bootlin.com> References: <20190425122917.26536-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation for wrapping the binner bo allocation helper with put/get helpers, pass the vc4 dev directly and drop the vc4 prefix. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/vc4/vc4_v3d.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c index a4b6859e3af6..7c490106e185 100644 --- a/drivers/gpu/drm/vc4/vc4_v3d.c +++ b/drivers/gpu/drm/vc4/vc4_v3d.c @@ -213,7 +213,7 @@ int vc4_v3d_get_bin_slot(struct vc4_dev *vc4) } /** - * vc4_allocate_bin_bo() - allocates the memory that will be used for + * bin_bo_alloc() - allocates the memory that will be used for * tile binning. * * The binner has a limitation that the addresses in the tile state @@ -234,9 +234,8 @@ int vc4_v3d_get_bin_slot(struct vc4_dev *vc4) * overall CMA pool before they make scenes complicated enough to run * out of bin space. */ -static int vc4_allocate_bin_bo(struct drm_device *drm) +static int bin_bo_alloc(struct vc4_dev *vc4) { - struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_v3d *v3d = vc4->v3d; uint32_t size = 16 * 1024 * 1024; int ret = 0; @@ -251,7 +250,7 @@ static int vc4_allocate_bin_bo(struct drm_device *drm) INIT_LIST_HEAD(&list); while (true) { - struct vc4_bo *bo = vc4_bo_create(drm, size, true, + struct vc4_bo *bo = vc4_bo_create(vc4->dev, size, true, VC4_BO_TYPE_BIN); if (IS_ERR(bo)) { @@ -333,7 +332,7 @@ static int vc4_v3d_runtime_resume(struct device *dev) struct vc4_dev *vc4 = v3d->vc4; int ret; - ret = vc4_allocate_bin_bo(vc4->dev); + ret = bin_bo_alloc(vc4); if (ret) return ret; @@ -403,7 +402,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data) if (ret != 0) return ret; - ret = vc4_allocate_bin_bo(drm); + ret = bin_bo_alloc(vc4); if (ret) { clk_disable_unprepare(v3d->clk); return ret; -- 2.21.0