From patchwork Fri Aug 11 22:39:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 9896689 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 05C0D60351 for ; Fri, 11 Aug 2017 22:39:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED69328CAC for ; Fri, 11 Aug 2017 22:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E10C028CFE; Fri, 11 Aug 2017 22:39:47 +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 6A1D828CAC for ; Fri, 11 Aug 2017 22:39:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 78F3A6E75D; Fri, 11 Aug 2017 22:39:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66E2B6E75F for ; Fri, 11 Aug 2017 22:39:44 +0000 (UTC) Received: by mail-pf0-x243.google.com with SMTP id t83so4522497pfj.3 for ; Fri, 11 Aug 2017 15:39:44 -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; bh=CeiAQBmNoMbFtH7KbrykGQB6WqlapmaDCfCn40x2yJE=; b=auoEWvmVm5DjKuqAa269kuqcPNls5kl36V7b7Ukh2rMxT3yFLmaZNryqbFNChxV9jW lc2Y1XScJXg2EvdLfBKUVzWTr8hPJhHoDjmCQJhHUzD7atlFAkwBkVoPLrUKmN275+1W z+BjcIKxAh0c76VZh5nrq1oo06bz/voh66b+3OBWpJu+5S2WDnRZh2D3+x7glCvSaqow ri2KpkPNZGUuoRtnVI/WvwHlpZKgx3tKEUqVKdafPUU/zLSGH2WXeHZ7TrfyTZJrVTi4 f0BhypXZF6Y1PJC206uRq4HlcT0JoESIEJ2HgwjN7cVQhQ5dol+rE5WaAX7OUPLVxmHa ajiA== 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; bh=CeiAQBmNoMbFtH7KbrykGQB6WqlapmaDCfCn40x2yJE=; b=VqVIwqPPgGsAONC/wJpFjUqX0k9zPtI3Tkr50YdDAm2X9eruUg/lYMLdNjCKDCr1gC h1UEACNxp5HT1jtJMol1pQIXDfaoygoYNiJD355Rq7ZSgvlgxIVbTkIVc6DCBN6Qp3At loxRG0f7XQPj5jkJdrQ7GDkjl5dxclsRGZQnb9wSCvRcFjrq/nv1Eu8A3vwtAehDoU4z dxCh4sHDMOrFG14bHFejJiiR0Lu9n95IkNGs98OCx+YzG/MEDrfc+ifBwg6Gt55SabIQ GEyBO2H2+JemmmCMaIlfnM3PN7UYlgq1pd15mIeYS/klRae83uA/PJoUkQpC6ceYMvqQ RUTQ== X-Gm-Message-State: AHYfb5j4+sOvymNeQl124d6tyxezvwg/Qdau11ASSirCAQcoCg3nyUMP gdrMDVkBH42p8ShlhXoyag== X-Received: by 10.84.132.106 with SMTP id 97mr19153159ple.105.1502491183729; Fri, 11 Aug 2017 15:39:43 -0700 (PDT) Received: from omlet.jf.intel.com (fmdmzpr03-ext.fm.intel.com. [192.55.54.38]) by smtp.gmail.com with ESMTPSA id p77sm3244484pfi.153.2017.08.11.15.39.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Aug 2017 15:39:42 -0700 (PDT) From: Jason Ekstrand X-Google-Original-From: Jason Ekstrand To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/9] drm/syncobj: Rename fence_get to find_fence Date: Fri, 11 Aug 2017 15:39:26 -0700 Message-Id: <1502491174-10913-2-git-send-email-jason.ekstrand@intel.com> X-Mailer: git-send-email 2.5.0.400.gff86faf In-Reply-To: <1502491174-10913-1-git-send-email-jason.ekstrand@intel.com> References: <1502232369-19753-1-git-send-email-jason.ekstrand@intel.com> <1502491174-10913-1-git-send-email-jason.ekstrand@intel.com> 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: , MIME-Version: 1.0 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 --- 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