From patchwork Mon Oct 7 08:34:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 2995031 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C26CE9F408 for ; Mon, 7 Oct 2013 08:47:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8EB6D201C7 for ; Mon, 7 Oct 2013 08:47:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 714D9201BF for ; Mon, 7 Oct 2013 08:47:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C4DBE6A2D for ; Mon, 7 Oct 2013 01:47:41 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f41.google.com (mail-bk0-f41.google.com [209.85.214.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 6183BE61A5 for ; Mon, 7 Oct 2013 01:36:58 -0700 (PDT) Received: by mail-bk0-f41.google.com with SMTP id na10so2477300bkb.14 for ; Mon, 07 Oct 2013 01:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w+UkUlKYeXyM/C975ZqwBrgzyqUS3XrQT3LFxkgjpuo=; b=ZBM2hsslwvIArVgmr62nVAQtlB/OgLsd9kE1DLOCq9EuYUVapfqoKdelvxR3PgAhFR eVm1z/KIPoPtLTuNApwEExvWiIOMVaS0KGPc4RyTudnZcYTlUNMz+4RdXT/RUUIPB+ey zpL1AuPq9yGMNLMGFwGs5fLYJd2NCsMNT61OlrcvBvrTk14/ouZsN6iwiWdAffJrVha0 2t+d9mr431GzCVIaqJqQVCYUc7vUMtH13q2SaNh4OahrYjL981tcMFisINUo1RL/R25Y SR0Fcw9FfCN6sTPlabFvSe7ziDQ/e7Z2WFJiCHRPzbKKSrdxjZRjnhXQH9ymjvji5Exp vFLg== X-Received: by 10.205.87.12 with SMTP id au12mr614920bkc.34.1381135017484; Mon, 07 Oct 2013 01:36:57 -0700 (PDT) Received: from localhost (port-46445.pppoe.wtnet.de. [46.59.230.36]) by mx.google.com with ESMTPSA id qg7sm16334492bkb.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 07 Oct 2013 01:36:56 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 09/27] drm/tegra: gem: Miscellaneous cleanups Date: Mon, 7 Oct 2013 10:34:26 +0200 Message-Id: <1381134884-5816-10-git-send-email-treding@nvidia.com> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1381134884-5816-1-git-send-email-treding@nvidia.com> References: <1381134884-5816-1-git-send-email-treding@nvidia.com> Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Rename the host1x_to_drm_bo() macro to host1x_to_tegra_bo() for consistency and fixup various stylistic issues. Signed-off-by: Thierry Reding --- drivers/gpu/host1x/drm/gem.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/host1x/drm/gem.c b/drivers/gpu/host1x/drm/gem.c index 4a21378..267c0c2 100644 --- a/drivers/gpu/host1x/drm/gem.c +++ b/drivers/gpu/host1x/drm/gem.c @@ -20,14 +20,14 @@ #include "gem.h" -static inline struct tegra_bo *host1x_to_drm_bo(struct host1x_bo *bo) +static inline struct tegra_bo *host1x_to_tegra_bo(struct host1x_bo *bo) { return container_of(bo, struct tegra_bo, base); } static void tegra_bo_put(struct host1x_bo *bo) { - struct tegra_bo *obj = host1x_to_drm_bo(bo); + struct tegra_bo *obj = host1x_to_tegra_bo(bo); struct drm_device *drm = obj->gem.dev; mutex_lock(&drm->struct_mutex); @@ -37,7 +37,7 @@ static void tegra_bo_put(struct host1x_bo *bo) static dma_addr_t tegra_bo_pin(struct host1x_bo *bo, struct sg_table **sgt) { - struct tegra_bo *obj = host1x_to_drm_bo(bo); + struct tegra_bo *obj = host1x_to_tegra_bo(bo); return obj->paddr; } @@ -48,7 +48,7 @@ static void tegra_bo_unpin(struct host1x_bo *bo, struct sg_table *sgt) static void *tegra_bo_mmap(struct host1x_bo *bo) { - struct tegra_bo *obj = host1x_to_drm_bo(bo); + struct tegra_bo *obj = host1x_to_tegra_bo(bo); return obj->vaddr; } @@ -59,7 +59,7 @@ static void tegra_bo_munmap(struct host1x_bo *bo, void *addr) static void *tegra_bo_kmap(struct host1x_bo *bo, unsigned int page) { - struct tegra_bo *obj = host1x_to_drm_bo(bo); + struct tegra_bo *obj = host1x_to_tegra_bo(bo); return obj->vaddr + page * PAGE_SIZE; } @@ -71,7 +71,7 @@ static void tegra_bo_kunmap(struct host1x_bo *bo, unsigned int page, static struct host1x_bo *tegra_bo_get(struct host1x_bo *bo) { - struct tegra_bo *obj = host1x_to_drm_bo(bo); + struct tegra_bo *obj = host1x_to_tegra_bo(bo); struct drm_device *drm = obj->gem.dev; mutex_lock(&drm->struct_mutex); @@ -140,9 +140,9 @@ err_dma: } struct tegra_bo *tegra_bo_create_with_handle(struct drm_file *file, - struct drm_device *drm, - unsigned int size, - unsigned int *handle) + struct drm_device *drm, + unsigned int size, + unsigned int *handle) { struct tegra_bo *bo; int ret; @@ -169,7 +169,6 @@ void tegra_bo_free_object(struct drm_gem_object *gem) struct tegra_bo *bo = to_tegra_bo(gem); drm_gem_free_mmap_offset(gem); - drm_gem_object_release(gem); tegra_bo_destroy(gem->dev, bo); @@ -189,7 +188,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct drm_device *drm, args->size = args->pitch * args->height; bo = tegra_bo_create_with_handle(file, drm, args->size, - &args->handle); + &args->handle); if (IS_ERR(bo)) return PTR_ERR(bo);