From 0f8da82500ec542e269092c0718479e25eaff5f6 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Tue, 31 Mar 2015 22:32:11 +0100 Subject: [PATCH] drm: remove drm_public macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs Cc: Damien Lespiau Cc: Maarten Lankhorst Cc: Michel Dänzer Cc: Rob Clark Cc: Thierry Reding Signed-off-by: Emil Velikov --- configure.ac | 5 ++- exynos/exynos_drm.c | 24 ++++++------- exynos/exynos_fimg2d.c | 16 ++++----- freedreno/freedreno_bo.c | 26 +++++++------- freedreno/freedreno_device.c | 8 ++--- freedreno/freedreno_pipe.c | 8 ++--- freedreno/freedreno_ringbuffer.c | 26 +++++++------- freedreno/kgsl/kgsl_bo.c | 2 +- intel/intel_bufmgr.c | 60 ++++++++++++++++---------------- intel/intel_bufmgr_fake.c | 16 ++++----- intel/intel_bufmgr_gem.c | 52 +++++++++++++-------------- intel/intel_decode.c | 14 ++++---- libdrm_macros.h | 2 -- nouveau/bufctx.c | 10 +++--- nouveau/nouveau.c | 40 ++++++++++----------- nouveau/pushbuf.c | 20 +++++------ omap/omap_drm.c | 36 +++++++++---------- radeon/radeon_bo.c | 28 +++++++-------- radeon/radeon_bo_gem.c | 16 ++++----- radeon/radeon_cs.c | 24 ++++++------- radeon/radeon_cs_gem.c | 4 +-- radeon/radeon_cs_space.c | 8 ++--- radeon/radeon_surface.c | 8 ++--- tegra/tegra.c | 13 ------- 24 files changed, 225 insertions(+), 241 deletions(-) diff --git a/configure.ac b/configure.ac index c25a8133..e7152623 100644 --- a/configure.ac +++ b/configure.ac @@ -403,14 +403,13 @@ AC_ARG_WITH([kernel-source], [kernel_source="$with_kernel_source"]) AC_SUBST(kernel_source) -AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))]) +AC_MSG_CHECKING([whether $CC supports __attribute__(("hidden"))]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ - int foo_default( void ) __attribute__((visibility("default"))); int foo_hidden( void ) __attribute__((visibility("hidden"))); ])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])); if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then - AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))]) + AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))]) fi AC_SUBST(WARN_CFLAGS) diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c index 5d07ea7b..df9b8ed4 100644 --- a/exynos/exynos_drm.c +++ b/exynos/exynos_drm.c @@ -49,7 +49,7 @@ * * if true, return the device object else NULL. */ -drm_public struct exynos_device * exynos_device_create(int fd) +struct exynos_device * exynos_device_create(int fd) { struct exynos_device *dev; @@ -70,7 +70,7 @@ drm_public struct exynos_device * exynos_device_create(int fd) * * @dev: exynos drm device object. */ -drm_public void exynos_device_destroy(struct exynos_device *dev) +void exynos_device_destroy(struct exynos_device *dev) { free(dev); } @@ -88,7 +88,7 @@ drm_public void exynos_device_destroy(struct exynos_device *dev) * * if true, return a exynos buffer object else NULL. */ -drm_public struct exynos_bo * exynos_bo_create(struct exynos_device *dev, +struct exynos_bo * exynos_bo_create(struct exynos_device *dev, size_t size, uint32_t flags) { struct exynos_bo *bo; @@ -142,7 +142,7 @@ fail: * * if true, return 0 else negative. */ -drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle, +int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle, size_t *size, uint32_t *flags) { int ret; @@ -168,7 +168,7 @@ drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle, * * @bo: a exynos buffer object to be destroyed. */ -drm_public void exynos_bo_destroy(struct exynos_bo *bo) +void exynos_bo_destroy(struct exynos_bo *bo) { if (!bo) return; @@ -200,7 +200,7 @@ drm_public void exynos_bo_destroy(struct exynos_bo *bo) * if true, return a exynos buffer object else NULL. * */ -drm_public struct exynos_bo * +struct exynos_bo * exynos_bo_from_name(struct exynos_device *dev, uint32_t name) { struct exynos_bo *bo; @@ -243,7 +243,7 @@ err_free_bo: * * if true, return 0 else negative. */ -drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name) +int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name) { if (!bo->name) { struct drm_gem_flink req = { @@ -266,7 +266,7 @@ drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name) return 0; } -drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo) +uint32_t exynos_bo_handle(struct exynos_bo *bo) { return bo->handle; } @@ -279,7 +279,7 @@ drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo) * * if true, user pointer mmaped else NULL. */ -drm_public void *exynos_bo_map(struct exynos_bo *bo) +void *exynos_bo_map(struct exynos_bo *bo) { if (!bo->vaddr) { struct exynos_device *dev = bo->dev; @@ -316,7 +316,7 @@ drm_public void *exynos_bo_map(struct exynos_bo *bo) * * @return: 0 on success, -1 on error, and errno will be set */ -drm_public int +int exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd) { return drmPrimeHandleToFD(dev->fd, handle, 0, fd); @@ -331,7 +331,7 @@ exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd) * * @return: 0 on success, -1 on error, and errno will be set */ -drm_public int +int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle) { return drmPrimeFDToHandle(dev->fd, fd, handle); @@ -354,7 +354,7 @@ exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle) * * if true, return 0 else negative. */ -drm_public int +int exynos_vidi_connection(struct exynos_device *dev, uint32_t connect, uint32_t ext, void *edid) { diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c index cb422e8a..86ae8989 100644 --- a/exynos/exynos_fimg2d.c +++ b/exynos/exynos_fimg2d.c @@ -224,7 +224,7 @@ static int g2d_flush(struct g2d_context *ctx) * * fd: a file descriptor to an opened drm device. */ -drm_public struct g2d_context *g2d_init(int fd) +struct g2d_context *g2d_init(int fd) { struct drm_exynos_g2d_get_ver ver; struct g2d_context *ctx; @@ -252,7 +252,7 @@ drm_public struct g2d_context *g2d_init(int fd) return ctx; } -drm_public void g2d_fini(struct g2d_context *ctx) +void g2d_fini(struct g2d_context *ctx) { if (ctx) free(ctx); @@ -263,7 +263,7 @@ drm_public void g2d_fini(struct g2d_context *ctx) * * @ctx: a pointer to g2d_context structure. */ -drm_public int g2d_exec(struct g2d_context *ctx) +int g2d_exec(struct g2d_context *ctx) { struct drm_exynos_g2d_exec exec; int ret; @@ -295,7 +295,7 @@ drm_public int g2d_exec(struct g2d_context *ctx) * @w: width value to buffer filled with given color data. * @h: height value to buffer filled with given color data. */ -drm_public int +int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img, unsigned int x, unsigned int y, unsigned int w, unsigned int h) @@ -350,7 +350,7 @@ g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img, * @w: width value to source and destination buffers. * @h: height value to source and destination buffers. */ -drm_public int +int g2d_copy(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned dst_y, unsigned int w, @@ -440,7 +440,7 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src, * @negative: indicate that it uses color negative to source and * destination buffers. */ -drm_public int +int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int src_w, @@ -548,7 +548,7 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, * @h: height value to source and destination buffer. * @op: blend operation type. */ -drm_public int +int g2d_blend(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned int dst_y, @@ -659,7 +659,7 @@ g2d_blend(struct g2d_context *ctx, struct g2d_image *src, * @dst_h: height value to destination buffer. * @op: blend operation type. */ -drm_public int +int g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src, struct g2d_image *dst, unsigned int src_x, unsigned int src_y, unsigned int src_w, unsigned int src_h, unsigned int dst_x, diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c index c56fdbd9..517a2f81 100644 --- a/freedreno/freedreno_bo.c +++ b/freedreno/freedreno_bo.c @@ -167,7 +167,7 @@ static struct fd_bo *find_in_bucket(struct fd_device *dev, } -drm_public struct fd_bo * +struct fd_bo * fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags) { struct fd_bo *bo = NULL; @@ -201,7 +201,7 @@ fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags) return bo; } -drm_public struct fd_bo * +struct fd_bo * fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size) { struct fd_bo *bo = NULL; @@ -220,7 +220,7 @@ out_unlock: return bo; } -drm_public struct fd_bo * +struct fd_bo * fd_bo_from_dmabuf(struct fd_device *dev, int fd) { struct drm_prime_handle req = { @@ -239,7 +239,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd) return fd_bo_from_handle(dev, req.handle, size); } -drm_public struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name) +struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name) { struct drm_gem_open req = { .name = name, @@ -272,13 +272,13 @@ out_unlock: return bo; } -drm_public struct fd_bo * fd_bo_ref(struct fd_bo *bo) +struct fd_bo * fd_bo_ref(struct fd_bo *bo) { atomic_inc(&bo->refcnt); return bo; } -drm_public void fd_bo_del(struct fd_bo *bo) +void fd_bo_del(struct fd_bo *bo) { struct fd_device *dev = bo->dev; @@ -342,7 +342,7 @@ static void bo_del(struct fd_bo *bo) bo->funcs->destroy(bo); } -drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name) +int fd_bo_get_name(struct fd_bo *bo, uint32_t *name) { if (!bo->name) { struct drm_gem_flink req = { @@ -365,12 +365,12 @@ drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name) return 0; } -drm_public uint32_t fd_bo_handle(struct fd_bo *bo) +uint32_t fd_bo_handle(struct fd_bo *bo) { return bo->handle; } -drm_public int fd_bo_dmabuf(struct fd_bo *bo) +int fd_bo_dmabuf(struct fd_bo *bo) { if (!bo->fd) { struct drm_prime_handle req = { @@ -389,12 +389,12 @@ drm_public int fd_bo_dmabuf(struct fd_bo *bo) return dup(bo->fd); } -drm_public uint32_t fd_bo_size(struct fd_bo *bo) +uint32_t fd_bo_size(struct fd_bo *bo) { return bo->size; } -drm_public void * fd_bo_map(struct fd_bo *bo) +void * fd_bo_map(struct fd_bo *bo) { if (!bo->map) { uint64_t offset; @@ -416,12 +416,12 @@ drm_public void * fd_bo_map(struct fd_bo *bo) } /* a bit odd to take the pipe as an arg, but it's a, umm, quirk of kgsl.. */ -drm_public int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op) +int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op) { return bo->funcs->cpu_prep(bo, pipe, op); } -drm_public void fd_bo_cpu_fini(struct fd_bo *bo) +void fd_bo_cpu_fini(struct fd_bo *bo) { bo->funcs->cpu_fini(bo); } diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c index 09b2302c..3bc4cb21 100644 --- a/freedreno/freedreno_device.c +++ b/freedreno/freedreno_device.c @@ -80,7 +80,7 @@ init_cache_buckets(struct fd_device *dev) } } -drm_public struct fd_device * fd_device_new(int fd) +struct fd_device * fd_device_new(int fd) { struct fd_device *dev; drmVersionPtr version; @@ -121,7 +121,7 @@ drm_public struct fd_device * fd_device_new(int fd) /* like fd_device_new() but creates it's own private dup() of the fd * which is close()d when the device is finalized. */ -drm_public struct fd_device * fd_device_new_dup(int fd) +struct fd_device * fd_device_new_dup(int fd) { struct fd_device *dev = fd_device_new(dup(fd)); if (dev) @@ -129,7 +129,7 @@ drm_public struct fd_device * fd_device_new_dup(int fd) return dev; } -drm_public struct fd_device * fd_device_ref(struct fd_device *dev) +struct fd_device * fd_device_ref(struct fd_device *dev) { atomic_inc(&dev->refcnt); return dev; @@ -152,7 +152,7 @@ drm_private void fd_device_del_locked(struct fd_device *dev) fd_device_del_impl(dev); } -drm_public void fd_device_del(struct fd_device *dev) +void fd_device_del(struct fd_device *dev) { if (!atomic_dec_and_test(&dev->refcnt)) return; diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c index 54e957b5..b6fed0a4 100644 --- a/freedreno/freedreno_pipe.c +++ b/freedreno/freedreno_pipe.c @@ -33,7 +33,7 @@ #include "freedreno_drmif.h" #include "freedreno_priv.h" -drm_public struct fd_pipe * +struct fd_pipe * fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) { struct fd_pipe *pipe = NULL; @@ -59,18 +59,18 @@ fail: return NULL; } -drm_public void fd_pipe_del(struct fd_pipe *pipe) +void fd_pipe_del(struct fd_pipe *pipe) { pipe->funcs->destroy(pipe); } -drm_public int fd_pipe_get_param(struct fd_pipe *pipe, +int fd_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param, uint64_t *value) { return pipe->funcs->get_param(pipe, param, value); } -drm_public int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp) +int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp) { return pipe->funcs->wait(pipe, timestamp); } diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c index c13dfe95..984da241 100644 --- a/freedreno/freedreno_ringbuffer.c +++ b/freedreno/freedreno_ringbuffer.c @@ -36,7 +36,7 @@ #include "freedreno_priv.h" #include "freedreno_ringbuffer.h" -drm_public struct fd_ringbuffer * +struct fd_ringbuffer * fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) { struct fd_ringbuffer *ring; @@ -55,7 +55,7 @@ fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) return ring; } -drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring) +void fd_ringbuffer_del(struct fd_ringbuffer *ring) { ring->funcs->destroy(ring); } @@ -64,13 +64,13 @@ drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring) * the IB source) as it's parent before emitting reloc's, to ensure * the bookkeeping works out properly. */ -drm_public void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, +void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, struct fd_ringbuffer *parent) { ring->parent = parent; } -drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring) +void fd_ringbuffer_reset(struct fd_ringbuffer *ring) { uint32_t *start = ring->start; if (ring->pipe->id == FD_PIPE_2D) @@ -81,23 +81,23 @@ drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring) } /* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */ -drm_public int fd_ringbuffer_flush(struct fd_ringbuffer *ring) +int fd_ringbuffer_flush(struct fd_ringbuffer *ring) { return ring->funcs->flush(ring, ring->last_start); } -drm_public uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring) +uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring) { return ring->last_timestamp; } -drm_public void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, +void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, const struct fd_reloc *reloc) { ring->funcs->emit_reloc(ring, reloc); } -drm_public void +void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, struct fd_ringmarker *target, struct fd_ringmarker *end) @@ -106,7 +106,7 @@ fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, ring->funcs->emit_reloc_ring(ring, target, end); } -drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring) +struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring) { struct fd_ringmarker *marker = NULL; @@ -123,23 +123,23 @@ drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring) return marker; } -drm_public void fd_ringmarker_del(struct fd_ringmarker *marker) +void fd_ringmarker_del(struct fd_ringmarker *marker) { free(marker); } -drm_public void fd_ringmarker_mark(struct fd_ringmarker *marker) +void fd_ringmarker_mark(struct fd_ringmarker *marker) { marker->cur = marker->ring->cur; } -drm_public uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start, +uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start, struct fd_ringmarker *end) { return end->cur - start->cur; } -drm_public int fd_ringmarker_flush(struct fd_ringmarker *marker) +int fd_ringmarker_flush(struct fd_ringmarker *marker) { struct fd_ringbuffer *ring = marker->ring; return ring->funcs->flush(ring, marker->cur); diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c index f1511864..15c3ff50 100644 --- a/freedreno/kgsl/kgsl_bo.c +++ b/freedreno/kgsl/kgsl_bo.c @@ -175,7 +175,7 @@ drm_private struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev, return bo; } -drm_public struct fd_bo * +struct fd_bo * fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size) { struct fd_bo *bo; diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index a95771d7..14ea9f9f 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -47,21 +47,21 @@ * Convenience functions for buffer management methods. */ -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment) { return bufmgr->bo_alloc(bufmgr, name, size, alignment); } -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment) { return bufmgr->bo_alloc_for_render(bufmgr, name, size, alignment); } -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, const char *name, void *addr, uint32_t tiling_mode, @@ -75,7 +75,7 @@ drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, return NULL; } -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, int x, int y, int cpp, uint32_t *tiling_mode, unsigned long *pitch, unsigned long flags) @@ -84,13 +84,13 @@ drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, tiling_mode, pitch, flags); } -drm_public void +void drm_intel_bo_reference(drm_intel_bo *bo) { bo->bufmgr->bo_reference(bo); } -drm_public void +void drm_intel_bo_unreference(drm_intel_bo *bo) { if (bo == NULL) @@ -99,26 +99,26 @@ drm_intel_bo_unreference(drm_intel_bo *bo) bo->bufmgr->bo_unreference(bo); } -drm_public int +int drm_intel_bo_map(drm_intel_bo *buf, int write_enable) { return buf->bufmgr->bo_map(buf, write_enable); } -drm_public int +int drm_intel_bo_unmap(drm_intel_bo *buf) { return buf->bufmgr->bo_unmap(buf); } -drm_public int +int drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset, unsigned long size, const void *data) { return bo->bufmgr->bo_subdata(bo, offset, size, data); } -drm_public int +int drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, unsigned long size, void *data) { @@ -137,26 +137,26 @@ drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, return 0; } -drm_public void +void drm_intel_bo_wait_rendering(drm_intel_bo *bo) { bo->bufmgr->bo_wait_rendering(bo); } -drm_public void +void drm_intel_bufmgr_destroy(drm_intel_bufmgr *bufmgr) { bufmgr->destroy(bufmgr); } -drm_public int +int drm_intel_bo_exec(drm_intel_bo *bo, int used, drm_clip_rect_t * cliprects, int num_cliprects, int DR4) { return bo->bufmgr->bo_exec(bo, used, cliprects, num_cliprects, DR4); } -drm_public int +int drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, drm_clip_rect_t *cliprects, int num_cliprects, int DR4, unsigned int rings) @@ -176,19 +176,19 @@ drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, } } -drm_public void +void drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug) { bufmgr->debug = enable_debug; } -drm_public int +int drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count) { return bo_array[0]->bufmgr->check_aperture_space(bo_array, count); } -drm_public int +int drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name) { if (bo->bufmgr->bo_flink) @@ -197,7 +197,7 @@ drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name) return -ENODEV; } -drm_public int +int drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain) @@ -208,7 +208,7 @@ drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, } /* For fence registers, not GL fences */ -drm_public int +int drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, drm_intel_bo *target_bo, uint32_t target_offset, uint32_t read_domains, uint32_t write_domain) @@ -219,7 +219,7 @@ drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, } -drm_public int +int drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment) { if (bo->bufmgr->bo_pin) @@ -228,7 +228,7 @@ drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment) return -ENODEV; } -drm_public int +int drm_intel_bo_unpin(drm_intel_bo *bo) { if (bo->bufmgr->bo_unpin) @@ -237,7 +237,7 @@ drm_intel_bo_unpin(drm_intel_bo *bo) return -ENODEV; } -drm_public int +int drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, uint32_t stride) { @@ -248,7 +248,7 @@ drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, return 0; } -drm_public int +int drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, uint32_t * swizzle_mode) { @@ -260,7 +260,7 @@ drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, return 0; } -drm_public int +int drm_intel_bo_disable_reuse(drm_intel_bo *bo) { if (bo->bufmgr->bo_disable_reuse) @@ -268,7 +268,7 @@ drm_intel_bo_disable_reuse(drm_intel_bo *bo) return 0; } -drm_public int +int drm_intel_bo_is_reusable(drm_intel_bo *bo) { if (bo->bufmgr->bo_is_reusable) @@ -276,7 +276,7 @@ drm_intel_bo_is_reusable(drm_intel_bo *bo) return 0; } -drm_public int +int drm_intel_bo_busy(drm_intel_bo *bo) { if (bo->bufmgr->bo_busy) @@ -284,7 +284,7 @@ drm_intel_bo_busy(drm_intel_bo *bo) return 0; } -drm_public int +int drm_intel_bo_madvise(drm_intel_bo *bo, int madv) { if (bo->bufmgr->bo_madvise) @@ -292,13 +292,13 @@ drm_intel_bo_madvise(drm_intel_bo *bo, int madv) return -1; } -drm_public int +int drm_intel_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo) { return bo->bufmgr->bo_references(bo, target_bo); } -drm_public int +int drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id) { if (bufmgr->get_pipe_from_crtc_id) @@ -332,7 +332,7 @@ err: return size; } -drm_public int +int drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total) { diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c index d0c2d748..54a39834 100644 --- a/intel/intel_bufmgr_fake.c +++ b/intel/intel_bufmgr_fake.c @@ -249,7 +249,7 @@ FENCE_LTE(unsigned a, unsigned b) return 0; } -drm_public void +void drm_intel_bufmgr_fake_set_fence_callback(drm_intel_bufmgr *bufmgr, unsigned int (*emit) (void *priv), void (*wait) (unsigned int fence, @@ -772,7 +772,7 @@ drm_intel_fake_bo_wait_rendering(drm_intel_bo *bo) * -- just evict everything * -- and wait for idle */ -drm_public void +void drm_intel_bufmgr_fake_contended_lock_take(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr; @@ -868,7 +868,7 @@ drm_intel_fake_bo_alloc_tiled(drm_intel_bufmgr * bufmgr, 4096); } -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr, const char *name, unsigned long offset, @@ -963,7 +963,7 @@ drm_intel_fake_bo_unreference(drm_intel_bo *bo) * Set the buffer as not requiring backing store, and instead get the callback * invoked whenever it would be set dirty. */ -drm_public void +void drm_intel_bo_fake_disable_backing_store(drm_intel_bo *bo, void (*invalidate_cb) (drm_intel_bo *bo, void *ptr), @@ -1417,7 +1417,7 @@ drm_intel_bo_fake_post_submit(drm_intel_bo *bo) bo_fake->write_domain = 0; } -drm_public void +void drm_intel_bufmgr_fake_set_exec_callback(drm_intel_bufmgr *bufmgr, int (*exec) (drm_intel_bo *bo, unsigned int used, @@ -1540,7 +1540,7 @@ drm_intel_fake_check_aperture_space(drm_intel_bo ** bo_array, int count) * Used by the X Server on LeaveVT, when the card memory is no longer our * own. */ -drm_public void +void drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr; @@ -1575,7 +1575,7 @@ drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr) pthread_mutex_unlock(&bufmgr_fake->lock); } -drm_public void +void drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr, volatile unsigned int *last_dispatch) @@ -1585,7 +1585,7 @@ drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr, bufmgr_fake->last_dispatch = (volatile int *)last_dispatch; } -drm_public drm_intel_bufmgr * +drm_intel_bufmgr * drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset, void *low_virtual, unsigned long size, volatile unsigned int *last_dispatch) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 55cd4ed9..7c947863 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -1007,7 +1007,7 @@ check_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, * This can be used when one application needs to pass a buffer object * to another. */ -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, const char *name, unsigned int handle) @@ -1469,7 +1469,7 @@ map_gtt(drm_intel_bo *bo) return 0; } -drm_public int +int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -1528,7 +1528,7 @@ drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) * undefined). */ -drm_public int +int drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -1617,7 +1617,7 @@ static int drm_intel_gem_bo_unmap(drm_intel_bo *bo) return ret; } -drm_public int +int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo) { return drm_intel_gem_bo_unmap(bo); @@ -1742,7 +1742,7 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo) * Note that some kernels have broken the inifite wait for negative values * promise, upgrade to latest stable kernels if this is the case. */ -drm_public int +int drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -1778,7 +1778,7 @@ drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns) * In combination with drm_intel_gem_bo_pin() and manual fence management, we * can do tiled pixmaps this way. */ -drm_public void +void drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -1941,7 +1941,7 @@ drm_intel_gem_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, read_domains, write_domain, true); } -drm_public int +int drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo) { drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; @@ -1962,7 +1962,7 @@ drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo) * Any further drm_intel_bufmgr_check_aperture_space() queries * involving this buffer in the tree are undefined after this call. */ -drm_public void +void drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -2298,7 +2298,7 @@ aub_build_dump_ringbuffer(drm_intel_bufmgr_gem *bufmgr_gem, bufmgr_gem->aub_offset += 4096; } -drm_public void +void drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo, int x1, int y1, int width, int height, enum aub_dump_bmp_format format, @@ -2569,7 +2569,7 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used, flags); } -drm_public int +int drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx, int used, unsigned int flags) { @@ -2694,7 +2694,7 @@ drm_intel_gem_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, return 0; } -drm_public drm_intel_bo * +drm_intel_bo * drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int size) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; @@ -2780,7 +2780,7 @@ drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int s return &bo_gem->bo; } -drm_public int +int drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; @@ -2840,7 +2840,7 @@ drm_intel_gem_bo_flink(drm_intel_bo *bo, uint32_t * name) * size is only bounded by how many buffers of that size we've managed to have * in flight at once. */ -drm_public void +void drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; @@ -2855,7 +2855,7 @@ drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr) * allocation. If this option is not enabled, all relocs will have fence * register allocated. */ -drm_public void +void drm_intel_bufmgr_gem_enable_fenced_relocs(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; @@ -3127,7 +3127,7 @@ init_cache_buckets(drm_intel_bufmgr_gem *bufmgr_gem) } } -drm_public void +void drm_intel_bufmgr_gem_set_vma_cache_size(drm_intel_bufmgr *bufmgr, int limit) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; @@ -3168,7 +3168,7 @@ get_pci_device_id(drm_intel_bufmgr_gem *bufmgr_gem) return devid; } -drm_public int +int drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; @@ -3182,7 +3182,7 @@ drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr) * This function has to be called before drm_intel_bufmgr_gem_set_aub_dump() * for it to have any effect. */ -drm_public void +void drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr, const char *filename) { @@ -3201,7 +3201,7 @@ drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr, * You can set up a GTT and upload your objects into the referenced * space, then send off batchbuffers and get BMPs out the other end. */ -drm_public void +void drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; @@ -3258,7 +3258,7 @@ drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable) } } -drm_public drm_intel_context * +drm_intel_context * drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; @@ -3285,7 +3285,7 @@ drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr) return context; } -drm_public void +void drm_intel_gem_context_destroy(drm_intel_context *ctx) { drm_intel_bufmgr_gem *bufmgr_gem; @@ -3308,7 +3308,7 @@ drm_intel_gem_context_destroy(drm_intel_context *ctx) free(ctx); } -drm_public int +int drm_intel_get_reset_stats(drm_intel_context *ctx, uint32_t *reset_count, uint32_t *active, @@ -3342,7 +3342,7 @@ drm_intel_get_reset_stats(drm_intel_context *ctx, return ret; } -drm_public int +int drm_intel_reg_read(drm_intel_bufmgr *bufmgr, uint32_t offset, uint64_t *result) @@ -3360,7 +3360,7 @@ drm_intel_reg_read(drm_intel_bufmgr *bufmgr, return ret; } -drm_public int +int drm_intel_get_subslice_total(int fd, unsigned int *subslice_total) { drm_i915_getparam_t gp; @@ -3376,7 +3376,7 @@ drm_intel_get_subslice_total(int fd, unsigned int *subslice_total) return 0; } -drm_public int +int drm_intel_get_eu_total(int fd, unsigned int *eu_total) { drm_i915_getparam_t gp; @@ -3413,7 +3413,7 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total) * default state (no annotations), call this function with a \c count * of zero. */ -drm_public void +void drm_intel_bufmgr_gem_set_aub_annotations(drm_intel_bo *bo, drm_intel_aub_annotation *annotations, unsigned count) @@ -3474,7 +3474,7 @@ drm_intel_bufmgr_gem_unref(drm_intel_bufmgr *bufmgr) * * \param fd File descriptor of the opened DRM device. */ -drm_public drm_intel_bufmgr * +drm_intel_bufmgr * drm_intel_bufmgr_gem_init(int fd, int batch_size) { drm_intel_bufmgr_gem *bufmgr_gem; diff --git a/intel/intel_decode.c b/intel/intel_decode.c index 87597605..2b902a39 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -3817,7 +3817,7 @@ decode_3d_i830(struct drm_intel_decode *ctx) return 1; } -drm_public struct drm_intel_decode * +struct drm_intel_decode * drm_intel_decode_context_alloc(uint32_t devid) { struct drm_intel_decode *ctx; @@ -3851,20 +3851,20 @@ drm_intel_decode_context_alloc(uint32_t devid) return ctx; } -drm_public void +void drm_intel_decode_context_free(struct drm_intel_decode *ctx) { free(ctx); } -drm_public void +void drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx, int dump_past_end) { ctx->dump_past_end = !!dump_past_end; } -drm_public void +void drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx, void *data, uint32_t hw_offset, int count) { @@ -3873,7 +3873,7 @@ drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx, ctx->base_count = count; } -drm_public void +void drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx, uint32_t head, uint32_t tail) { @@ -3881,7 +3881,7 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx, ctx->tail = tail; } -drm_public void +void drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, FILE *out) { @@ -3895,7 +3895,7 @@ drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, * \param count number of DWORDs to decode in the batch buffer * \param hw_offset hardware address for the buffer */ -drm_public void +void drm_intel_decode(struct drm_intel_decode *ctx) { int ret; diff --git a/libdrm_macros.h b/libdrm_macros.h index 6c3cd594..639d0904 100644 --- a/libdrm_macros.h +++ b/libdrm_macros.h @@ -25,10 +25,8 @@ #if defined(HAVE_VISIBILITY) # define drm_private __attribute__((visibility("hidden"))) -# define drm_public __attribute__((visibility("default"))) #else # define drm_private -# define drm_public #endif diff --git a/nouveau/bufctx.c b/nouveau/bufctx.c index 0cba410e..4f76e5df 100644 --- a/nouveau/bufctx.c +++ b/nouveau/bufctx.c @@ -62,7 +62,7 @@ nouveau_bufctx(struct nouveau_bufctx *bctx) return (struct nouveau_bufctx_priv *)bctx; } -drm_public int +int nouveau_bufctx_new(struct nouveau_client *client, int bins, struct nouveau_bufctx **pbctx) { @@ -82,7 +82,7 @@ nouveau_bufctx_new(struct nouveau_client *client, int bins, return -ENOMEM; } -drm_public void +void nouveau_bufctx_del(struct nouveau_bufctx **pbctx) { struct nouveau_bufctx_priv *pctx = nouveau_bufctx(*pbctx); @@ -99,7 +99,7 @@ nouveau_bufctx_del(struct nouveau_bufctx **pbctx) } } -drm_public void +void nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin) { struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx); @@ -117,7 +117,7 @@ nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin) pbin->relocs = 0; } -drm_public struct nouveau_bufref * +struct nouveau_bufref * nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin, struct nouveau_bo *bo, uint32_t flags) { @@ -144,7 +144,7 @@ nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin, return &pref->base; } -drm_public struct nouveau_bufref * +struct nouveau_bufref * nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet, struct nouveau_bo *bo, uint64_t data, uint32_t flags, uint32_t vor, uint32_t tor) diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index 9d12091a..687bbb02 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -62,14 +62,14 @@ debug_init(char *args) * is kept here to prevent AIGLX from crashing if the DDX is linked against * the new libdrm, but the DRI driver against the old */ -drm_public int +int nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd, drm_context_t ctx) { return -EACCES; } -drm_public int +int nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) { struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev)); @@ -147,7 +147,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) return 0; } -drm_public int +int nouveau_device_open(const char *busid, struct nouveau_device **pdev) { int ret = -ENODEV, fd = drmOpen("nouveau", busid); @@ -159,7 +159,7 @@ nouveau_device_open(const char *busid, struct nouveau_device **pdev) return ret; } -drm_public void +void nouveau_device_del(struct nouveau_device **pdev) { struct nouveau_device_priv *nvdev = nouveau_device(*pdev); @@ -173,7 +173,7 @@ nouveau_device_del(struct nouveau_device **pdev) } } -drm_public int +int nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value) { struct drm_nouveau_getparam r = { param, 0 }; @@ -183,14 +183,14 @@ nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value) return ret; } -drm_public int +int nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value) { struct drm_nouveau_setparam r = { param, value }; return drmCommandWrite(dev->fd, DRM_NOUVEAU_SETPARAM, &r, sizeof(r)); } -drm_public int +int nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient) { struct nouveau_device_priv *nvdev = nouveau_device(dev); @@ -229,7 +229,7 @@ unlock: return ret; } -drm_public void +void nouveau_client_del(struct nouveau_client **pclient) { struct nouveau_client_priv *pcli = nouveau_client(*pclient); @@ -245,7 +245,7 @@ nouveau_client_del(struct nouveau_client **pclient) } } -drm_public int +int nouveau_object_new(struct nouveau_object *parent, uint64_t handle, uint32_t oclass, void *data, uint32_t length, struct nouveau_object **pobj) @@ -307,7 +307,7 @@ nouveau_object_new(struct nouveau_object *parent, uint64_t handle, return 0; } -drm_public void +void nouveau_object_del(struct nouveau_object **pobj) { struct nouveau_object *obj = *pobj; @@ -331,7 +331,7 @@ nouveau_object_del(struct nouveau_object **pobj) *pobj = NULL; } -drm_public void * +void * nouveau_object_find(struct nouveau_object *obj, uint32_t pclass) { while (obj && obj->oclass != pclass) { @@ -372,7 +372,7 @@ nouveau_bo_del(struct nouveau_bo *bo) free(nvbo); } -drm_public int +int nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align, uint64_t size, union nouveau_bo_config *config, struct nouveau_bo **pbo) @@ -462,7 +462,7 @@ nouveau_bo_make_global(struct nouveau_bo_priv *nvbo) } } -drm_public int +int nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, struct nouveau_bo **pbo) { @@ -474,7 +474,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, return ret; } -drm_public int +int nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name, struct nouveau_bo **pbo) { @@ -492,7 +492,7 @@ nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name, return ret; } -drm_public int +int nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name) { struct drm_gem_flink req = { .handle = bo->handle }; @@ -513,7 +513,7 @@ nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name) return 0; } -drm_public void +void nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref) { struct nouveau_bo *ref = *pref; @@ -527,7 +527,7 @@ nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref) *pref = bo; } -drm_public int +int nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd, struct nouveau_bo **bo) { @@ -546,7 +546,7 @@ nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd, return ret; } -drm_public int +int nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd) { struct nouveau_bo_priv *nvbo = nouveau_bo(bo); @@ -560,7 +560,7 @@ nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd) return 0; } -drm_public int +int nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access, struct nouveau_client *client) { @@ -594,7 +594,7 @@ nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access, return ret; } -drm_public int +int nouveau_bo_map(struct nouveau_bo *bo, uint32_t access, struct nouveau_client *client) { diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c index 6e703a44..4f77881b 100644 --- a/nouveau/pushbuf.c +++ b/nouveau/pushbuf.c @@ -529,7 +529,7 @@ pushbuf_validate(struct nouveau_pushbuf *push, bool retry) return ret; } -drm_public int +int nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan, int nr, uint32_t size, bool immediate, struct nouveau_pushbuf **ppush) @@ -600,7 +600,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan, return 0; } -drm_public void +void nouveau_pushbuf_del(struct nouveau_pushbuf **ppush) { struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(*ppush); @@ -626,7 +626,7 @@ nouveau_pushbuf_del(struct nouveau_pushbuf **ppush) *ppush = NULL; } -drm_public struct nouveau_bufctx * +struct nouveau_bufctx * nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx) { struct nouveau_bufctx *prev = push->bufctx; @@ -634,7 +634,7 @@ nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx) return prev; } -drm_public int +int nouveau_pushbuf_space(struct nouveau_pushbuf *push, uint32_t dwords, uint32_t relocs, uint32_t pushes) { @@ -698,7 +698,7 @@ nouveau_pushbuf_space(struct nouveau_pushbuf *push, return flushed ? pushbuf_validate(push, false) : 0; } -drm_public void +void nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint64_t offset, uint64_t length) { @@ -728,14 +728,14 @@ nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo, } } -drm_public int +int nouveau_pushbuf_refn(struct nouveau_pushbuf *push, struct nouveau_pushbuf_refn *refs, int nr) { return pushbuf_refn(push, true, refs, nr); } -drm_public void +void nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo, uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor) { @@ -743,13 +743,13 @@ nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo, push->cur++; } -drm_public int +int nouveau_pushbuf_validate(struct nouveau_pushbuf *push) { return pushbuf_validate(push, true); } -drm_public uint32_t +uint32_t nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo) { struct drm_nouveau_gem_pushbuf_bo *kref; @@ -766,7 +766,7 @@ nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo) return flags; } -drm_public int +int nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan) { if (!push->channel) diff --git a/omap/omap_drm.c b/omap/omap_drm.c index 7bc89842..ff83a930 100644 --- a/omap/omap_drm.c +++ b/omap/omap_drm.c @@ -92,7 +92,7 @@ static struct omap_device * omap_device_new_impl(int fd) return dev; } -drm_public struct omap_device * omap_device_new(int fd) +struct omap_device * omap_device_new(int fd) { struct omap_device *dev = NULL; @@ -115,13 +115,13 @@ drm_public struct omap_device * omap_device_new(int fd) return dev; } -drm_public struct omap_device * omap_device_ref(struct omap_device *dev) +struct omap_device * omap_device_ref(struct omap_device *dev) { atomic_inc(&dev->refcnt); return dev; } -drm_public void omap_device_del(struct omap_device *dev) +void omap_device_del(struct omap_device *dev) { if (!atomic_dec_and_test(&dev->refcnt)) return; @@ -132,7 +132,7 @@ drm_public void omap_device_del(struct omap_device *dev) free(dev); } -drm_public int +int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) { struct drm_omap_param req = { @@ -150,7 +150,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) return 0; } -drm_public int +int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) { struct drm_omap_param req = { @@ -229,7 +229,7 @@ fail: /* allocate a new (un-tiled) buffer object */ -drm_public struct omap_bo * +struct omap_bo * omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) { union omap_gem_size gsize = { @@ -242,7 +242,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) } /* allocate a new buffer object */ -drm_public struct omap_bo * +struct omap_bo * omap_bo_new_tiled(struct omap_device *dev, uint32_t width, uint32_t height, uint32_t flags) { @@ -258,7 +258,7 @@ omap_bo_new_tiled(struct omap_device *dev, uint32_t width, return omap_bo_new_impl(dev, gsize, flags); } -drm_public struct omap_bo *omap_bo_ref(struct omap_bo *bo) +struct omap_bo *omap_bo_ref(struct omap_bo *bo) { atomic_inc(&bo->refcnt); return bo; @@ -284,7 +284,7 @@ static int get_buffer_info(struct omap_bo *bo) } /* import a buffer object from DRI2 name */ -drm_public struct omap_bo * +struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name) { struct omap_bo *bo = NULL; @@ -318,7 +318,7 @@ fail: * fd so caller should close() the fd when it is otherwise done * with it (even if it is still using the 'struct omap_bo *') */ -drm_public struct omap_bo * +struct omap_bo * omap_bo_from_dmabuf(struct omap_device *dev, int fd) { struct omap_bo *bo = NULL; @@ -350,7 +350,7 @@ fail: } /* destroy a buffer object */ -drm_public void omap_bo_del(struct omap_bo *bo) +void omap_bo_del(struct omap_bo *bo) { if (!bo) { return; @@ -383,7 +383,7 @@ drm_public void omap_bo_del(struct omap_bo *bo) } /* get the global flink/DRI2 buffer name */ -drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) +int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) { if (!bo->name) { struct drm_gem_flink req = { @@ -404,7 +404,7 @@ drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) return 0; } -drm_public uint32_t omap_bo_handle(struct omap_bo *bo) +uint32_t omap_bo_handle(struct omap_bo *bo) { return bo->handle; } @@ -412,7 +412,7 @@ drm_public uint32_t omap_bo_handle(struct omap_bo *bo) /* caller owns the dmabuf fd that is returned and is responsible * to close() it when done */ -drm_public int omap_bo_dmabuf(struct omap_bo *bo) +int omap_bo_dmabuf(struct omap_bo *bo) { if (!bo->fd) { struct drm_prime_handle req = { @@ -431,7 +431,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo) return dup(bo->fd); } -drm_public uint32_t omap_bo_size(struct omap_bo *bo) +uint32_t omap_bo_size(struct omap_bo *bo) { if (!bo->size) { get_buffer_info(bo); @@ -439,7 +439,7 @@ drm_public uint32_t omap_bo_size(struct omap_bo *bo) return bo->size; } -drm_public void *omap_bo_map(struct omap_bo *bo) +void *omap_bo_map(struct omap_bo *bo) { if (!bo->map) { if (!bo->offset) { @@ -455,7 +455,7 @@ drm_public void *omap_bo_map(struct omap_bo *bo) return bo->map; } -drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) +int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) { struct drm_omap_gem_cpu_prep req = { .handle = bo->handle, @@ -465,7 +465,7 @@ drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req)); } -drm_public int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) +int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) { struct drm_omap_gem_cpu_fini req = { .handle = bo->handle, diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c index 02a2d83d..447f9280 100644 --- a/radeon/radeon_bo.c +++ b/radeon/radeon_bo.c @@ -36,7 +36,7 @@ #include #include -drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op) +void radeon_bo_debug(struct radeon_bo *bo, const char *op) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; @@ -44,7 +44,7 @@ drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op) op, bo, bo->handle, boi->size, boi->cref); } -drm_public struct radeon_bo * +struct radeon_bo * radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size, uint32_t alignment, uint32_t domains, uint32_t flags) { @@ -53,14 +53,14 @@ radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size, return bo; } -drm_public void radeon_bo_ref(struct radeon_bo *bo) +void radeon_bo_ref(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; boi->cref++; boi->bom->funcs->bo_ref(boi); } -drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) +struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; if (bo == NULL) @@ -70,19 +70,19 @@ drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) return boi->bom->funcs->bo_unref(boi); } -drm_public int radeon_bo_map(struct radeon_bo *bo, int write) +int radeon_bo_map(struct radeon_bo *bo, int write) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; return boi->bom->funcs->bo_map(boi, write); } -drm_public int radeon_bo_unmap(struct radeon_bo *bo) +int radeon_bo_unmap(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; return boi->bom->funcs->bo_unmap(boi); } -drm_public int radeon_bo_wait(struct radeon_bo *bo) +int radeon_bo_wait(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; if (!boi->bom->funcs->bo_wait) @@ -90,13 +90,13 @@ drm_public int radeon_bo_wait(struct radeon_bo *bo) return boi->bom->funcs->bo_wait(boi); } -drm_public int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain) +int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; return boi->bom->funcs->bo_is_busy(boi, domain); } -drm_public int +int radeon_bo_set_tiling(struct radeon_bo *bo, uint32_t tiling_flags, uint32_t pitch) { @@ -104,7 +104,7 @@ radeon_bo_set_tiling(struct radeon_bo *bo, return boi->bom->funcs->bo_set_tiling(boi, tiling_flags, pitch); } -drm_public int +int radeon_bo_get_tiling(struct radeon_bo *bo, uint32_t *tiling_flags, uint32_t *pitch) { @@ -112,7 +112,7 @@ radeon_bo_get_tiling(struct radeon_bo *bo, return boi->bom->funcs->bo_get_tiling(boi, tiling_flags, pitch); } -drm_public int radeon_bo_is_static(struct radeon_bo *bo) +int radeon_bo_is_static(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; if (boi->bom->funcs->bo_is_static) @@ -120,19 +120,19 @@ drm_public int radeon_bo_is_static(struct radeon_bo *bo) return 0; } -drm_public int +int radeon_bo_is_referenced_by_cs(struct radeon_bo *bo, struct radeon_cs *cs) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; return boi->cref > 1; } -drm_public uint32_t radeon_bo_get_handle(struct radeon_bo *bo) +uint32_t radeon_bo_get_handle(struct radeon_bo *bo) { return bo->handle; } -drm_public uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo) +uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; uint32_t src_domain; diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c index b48cf540..7fdd437a 100644 --- a/radeon/radeon_bo_gem.c +++ b/radeon/radeon_bo_gem.c @@ -283,7 +283,7 @@ static struct radeon_bo_funcs bo_gem_funcs = { bo_is_busy, }; -drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) +struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) { struct bo_manager_gem *bomg; @@ -296,7 +296,7 @@ drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) return (struct radeon_bo_manager*)bomg; } -drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom) +void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom) { struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom; @@ -306,21 +306,21 @@ drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom) free(bomg); } -drm_public uint32_t +uint32_t radeon_gem_name_bo(struct radeon_bo *bo) { struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; return bo_gem->name; } -drm_public void * +void * radeon_gem_get_reloc_in_cs(struct radeon_bo *bo) { struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; return &bo_gem->reloc_in_cs; } -drm_public int +int radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) { struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; @@ -342,7 +342,7 @@ radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) return 0; } -drm_public int +int radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) { struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; @@ -360,7 +360,7 @@ radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t writ return r; } -drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) +int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) { struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; int ret; @@ -369,7 +369,7 @@ drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) return ret; } -drm_public struct radeon_bo * +struct radeon_bo * radeon_gem_bo_open_prime(struct radeon_bo_manager *bom, int fd_handle, uint32_t size) { struct radeon_bo_gem *bo; diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c index 142b71f7..dffb869f 100644 --- a/radeon/radeon_cs.c +++ b/radeon/radeon_cs.c @@ -6,14 +6,14 @@ #include "radeon_cs.h" #include "radeon_cs_int.h" -drm_public struct radeon_cs * +struct radeon_cs * radeon_cs_create(struct radeon_cs_manager *csm, uint32_t ndw) { struct radeon_cs_int *csi = csm->funcs->cs_create(csm, ndw); return (struct radeon_cs *)csi; } -drm_public int +int radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo, uint32_t read_domain, uint32_t write_domain, uint32_t flags) @@ -27,7 +27,7 @@ radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo, flags); } -drm_public int +int radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw, const char *file, const char *func, int line) { @@ -35,7 +35,7 @@ radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw, return csi->csm->funcs->cs_begin(csi, ndw, file, func, line); } -drm_public int +int radeon_cs_end(struct radeon_cs *cs, const char *file, const char *func, int line) { @@ -43,37 +43,37 @@ radeon_cs_end(struct radeon_cs *cs, return csi->csm->funcs->cs_end(csi, file, func, line); } -drm_public int radeon_cs_emit(struct radeon_cs *cs) +int radeon_cs_emit(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return csi->csm->funcs->cs_emit(csi); } -drm_public int radeon_cs_destroy(struct radeon_cs *cs) +int radeon_cs_destroy(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return csi->csm->funcs->cs_destroy(csi); } -drm_public int radeon_cs_erase(struct radeon_cs *cs) +int radeon_cs_erase(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return csi->csm->funcs->cs_erase(csi); } -drm_public int radeon_cs_need_flush(struct radeon_cs *cs) +int radeon_cs_need_flush(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return csi->csm->funcs->cs_need_flush(csi); } -drm_public void radeon_cs_print(struct radeon_cs *cs, FILE *file) +void radeon_cs_print(struct radeon_cs *cs, FILE *file) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; csi->csm->funcs->cs_print(csi, file); } -drm_public void +void radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; @@ -83,7 +83,7 @@ radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit) csi->csm->gart_limit = limit; } -drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs, +void radeon_cs_space_set_flush(struct radeon_cs *cs, void (*fn)(void *), void *data) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; @@ -91,7 +91,7 @@ drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs, csi->space_flush_data = data; } -drm_public uint32_t radeon_cs_get_id(struct radeon_cs *cs) +uint32_t radeon_cs_get_id(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return csi->id; diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c index cff2415d..1962e915 100644 --- a/radeon/radeon_cs_gem.c +++ b/radeon/radeon_cs_gem.c @@ -539,7 +539,7 @@ static int radeon_get_device_id(int fd, uint32_t *device_id) return r; } -drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd) +struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd) { struct radeon_cs_manager_gem *csm; @@ -553,7 +553,7 @@ drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd) return &csm->base; } -drm_public void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm) +void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm) { free(csm); } diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c index 1a6ea28e..69287be5 100644 --- a/radeon/radeon_cs_space.c +++ b/radeon/radeon_cs_space.c @@ -165,7 +165,7 @@ static int radeon_cs_do_space_check(struct radeon_cs_int *cs, struct radeon_cs_s return RADEON_CS_SPACE_OK; } -drm_public void +void radeon_cs_space_add_persistent_bo(struct radeon_cs *cs, struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) { @@ -209,7 +209,7 @@ again: return 0; } -drm_public int +int radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) { @@ -230,13 +230,13 @@ radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo, return ret; } -drm_public int radeon_cs_space_check(struct radeon_cs *cs) +int radeon_cs_space_check(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; return radeon_cs_check_space_internal(csi, NULL); } -drm_public void radeon_cs_space_reset_bos(struct radeon_cs *cs) +void radeon_cs_space_reset_bos(struct radeon_cs *cs) { struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; int i; diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index fd75b16a..fad4bda3 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -2400,7 +2400,7 @@ static int cik_surface_best(struct radeon_surface_manager *surf_man, /* =========================================================================== * public API */ -drm_public struct radeon_surface_manager * +struct radeon_surface_manager * radeon_surface_manager_new(int fd) { struct radeon_surface_manager *surf_man; @@ -2449,7 +2449,7 @@ out_err: return NULL; } -drm_public void +void radeon_surface_manager_free(struct radeon_surface_manager *surf_man) { free(surf_man); @@ -2522,7 +2522,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man, return 0; } -drm_public int +int radeon_surface_init(struct radeon_surface_manager *surf_man, struct radeon_surface *surf) { @@ -2539,7 +2539,7 @@ radeon_surface_init(struct radeon_surface_manager *surf_man, return surf_man->surface_init(surf_man, surf); } -drm_public int +int radeon_surface_best(struct radeon_surface_manager *surf_man, struct radeon_surface *surf) { diff --git a/tegra/tegra.c b/tegra/tegra.c index f8d40786..f7dc89ad 100644 --- a/tegra/tegra.c +++ b/tegra/tegra.c @@ -74,7 +74,6 @@ static int drm_tegra_wrap(struct drm_tegra **drmp, int fd, bool close) return 0; } -drm_public int drm_tegra_new(struct drm_tegra **drmp, int fd) { bool supported = false; @@ -95,7 +94,6 @@ int drm_tegra_new(struct drm_tegra **drmp, int fd) return drm_tegra_wrap(drmp, fd, false); } -drm_public void drm_tegra_close(struct drm_tegra *drm) { if (!drm) @@ -107,7 +105,6 @@ void drm_tegra_close(struct drm_tegra *drm) free(drm); } -drm_public int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, uint32_t flags, uint32_t size) { @@ -146,7 +143,6 @@ int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, return 0; } -drm_public int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, uint32_t handle, uint32_t flags, uint32_t size) { @@ -170,7 +166,6 @@ int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, return 0; } -drm_public struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) { if (bo) @@ -179,14 +174,12 @@ struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) return bo; } -drm_public void drm_tegra_bo_unref(struct drm_tegra_bo *bo) { if (bo && atomic_dec_and_test(&bo->ref)) drm_tegra_bo_free(bo); } -drm_public int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) { if (!bo || !handle) @@ -197,7 +190,6 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) return 0; } -drm_public int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) { struct drm_tegra *drm = bo->drm; @@ -230,7 +222,6 @@ int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) return 0; } -drm_public int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) { if (!bo) @@ -247,7 +238,6 @@ int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) return 0; } -drm_public int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) { struct drm_tegra_gem_get_flags args; @@ -271,7 +261,6 @@ int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) return 0; } -drm_public int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) { struct drm_tegra_gem_get_flags args; @@ -293,7 +282,6 @@ int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) return 0; } -drm_public int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, struct drm_tegra_bo_tiling *tiling) { @@ -320,7 +308,6 @@ int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, return 0; } -drm_public int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo, const struct drm_tegra_bo_tiling *tiling) {