From patchwork Wed Nov 28 23:09:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 10703607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13B2B13A4 for ; Wed, 28 Nov 2018 23:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04F3E2C3E9 for ; Wed, 28 Nov 2018 23:09:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC9D12DDC7; Wed, 28 Nov 2018 23:09:34 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 707B22C3E9 for ; Wed, 28 Nov 2018 23:09:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 499556E09B; Wed, 28 Nov 2018 23:09:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 0816C6E09B for ; Wed, 28 Nov 2018 23:09:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id E74C510A156C; Wed, 28 Nov 2018 15:09:29 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id d-pggeT1UdXD; Wed, 28 Nov 2018 15:09:28 -0800 (PST) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 07DA710A11D0; Wed, 28 Nov 2018 15:09:28 -0800 (PST) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 514CA2FE2D5B; Wed, 28 Nov 2018 15:09:27 -0800 (PST) From: Eric Anholt To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/3] drm/v3d: Drop the "dev" argument to lock/unlock of BO reservations. Date: Wed, 28 Nov 2018 15:09:26 -0800 Message-Id: <20181128230927.10951-2-eric@anholt.net> X-Mailer: git-send-email 2.20.0.rc1 In-Reply-To: <20181128230927.10951-1-eric@anholt.net> References: <20181128230927.10951-1-eric@anholt.net> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Emett , linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP They were unused, as Dave Emett noticed in TFU review. Signed-off-by: Eric Anholt Cc: Dave Emett Reviewed-by: Daniel Vetter --- drivers/gpu/drm/v3d/v3d_gem.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 41cbe2cdad50..778657d9b6e7 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -219,8 +219,7 @@ v3d_attach_object_fences(struct v3d_bo **bos, int bo_count, } static void -v3d_unlock_bo_reservations(struct drm_device *dev, - struct v3d_bo **bos, +v3d_unlock_bo_reservations(struct v3d_bo **bos, int bo_count, struct ww_acquire_ctx *acquire_ctx) { @@ -240,8 +239,7 @@ v3d_unlock_bo_reservations(struct drm_device *dev, * to v3d, so we don't attach dma-buf fences to them. */ static int -v3d_lock_bo_reservations(struct drm_device *dev, - struct v3d_bo **bos, +v3d_lock_bo_reservations(struct v3d_bo **bos, int bo_count, struct ww_acquire_ctx *acquire_ctx) { @@ -298,7 +296,7 @@ v3d_lock_bo_reservations(struct drm_device *dev, for (i = 0; i < bo_count; i++) { ret = reservation_object_reserve_shared(bos[i]->resv, 1); if (ret) { - v3d_unlock_bo_reservations(dev, bos, bo_count, + v3d_unlock_bo_reservations(bos, bo_count, acquire_ctx); return ret; } @@ -566,7 +564,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, if (ret) goto fail; - ret = v3d_lock_bo_reservations(dev, exec->bo, exec->bo_count, + ret = v3d_lock_bo_reservations(exec->bo, exec->bo_count, &acquire_ctx); if (ret) goto fail; @@ -604,7 +602,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, v3d_attach_object_fences(exec->bo, exec->bo_count, exec->render_done_fence); - v3d_unlock_bo_reservations(dev, exec->bo, exec->bo_count, &acquire_ctx); + v3d_unlock_bo_reservations(exec->bo, exec->bo_count, &acquire_ctx); /* Update the return sync object for the */ sync_out = drm_syncobj_find(file_priv, args->out_sync); @@ -620,7 +618,7 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, fail_unreserve: mutex_unlock(&v3d->sched_lock); - v3d_unlock_bo_reservations(dev, exec->bo, exec->bo_count, &acquire_ctx); + v3d_unlock_bo_reservations(exec->bo, exec->bo_count, &acquire_ctx); fail: v3d_exec_put(exec); @@ -691,7 +689,7 @@ v3d_submit_tfu_ioctl(struct drm_device *dev, void *data, } spin_unlock(&file_priv->table_lock); - ret = v3d_lock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx); + ret = v3d_lock_bo_reservations(job->bo, bo_count, &acquire_ctx); if (ret) goto fail; @@ -710,7 +708,7 @@ v3d_submit_tfu_ioctl(struct drm_device *dev, void *data, v3d_attach_object_fences(job->bo, bo_count, sched_done_fence); - v3d_unlock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx); + v3d_unlock_bo_reservations(job->bo, bo_count, &acquire_ctx); /* Update the return sync object */ sync_out = drm_syncobj_find(file_priv, args->out_sync); @@ -726,7 +724,7 @@ v3d_submit_tfu_ioctl(struct drm_device *dev, void *data, fail_unreserve: mutex_unlock(&v3d->sched_lock); - v3d_unlock_bo_reservations(dev, job->bo, bo_count, &acquire_ctx); + v3d_unlock_bo_reservations(job->bo, bo_count, &acquire_ctx); fail: v3d_tfu_job_put(job);