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 /nouveau
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>
Diffstat (limited to 'nouveau')
-rw-r--r--nouveau/bufctx.c10
-rw-r--r--nouveau/nouveau.c40
-rw-r--r--nouveau/pushbuf.c20
3 files changed, 35 insertions, 35 deletions
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)