aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov2015-03-31 16:32:11 -0500
committerEmil Velikov2015-04-28 05:19:15 -0500
commit0f8da82500ec542e269092c0718479e25eaff5f6 (patch)
tree4bfdf0fe56674bd42926f6f4607331d1468d08dd
parent104c895f650cac7741c12e10ee78bb2fca2cbd49 (diff)
downloadexternal-libdrm-0f8da82500ec542e269092c0718479e25eaff5f6.tar.gz
external-libdrm-0f8da82500ec542e269092c0718479e25eaff5f6.tar.xz
external-libdrm-0f8da82500ec542e269092c0718479e25eaff5f6.zip
drm: remove drm_public macro
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 <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--configure.ac5
-rw-r--r--exynos/exynos_drm.c24
-rw-r--r--exynos/exynos_fimg2d.c16
-rw-r--r--freedreno/freedreno_bo.c26
-rw-r--r--freedreno/freedreno_device.c8
-rw-r--r--freedreno/freedreno_pipe.c8
-rw-r--r--freedreno/freedreno_ringbuffer.c26
-rw-r--r--freedreno/kgsl/kgsl_bo.c2
-rw-r--r--intel/intel_bufmgr.c60
-rw-r--r--intel/intel_bufmgr_fake.c16
-rw-r--r--intel/intel_bufmgr_gem.c52
-rw-r--r--intel/intel_decode.c14
-rw-r--r--libdrm_macros.h2
-rw-r--r--nouveau/bufctx.c10
-rw-r--r--nouveau/nouveau.c40
-rw-r--r--nouveau/pushbuf.c20
-rw-r--r--omap/omap_drm.c36
-rw-r--r--radeon/radeon_bo.c28
-rw-r--r--radeon/radeon_bo_gem.c16
-rw-r--r--radeon/radeon_cs.c24
-rw-r--r--radeon/radeon_cs_gem.c4
-rw-r--r--radeon/radeon_cs_space.c8
-rw-r--r--radeon/radeon_surface.c8
-rw-r--r--tegra/tegra.c13
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],
403 [kernel_source="$with_kernel_source"]) 403 [kernel_source="$with_kernel_source"])
404AC_SUBST(kernel_source) 404AC_SUBST(kernel_source)
405 405
406AC_MSG_CHECKING([whether $CC supports __attribute__((visibility))]) 406AC_MSG_CHECKING([whether $CC supports __attribute__(("hidden"))])
407AC_LINK_IFELSE([AC_LANG_PROGRAM([ 407AC_LINK_IFELSE([AC_LANG_PROGRAM([
408 int foo_default( void ) __attribute__((visibility("default")));
409 int foo_hidden( void ) __attribute__((visibility("hidden"))); 408 int foo_hidden( void ) __attribute__((visibility("hidden")));
410])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])); 409])], HAVE_ATTRIBUTE_VISIBILITY="yes"; AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]));
411 410
412if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then 411if test "x$HAVE_ATTRIBUTE_VISIBILITY" = xyes; then
413 AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__((visibility))]) 412 AC_DEFINE(HAVE_VISIBILITY, 1, [Compiler supports __attribute__(("hidden"))])
414fi 413fi
415 414
416AC_SUBST(WARN_CFLAGS) 415AC_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 @@
49 * 49 *
50 * if true, return the device object else NULL. 50 * if true, return the device object else NULL.
51 */ 51 */
52drm_public struct exynos_device * exynos_device_create(int fd) 52struct exynos_device * exynos_device_create(int fd)
53{ 53{
54 struct exynos_device *dev; 54 struct exynos_device *dev;
55 55
@@ -70,7 +70,7 @@ drm_public struct exynos_device * exynos_device_create(int fd)
70 * 70 *
71 * @dev: exynos drm device object. 71 * @dev: exynos drm device object.
72 */ 72 */
73drm_public void exynos_device_destroy(struct exynos_device *dev) 73void exynos_device_destroy(struct exynos_device *dev)
74{ 74{
75 free(dev); 75 free(dev);
76} 76}
@@ -88,7 +88,7 @@ drm_public void exynos_device_destroy(struct exynos_device *dev)
88 * 88 *
89 * if true, return a exynos buffer object else NULL. 89 * if true, return a exynos buffer object else NULL.
90 */ 90 */
91drm_public struct exynos_bo * exynos_bo_create(struct exynos_device *dev, 91struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
92 size_t size, uint32_t flags) 92 size_t size, uint32_t flags)
93{ 93{
94 struct exynos_bo *bo; 94 struct exynos_bo *bo;
@@ -142,7 +142,7 @@ fail:
142 * 142 *
143 * if true, return 0 else negative. 143 * if true, return 0 else negative.
144 */ 144 */
145drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle, 145int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
146 size_t *size, uint32_t *flags) 146 size_t *size, uint32_t *flags)
147{ 147{
148 int ret; 148 int ret;
@@ -168,7 +168,7 @@ drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
168 * 168 *
169 * @bo: a exynos buffer object to be destroyed. 169 * @bo: a exynos buffer object to be destroyed.
170 */ 170 */
171drm_public void exynos_bo_destroy(struct exynos_bo *bo) 171void exynos_bo_destroy(struct exynos_bo *bo)
172{ 172{
173 if (!bo) 173 if (!bo)
174 return; 174 return;
@@ -200,7 +200,7 @@ drm_public void exynos_bo_destroy(struct exynos_bo *bo)
200 * if true, return a exynos buffer object else NULL. 200 * if true, return a exynos buffer object else NULL.
201 * 201 *
202 */ 202 */
203drm_public struct exynos_bo * 203struct exynos_bo *
204exynos_bo_from_name(struct exynos_device *dev, uint32_t name) 204exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
205{ 205{
206 struct exynos_bo *bo; 206 struct exynos_bo *bo;
@@ -243,7 +243,7 @@ err_free_bo:
243 * 243 *
244 * if true, return 0 else negative. 244 * if true, return 0 else negative.
245 */ 245 */
246drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name) 246int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
247{ 247{
248 if (!bo->name) { 248 if (!bo->name) {
249 struct drm_gem_flink req = { 249 struct drm_gem_flink req = {
@@ -266,7 +266,7 @@ drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
266 return 0; 266 return 0;
267} 267}
268 268
269drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo) 269uint32_t exynos_bo_handle(struct exynos_bo *bo)
270{ 270{
271 return bo->handle; 271 return bo->handle;
272} 272}
@@ -279,7 +279,7 @@ drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo)
279 * 279 *
280 * if true, user pointer mmaped else NULL. 280 * if true, user pointer mmaped else NULL.
281 */ 281 */
282drm_public void *exynos_bo_map(struct exynos_bo *bo) 282void *exynos_bo_map(struct exynos_bo *bo)
283{ 283{
284 if (!bo->vaddr) { 284 if (!bo->vaddr) {
285 struct exynos_device *dev = bo->dev; 285 struct exynos_device *dev = bo->dev;
@@ -316,7 +316,7 @@ drm_public void *exynos_bo_map(struct exynos_bo *bo)
316 * 316 *
317 * @return: 0 on success, -1 on error, and errno will be set 317 * @return: 0 on success, -1 on error, and errno will be set
318 */ 318 */
319drm_public int 319int
320exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd) 320exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)
321{ 321{
322 return drmPrimeHandleToFD(dev->fd, handle, 0, fd); 322 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)
331 * 331 *
332 * @return: 0 on success, -1 on error, and errno will be set 332 * @return: 0 on success, -1 on error, and errno will be set
333 */ 333 */
334drm_public int 334int
335exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle) 335exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
336{ 336{
337 return drmPrimeFDToHandle(dev->fd, fd, handle); 337 return drmPrimeFDToHandle(dev->fd, fd, handle);
@@ -354,7 +354,7 @@ exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
354 * 354 *
355 * if true, return 0 else negative. 355 * if true, return 0 else negative.
356 */ 356 */
357drm_public int 357int
358exynos_vidi_connection(struct exynos_device *dev, uint32_t connect, 358exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
359 uint32_t ext, void *edid) 359 uint32_t ext, void *edid)
360{ 360{
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)
224 * 224 *
225 * fd: a file descriptor to an opened drm device. 225 * fd: a file descriptor to an opened drm device.
226 */ 226 */
227drm_public struct g2d_context *g2d_init(int fd) 227struct g2d_context *g2d_init(int fd)
228{ 228{
229 struct drm_exynos_g2d_get_ver ver; 229 struct drm_exynos_g2d_get_ver ver;
230 struct g2d_context *ctx; 230 struct g2d_context *ctx;
@@ -252,7 +252,7 @@ drm_public struct g2d_context *g2d_init(int fd)
252 return ctx; 252 return ctx;
253} 253}
254 254
255drm_public void g2d_fini(struct g2d_context *ctx) 255void g2d_fini(struct g2d_context *ctx)
256{ 256{
257 if (ctx) 257 if (ctx)
258 free(ctx); 258 free(ctx);
@@ -263,7 +263,7 @@ drm_public void g2d_fini(struct g2d_context *ctx)
263 * 263 *
264 * @ctx: a pointer to g2d_context structure. 264 * @ctx: a pointer to g2d_context structure.
265 */ 265 */
266drm_public int g2d_exec(struct g2d_context *ctx) 266int g2d_exec(struct g2d_context *ctx)
267{ 267{
268 struct drm_exynos_g2d_exec exec; 268 struct drm_exynos_g2d_exec exec;
269 int ret; 269 int ret;
@@ -295,7 +295,7 @@ drm_public int g2d_exec(struct g2d_context *ctx)
295 * @w: width value to buffer filled with given color data. 295 * @w: width value to buffer filled with given color data.
296 * @h: height value to buffer filled with given color data. 296 * @h: height value to buffer filled with given color data.
297 */ 297 */
298drm_public int 298int
299g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img, 299g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
300 unsigned int x, unsigned int y, unsigned int w, 300 unsigned int x, unsigned int y, unsigned int w,
301 unsigned int h) 301 unsigned int h)
@@ -350,7 +350,7 @@ g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
350 * @w: width value to source and destination buffers. 350 * @w: width value to source and destination buffers.
351 * @h: height value to source and destination buffers. 351 * @h: height value to source and destination buffers.
352 */ 352 */
353drm_public int 353int
354g2d_copy(struct g2d_context *ctx, struct g2d_image *src, 354g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
355 struct g2d_image *dst, unsigned int src_x, unsigned int src_y, 355 struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
356 unsigned int dst_x, unsigned dst_y, unsigned int w, 356 unsigned int dst_x, unsigned dst_y, unsigned int w,
@@ -440,7 +440,7 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
440 * @negative: indicate that it uses color negative to source and 440 * @negative: indicate that it uses color negative to source and
441 * destination buffers. 441 * destination buffers.
442 */ 442 */
443drm_public int 443int
444g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src, 444g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
445 struct g2d_image *dst, unsigned int src_x, 445 struct g2d_image *dst, unsigned int src_x,
446 unsigned int src_y, unsigned int src_w, 446 unsigned int src_y, unsigned int src_w,
@@ -548,7 +548,7 @@ g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
548 * @h: height value to source and destination buffer. 548 * @h: height value to source and destination buffer.
549 * @op: blend operation type. 549 * @op: blend operation type.
550 */ 550 */
551drm_public int 551int
552g2d_blend(struct g2d_context *ctx, struct g2d_image *src, 552g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
553 struct g2d_image *dst, unsigned int src_x, 553 struct g2d_image *dst, unsigned int src_x,
554 unsigned int src_y, unsigned int dst_x, unsigned int dst_y, 554 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,
659 * @dst_h: height value to destination buffer. 659 * @dst_h: height value to destination buffer.
660 * @op: blend operation type. 660 * @op: blend operation type.
661 */ 661 */
662drm_public int 662int
663g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src, 663g2d_scale_and_blend(struct g2d_context *ctx, struct g2d_image *src,
664 struct g2d_image *dst, unsigned int src_x, unsigned int src_y, 664 struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
665 unsigned int src_w, unsigned int src_h, unsigned int dst_x, 665 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,
167} 167}
168 168
169 169
170drm_public struct fd_bo * 170struct fd_bo *
171fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags) 171fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
172{ 172{
173 struct fd_bo *bo = NULL; 173 struct fd_bo *bo = NULL;
@@ -201,7 +201,7 @@ fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
201 return bo; 201 return bo;
202} 202}
203 203
204drm_public struct fd_bo * 204struct fd_bo *
205fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size) 205fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size)
206{ 206{
207 struct fd_bo *bo = NULL; 207 struct fd_bo *bo = NULL;
@@ -220,7 +220,7 @@ out_unlock:
220 return bo; 220 return bo;
221} 221}
222 222
223drm_public struct fd_bo * 223struct fd_bo *
224fd_bo_from_dmabuf(struct fd_device *dev, int fd) 224fd_bo_from_dmabuf(struct fd_device *dev, int fd)
225{ 225{
226 struct drm_prime_handle req = { 226 struct drm_prime_handle req = {
@@ -239,7 +239,7 @@ fd_bo_from_dmabuf(struct fd_device *dev, int fd)
239 return fd_bo_from_handle(dev, req.handle, size); 239 return fd_bo_from_handle(dev, req.handle, size);
240} 240}
241 241
242drm_public struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name) 242struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
243{ 243{
244 struct drm_gem_open req = { 244 struct drm_gem_open req = {
245 .name = name, 245 .name = name,
@@ -272,13 +272,13 @@ out_unlock:
272 return bo; 272 return bo;
273} 273}
274 274
275drm_public struct fd_bo * fd_bo_ref(struct fd_bo *bo) 275struct fd_bo * fd_bo_ref(struct fd_bo *bo)
276{ 276{
277 atomic_inc(&bo->refcnt); 277 atomic_inc(&bo->refcnt);
278 return bo; 278 return bo;
279} 279}
280 280
281drm_public void fd_bo_del(struct fd_bo *bo) 281void fd_bo_del(struct fd_bo *bo)
282{ 282{
283 struct fd_device *dev = bo->dev; 283 struct fd_device *dev = bo->dev;
284 284
@@ -342,7 +342,7 @@ static void bo_del(struct fd_bo *bo)
342 bo->funcs->destroy(bo); 342 bo->funcs->destroy(bo);
343} 343}
344 344
345drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name) 345int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
346{ 346{
347 if (!bo->name) { 347 if (!bo->name) {
348 struct drm_gem_flink req = { 348 struct drm_gem_flink req = {
@@ -365,12 +365,12 @@ drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
365 return 0; 365 return 0;
366} 366}
367 367
368drm_public uint32_t fd_bo_handle(struct fd_bo *bo) 368uint32_t fd_bo_handle(struct fd_bo *bo)
369{ 369{
370 return bo->handle; 370 return bo->handle;
371} 371}
372 372
373drm_public int fd_bo_dmabuf(struct fd_bo *bo) 373int fd_bo_dmabuf(struct fd_bo *bo)
374{ 374{
375 if (!bo->fd) { 375 if (!bo->fd) {
376 struct drm_prime_handle req = { 376 struct drm_prime_handle req = {
@@ -389,12 +389,12 @@ drm_public int fd_bo_dmabuf(struct fd_bo *bo)
389 return dup(bo->fd); 389 return dup(bo->fd);
390} 390}
391 391
392drm_public uint32_t fd_bo_size(struct fd_bo *bo) 392uint32_t fd_bo_size(struct fd_bo *bo)
393{ 393{
394 return bo->size; 394 return bo->size;
395} 395}
396 396
397drm_public void * fd_bo_map(struct fd_bo *bo) 397void * fd_bo_map(struct fd_bo *bo)
398{ 398{
399 if (!bo->map) { 399 if (!bo->map) {
400 uint64_t offset; 400 uint64_t offset;
@@ -416,12 +416,12 @@ drm_public void * fd_bo_map(struct fd_bo *bo)
416} 416}
417 417
418/* a bit odd to take the pipe as an arg, but it's a, umm, quirk of kgsl.. */ 418/* a bit odd to take the pipe as an arg, but it's a, umm, quirk of kgsl.. */
419drm_public int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op) 419int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
420{ 420{
421 return bo->funcs->cpu_prep(bo, pipe, op); 421 return bo->funcs->cpu_prep(bo, pipe, op);
422} 422}
423 423
424drm_public void fd_bo_cpu_fini(struct fd_bo *bo) 424void fd_bo_cpu_fini(struct fd_bo *bo)
425{ 425{
426 bo->funcs->cpu_fini(bo); 426 bo->funcs->cpu_fini(bo);
427} 427}
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)
80 } 80 }
81} 81}
82 82
83drm_public struct fd_device * fd_device_new(int fd) 83struct fd_device * fd_device_new(int fd)
84{ 84{
85 struct fd_device *dev; 85 struct fd_device *dev;
86 drmVersionPtr version; 86 drmVersionPtr version;
@@ -121,7 +121,7 @@ drm_public struct fd_device * fd_device_new(int fd)
121/* like fd_device_new() but creates it's own private dup() of the fd 121/* like fd_device_new() but creates it's own private dup() of the fd
122 * which is close()d when the device is finalized. 122 * which is close()d when the device is finalized.
123 */ 123 */
124drm_public struct fd_device * fd_device_new_dup(int fd) 124struct fd_device * fd_device_new_dup(int fd)
125{ 125{
126 struct fd_device *dev = fd_device_new(dup(fd)); 126 struct fd_device *dev = fd_device_new(dup(fd));
127 if (dev) 127 if (dev)
@@ -129,7 +129,7 @@ drm_public struct fd_device * fd_device_new_dup(int fd)
129 return dev; 129 return dev;
130} 130}
131 131
132drm_public struct fd_device * fd_device_ref(struct fd_device *dev) 132struct fd_device * fd_device_ref(struct fd_device *dev)
133{ 133{
134 atomic_inc(&dev->refcnt); 134 atomic_inc(&dev->refcnt);
135 return dev; 135 return dev;
@@ -152,7 +152,7 @@ drm_private void fd_device_del_locked(struct fd_device *dev)
152 fd_device_del_impl(dev); 152 fd_device_del_impl(dev);
153} 153}
154 154
155drm_public void fd_device_del(struct fd_device *dev) 155void fd_device_del(struct fd_device *dev)
156{ 156{
157 if (!atomic_dec_and_test(&dev->refcnt)) 157 if (!atomic_dec_and_test(&dev->refcnt))
158 return; 158 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 @@
33#include "freedreno_drmif.h" 33#include "freedreno_drmif.h"
34#include "freedreno_priv.h" 34#include "freedreno_priv.h"
35 35
36drm_public struct fd_pipe * 36struct fd_pipe *
37fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) 37fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
38{ 38{
39 struct fd_pipe *pipe = NULL; 39 struct fd_pipe *pipe = NULL;
@@ -59,18 +59,18 @@ fail:
59 return NULL; 59 return NULL;
60} 60}
61 61
62drm_public void fd_pipe_del(struct fd_pipe *pipe) 62void fd_pipe_del(struct fd_pipe *pipe)
63{ 63{
64 pipe->funcs->destroy(pipe); 64 pipe->funcs->destroy(pipe);
65} 65}
66 66
67drm_public int fd_pipe_get_param(struct fd_pipe *pipe, 67int fd_pipe_get_param(struct fd_pipe *pipe,
68 enum fd_param_id param, uint64_t *value) 68 enum fd_param_id param, uint64_t *value)
69{ 69{
70 return pipe->funcs->get_param(pipe, param, value); 70 return pipe->funcs->get_param(pipe, param, value);
71} 71}
72 72
73drm_public int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp) 73int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
74{ 74{
75 return pipe->funcs->wait(pipe, timestamp); 75 return pipe->funcs->wait(pipe, timestamp);
76} 76}
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 @@
36#include "freedreno_priv.h" 36#include "freedreno_priv.h"
37#include "freedreno_ringbuffer.h" 37#include "freedreno_ringbuffer.h"
38 38
39drm_public struct fd_ringbuffer * 39struct fd_ringbuffer *
40fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) 40fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
41{ 41{
42 struct fd_ringbuffer *ring; 42 struct fd_ringbuffer *ring;
@@ -55,7 +55,7 @@ fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
55 return ring; 55 return ring;
56} 56}
57 57
58drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring) 58void fd_ringbuffer_del(struct fd_ringbuffer *ring)
59{ 59{
60 ring->funcs->destroy(ring); 60 ring->funcs->destroy(ring);
61} 61}
@@ -64,13 +64,13 @@ drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring)
64 * the IB source) as it's parent before emitting reloc's, to ensure 64 * the IB source) as it's parent before emitting reloc's, to ensure
65 * the bookkeeping works out properly. 65 * the bookkeeping works out properly.
66 */ 66 */
67drm_public void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, 67void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
68 struct fd_ringbuffer *parent) 68 struct fd_ringbuffer *parent)
69{ 69{
70 ring->parent = parent; 70 ring->parent = parent;
71} 71}
72 72
73drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring) 73void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
74{ 74{
75 uint32_t *start = ring->start; 75 uint32_t *start = ring->start;
76 if (ring->pipe->id == FD_PIPE_2D) 76 if (ring->pipe->id == FD_PIPE_2D)
@@ -81,23 +81,23 @@ drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
81} 81}
82 82
83/* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */ 83/* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */
84drm_public int fd_ringbuffer_flush(struct fd_ringbuffer *ring) 84int fd_ringbuffer_flush(struct fd_ringbuffer *ring)
85{ 85{
86 return ring->funcs->flush(ring, ring->last_start); 86 return ring->funcs->flush(ring, ring->last_start);
87} 87}
88 88
89drm_public uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring) 89uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
90{ 90{
91 return ring->last_timestamp; 91 return ring->last_timestamp;
92} 92}
93 93
94drm_public void fd_ringbuffer_reloc(struct fd_ringbuffer *ring, 94void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
95 const struct fd_reloc *reloc) 95 const struct fd_reloc *reloc)
96{ 96{
97 ring->funcs->emit_reloc(ring, reloc); 97 ring->funcs->emit_reloc(ring, reloc);
98} 98}
99 99
100drm_public void 100void
101fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, 101fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
102 struct fd_ringmarker *target, 102 struct fd_ringmarker *target,
103 struct fd_ringmarker *end) 103 struct fd_ringmarker *end)
@@ -106,7 +106,7 @@ fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
106 ring->funcs->emit_reloc_ring(ring, target, end); 106 ring->funcs->emit_reloc_ring(ring, target, end);
107} 107}
108 108
109drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring) 109struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
110{ 110{
111 struct fd_ringmarker *marker = NULL; 111 struct fd_ringmarker *marker = NULL;
112 112
@@ -123,23 +123,23 @@ drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
123 return marker; 123 return marker;
124} 124}
125 125
126drm_public void fd_ringmarker_del(struct fd_ringmarker *marker) 126void fd_ringmarker_del(struct fd_ringmarker *marker)
127{ 127{
128 free(marker); 128 free(marker);
129} 129}
130 130
131drm_public void fd_ringmarker_mark(struct fd_ringmarker *marker) 131void fd_ringmarker_mark(struct fd_ringmarker *marker)
132{ 132{
133 marker->cur = marker->ring->cur; 133 marker->cur = marker->ring->cur;
134} 134}
135 135
136drm_public uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start, 136uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
137 struct fd_ringmarker *end) 137 struct fd_ringmarker *end)
138{ 138{
139 return end->cur - start->cur; 139 return end->cur - start->cur;
140} 140}
141 141
142drm_public int fd_ringmarker_flush(struct fd_ringmarker *marker) 142int fd_ringmarker_flush(struct fd_ringmarker *marker)
143{ 143{
144 struct fd_ringbuffer *ring = marker->ring; 144 struct fd_ringbuffer *ring = marker->ring;
145 return ring->funcs->flush(ring, marker->cur); 145 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,
175 return bo; 175 return bo;
176} 176}
177 177
178drm_public struct fd_bo * 178struct fd_bo *
179fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size) 179fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size)
180{ 180{
181 struct fd_bo *bo; 181 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 @@
47 * Convenience functions for buffer management methods. 47 * Convenience functions for buffer management methods.
48 */ 48 */
49 49
50drm_public drm_intel_bo * 50drm_intel_bo *
51drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name, 51drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name,
52 unsigned long size, unsigned int alignment) 52 unsigned long size, unsigned int alignment)
53{ 53{
54 return bufmgr->bo_alloc(bufmgr, name, size, alignment); 54 return bufmgr->bo_alloc(bufmgr, name, size, alignment);
55} 55}
56 56
57drm_public drm_intel_bo * 57drm_intel_bo *
58drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name, 58drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name,
59 unsigned long size, unsigned int alignment) 59 unsigned long size, unsigned int alignment)
60{ 60{
61 return bufmgr->bo_alloc_for_render(bufmgr, name, size, alignment); 61 return bufmgr->bo_alloc_for_render(bufmgr, name, size, alignment);
62} 62}
63 63
64drm_public drm_intel_bo * 64drm_intel_bo *
65drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, 65drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
66 const char *name, void *addr, 66 const char *name, void *addr,
67 uint32_t tiling_mode, 67 uint32_t tiling_mode,
@@ -75,7 +75,7 @@ drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,
75 return NULL; 75 return NULL;
76} 76}
77 77
78drm_public drm_intel_bo * 78drm_intel_bo *
79drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, 79drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
80 int x, int y, int cpp, uint32_t *tiling_mode, 80 int x, int y, int cpp, uint32_t *tiling_mode,
81 unsigned long *pitch, unsigned long flags) 81 unsigned long *pitch, unsigned long flags)
@@ -84,13 +84,13 @@ drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name,
84 tiling_mode, pitch, flags); 84 tiling_mode, pitch, flags);
85} 85}
86 86
87drm_public void 87void
88drm_intel_bo_reference(drm_intel_bo *bo) 88drm_intel_bo_reference(drm_intel_bo *bo)
89{ 89{
90 bo->bufmgr->bo_reference(bo); 90 bo->bufmgr->bo_reference(bo);
91} 91}
92 92
93drm_public void 93void
94drm_intel_bo_unreference(drm_intel_bo *bo) 94drm_intel_bo_unreference(drm_intel_bo *bo)
95{ 95{
96 if (bo == NULL) 96 if (bo == NULL)
@@ -99,26 +99,26 @@ drm_intel_bo_unreference(drm_intel_bo *bo)
99 bo->bufmgr->bo_unreference(bo); 99 bo->bufmgr->bo_unreference(bo);
100} 100}
101 101
102drm_public int 102int
103drm_intel_bo_map(drm_intel_bo *buf, int write_enable) 103drm_intel_bo_map(drm_intel_bo *buf, int write_enable)
104{ 104{
105 return buf->bufmgr->bo_map(buf, write_enable); 105 return buf->bufmgr->bo_map(buf, write_enable);
106} 106}
107 107
108drm_public int 108int
109drm_intel_bo_unmap(drm_intel_bo *buf) 109drm_intel_bo_unmap(drm_intel_bo *buf)
110{ 110{
111 return buf->bufmgr->bo_unmap(buf); 111 return buf->bufmgr->bo_unmap(buf);
112} 112}
113 113
114drm_public int 114int
115drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset, 115drm_intel_bo_subdata(drm_intel_bo *bo, unsigned long offset,
116 unsigned long size, const void *data) 116 unsigned long size, const void *data)
117{ 117{
118 return bo->bufmgr->bo_subdata(bo, offset, size, data); 118 return bo->bufmgr->bo_subdata(bo, offset, size, data);
119} 119}
120 120
121drm_public int 121int
122drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset, 122drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset,
123 unsigned long size, void *data) 123 unsigned long size, void *data)
124{ 124{
@@ -137,26 +137,26 @@ drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset,
137 return 0; 137 return 0;
138} 138}
139 139
140drm_public void 140void
141drm_intel_bo_wait_rendering(drm_intel_bo *bo) 141drm_intel_bo_wait_rendering(drm_intel_bo *bo)
142{ 142{
143 bo->bufmgr->bo_wait_rendering(bo); 143 bo->bufmgr->bo_wait_rendering(bo);
144} 144}
145 145
146drm_public void 146void
147drm_intel_bufmgr_destroy(drm_intel_bufmgr *bufmgr) 147drm_intel_bufmgr_destroy(drm_intel_bufmgr *bufmgr)
148{ 148{
149 bufmgr->destroy(bufmgr); 149 bufmgr->destroy(bufmgr);
150} 150}
151 151
152drm_public int 152int
153drm_intel_bo_exec(drm_intel_bo *bo, int used, 153drm_intel_bo_exec(drm_intel_bo *bo, int used,
154 drm_clip_rect_t * cliprects, int num_cliprects, int DR4) 154 drm_clip_rect_t * cliprects, int num_cliprects, int DR4)
155{ 155{
156 return bo->bufmgr->bo_exec(bo, used, cliprects, num_cliprects, DR4); 156 return bo->bufmgr->bo_exec(bo, used, cliprects, num_cliprects, DR4);
157} 157}
158 158
159drm_public int 159int
160drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, 160drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
161 drm_clip_rect_t *cliprects, int num_cliprects, int DR4, 161 drm_clip_rect_t *cliprects, int num_cliprects, int DR4,
162 unsigned int rings) 162 unsigned int rings)
@@ -176,19 +176,19 @@ drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used,
176 } 176 }
177} 177}
178 178
179drm_public void 179void
180drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug) 180drm_intel_bufmgr_set_debug(drm_intel_bufmgr *bufmgr, int enable_debug)
181{ 181{
182 bufmgr->debug = enable_debug; 182 bufmgr->debug = enable_debug;
183} 183}
184 184
185drm_public int 185int
186drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count) 186drm_intel_bufmgr_check_aperture_space(drm_intel_bo ** bo_array, int count)
187{ 187{
188 return bo_array[0]->bufmgr->check_aperture_space(bo_array, count); 188 return bo_array[0]->bufmgr->check_aperture_space(bo_array, count);
189} 189}
190 190
191drm_public int 191int
192drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name) 192drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name)
193{ 193{
194 if (bo->bufmgr->bo_flink) 194 if (bo->bufmgr->bo_flink)
@@ -197,7 +197,7 @@ drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name)
197 return -ENODEV; 197 return -ENODEV;
198} 198}
199 199
200drm_public int 200int
201drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, 201drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
202 drm_intel_bo *target_bo, uint32_t target_offset, 202 drm_intel_bo *target_bo, uint32_t target_offset,
203 uint32_t read_domains, uint32_t write_domain) 203 uint32_t read_domains, uint32_t write_domain)
@@ -208,7 +208,7 @@ drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
208} 208}
209 209
210/* For fence registers, not GL fences */ 210/* For fence registers, not GL fences */
211drm_public int 211int
212drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, 212drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset,
213 drm_intel_bo *target_bo, uint32_t target_offset, 213 drm_intel_bo *target_bo, uint32_t target_offset,
214 uint32_t read_domains, uint32_t write_domain) 214 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,
219} 219}
220 220
221 221
222drm_public int 222int
223drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment) 223drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment)
224{ 224{
225 if (bo->bufmgr->bo_pin) 225 if (bo->bufmgr->bo_pin)
@@ -228,7 +228,7 @@ drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment)
228 return -ENODEV; 228 return -ENODEV;
229} 229}
230 230
231drm_public int 231int
232drm_intel_bo_unpin(drm_intel_bo *bo) 232drm_intel_bo_unpin(drm_intel_bo *bo)
233{ 233{
234 if (bo->bufmgr->bo_unpin) 234 if (bo->bufmgr->bo_unpin)
@@ -237,7 +237,7 @@ drm_intel_bo_unpin(drm_intel_bo *bo)
237 return -ENODEV; 237 return -ENODEV;
238} 238}
239 239
240drm_public int 240int
241drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, 241drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
242 uint32_t stride) 242 uint32_t stride)
243{ 243{
@@ -248,7 +248,7 @@ drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
248 return 0; 248 return 0;
249} 249}
250 250
251drm_public int 251int
252drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode, 252drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
253 uint32_t * swizzle_mode) 253 uint32_t * swizzle_mode)
254{ 254{
@@ -260,7 +260,7 @@ drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
260 return 0; 260 return 0;
261} 261}
262 262
263drm_public int 263int
264drm_intel_bo_disable_reuse(drm_intel_bo *bo) 264drm_intel_bo_disable_reuse(drm_intel_bo *bo)
265{ 265{
266 if (bo->bufmgr->bo_disable_reuse) 266 if (bo->bufmgr->bo_disable_reuse)
@@ -268,7 +268,7 @@ drm_intel_bo_disable_reuse(drm_intel_bo *bo)
268 return 0; 268 return 0;
269} 269}
270 270
271drm_public int 271int
272drm_intel_bo_is_reusable(drm_intel_bo *bo) 272drm_intel_bo_is_reusable(drm_intel_bo *bo)
273{ 273{
274 if (bo->bufmgr->bo_is_reusable) 274 if (bo->bufmgr->bo_is_reusable)
@@ -276,7 +276,7 @@ drm_intel_bo_is_reusable(drm_intel_bo *bo)
276 return 0; 276 return 0;
277} 277}
278 278
279drm_public int 279int
280drm_intel_bo_busy(drm_intel_bo *bo) 280drm_intel_bo_busy(drm_intel_bo *bo)
281{ 281{
282 if (bo->bufmgr->bo_busy) 282 if (bo->bufmgr->bo_busy)
@@ -284,7 +284,7 @@ drm_intel_bo_busy(drm_intel_bo *bo)
284 return 0; 284 return 0;
285} 285}
286 286
287drm_public int 287int
288drm_intel_bo_madvise(drm_intel_bo *bo, int madv) 288drm_intel_bo_madvise(drm_intel_bo *bo, int madv)
289{ 289{
290 if (bo->bufmgr->bo_madvise) 290 if (bo->bufmgr->bo_madvise)
@@ -292,13 +292,13 @@ drm_intel_bo_madvise(drm_intel_bo *bo, int madv)
292 return -1; 292 return -1;
293} 293}
294 294
295drm_public int 295int
296drm_intel_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo) 296drm_intel_bo_references(drm_intel_bo *bo, drm_intel_bo *target_bo)
297{ 297{
298 return bo->bufmgr->bo_references(bo, target_bo); 298 return bo->bufmgr->bo_references(bo, target_bo);
299} 299}
300 300
301drm_public int 301int
302drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id) 302drm_intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, int crtc_id)
303{ 303{
304 if (bufmgr->get_pipe_from_crtc_id) 304 if (bufmgr->get_pipe_from_crtc_id)
@@ -332,7 +332,7 @@ err:
332 return size; 332 return size;
333} 333}
334 334
335drm_public int 335int
336drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total) 336drm_intel_get_aperture_sizes(int fd, size_t *mappable, size_t *total)
337{ 337{
338 338
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)
249 return 0; 249 return 0;
250} 250}
251 251
252drm_public void 252void
253drm_intel_bufmgr_fake_set_fence_callback(drm_intel_bufmgr *bufmgr, 253drm_intel_bufmgr_fake_set_fence_callback(drm_intel_bufmgr *bufmgr,
254 unsigned int (*emit) (void *priv), 254 unsigned int (*emit) (void *priv),
255 void (*wait) (unsigned int fence, 255 void (*wait) (unsigned int fence,
@@ -772,7 +772,7 @@ drm_intel_fake_bo_wait_rendering(drm_intel_bo *bo)
772 * -- just evict everything 772 * -- just evict everything
773 * -- and wait for idle 773 * -- and wait for idle
774 */ 774 */
775drm_public void 775void
776drm_intel_bufmgr_fake_contended_lock_take(drm_intel_bufmgr *bufmgr) 776drm_intel_bufmgr_fake_contended_lock_take(drm_intel_bufmgr *bufmgr)
777{ 777{
778 drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr; 778 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,
868 4096); 868 4096);
869} 869}
870 870
871drm_public drm_intel_bo * 871drm_intel_bo *
872drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr, 872drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr,
873 const char *name, 873 const char *name,
874 unsigned long offset, 874 unsigned long offset,
@@ -963,7 +963,7 @@ drm_intel_fake_bo_unreference(drm_intel_bo *bo)
963 * Set the buffer as not requiring backing store, and instead get the callback 963 * Set the buffer as not requiring backing store, and instead get the callback
964 * invoked whenever it would be set dirty. 964 * invoked whenever it would be set dirty.
965 */ 965 */
966drm_public void 966void
967drm_intel_bo_fake_disable_backing_store(drm_intel_bo *bo, 967drm_intel_bo_fake_disable_backing_store(drm_intel_bo *bo,
968 void (*invalidate_cb) (drm_intel_bo *bo, 968 void (*invalidate_cb) (drm_intel_bo *bo,
969 void *ptr), 969 void *ptr),
@@ -1417,7 +1417,7 @@ drm_intel_bo_fake_post_submit(drm_intel_bo *bo)
1417 bo_fake->write_domain = 0; 1417 bo_fake->write_domain = 0;
1418} 1418}
1419 1419
1420drm_public void 1420void
1421drm_intel_bufmgr_fake_set_exec_callback(drm_intel_bufmgr *bufmgr, 1421drm_intel_bufmgr_fake_set_exec_callback(drm_intel_bufmgr *bufmgr,
1422 int (*exec) (drm_intel_bo *bo, 1422 int (*exec) (drm_intel_bo *bo,
1423 unsigned int used, 1423 unsigned int used,
@@ -1540,7 +1540,7 @@ drm_intel_fake_check_aperture_space(drm_intel_bo ** bo_array, int count)
1540 * Used by the X Server on LeaveVT, when the card memory is no longer our 1540 * Used by the X Server on LeaveVT, when the card memory is no longer our
1541 * own. 1541 * own.
1542 */ 1542 */
1543drm_public void 1543void
1544drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr) 1544drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr)
1545{ 1545{
1546 drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr; 1546 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)
1575 pthread_mutex_unlock(&bufmgr_fake->lock); 1575 pthread_mutex_unlock(&bufmgr_fake->lock);
1576} 1576}
1577 1577
1578drm_public void 1578void
1579drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr, 1579drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr,
1580 volatile unsigned int 1580 volatile unsigned int
1581 *last_dispatch) 1581 *last_dispatch)
@@ -1585,7 +1585,7 @@ drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr,
1585 bufmgr_fake->last_dispatch = (volatile int *)last_dispatch; 1585 bufmgr_fake->last_dispatch = (volatile int *)last_dispatch;
1586} 1586}
1587 1587
1588drm_public drm_intel_bufmgr * 1588drm_intel_bufmgr *
1589drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset, 1589drm_intel_bufmgr_fake_init(int fd, unsigned long low_offset,
1590 void *low_virtual, unsigned long size, 1590 void *low_virtual, unsigned long size,
1591 volatile unsigned int *last_dispatch) 1591 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,
1007 * This can be used when one application needs to pass a buffer object 1007 * This can be used when one application needs to pass a buffer object
1008 * to another. 1008 * to another.
1009 */ 1009 */
1010drm_public drm_intel_bo * 1010drm_intel_bo *
1011drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr, 1011drm_intel_bo_gem_create_from_name(drm_intel_bufmgr *bufmgr,
1012 const char *name, 1012 const char *name,
1013 unsigned int handle) 1013 unsigned int handle)
@@ -1469,7 +1469,7 @@ map_gtt(drm_intel_bo *bo)
1469 return 0; 1469 return 0;
1470} 1470}
1471 1471
1472drm_public int 1472int
1473drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) 1473drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
1474{ 1474{
1475 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1475 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)
1528 * undefined). 1528 * undefined).
1529 */ 1529 */
1530 1530
1531drm_public int 1531int
1532drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo) 1532drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
1533{ 1533{
1534 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1534 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)
1617 return ret; 1617 return ret;
1618} 1618}
1619 1619
1620drm_public int 1620int
1621drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo) 1621drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo)
1622{ 1622{
1623 return drm_intel_gem_bo_unmap(bo); 1623 return drm_intel_gem_bo_unmap(bo);
@@ -1742,7 +1742,7 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)
1742 * Note that some kernels have broken the inifite wait for negative values 1742 * Note that some kernels have broken the inifite wait for negative values
1743 * promise, upgrade to latest stable kernels if this is the case. 1743 * promise, upgrade to latest stable kernels if this is the case.
1744 */ 1744 */
1745drm_public int 1745int
1746drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns) 1746drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns)
1747{ 1747{
1748 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1748 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)
1778 * In combination with drm_intel_gem_bo_pin() and manual fence management, we 1778 * In combination with drm_intel_gem_bo_pin() and manual fence management, we
1779 * can do tiled pixmaps this way. 1779 * can do tiled pixmaps this way.
1780 */ 1780 */
1781drm_public void 1781void
1782drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable) 1782drm_intel_gem_bo_start_gtt_access(drm_intel_bo *bo, int write_enable)
1783{ 1783{
1784 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1784 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,
1941 read_domains, write_domain, true); 1941 read_domains, write_domain, true);
1942} 1942}
1943 1943
1944drm_public int 1944int
1945drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo) 1945drm_intel_gem_bo_get_reloc_count(drm_intel_bo *bo)
1946{ 1946{
1947 drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; 1947 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)
1962 * Any further drm_intel_bufmgr_check_aperture_space() queries 1962 * Any further drm_intel_bufmgr_check_aperture_space() queries
1963 * involving this buffer in the tree are undefined after this call. 1963 * involving this buffer in the tree are undefined after this call.
1964 */ 1964 */
1965drm_public void 1965void
1966drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start) 1966drm_intel_gem_bo_clear_relocs(drm_intel_bo *bo, int start)
1967{ 1967{
1968 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1968 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,
2298 bufmgr_gem->aub_offset += 4096; 2298 bufmgr_gem->aub_offset += 4096;
2299} 2299}
2300 2300
2301drm_public void 2301void
2302drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo, 2302drm_intel_gem_bo_aub_dump_bmp(drm_intel_bo *bo,
2303 int x1, int y1, int width, int height, 2303 int x1, int y1, int width, int height,
2304 enum aub_dump_bmp_format format, 2304 enum aub_dump_bmp_format format,
@@ -2569,7 +2569,7 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used,
2569 flags); 2569 flags);
2570} 2570}
2571 2571
2572drm_public int 2572int
2573drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx, 2573drm_intel_gem_bo_context_exec(drm_intel_bo *bo, drm_intel_context *ctx,
2574 int used, unsigned int flags) 2574 int used, unsigned int flags)
2575{ 2575{
@@ -2694,7 +2694,7 @@ drm_intel_gem_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,
2694 return 0; 2694 return 0;
2695} 2695}
2696 2696
2697drm_public drm_intel_bo * 2697drm_intel_bo *
2698drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int size) 2698drm_intel_bo_gem_create_from_prime(drm_intel_bufmgr *bufmgr, int prime_fd, int size)
2699{ 2699{
2700 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; 2700 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
2780 return &bo_gem->bo; 2780 return &bo_gem->bo;
2781} 2781}
2782 2782
2783drm_public int 2783int
2784drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd) 2784drm_intel_bo_gem_export_to_prime(drm_intel_bo *bo, int *prime_fd)
2785{ 2785{
2786 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 2786 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)
2840 * size is only bounded by how many buffers of that size we've managed to have 2840 * size is only bounded by how many buffers of that size we've managed to have
2841 * in flight at once. 2841 * in flight at once.
2842 */ 2842 */
2843drm_public void 2843void
2844drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr) 2844drm_intel_bufmgr_gem_enable_reuse(drm_intel_bufmgr *bufmgr)
2845{ 2845{
2846 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bufmgr; 2846 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)
2855 * allocation. If this option is not enabled, all relocs will have fence 2855 * allocation. If this option is not enabled, all relocs will have fence
2856 * register allocated. 2856 * register allocated.
2857 */ 2857 */
2858drm_public void 2858void
2859drm_intel_bufmgr_gem_enable_fenced_relocs(drm_intel_bufmgr *bufmgr) 2859drm_intel_bufmgr_gem_enable_fenced_relocs(drm_intel_bufmgr *bufmgr)
2860{ 2860{
2861 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; 2861 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3127,7 +3127,7 @@ init_cache_buckets(drm_intel_bufmgr_gem *bufmgr_gem)
3127 } 3127 }
3128} 3128}
3129 3129
3130drm_public void 3130void
3131drm_intel_bufmgr_gem_set_vma_cache_size(drm_intel_bufmgr *bufmgr, int limit) 3131drm_intel_bufmgr_gem_set_vma_cache_size(drm_intel_bufmgr *bufmgr, int limit)
3132{ 3132{
3133 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; 3133 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)
3168 return devid; 3168 return devid;
3169} 3169}
3170 3170
3171drm_public int 3171int
3172drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr) 3172drm_intel_bufmgr_gem_get_devid(drm_intel_bufmgr *bufmgr)
3173{ 3173{
3174 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; 3174 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)
3182 * This function has to be called before drm_intel_bufmgr_gem_set_aub_dump() 3182 * This function has to be called before drm_intel_bufmgr_gem_set_aub_dump()
3183 * for it to have any effect. 3183 * for it to have any effect.
3184 */ 3184 */
3185drm_public void 3185void
3186drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr, 3186drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr,
3187 const char *filename) 3187 const char *filename)
3188{ 3188{
@@ -3201,7 +3201,7 @@ drm_intel_bufmgr_gem_set_aub_filename(drm_intel_bufmgr *bufmgr,
3201 * You can set up a GTT and upload your objects into the referenced 3201 * You can set up a GTT and upload your objects into the referenced
3202 * space, then send off batchbuffers and get BMPs out the other end. 3202 * space, then send off batchbuffers and get BMPs out the other end.
3203 */ 3203 */
3204drm_public void 3204void
3205drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable) 3205drm_intel_bufmgr_gem_set_aub_dump(drm_intel_bufmgr *bufmgr, int enable)
3206{ 3206{
3207 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; 3207 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)
3258 } 3258 }
3259} 3259}
3260 3260
3261drm_public drm_intel_context * 3261drm_intel_context *
3262drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr) 3262drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
3263{ 3263{
3264 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr; 3264 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *)bufmgr;
@@ -3285,7 +3285,7 @@ drm_intel_gem_context_create(drm_intel_bufmgr *bufmgr)
3285 return context; 3285 return context;
3286} 3286}
3287 3287
3288drm_public void 3288void
3289drm_intel_gem_context_destroy(drm_intel_context *ctx) 3289drm_intel_gem_context_destroy(drm_intel_context *ctx)
3290{ 3290{
3291 drm_intel_bufmgr_gem *bufmgr_gem; 3291 drm_intel_bufmgr_gem *bufmgr_gem;
@@ -3308,7 +3308,7 @@ drm_intel_gem_context_destroy(drm_intel_context *ctx)
3308 free(ctx); 3308 free(ctx);
3309} 3309}
3310 3310
3311drm_public int 3311int
3312drm_intel_get_reset_stats(drm_intel_context *ctx, 3312drm_intel_get_reset_stats(drm_intel_context *ctx,
3313 uint32_t *reset_count, 3313 uint32_t *reset_count,
3314 uint32_t *active, 3314 uint32_t *active,
@@ -3342,7 +3342,7 @@ drm_intel_get_reset_stats(drm_intel_context *ctx,
3342 return ret; 3342 return ret;
3343} 3343}
3344 3344
3345drm_public int 3345int
3346drm_intel_reg_read(drm_intel_bufmgr *bufmgr, 3346drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
3347 uint32_t offset, 3347 uint32_t offset,
3348 uint64_t *result) 3348 uint64_t *result)
@@ -3360,7 +3360,7 @@ drm_intel_reg_read(drm_intel_bufmgr *bufmgr,
3360 return ret; 3360 return ret;
3361} 3361}
3362 3362
3363drm_public int 3363int
3364drm_intel_get_subslice_total(int fd, unsigned int *subslice_total) 3364drm_intel_get_subslice_total(int fd, unsigned int *subslice_total)
3365{ 3365{
3366 drm_i915_getparam_t gp; 3366 drm_i915_getparam_t gp;
@@ -3376,7 +3376,7 @@ drm_intel_get_subslice_total(int fd, unsigned int *subslice_total)
3376 return 0; 3376 return 0;
3377} 3377}
3378 3378
3379drm_public int 3379int
3380drm_intel_get_eu_total(int fd, unsigned int *eu_total) 3380drm_intel_get_eu_total(int fd, unsigned int *eu_total)
3381{ 3381{
3382 drm_i915_getparam_t gp; 3382 drm_i915_getparam_t gp;
@@ -3413,7 +3413,7 @@ drm_intel_get_eu_total(int fd, unsigned int *eu_total)
3413 * default state (no annotations), call this function with a \c count 3413 * default state (no annotations), call this function with a \c count
3414 * of zero. 3414 * of zero.
3415 */ 3415 */
3416drm_public void 3416void
3417drm_intel_bufmgr_gem_set_aub_annotations(drm_intel_bo *bo, 3417drm_intel_bufmgr_gem_set_aub_annotations(drm_intel_bo *bo,
3418 drm_intel_aub_annotation *annotations, 3418 drm_intel_aub_annotation *annotations,
3419 unsigned count) 3419 unsigned count)
@@ -3474,7 +3474,7 @@ drm_intel_bufmgr_gem_unref(drm_intel_bufmgr *bufmgr)
3474 * 3474 *
3475 * \param fd File descriptor of the opened DRM device. 3475 * \param fd File descriptor of the opened DRM device.
3476 */ 3476 */
3477drm_public drm_intel_bufmgr * 3477drm_intel_bufmgr *
3478drm_intel_bufmgr_gem_init(int fd, int batch_size) 3478drm_intel_bufmgr_gem_init(int fd, int batch_size)
3479{ 3479{
3480 drm_intel_bufmgr_gem *bufmgr_gem; 3480 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)
3817 return 1; 3817 return 1;
3818} 3818}
3819 3819
3820drm_public struct drm_intel_decode * 3820struct drm_intel_decode *
3821drm_intel_decode_context_alloc(uint32_t devid) 3821drm_intel_decode_context_alloc(uint32_t devid)
3822{ 3822{
3823 struct drm_intel_decode *ctx; 3823 struct drm_intel_decode *ctx;
@@ -3851,20 +3851,20 @@ drm_intel_decode_context_alloc(uint32_t devid)
3851 return ctx; 3851 return ctx;
3852} 3852}
3853 3853
3854drm_public void 3854void
3855drm_intel_decode_context_free(struct drm_intel_decode *ctx) 3855drm_intel_decode_context_free(struct drm_intel_decode *ctx)
3856{ 3856{
3857 free(ctx); 3857 free(ctx);
3858} 3858}
3859 3859
3860drm_public void 3860void
3861drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx, 3861drm_intel_decode_set_dump_past_end(struct drm_intel_decode *ctx,
3862 int dump_past_end) 3862 int dump_past_end)
3863{ 3863{
3864 ctx->dump_past_end = !!dump_past_end; 3864 ctx->dump_past_end = !!dump_past_end;
3865} 3865}
3866 3866
3867drm_public void 3867void
3868drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx, 3868drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
3869 void *data, uint32_t hw_offset, int count) 3869 void *data, uint32_t hw_offset, int count)
3870{ 3870{
@@ -3873,7 +3873,7 @@ drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx,
3873 ctx->base_count = count; 3873 ctx->base_count = count;
3874} 3874}
3875 3875
3876drm_public void 3876void
3877drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx, 3877drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
3878 uint32_t head, uint32_t tail) 3878 uint32_t head, uint32_t tail)
3879{ 3879{
@@ -3881,7 +3881,7 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx,
3881 ctx->tail = tail; 3881 ctx->tail = tail;
3882} 3882}
3883 3883
3884drm_public void 3884void
3885drm_intel_decode_set_output_file(struct drm_intel_decode *ctx, 3885drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
3886 FILE *out) 3886 FILE *out)
3887{ 3887{
@@ -3895,7 +3895,7 @@ drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,
3895 * \param count number of DWORDs to decode in the batch buffer 3895 * \param count number of DWORDs to decode in the batch buffer
3896 * \param hw_offset hardware address for the buffer 3896 * \param hw_offset hardware address for the buffer
3897 */ 3897 */
3898drm_public void 3898void
3899drm_intel_decode(struct drm_intel_decode *ctx) 3899drm_intel_decode(struct drm_intel_decode *ctx)
3900{ 3900{
3901 int ret; 3901 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 @@
25 25
26#if defined(HAVE_VISIBILITY) 26#if defined(HAVE_VISIBILITY)
27# define drm_private __attribute__((visibility("hidden"))) 27# define drm_private __attribute__((visibility("hidden")))
28# define drm_public __attribute__((visibility("default")))
29#else 28#else
30# define drm_private 29# define drm_private
31# define drm_public
32#endif 30#endif
33 31
34 32
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)
62 return (struct nouveau_bufctx_priv *)bctx; 62 return (struct nouveau_bufctx_priv *)bctx;
63} 63}
64 64
65drm_public int 65int
66nouveau_bufctx_new(struct nouveau_client *client, int bins, 66nouveau_bufctx_new(struct nouveau_client *client, int bins,
67 struct nouveau_bufctx **pbctx) 67 struct nouveau_bufctx **pbctx)
68{ 68{
@@ -82,7 +82,7 @@ nouveau_bufctx_new(struct nouveau_client *client, int bins,
82 return -ENOMEM; 82 return -ENOMEM;
83} 83}
84 84
85drm_public void 85void
86nouveau_bufctx_del(struct nouveau_bufctx **pbctx) 86nouveau_bufctx_del(struct nouveau_bufctx **pbctx)
87{ 87{
88 struct nouveau_bufctx_priv *pctx = nouveau_bufctx(*pbctx); 88 struct nouveau_bufctx_priv *pctx = nouveau_bufctx(*pbctx);
@@ -99,7 +99,7 @@ nouveau_bufctx_del(struct nouveau_bufctx **pbctx)
99 } 99 }
100} 100}
101 101
102drm_public void 102void
103nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin) 103nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin)
104{ 104{
105 struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx); 105 struct nouveau_bufctx_priv *pctx = nouveau_bufctx(bctx);
@@ -117,7 +117,7 @@ nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin)
117 pbin->relocs = 0; 117 pbin->relocs = 0;
118} 118}
119 119
120drm_public struct nouveau_bufref * 120struct nouveau_bufref *
121nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin, 121nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,
122 struct nouveau_bo *bo, uint32_t flags) 122 struct nouveau_bo *bo, uint32_t flags)
123{ 123{
@@ -144,7 +144,7 @@ nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,
144 return &pref->base; 144 return &pref->base;
145} 145}
146 146
147drm_public struct nouveau_bufref * 147struct nouveau_bufref *
148nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet, 148nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet,
149 struct nouveau_bo *bo, uint64_t data, uint32_t flags, 149 struct nouveau_bo *bo, uint64_t data, uint32_t flags,
150 uint32_t vor, uint32_t tor) 150 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)
62 * is kept here to prevent AIGLX from crashing if the DDX is linked against 62 * is kept here to prevent AIGLX from crashing if the DDX is linked against
63 * the new libdrm, but the DRI driver against the old 63 * the new libdrm, but the DRI driver against the old
64 */ 64 */
65drm_public int 65int
66nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd, 66nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd,
67 drm_context_t ctx) 67 drm_context_t ctx)
68{ 68{
69 return -EACCES; 69 return -EACCES;
70} 70}
71 71
72drm_public int 72int
73nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) 73nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
74{ 74{
75 struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev)); 75 struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev));
@@ -147,7 +147,7 @@ nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev)
147 return 0; 147 return 0;
148} 148}
149 149
150drm_public int 150int
151nouveau_device_open(const char *busid, struct nouveau_device **pdev) 151nouveau_device_open(const char *busid, struct nouveau_device **pdev)
152{ 152{
153 int ret = -ENODEV, fd = drmOpen("nouveau", busid); 153 int ret = -ENODEV, fd = drmOpen("nouveau", busid);
@@ -159,7 +159,7 @@ nouveau_device_open(const char *busid, struct nouveau_device **pdev)
159 return ret; 159 return ret;
160} 160}
161 161
162drm_public void 162void
163nouveau_device_del(struct nouveau_device **pdev) 163nouveau_device_del(struct nouveau_device **pdev)
164{ 164{
165 struct nouveau_device_priv *nvdev = nouveau_device(*pdev); 165 struct nouveau_device_priv *nvdev = nouveau_device(*pdev);
@@ -173,7 +173,7 @@ nouveau_device_del(struct nouveau_device **pdev)
173 } 173 }
174} 174}
175 175
176drm_public int 176int
177nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value) 177nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value)
178{ 178{
179 struct drm_nouveau_getparam r = { param, 0 }; 179 struct drm_nouveau_getparam r = { param, 0 };
@@ -183,14 +183,14 @@ nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value)
183 return ret; 183 return ret;
184} 184}
185 185
186drm_public int 186int
187nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value) 187nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value)
188{ 188{
189 struct drm_nouveau_setparam r = { param, value }; 189 struct drm_nouveau_setparam r = { param, value };
190 return drmCommandWrite(dev->fd, DRM_NOUVEAU_SETPARAM, &r, sizeof(r)); 190 return drmCommandWrite(dev->fd, DRM_NOUVEAU_SETPARAM, &r, sizeof(r));
191} 191}
192 192
193drm_public int 193int
194nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient) 194nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient)
195{ 195{
196 struct nouveau_device_priv *nvdev = nouveau_device(dev); 196 struct nouveau_device_priv *nvdev = nouveau_device(dev);
@@ -229,7 +229,7 @@ unlock:
229 return ret; 229 return ret;
230} 230}
231 231
232drm_public void 232void
233nouveau_client_del(struct nouveau_client **pclient) 233nouveau_client_del(struct nouveau_client **pclient)
234{ 234{
235 struct nouveau_client_priv *pcli = nouveau_client(*pclient); 235 struct nouveau_client_priv *pcli = nouveau_client(*pclient);
@@ -245,7 +245,7 @@ nouveau_client_del(struct nouveau_client **pclient)
245 } 245 }
246} 246}
247 247
248drm_public int 248int
249nouveau_object_new(struct nouveau_object *parent, uint64_t handle, 249nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
250 uint32_t oclass, void *data, uint32_t length, 250 uint32_t oclass, void *data, uint32_t length,
251 struct nouveau_object **pobj) 251 struct nouveau_object **pobj)
@@ -307,7 +307,7 @@ nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
307 return 0; 307 return 0;
308} 308}
309 309
310drm_public void 310void
311nouveau_object_del(struct nouveau_object **pobj) 311nouveau_object_del(struct nouveau_object **pobj)
312{ 312{
313 struct nouveau_object *obj = *pobj; 313 struct nouveau_object *obj = *pobj;
@@ -331,7 +331,7 @@ nouveau_object_del(struct nouveau_object **pobj)
331 *pobj = NULL; 331 *pobj = NULL;
332} 332}
333 333
334drm_public void * 334void *
335nouveau_object_find(struct nouveau_object *obj, uint32_t pclass) 335nouveau_object_find(struct nouveau_object *obj, uint32_t pclass)
336{ 336{
337 while (obj && obj->oclass != pclass) { 337 while (obj && obj->oclass != pclass) {
@@ -372,7 +372,7 @@ nouveau_bo_del(struct nouveau_bo *bo)
372 free(nvbo); 372 free(nvbo);
373} 373}
374 374
375drm_public int 375int
376nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align, 376nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align,
377 uint64_t size, union nouveau_bo_config *config, 377 uint64_t size, union nouveau_bo_config *config,
378 struct nouveau_bo **pbo) 378 struct nouveau_bo **pbo)
@@ -462,7 +462,7 @@ nouveau_bo_make_global(struct nouveau_bo_priv *nvbo)
462 } 462 }
463} 463}
464 464
465drm_public int 465int
466nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, 466nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
467 struct nouveau_bo **pbo) 467 struct nouveau_bo **pbo)
468{ 468{
@@ -474,7 +474,7 @@ nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle,
474 return ret; 474 return ret;
475} 475}
476 476
477drm_public int 477int
478nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name, 478nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name,
479 struct nouveau_bo **pbo) 479 struct nouveau_bo **pbo)
480{ 480{
@@ -492,7 +492,7 @@ nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name,
492 return ret; 492 return ret;
493} 493}
494 494
495drm_public int 495int
496nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name) 496nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name)
497{ 497{
498 struct drm_gem_flink req = { .handle = bo->handle }; 498 struct drm_gem_flink req = { .handle = bo->handle };
@@ -513,7 +513,7 @@ nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name)
513 return 0; 513 return 0;
514} 514}
515 515
516drm_public void 516void
517nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref) 517nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref)
518{ 518{
519 struct nouveau_bo *ref = *pref; 519 struct nouveau_bo *ref = *pref;
@@ -527,7 +527,7 @@ nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref)
527 *pref = bo; 527 *pref = bo;
528} 528}
529 529
530drm_public int 530int
531nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd, 531nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd,
532 struct nouveau_bo **bo) 532 struct nouveau_bo **bo)
533{ 533{
@@ -546,7 +546,7 @@ nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd,
546 return ret; 546 return ret;
547} 547}
548 548
549drm_public int 549int
550nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd) 550nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd)
551{ 551{
552 struct nouveau_bo_priv *nvbo = nouveau_bo(bo); 552 struct nouveau_bo_priv *nvbo = nouveau_bo(bo);
@@ -560,7 +560,7 @@ nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd)
560 return 0; 560 return 0;
561} 561}
562 562
563drm_public int 563int
564nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access, 564nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
565 struct nouveau_client *client) 565 struct nouveau_client *client)
566{ 566{
@@ -594,7 +594,7 @@ nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access,
594 return ret; 594 return ret;
595} 595}
596 596
597drm_public int 597int
598nouveau_bo_map(struct nouveau_bo *bo, uint32_t access, 598nouveau_bo_map(struct nouveau_bo *bo, uint32_t access,
599 struct nouveau_client *client) 599 struct nouveau_client *client)
600{ 600{
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)
529 return ret; 529 return ret;
530} 530}
531 531
532drm_public int 532int
533nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan, 533nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
534 int nr, uint32_t size, bool immediate, 534 int nr, uint32_t size, bool immediate,
535 struct nouveau_pushbuf **ppush) 535 struct nouveau_pushbuf **ppush)
@@ -600,7 +600,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
600 return 0; 600 return 0;
601} 601}
602 602
603drm_public void 603void
604nouveau_pushbuf_del(struct nouveau_pushbuf **ppush) 604nouveau_pushbuf_del(struct nouveau_pushbuf **ppush)
605{ 605{
606 struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(*ppush); 606 struct nouveau_pushbuf_priv *nvpb = nouveau_pushbuf(*ppush);
@@ -626,7 +626,7 @@ nouveau_pushbuf_del(struct nouveau_pushbuf **ppush)
626 *ppush = NULL; 626 *ppush = NULL;
627} 627}
628 628
629drm_public struct nouveau_bufctx * 629struct nouveau_bufctx *
630nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx) 630nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx)
631{ 631{
632 struct nouveau_bufctx *prev = push->bufctx; 632 struct nouveau_bufctx *prev = push->bufctx;
@@ -634,7 +634,7 @@ nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx)
634 return prev; 634 return prev;
635} 635}
636 636
637drm_public int 637int
638nouveau_pushbuf_space(struct nouveau_pushbuf *push, 638nouveau_pushbuf_space(struct nouveau_pushbuf *push,
639 uint32_t dwords, uint32_t relocs, uint32_t pushes) 639 uint32_t dwords, uint32_t relocs, uint32_t pushes)
640{ 640{
@@ -698,7 +698,7 @@ nouveau_pushbuf_space(struct nouveau_pushbuf *push,
698 return flushed ? pushbuf_validate(push, false) : 0; 698 return flushed ? pushbuf_validate(push, false) : 0;
699} 699}
700 700
701drm_public void 701void
702nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo, 702nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
703 uint64_t offset, uint64_t length) 703 uint64_t offset, uint64_t length)
704{ 704{
@@ -728,14 +728,14 @@ nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
728 } 728 }
729} 729}
730 730
731drm_public int 731int
732nouveau_pushbuf_refn(struct nouveau_pushbuf *push, 732nouveau_pushbuf_refn(struct nouveau_pushbuf *push,
733 struct nouveau_pushbuf_refn *refs, int nr) 733 struct nouveau_pushbuf_refn *refs, int nr)
734{ 734{
735 return pushbuf_refn(push, true, refs, nr); 735 return pushbuf_refn(push, true, refs, nr);
736} 736}
737 737
738drm_public void 738void
739nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo, 739nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
740 uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor) 740 uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor)
741{ 741{
@@ -743,13 +743,13 @@ nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
743 push->cur++; 743 push->cur++;
744} 744}
745 745
746drm_public int 746int
747nouveau_pushbuf_validate(struct nouveau_pushbuf *push) 747nouveau_pushbuf_validate(struct nouveau_pushbuf *push)
748{ 748{
749 return pushbuf_validate(push, true); 749 return pushbuf_validate(push, true);
750} 750}
751 751
752drm_public uint32_t 752uint32_t
753nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo) 753nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo)
754{ 754{
755 struct drm_nouveau_gem_pushbuf_bo *kref; 755 struct drm_nouveau_gem_pushbuf_bo *kref;
@@ -766,7 +766,7 @@ nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo)
766 return flags; 766 return flags;
767} 767}
768 768
769drm_public int 769int
770nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan) 770nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan)
771{ 771{
772 if (!push->channel) 772 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)
92 return dev; 92 return dev;
93} 93}
94 94
95drm_public struct omap_device * omap_device_new(int fd) 95struct omap_device * omap_device_new(int fd)
96{ 96{
97 struct omap_device *dev = NULL; 97 struct omap_device *dev = NULL;
98 98
@@ -115,13 +115,13 @@ drm_public struct omap_device * omap_device_new(int fd)
115 return dev; 115 return dev;
116} 116}
117 117
118drm_public struct omap_device * omap_device_ref(struct omap_device *dev) 118struct omap_device * omap_device_ref(struct omap_device *dev)
119{ 119{
120 atomic_inc(&dev->refcnt); 120 atomic_inc(&dev->refcnt);
121 return dev; 121 return dev;
122} 122}
123 123
124drm_public void omap_device_del(struct omap_device *dev) 124void omap_device_del(struct omap_device *dev)
125{ 125{
126 if (!atomic_dec_and_test(&dev->refcnt)) 126 if (!atomic_dec_and_test(&dev->refcnt))
127 return; 127 return;
@@ -132,7 +132,7 @@ drm_public void omap_device_del(struct omap_device *dev)
132 free(dev); 132 free(dev);
133} 133}
134 134
135drm_public int 135int
136omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) 136omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
137{ 137{
138 struct drm_omap_param req = { 138 struct drm_omap_param req = {
@@ -150,7 +150,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
150 return 0; 150 return 0;
151} 151}
152 152
153drm_public int 153int
154omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) 154omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value)
155{ 155{
156 struct drm_omap_param req = { 156 struct drm_omap_param req = {
@@ -229,7 +229,7 @@ fail:
229 229
230 230
231/* allocate a new (un-tiled) buffer object */ 231/* allocate a new (un-tiled) buffer object */
232drm_public struct omap_bo * 232struct omap_bo *
233omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) 233omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)
234{ 234{
235 union omap_gem_size gsize = { 235 union omap_gem_size gsize = {
@@ -242,7 +242,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)
242} 242}
243 243
244/* allocate a new buffer object */ 244/* allocate a new buffer object */
245drm_public struct omap_bo * 245struct omap_bo *
246omap_bo_new_tiled(struct omap_device *dev, uint32_t width, 246omap_bo_new_tiled(struct omap_device *dev, uint32_t width,
247 uint32_t height, uint32_t flags) 247 uint32_t height, uint32_t flags)
248{ 248{
@@ -258,7 +258,7 @@ omap_bo_new_tiled(struct omap_device *dev, uint32_t width,
258 return omap_bo_new_impl(dev, gsize, flags); 258 return omap_bo_new_impl(dev, gsize, flags);
259} 259}
260 260
261drm_public struct omap_bo *omap_bo_ref(struct omap_bo *bo) 261struct omap_bo *omap_bo_ref(struct omap_bo *bo)
262{ 262{
263 atomic_inc(&bo->refcnt); 263 atomic_inc(&bo->refcnt);
264 return bo; 264 return bo;
@@ -284,7 +284,7 @@ static int get_buffer_info(struct omap_bo *bo)
284} 284}
285 285
286/* import a buffer object from DRI2 name */ 286/* import a buffer object from DRI2 name */
287drm_public struct omap_bo * 287struct omap_bo *
288omap_bo_from_name(struct omap_device *dev, uint32_t name) 288omap_bo_from_name(struct omap_device *dev, uint32_t name)
289{ 289{
290 struct omap_bo *bo = NULL; 290 struct omap_bo *bo = NULL;
@@ -318,7 +318,7 @@ fail:
318 * fd so caller should close() the fd when it is otherwise done 318 * fd so caller should close() the fd when it is otherwise done
319 * with it (even if it is still using the 'struct omap_bo *') 319 * with it (even if it is still using the 'struct omap_bo *')
320 */ 320 */
321drm_public struct omap_bo * 321struct omap_bo *
322omap_bo_from_dmabuf(struct omap_device *dev, int fd) 322omap_bo_from_dmabuf(struct omap_device *dev, int fd)
323{ 323{
324 struct omap_bo *bo = NULL; 324 struct omap_bo *bo = NULL;
@@ -350,7 +350,7 @@ fail:
350} 350}
351 351
352/* destroy a buffer object */ 352/* destroy a buffer object */
353drm_public void omap_bo_del(struct omap_bo *bo) 353void omap_bo_del(struct omap_bo *bo)
354{ 354{
355 if (!bo) { 355 if (!bo) {
356 return; 356 return;
@@ -383,7 +383,7 @@ drm_public void omap_bo_del(struct omap_bo *bo)
383} 383}
384 384
385/* get the global flink/DRI2 buffer name */ 385/* get the global flink/DRI2 buffer name */
386drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) 386int omap_bo_get_name(struct omap_bo *bo, uint32_t *name)
387{ 387{
388 if (!bo->name) { 388 if (!bo->name) {
389 struct drm_gem_flink req = { 389 struct drm_gem_flink req = {
@@ -404,7 +404,7 @@ drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name)
404 return 0; 404 return 0;
405} 405}
406 406
407drm_public uint32_t omap_bo_handle(struct omap_bo *bo) 407uint32_t omap_bo_handle(struct omap_bo *bo)
408{ 408{
409 return bo->handle; 409 return bo->handle;
410} 410}
@@ -412,7 +412,7 @@ drm_public uint32_t omap_bo_handle(struct omap_bo *bo)
412/* caller owns the dmabuf fd that is returned and is responsible 412/* caller owns the dmabuf fd that is returned and is responsible
413 * to close() it when done 413 * to close() it when done
414 */ 414 */
415drm_public int omap_bo_dmabuf(struct omap_bo *bo) 415int omap_bo_dmabuf(struct omap_bo *bo)
416{ 416{
417 if (!bo->fd) { 417 if (!bo->fd) {
418 struct drm_prime_handle req = { 418 struct drm_prime_handle req = {
@@ -431,7 +431,7 @@ drm_public int omap_bo_dmabuf(struct omap_bo *bo)
431 return dup(bo->fd); 431 return dup(bo->fd);
432} 432}
433 433
434drm_public uint32_t omap_bo_size(struct omap_bo *bo) 434uint32_t omap_bo_size(struct omap_bo *bo)
435{ 435{
436 if (!bo->size) { 436 if (!bo->size) {
437 get_buffer_info(bo); 437 get_buffer_info(bo);
@@ -439,7 +439,7 @@ drm_public uint32_t omap_bo_size(struct omap_bo *bo)
439 return bo->size; 439 return bo->size;
440} 440}
441 441
442drm_public void *omap_bo_map(struct omap_bo *bo) 442void *omap_bo_map(struct omap_bo *bo)
443{ 443{
444 if (!bo->map) { 444 if (!bo->map) {
445 if (!bo->offset) { 445 if (!bo->offset) {
@@ -455,7 +455,7 @@ drm_public void *omap_bo_map(struct omap_bo *bo)
455 return bo->map; 455 return bo->map;
456} 456}
457 457
458drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) 458int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op)
459{ 459{
460 struct drm_omap_gem_cpu_prep req = { 460 struct drm_omap_gem_cpu_prep req = {
461 .handle = bo->handle, 461 .handle = bo->handle,
@@ -465,7 +465,7 @@ drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op)
465 DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req)); 465 DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req));
466} 466}
467 467
468drm_public int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) 468int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op)
469{ 469{
470 struct drm_omap_gem_cpu_fini req = { 470 struct drm_omap_gem_cpu_fini req = {
471 .handle = bo->handle, 471 .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 @@
36#include <radeon_bo.h> 36#include <radeon_bo.h>
37#include <radeon_bo_int.h> 37#include <radeon_bo_int.h>
38 38
39drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op) 39void radeon_bo_debug(struct radeon_bo *bo, const char *op)
40{ 40{
41 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 41 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
42 42
@@ -44,7 +44,7 @@ drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op)
44 op, bo, bo->handle, boi->size, boi->cref); 44 op, bo, bo->handle, boi->size, boi->cref);
45} 45}
46 46
47drm_public struct radeon_bo * 47struct radeon_bo *
48radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size, 48radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size,
49 uint32_t alignment, uint32_t domains, uint32_t flags) 49 uint32_t alignment, uint32_t domains, uint32_t flags)
50{ 50{
@@ -53,14 +53,14 @@ radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size,
53 return bo; 53 return bo;
54} 54}
55 55
56drm_public void radeon_bo_ref(struct radeon_bo *bo) 56void radeon_bo_ref(struct radeon_bo *bo)
57{ 57{
58 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 58 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
59 boi->cref++; 59 boi->cref++;
60 boi->bom->funcs->bo_ref(boi); 60 boi->bom->funcs->bo_ref(boi);
61} 61}
62 62
63drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) 63struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo)
64{ 64{
65 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 65 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
66 if (bo == NULL) 66 if (bo == NULL)
@@ -70,19 +70,19 @@ drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo)
70 return boi->bom->funcs->bo_unref(boi); 70 return boi->bom->funcs->bo_unref(boi);
71} 71}
72 72
73drm_public int radeon_bo_map(struct radeon_bo *bo, int write) 73int radeon_bo_map(struct radeon_bo *bo, int write)
74{ 74{
75 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 75 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
76 return boi->bom->funcs->bo_map(boi, write); 76 return boi->bom->funcs->bo_map(boi, write);
77} 77}
78 78
79drm_public int radeon_bo_unmap(struct radeon_bo *bo) 79int radeon_bo_unmap(struct radeon_bo *bo)
80{ 80{
81 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 81 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
82 return boi->bom->funcs->bo_unmap(boi); 82 return boi->bom->funcs->bo_unmap(boi);
83} 83}
84 84
85drm_public int radeon_bo_wait(struct radeon_bo *bo) 85int radeon_bo_wait(struct radeon_bo *bo)
86{ 86{
87 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 87 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
88 if (!boi->bom->funcs->bo_wait) 88 if (!boi->bom->funcs->bo_wait)
@@ -90,13 +90,13 @@ drm_public int radeon_bo_wait(struct radeon_bo *bo)
90 return boi->bom->funcs->bo_wait(boi); 90 return boi->bom->funcs->bo_wait(boi);
91} 91}
92 92
93drm_public int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain) 93int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain)
94{ 94{
95 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 95 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
96 return boi->bom->funcs->bo_is_busy(boi, domain); 96 return boi->bom->funcs->bo_is_busy(boi, domain);
97} 97}
98 98
99drm_public int 99int
100radeon_bo_set_tiling(struct radeon_bo *bo, 100radeon_bo_set_tiling(struct radeon_bo *bo,
101 uint32_t tiling_flags, uint32_t pitch) 101 uint32_t tiling_flags, uint32_t pitch)
102{ 102{
@@ -104,7 +104,7 @@ radeon_bo_set_tiling(struct radeon_bo *bo,
104 return boi->bom->funcs->bo_set_tiling(boi, tiling_flags, pitch); 104 return boi->bom->funcs->bo_set_tiling(boi, tiling_flags, pitch);
105} 105}
106 106
107drm_public int 107int
108radeon_bo_get_tiling(struct radeon_bo *bo, 108radeon_bo_get_tiling(struct radeon_bo *bo,
109 uint32_t *tiling_flags, uint32_t *pitch) 109 uint32_t *tiling_flags, uint32_t *pitch)
110{ 110{
@@ -112,7 +112,7 @@ radeon_bo_get_tiling(struct radeon_bo *bo,
112 return boi->bom->funcs->bo_get_tiling(boi, tiling_flags, pitch); 112 return boi->bom->funcs->bo_get_tiling(boi, tiling_flags, pitch);
113} 113}
114 114
115drm_public int radeon_bo_is_static(struct radeon_bo *bo) 115int radeon_bo_is_static(struct radeon_bo *bo)
116{ 116{
117 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 117 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
118 if (boi->bom->funcs->bo_is_static) 118 if (boi->bom->funcs->bo_is_static)
@@ -120,19 +120,19 @@ drm_public int radeon_bo_is_static(struct radeon_bo *bo)
120 return 0; 120 return 0;
121} 121}
122 122
123drm_public int 123int
124radeon_bo_is_referenced_by_cs(struct radeon_bo *bo, struct radeon_cs *cs) 124radeon_bo_is_referenced_by_cs(struct radeon_bo *bo, struct radeon_cs *cs)
125{ 125{
126 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 126 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
127 return boi->cref > 1; 127 return boi->cref > 1;
128} 128}
129 129
130drm_public uint32_t radeon_bo_get_handle(struct radeon_bo *bo) 130uint32_t radeon_bo_get_handle(struct radeon_bo *bo)
131{ 131{
132 return bo->handle; 132 return bo->handle;
133} 133}
134 134
135drm_public uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo) 135uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo)
136{ 136{
137 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 137 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
138 uint32_t src_domain; 138 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 = {
283 bo_is_busy, 283 bo_is_busy,
284}; 284};
285 285
286drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) 286struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)
287{ 287{
288 struct bo_manager_gem *bomg; 288 struct bo_manager_gem *bomg;
289 289
@@ -296,7 +296,7 @@ drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)
296 return (struct radeon_bo_manager*)bomg; 296 return (struct radeon_bo_manager*)bomg;
297} 297}
298 298
299drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom) 299void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)
300{ 300{
301 struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom; 301 struct bo_manager_gem *bomg = (struct bo_manager_gem*)bom;
302 302
@@ -306,21 +306,21 @@ drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)
306 free(bomg); 306 free(bomg);
307} 307}
308 308
309drm_public uint32_t 309uint32_t
310radeon_gem_name_bo(struct radeon_bo *bo) 310radeon_gem_name_bo(struct radeon_bo *bo)
311{ 311{
312 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; 312 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
313 return bo_gem->name; 313 return bo_gem->name;
314} 314}
315 315
316drm_public void * 316void *
317radeon_gem_get_reloc_in_cs(struct radeon_bo *bo) 317radeon_gem_get_reloc_in_cs(struct radeon_bo *bo)
318{ 318{
319 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; 319 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
320 return &bo_gem->reloc_in_cs; 320 return &bo_gem->reloc_in_cs;
321} 321}
322 322
323drm_public int 323int
324radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name) 324radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name)
325{ 325{
326 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; 326 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)
342 return 0; 342 return 0;
343} 343}
344 344
345drm_public int 345int
346radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain) 346radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t write_domain)
347{ 347{
348 struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; 348 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
360 return r; 360 return r;
361} 361}
362 362
363drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) 363int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
364{ 364{
365 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo; 365 struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem*)bo;
366 int ret; 366 int ret;
@@ -369,7 +369,7 @@ drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)
369 return ret; 369 return ret;
370} 370}
371 371
372drm_public struct radeon_bo * 372struct radeon_bo *
373radeon_gem_bo_open_prime(struct radeon_bo_manager *bom, int fd_handle, uint32_t size) 373radeon_gem_bo_open_prime(struct radeon_bo_manager *bom, int fd_handle, uint32_t size)
374{ 374{
375 struct radeon_bo_gem *bo; 375 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 @@
6#include "radeon_cs.h" 6#include "radeon_cs.h"
7#include "radeon_cs_int.h" 7#include "radeon_cs_int.h"
8 8
9drm_public struct radeon_cs * 9struct radeon_cs *
10radeon_cs_create(struct radeon_cs_manager *csm, uint32_t ndw) 10radeon_cs_create(struct radeon_cs_manager *csm, uint32_t ndw)
11{ 11{
12 struct radeon_cs_int *csi = csm->funcs->cs_create(csm, ndw); 12 struct radeon_cs_int *csi = csm->funcs->cs_create(csm, ndw);
13 return (struct radeon_cs *)csi; 13 return (struct radeon_cs *)csi;
14} 14}
15 15
16drm_public int 16int
17radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo, 17radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo,
18 uint32_t read_domain, uint32_t write_domain, 18 uint32_t read_domain, uint32_t write_domain,
19 uint32_t flags) 19 uint32_t flags)
@@ -27,7 +27,7 @@ radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo,
27 flags); 27 flags);
28} 28}
29 29
30drm_public int 30int
31radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw, 31radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw,
32 const char *file, const char *func, int line) 32 const char *file, const char *func, int line)
33{ 33{
@@ -35,7 +35,7 @@ radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw,
35 return csi->csm->funcs->cs_begin(csi, ndw, file, func, line); 35 return csi->csm->funcs->cs_begin(csi, ndw, file, func, line);
36} 36}
37 37
38drm_public int 38int
39radeon_cs_end(struct radeon_cs *cs, 39radeon_cs_end(struct radeon_cs *cs,
40 const char *file, const char *func, int line) 40 const char *file, const char *func, int line)
41{ 41{
@@ -43,37 +43,37 @@ radeon_cs_end(struct radeon_cs *cs,
43 return csi->csm->funcs->cs_end(csi, file, func, line); 43 return csi->csm->funcs->cs_end(csi, file, func, line);
44} 44}
45 45
46drm_public int radeon_cs_emit(struct radeon_cs *cs) 46int radeon_cs_emit(struct radeon_cs *cs)
47{ 47{
48 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 48 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
49 return csi->csm->funcs->cs_emit(csi); 49 return csi->csm->funcs->cs_emit(csi);
50} 50}
51 51
52drm_public int radeon_cs_destroy(struct radeon_cs *cs) 52int radeon_cs_destroy(struct radeon_cs *cs)
53{ 53{
54 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 54 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
55 return csi->csm->funcs->cs_destroy(csi); 55 return csi->csm->funcs->cs_destroy(csi);
56} 56}
57 57
58drm_public int radeon_cs_erase(struct radeon_cs *cs) 58int radeon_cs_erase(struct radeon_cs *cs)
59{ 59{
60 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 60 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
61 return csi->csm->funcs->cs_erase(csi); 61 return csi->csm->funcs->cs_erase(csi);
62} 62}
63 63
64drm_public int radeon_cs_need_flush(struct radeon_cs *cs) 64int radeon_cs_need_flush(struct radeon_cs *cs)
65{ 65{
66 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 66 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
67 return csi->csm->funcs->cs_need_flush(csi); 67 return csi->csm->funcs->cs_need_flush(csi);
68} 68}
69 69
70drm_public void radeon_cs_print(struct radeon_cs *cs, FILE *file) 70void radeon_cs_print(struct radeon_cs *cs, FILE *file)
71{ 71{
72 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 72 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
73 csi->csm->funcs->cs_print(csi, file); 73 csi->csm->funcs->cs_print(csi, file);
74} 74}
75 75
76drm_public void 76void
77radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit) 77radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit)
78{ 78{
79 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 79 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)
83 csi->csm->gart_limit = limit; 83 csi->csm->gart_limit = limit;
84} 84}
85 85
86drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs, 86void radeon_cs_space_set_flush(struct radeon_cs *cs,
87 void (*fn)(void *), void *data) 87 void (*fn)(void *), void *data)
88{ 88{
89 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 89 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,
91 csi->space_flush_data = data; 91 csi->space_flush_data = data;
92} 92}
93 93
94drm_public uint32_t radeon_cs_get_id(struct radeon_cs *cs) 94uint32_t radeon_cs_get_id(struct radeon_cs *cs)
95{ 95{
96 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 96 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
97 return csi->id; 97 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)
539 return r; 539 return r;
540} 540}
541 541
542drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd) 542struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)
543{ 543{
544 struct radeon_cs_manager_gem *csm; 544 struct radeon_cs_manager_gem *csm;
545 545
@@ -553,7 +553,7 @@ drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)
553 return &csm->base; 553 return &csm->base;
554} 554}
555 555
556drm_public void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm) 556void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm)
557{ 557{
558 free(csm); 558 free(csm);
559} 559}
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
165 return RADEON_CS_SPACE_OK; 165 return RADEON_CS_SPACE_OK;
166} 166}
167 167
168drm_public void 168void
169radeon_cs_space_add_persistent_bo(struct radeon_cs *cs, struct radeon_bo *bo, 169radeon_cs_space_add_persistent_bo(struct radeon_cs *cs, struct radeon_bo *bo,
170 uint32_t read_domains, uint32_t write_domain) 170 uint32_t read_domains, uint32_t write_domain)
171{ 171{
@@ -209,7 +209,7 @@ again:
209 return 0; 209 return 0;
210} 210}
211 211
212drm_public int 212int
213radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo, 213radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo,
214 uint32_t read_domains, uint32_t write_domain) 214 uint32_t read_domains, uint32_t write_domain)
215{ 215{
@@ -230,13 +230,13 @@ radeon_cs_space_check_with_bo(struct radeon_cs *cs, struct radeon_bo *bo,
230 return ret; 230 return ret;
231} 231}
232 232
233drm_public int radeon_cs_space_check(struct radeon_cs *cs) 233int radeon_cs_space_check(struct radeon_cs *cs)
234{ 234{
235 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 235 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
236 return radeon_cs_check_space_internal(csi, NULL); 236 return radeon_cs_check_space_internal(csi, NULL);
237} 237}
238 238
239drm_public void radeon_cs_space_reset_bos(struct radeon_cs *cs) 239void radeon_cs_space_reset_bos(struct radeon_cs *cs)
240{ 240{
241 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; 241 struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
242 int i; 242 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,
2400/* =========================================================================== 2400/* ===========================================================================
2401 * public API 2401 * public API
2402 */ 2402 */
2403drm_public struct radeon_surface_manager * 2403struct radeon_surface_manager *
2404radeon_surface_manager_new(int fd) 2404radeon_surface_manager_new(int fd)
2405{ 2405{
2406 struct radeon_surface_manager *surf_man; 2406 struct radeon_surface_manager *surf_man;
@@ -2449,7 +2449,7 @@ out_err:
2449 return NULL; 2449 return NULL;
2450} 2450}
2451 2451
2452drm_public void 2452void
2453radeon_surface_manager_free(struct radeon_surface_manager *surf_man) 2453radeon_surface_manager_free(struct radeon_surface_manager *surf_man)
2454{ 2454{
2455 free(surf_man); 2455 free(surf_man);
@@ -2522,7 +2522,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man,
2522 return 0; 2522 return 0;
2523} 2523}
2524 2524
2525drm_public int 2525int
2526radeon_surface_init(struct radeon_surface_manager *surf_man, 2526radeon_surface_init(struct radeon_surface_manager *surf_man,
2527 struct radeon_surface *surf) 2527 struct radeon_surface *surf)
2528{ 2528{
@@ -2539,7 +2539,7 @@ radeon_surface_init(struct radeon_surface_manager *surf_man,
2539 return surf_man->surface_init(surf_man, surf); 2539 return surf_man->surface_init(surf_man, surf);
2540} 2540}
2541 2541
2542drm_public int 2542int
2543radeon_surface_best(struct radeon_surface_manager *surf_man, 2543radeon_surface_best(struct radeon_surface_manager *surf_man,
2544 struct radeon_surface *surf) 2544 struct radeon_surface *surf)
2545{ 2545{
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)
74 return 0; 74 return 0;
75} 75}
76 76
77drm_public
78int drm_tegra_new(struct drm_tegra **drmp, int fd) 77int drm_tegra_new(struct drm_tegra **drmp, int fd)
79{ 78{
80 bool supported = false; 79 bool supported = false;
@@ -95,7 +94,6 @@ int drm_tegra_new(struct drm_tegra **drmp, int fd)
95 return drm_tegra_wrap(drmp, fd, false); 94 return drm_tegra_wrap(drmp, fd, false);
96} 95}
97 96
98drm_public
99void drm_tegra_close(struct drm_tegra *drm) 97void drm_tegra_close(struct drm_tegra *drm)
100{ 98{
101 if (!drm) 99 if (!drm)
@@ -107,7 +105,6 @@ void drm_tegra_close(struct drm_tegra *drm)
107 free(drm); 105 free(drm);
108} 106}
109 107
110drm_public
111int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm, 108int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,
112 uint32_t flags, uint32_t size) 109 uint32_t flags, uint32_t size)
113{ 110{
@@ -146,7 +143,6 @@ int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,
146 return 0; 143 return 0;
147} 144}
148 145
149drm_public
150int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm, 146int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,
151 uint32_t handle, uint32_t flags, uint32_t size) 147 uint32_t handle, uint32_t flags, uint32_t size)
152{ 148{
@@ -170,7 +166,6 @@ int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,
170 return 0; 166 return 0;
171} 167}
172 168
173drm_public
174struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) 169struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo)
175{ 170{
176 if (bo) 171 if (bo)
@@ -179,14 +174,12 @@ struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo)
179 return bo; 174 return bo;
180} 175}
181 176
182drm_public
183void drm_tegra_bo_unref(struct drm_tegra_bo *bo) 177void drm_tegra_bo_unref(struct drm_tegra_bo *bo)
184{ 178{
185 if (bo && atomic_dec_and_test(&bo->ref)) 179 if (bo && atomic_dec_and_test(&bo->ref))
186 drm_tegra_bo_free(bo); 180 drm_tegra_bo_free(bo);
187} 181}
188 182
189drm_public
190int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) 183int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle)
191{ 184{
192 if (!bo || !handle) 185 if (!bo || !handle)
@@ -197,7 +190,6 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle)
197 return 0; 190 return 0;
198} 191}
199 192
200drm_public
201int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) 193int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr)
202{ 194{
203 struct drm_tegra *drm = bo->drm; 195 struct drm_tegra *drm = bo->drm;
@@ -230,7 +222,6 @@ int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr)
230 return 0; 222 return 0;
231} 223}
232 224
233drm_public
234int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) 225int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
235{ 226{
236 if (!bo) 227 if (!bo)
@@ -247,7 +238,6 @@ int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)
247 return 0; 238 return 0;
248} 239}
249 240
250drm_public
251int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) 241int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags)
252{ 242{
253 struct drm_tegra_gem_get_flags args; 243 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)
271 return 0; 261 return 0;
272} 262}
273 263
274drm_public
275int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) 264int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags)
276{ 265{
277 struct drm_tegra_gem_get_flags args; 266 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)
293 return 0; 282 return 0;
294} 283}
295 284
296drm_public
297int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo, 285int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
298 struct drm_tegra_bo_tiling *tiling) 286 struct drm_tegra_bo_tiling *tiling)
299{ 287{
@@ -320,7 +308,6 @@ int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,
320 return 0; 308 return 0;
321} 309}
322 310
323drm_public
324int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo, 311int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo,
325 const struct drm_tegra_bo_tiling *tiling) 312 const struct drm_tegra_bo_tiling *tiling)
326{ 313{