From patchwork Wed Apr 1 16:15:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6141201 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28BCCBF4A6 for ; Wed, 1 Apr 2015 16:12:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B75A520351 for ; Wed, 1 Apr 2015 16:12:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 50B5E2035E for ; Wed, 1 Apr 2015 16:12:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D3C7F6E8C2; Wed, 1 Apr 2015 09:12:38 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 3819C6E8C8 for ; Wed, 1 Apr 2015 09:12:37 -0700 (PDT) Received: by wixo5 with SMTP id o5so32985689wix.1 for ; Wed, 01 Apr 2015 09:12:36 -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=77QOuUD/AQfgx4NDh8/edQ8qUEYIkDsVEFxL3/xAhks=; b=M4IkMccQ+pJsYgoS9gZJntsjfKvdFj6Vc+ScK2R5rt+Atzpacl4FD7HvFL6UhHVLRF OFR1P6MC5jkDcH8tUyqP8Cxvce0ethgBtO5gWd2QtVIgX6jjx3HfDGIFbuvKcwb7leu3 Wq7NRUjWBkvIi7FkC/gD2ObO+T+ndS0P8HKU3WQq4ysu/A5A2AeNTCTLR3gbdZAtRepO Trby0bK8r3F2G6l5Y+i/oYGMVNefpcw6MyOnt5lBfIkNkEOW5RA0qP/apKAsVCbnkyDA NOKGb2IfEOPEqt+J3MxZh8TZpBq0htbvWsHpZF/PUODh9TMP6I2YmtQVbqhguC9atMXm g+xQ== X-Received: by 10.194.57.206 with SMTP id k14mr86692097wjq.1.1427904756420; Wed, 01 Apr 2015 09:12:36 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id ge8sm3319498wjc.32.2015.04.01.09.12.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 09:12:35 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 09/24] freedreno: annotate the private symbols Date: Wed, 1 Apr 2015 17:15:20 +0100 Message-Id: <1427904935-14387-10-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> References: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> Cc: emil.l.velikov@gmail.com 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.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Rob Clark Signed-off-by: Emil Velikov --- freedreno/freedreno_bo.c | 2 +- freedreno/freedreno_device.c | 2 +- freedreno/freedreno_priv.h | 4 ++-- freedreno/kgsl/kgsl_bo.c | 11 ++++++----- freedreno/kgsl/kgsl_device.c | 2 +- freedreno/kgsl/kgsl_pipe.c | 18 +++++++++++------- freedreno/kgsl/kgsl_priv.h | 33 +++++++++++++++++++-------------- freedreno/kgsl/kgsl_ringbuffer.c | 2 +- freedreno/msm/msm_bo.c | 4 ++-- freedreno/msm/msm_device.c | 2 +- freedreno/msm/msm_pipe.c | 3 ++- freedreno/msm/msm_priv.h | 11 ++++++----- freedreno/msm/msm_ringbuffer.c | 2 +- 13 files changed, 54 insertions(+), 42 deletions(-) diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c index 9089c93..c56fdbd 100644 --- a/freedreno/freedreno_bo.c +++ b/freedreno/freedreno_bo.c @@ -81,7 +81,7 @@ static struct fd_bo * bo_from_handle(struct fd_device *dev, } /* Frees older cached buffers. Called under table_lock */ -void fd_cleanup_bo_cache(struct fd_device *dev, time_t time) +drm_private void fd_cleanup_bo_cache(struct fd_device *dev, time_t time) { int i; diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c index e8b5f60..09b2302 100644 --- a/freedreno/freedreno_device.c +++ b/freedreno/freedreno_device.c @@ -145,7 +145,7 @@ static void fd_device_del_impl(struct fd_device *dev) dev->funcs->destroy(dev); } -void fd_device_del_locked(struct fd_device *dev) +drm_private void fd_device_del_locked(struct fd_device *dev) { if (!atomic_dec_and_test(&dev->refcnt)) return; diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h index 8e072d9..2d0fa6d 100644 --- a/freedreno/freedreno_priv.h +++ b/freedreno/freedreno_priv.h @@ -92,10 +92,10 @@ struct fd_device { int closefd; /* call close(fd) upon destruction */ }; -void fd_cleanup_bo_cache(struct fd_device *dev, time_t time); +drm_private void fd_cleanup_bo_cache(struct fd_device *dev, time_t time); /* for where @table_lock is already held: */ -void fd_device_del_locked(struct fd_device *dev); +drm_private void fd_device_del_locked(struct fd_device *dev); struct fd_pipe_funcs { struct fd_ringbuffer * (*ringbuffer_new)(struct fd_pipe *pipe, uint32_t size); diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c index fab3350..f151186 100644 --- a/freedreno/kgsl/kgsl_bo.c +++ b/freedreno/kgsl/kgsl_bo.c @@ -131,7 +131,7 @@ static struct fd_bo_funcs funcs = { }; /* allocate a buffer handle: */ -int kgsl_bo_new_handle(struct fd_device *dev, +drm_private int kgsl_bo_new_handle(struct fd_device *dev, uint32_t size, uint32_t flags, uint32_t *handle) { struct drm_kgsl_gem_create req = { @@ -155,7 +155,7 @@ int kgsl_bo_new_handle(struct fd_device *dev, } /* allocate a new buffer object */ -struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, +drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, uint32_t size, uint32_t handle) { struct kgsl_bo *kgsl_bo; @@ -218,7 +218,7 @@ fail: return NULL; } -uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset) +drm_private uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset) { struct fd_bo *bo = &kgsl_bo->base; if (!kgsl_bo->gpuaddr) { @@ -267,7 +267,8 @@ uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *kgsl_bo, uint32_t offset) * _emit_reloc().. */ -void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo, uint32_t timestamp) +drm_private void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo, + uint32_t timestamp) { struct fd_bo *bo = &kgsl_bo->base; if (bo->name) { @@ -285,7 +286,7 @@ void kgsl_bo_set_timestamp(struct kgsl_bo *kgsl_bo, uint32_t timestamp) } } -uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *kgsl_bo) +drm_private uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *kgsl_bo) { struct fd_bo *bo = &kgsl_bo->base; uint32_t timestamp = 0; diff --git a/freedreno/kgsl/kgsl_device.c b/freedreno/kgsl/kgsl_device.c index 5f2dfea..8352d60 100644 --- a/freedreno/kgsl/kgsl_device.c +++ b/freedreno/kgsl/kgsl_device.c @@ -49,7 +49,7 @@ static struct fd_device_funcs funcs = { .destroy = kgsl_device_destroy, }; -struct fd_device * kgsl_device_new(int fd) +drm_private struct fd_device * kgsl_device_new(int fd) { struct kgsl_device *kgsl_dev; struct fd_device *dev; diff --git a/freedreno/kgsl/kgsl_pipe.c b/freedreno/kgsl/kgsl_pipe.c index 1a795ba..fc76b2b 100644 --- a/freedreno/kgsl/kgsl_pipe.c +++ b/freedreno/kgsl/kgsl_pipe.c @@ -75,7 +75,8 @@ static int kgsl_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp) return ret; } -int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, uint32_t *timestamp) +drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, + uint32_t *timestamp) { struct kgsl_cmdstream_readtimestamp req = { .type = KGSL_TIMESTAMP_RETIRED @@ -113,13 +114,13 @@ static struct fd_pipe_funcs funcs = { .destroy = kgsl_pipe_destroy, }; -int is_kgsl_pipe(struct fd_pipe *pipe) +drm_private int is_kgsl_pipe(struct fd_pipe *pipe) { return pipe->funcs == &funcs; } /* add buffer to submit list when it is referenced in cmdstream: */ -void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe, +drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe, struct kgsl_bo *kgsl_bo) { struct fd_pipe *pipe = &kgsl_pipe->base; @@ -134,7 +135,7 @@ void kgsl_pipe_add_submit(struct kgsl_pipe *kgsl_pipe, } /* prepare buffers on submit list before flush: */ -void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe) +drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe) { struct fd_pipe *pipe = &kgsl_pipe->base; struct kgsl_bo *kgsl_bo = NULL; @@ -150,7 +151,8 @@ void kgsl_pipe_pre_submit(struct kgsl_pipe *kgsl_pipe) } /* process buffers on submit list after flush: */ -void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp) +drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, + uint32_t timestamp) { struct fd_pipe *pipe = &kgsl_pipe->base; struct kgsl_bo *kgsl_bo = NULL, *tmp; @@ -168,7 +170,8 @@ void kgsl_pipe_post_submit(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp) kgsl_pipe_process_pending(kgsl_pipe, timestamp); } -void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe, uint32_t timestamp) +drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *kgsl_pipe, + uint32_t timestamp) { struct fd_pipe *pipe = &kgsl_pipe->base; struct kgsl_bo *kgsl_bo = NULL, *tmp; @@ -201,7 +204,8 @@ static int getprop(int fd, enum kgsl_property_type type, } } while (0) -struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, enum fd_pipe_id id) +drm_private struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, + enum fd_pipe_id id) { static const char *paths[] = { [FD_PIPE_3D] = "/dev/kgsl-3d0", diff --git a/freedreno/kgsl/kgsl_priv.h b/freedreno/kgsl/kgsl_priv.h index 56dc21a..6ab6496 100644 --- a/freedreno/kgsl/kgsl_priv.h +++ b/freedreno/kgsl/kgsl_priv.h @@ -73,7 +73,7 @@ static inline struct kgsl_pipe * to_kgsl_pipe(struct fd_pipe *x) return (struct kgsl_pipe *)x; } -int is_kgsl_pipe(struct fd_pipe *pipe); +drm_private int is_kgsl_pipe(struct fd_pipe *pipe); struct kgsl_bo { struct fd_bo base; @@ -91,25 +91,30 @@ static inline struct kgsl_bo * to_kgsl_bo(struct fd_bo *x) } -struct fd_device * kgsl_device_new(int fd); +drm_private struct fd_device * kgsl_device_new(int fd); -int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, uint32_t *timestamp); -void kgsl_pipe_add_submit(struct kgsl_pipe *pipe, struct kgsl_bo *bo); -void kgsl_pipe_pre_submit(struct kgsl_pipe *pipe); -void kgsl_pipe_post_submit(struct kgsl_pipe *pipe, uint32_t timestamp); -void kgsl_pipe_process_pending(struct kgsl_pipe *pipe, uint32_t timestamp); -struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, enum fd_pipe_id id); +drm_private int kgsl_pipe_timestamp(struct kgsl_pipe *kgsl_pipe, + uint32_t *timestamp); +drm_private void kgsl_pipe_add_submit(struct kgsl_pipe *pipe, + struct kgsl_bo *bo); +drm_private void kgsl_pipe_pre_submit(struct kgsl_pipe *pipe); +drm_private void kgsl_pipe_post_submit(struct kgsl_pipe *pipe, + uint32_t timestamp); +drm_private void kgsl_pipe_process_pending(struct kgsl_pipe *pipe, + uint32_t timestamp); +drm_private struct fd_pipe * kgsl_pipe_new(struct fd_device *dev, + enum fd_pipe_id id); -struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe, +drm_private struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe, uint32_t size); -int kgsl_bo_new_handle(struct fd_device *dev, +drm_private int kgsl_bo_new_handle(struct fd_device *dev, uint32_t size, uint32_t flags, uint32_t *handle); -struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, +drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, uint32_t size, uint32_t handle); -uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *bo, uint32_t offset); -void kgsl_bo_set_timestamp(struct kgsl_bo *bo, uint32_t timestamp); -uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *bo); +drm_private uint32_t kgsl_bo_gpuaddr(struct kgsl_bo *bo, uint32_t offset); +drm_private void kgsl_bo_set_timestamp(struct kgsl_bo *bo, uint32_t timestamp); +drm_private uint32_t kgsl_bo_get_timestamp(struct kgsl_bo *bo); #endif /* KGSL_PRIV_H_ */ diff --git a/freedreno/kgsl/kgsl_ringbuffer.c b/freedreno/kgsl/kgsl_ringbuffer.c index d1e8321..f013307 100644 --- a/freedreno/kgsl/kgsl_ringbuffer.c +++ b/freedreno/kgsl/kgsl_ringbuffer.c @@ -199,7 +199,7 @@ static struct fd_ringbuffer_funcs funcs = { .destroy = kgsl_ringbuffer_destroy, }; -struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe, +drm_private struct fd_ringbuffer * kgsl_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) { struct kgsl_ringbuffer *kgsl_ring; diff --git a/freedreno/msm/msm_bo.c b/freedreno/msm/msm_bo.c index 0cac1c6..fbd82df 100644 --- a/freedreno/msm/msm_bo.c +++ b/freedreno/msm/msm_bo.c @@ -104,7 +104,7 @@ static struct fd_bo_funcs funcs = { }; /* allocate a buffer handle: */ -int msm_bo_new_handle(struct fd_device *dev, +drm_private int msm_bo_new_handle(struct fd_device *dev, uint32_t size, uint32_t flags, uint32_t *handle) { struct drm_msm_gem_new req = { @@ -124,7 +124,7 @@ int msm_bo_new_handle(struct fd_device *dev, } /* allocate a new buffer object */ -struct fd_bo * msm_bo_from_handle(struct fd_device *dev, +drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev, uint32_t size, uint32_t handle) { struct msm_bo *msm_bo; diff --git a/freedreno/msm/msm_device.c b/freedreno/msm/msm_device.c index b9c5a3e..81077e1 100644 --- a/freedreno/msm/msm_device.c +++ b/freedreno/msm/msm_device.c @@ -49,7 +49,7 @@ static struct fd_device_funcs funcs = { .destroy = msm_device_destroy, }; -struct fd_device * msm_device_new(int fd) +drm_private struct fd_device * msm_device_new(int fd) { struct msm_device *msm_dev; struct fd_device *dev; diff --git a/freedreno/msm/msm_pipe.c b/freedreno/msm/msm_pipe.c index 6955f2c..ddc975e 100644 --- a/freedreno/msm/msm_pipe.c +++ b/freedreno/msm/msm_pipe.c @@ -103,7 +103,8 @@ static uint64_t get_param(struct fd_device *dev, uint32_t pipe, uint32_t param) return req.value; } -struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id) +drm_private struct fd_pipe * msm_pipe_new(struct fd_device *dev, + enum fd_pipe_id id) { static const uint32_t pipe_id[] = { [FD_PIPE_3D] = MSM_PIPE_3D0, diff --git a/freedreno/msm/msm_priv.h b/freedreno/msm/msm_priv.h index 75ae883..94d2357 100644 --- a/freedreno/msm/msm_priv.h +++ b/freedreno/msm/msm_priv.h @@ -46,7 +46,7 @@ static inline struct msm_device * to_msm_device(struct fd_device *x) return (struct msm_device *)x; } -struct fd_device * msm_device_new(int fd); +drm_private struct fd_device * msm_device_new(int fd); struct msm_pipe { struct fd_pipe base; @@ -61,9 +61,10 @@ static inline struct msm_pipe * to_msm_pipe(struct fd_pipe *x) return (struct msm_pipe *)x; } -struct fd_pipe * msm_pipe_new(struct fd_device *dev, enum fd_pipe_id id); +drm_private struct fd_pipe * msm_pipe_new(struct fd_device *dev, + enum fd_pipe_id id); -struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, +drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, uint32_t size); struct msm_bo { @@ -79,9 +80,9 @@ static inline struct msm_bo * to_msm_bo(struct fd_bo *x) return (struct msm_bo *)x; } -int msm_bo_new_handle(struct fd_device *dev, +drm_private int msm_bo_new_handle(struct fd_device *dev, uint32_t size, uint32_t flags, uint32_t *handle); -struct fd_bo * msm_bo_from_handle(struct fd_device *dev, +drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev, uint32_t size, uint32_t handle); static inline void get_abs_timeout(struct drm_msm_timespec *tv, uint32_t ms) diff --git a/freedreno/msm/msm_ringbuffer.c b/freedreno/msm/msm_ringbuffer.c index 6a4043f..6ee85bd 100644 --- a/freedreno/msm/msm_ringbuffer.c +++ b/freedreno/msm/msm_ringbuffer.c @@ -318,7 +318,7 @@ static struct fd_ringbuffer_funcs funcs = { .destroy = msm_ringbuffer_destroy, }; -struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, +drm_private struct fd_ringbuffer * msm_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) { struct msm_ringbuffer *msm_ring;