aboutsummaryrefslogtreecommitdiffstats
path: root/omap
diff options
context:
space:
mode:
authorEmil Velikov2015-03-31 16:32:11 -0500
committerEmil Velikov2015-04-28 05:19:15 -0500
commit0f8da82500ec542e269092c0718479e25eaff5f6 (patch)
tree4bfdf0fe56674bd42926f6f4607331d1468d08dd /omap
parent104c895f650cac7741c12e10ee78bb2fca2cbd49 (diff)
downloadexternal-libgbm-0f8da82500ec542e269092c0718479e25eaff5f6.tar.gz
external-libgbm-0f8da82500ec542e269092c0718479e25eaff5f6.tar.xz
external-libgbm-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>
Diffstat (limited to 'omap')
-rw-r--r--omap/omap_drm.c36
1 files changed, 18 insertions, 18 deletions
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,