From patchwork Wed Aug 16 04:13:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 9902875 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 7D90760231 for ; Wed, 16 Aug 2017 04:14:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 721D4288BE for ; Wed, 16 Aug 2017 04:14:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67153288C3; Wed, 16 Aug 2017 04:14:51 +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]) (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 44AB528976 for ; Wed, 16 Aug 2017 04:14:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C163589F53; Wed, 16 Aug 2017 04:14:08 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x243.google.com (mail-pg0-x243.google.com [IPv6:2607:f8b0:400e:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 373D26E054 for ; Wed, 16 Aug 2017 04:14:06 +0000 (UTC) Received: by mail-pg0-x243.google.com with SMTP id 83so4240752pgb.4 for ; Tue, 15 Aug 2017 21:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jlekstrand-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M76WeZwv/shxgTYirAhCNNUQhgV9pXANYe6Dvd1rk6g=; b=Cn7TEYfKzHNsMWeC4EEJsE9Ew757t3Y3D6wyCFQnxuiEC3hx8Z/xi6ma+zCV+/69Zr pswn5JdiJZDERBYeVb5PReQ6RwXig18USqa0Ms8wThBx2Bj9Q3wWoblCBiw7c64rhjoK QNC1qaQ8TvGvIWqm7wqoNTzVFKtpmNiPX0vxddSr2hQZdUAWd7oclRYhd2fRLymuQs18 HjJPUgFWcllG1cMv4MYYGHkL26Fit0LhCZm7sVFhDceCmLW7rRcASdZTuKMC1bhLTLW2 C69jEgC2rVCGB9rIq13L2MmNjN9op+Sgk2rADnGnQVxeykgTHoCYG2loyzb/S+duKQGq B/DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M76WeZwv/shxgTYirAhCNNUQhgV9pXANYe6Dvd1rk6g=; b=qL/CoQ7YH22Jz/S4sMIjRVa5GOIU8CGmwU9W+8KP8RUrvOvE6/PZGrZkcCS6HPPHDj 9QhO0/eE6awKDD+SxMApNzjAtxighWd97Km4M8VkvEdAT+nilOS7EMREL8M/W8aQPcsb 4t+fdCO3iE/iFqNYjrr5T67beVQQFHMcB6K6QzJlxPFs4hMCubgZ1cRI8bU6m1Mdx2NN 8QJDZXXWH/KNPrl1fSkiYYqKVnOlWZTXlW9NahCajlfxKQU3+Q6BBb9TZuiqqxwLF634 ORTrFXUPogXOIu2KXtIq6+HhPwjaSFL1hNuBlwuFvYR8W/M2NM8DWJBWNaBRDWT9AhdP 0g1g== X-Gm-Message-State: AHYfb5hmLdmRFSz8YWlkzJoxve0DDk2ntbtRkJHHd8jPwwuxZTFRqbVK Pbs68l68YvASV0ZzKYO3Qw== X-Received: by 10.84.215.219 with SMTP id g27mr420694plj.190.1502856845349; Tue, 15 Aug 2017 21:14:05 -0700 (PDT) Received: from omlet.jf.intel.com ([192.55.54.40]) by smtp.gmail.com with ESMTPSA id f88sm19684595pff.74.2017.08.15.21.14.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Aug 2017 21:14:04 -0700 (PDT) From: Jason Ekstrand X-Google-Original-From: Jason Ekstrand To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/7] drm/syncobj: Rename fence_get to find_fence Date: Tue, 15 Aug 2017 21:13:49 -0700 Message-Id: <1502856835-9433-2-git-send-email-jason.ekstrand@intel.com> X-Mailer: git-send-email 2.5.0.400.gff86faf In-Reply-To: <1502856835-9433-1-git-send-email-jason.ekstrand@intel.com> References: <1502856835-9433-1-git-send-email-jason.ekstrand@intel.com> MIME-Version: 1.0 Cc: Jason Ekstrand , Jason Ekstrand X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The function has far more in common with drm_syncobj_find than with any in the get/put functions. Signed-off-by: Jason Ekstrand Acked-by: Christian König (v1) --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/drm_syncobj.c | 10 +++++----- include/drm/drm_syncobj.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 3378951..dcfb056 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1038,7 +1038,7 @@ static int amdgpu_syncobj_lookup_and_add_to_sync(struct amdgpu_cs_parser *p, { int r; struct dma_fence *fence; - r = drm_syncobj_fence_get(p->filp, handle, &fence); + r = drm_syncobj_find_fence(p->filp, handle, &fence); if (r) return r; diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index a5b38a8..0412b0b 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -95,9 +95,9 @@ void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, } EXPORT_SYMBOL(drm_syncobj_replace_fence); -int drm_syncobj_fence_get(struct drm_file *file_private, - u32 handle, - struct dma_fence **fence) +int drm_syncobj_find_fence(struct drm_file *file_private, + u32 handle, + struct dma_fence **fence) { struct drm_syncobj *syncobj = drm_syncobj_find(file_private, handle); int ret = 0; @@ -112,7 +112,7 @@ int drm_syncobj_fence_get(struct drm_file *file_private, drm_syncobj_put(syncobj); return ret; } -EXPORT_SYMBOL(drm_syncobj_fence_get); +EXPORT_SYMBOL(drm_syncobj_find_fence); /** * drm_syncobj_free - free a sync object. @@ -307,7 +307,7 @@ int drm_syncobj_export_sync_file(struct drm_file *file_private, if (fd < 0) return fd; - ret = drm_syncobj_fence_get(file_private, handle, &fence); + ret = drm_syncobj_find_fence(file_private, handle, &fence); if (ret) goto err_put_fd; diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index 89976da..7d4ad77 100644 --- a/include/drm/drm_syncobj.h +++ b/include/drm/drm_syncobj.h @@ -81,9 +81,9 @@ struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, u32 handle); void drm_syncobj_replace_fence(struct drm_syncobj *syncobj, struct dma_fence *fence); -int drm_syncobj_fence_get(struct drm_file *file_private, - u32 handle, - struct dma_fence **fence); +int drm_syncobj_find_fence(struct drm_file *file_private, + u32 handle, + struct dma_fence **fence); void drm_syncobj_free(struct kref *kref); #endif