From patchwork Fri Aug 7 16:45:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6971581 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7DF729F358 for ; Fri, 7 Aug 2015 16:41:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3B9B2056E for ; Fri, 7 Aug 2015 16:41:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BC0FA202D1 for ; Fri, 7 Aug 2015 16:41:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E8EB77A1AD; Fri, 7 Aug 2015 09:41:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 94D3C6E2CC for ; Fri, 7 Aug 2015 09:41:08 -0700 (PDT) Received: by wicne3 with SMTP id ne3so66730968wic.1 for ; Fri, 07 Aug 2015 09:41:07 -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=wm57L2HdXCIJdr3lcMQ4VuzqZ5pcfxhNT8QDexweE58=; b=djAMA8lX4eDmFByRDpjVJQQvUd2L5igi3RdDvPMqVJ6szpdnS9KVzuUQfejkAXHSP7 RKvs6f7ufSlhQtijP95fVNHn4btIlUdRPAgkYA9LqLu5lO1uVipbhIuD1I4RZ38YlqiD BjmtgW420FmBwwTMuHAxB5q5ajbTdAp5cl6UwSTwleST1C1TwkyaBMlPV56zUZ1w/WP2 ce2/NDTeT+JXIkzEIjJhyeWF102+E0ahVGryI8V5Z3fSz2cxw3IbcENWISn45kVBDWkt BHdxDSCeP1eYSWFju8n0O1XDw00XXnsQU+bYGEboIbzyjy4PVJ2zUHb8iD41MSirdPHx 5dzQ== X-Received: by 10.180.84.230 with SMTP id c6mr9050437wiz.32.1438965667388; Fri, 07 Aug 2015 09:41:07 -0700 (PDT) Received: from arch-x220.localdomain (genkt-049-238.t-mobile.co.uk. [149.254.49.238]) by smtp.gmail.com with ESMTPSA id lg8sm4528960wic.12.2015.08.07.09.41.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Aug 2015 09:41:06 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 7/9] amdgpu/amdgpu_vamgr: hide private symbols from global namespace Date: Fri, 7 Aug 2015 17:45:01 +0100 Message-Id: <1438965903-6342-8-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1438965903-6342-1-git-send-email-emil.l.velikov@gmail.com> References: <1438965903-6342-1-git-send-email-emil.l.velikov@gmail.com> Cc: Alex Deucher , Emil Velikov 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-Spam-Status: No, score=-4.2 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 Signed-off-by: Emil Velikov --- amdgpu/amdgpu_internal.h | 18 ++++++++++++------ amdgpu/amdgpu_vamgr.c | 17 ++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h index ab01bb5..7f86da9 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h @@ -31,6 +31,8 @@ #include #include + +#include "libdrm_macros.h" #include "xf86atomic.h" #include "amdgpu.h" #include "util_double_list.h" @@ -121,15 +123,19 @@ void amdgpu_device_free_internal(amdgpu_device_handle dev); void amdgpu_bo_free_internal(amdgpu_bo_handle bo); -struct amdgpu_bo_va_mgr* amdgpu_vamgr_get_global(struct amdgpu_device *dev); +drm_private struct amdgpu_bo_va_mgr* +amdgpu_vamgr_get_global(struct amdgpu_device *dev); -void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, struct amdgpu_bo_va_mgr *src); +drm_private void +amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, + struct amdgpu_bo_va_mgr *src); -uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, - uint64_t alignment, uint64_t base_required); +drm_private uint64_t +amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, + uint64_t alignment, uint64_t base_required); -void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, - uint64_t size); +drm_private void +amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size); int amdgpu_query_gpu_info_init(amdgpu_device_handle dev); diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c index e2a4c87..b5d330f 100644 --- a/amdgpu/amdgpu_vamgr.c +++ b/amdgpu/amdgpu_vamgr.c @@ -66,7 +66,8 @@ static void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr) pthread_mutex_destroy(&mgr->bo_va_mutex); } -struct amdgpu_bo_va_mgr * amdgpu_vamgr_get_global(struct amdgpu_device *dev) +drm_private struct amdgpu_bo_va_mgr * +amdgpu_vamgr_get_global(struct amdgpu_device *dev) { int ref; ref = atomic_inc_return(&vamgr.refcount); @@ -76,16 +77,18 @@ struct amdgpu_bo_va_mgr * amdgpu_vamgr_get_global(struct amdgpu_device *dev) return &vamgr; } -void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, - struct amdgpu_bo_va_mgr *src) +drm_private void +amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, + struct amdgpu_bo_va_mgr *src) { if (update_references(&(*dst)->refcount, NULL)) amdgpu_vamgr_deinit(*dst); *dst = src; } -uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, - uint64_t alignment, uint64_t base_required) +drm_private uint64_t +amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, + uint64_t alignment, uint64_t base_required) { struct amdgpu_bo_va_hole *hole, *n; uint64_t offset = 0, waste = 0; @@ -170,8 +173,8 @@ uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, return offset; } -void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, - uint64_t va, uint64_t size) +drm_private void +amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size) { struct amdgpu_bo_va_hole *hole;