freedreno: annotate the private symbols

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 <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
main
Emil Velikov 2015-03-23 21:35:38 +00:00
parent 552de225bf
commit 44e9a0258a
13 changed files with 54 additions and 42 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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",

View File

@ -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_ */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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)

View File

@ -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;