diff options
Diffstat (limited to 'nouveau')
-rw-r--r-- | nouveau/bufctx.c | 10 | ||||
-rw-r--r-- | nouveau/nouveau.c | 40 | ||||
-rw-r--r-- | nouveau/pushbuf.c | 20 |
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 | ||
65 | drm_public int | 65 | int |
66 | nouveau_bufctx_new(struct nouveau_client *client, int bins, | 66 | nouveau_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 | ||
85 | drm_public void | 85 | void |
86 | nouveau_bufctx_del(struct nouveau_bufctx **pbctx) | 86 | nouveau_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 | ||
102 | drm_public void | 102 | void |
103 | nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin) | 103 | nouveau_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 | ||
120 | drm_public struct nouveau_bufref * | 120 | struct nouveau_bufref * |
121 | nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin, | 121 | nouveau_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 | ||
147 | drm_public struct nouveau_bufref * | 147 | struct nouveau_bufref * |
148 | nouveau_bufctx_mthd(struct nouveau_bufctx *bctx, int bin, uint32_t packet, | 148 | nouveau_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 | */ |
65 | drm_public int | 65 | int |
66 | nouveau_device_open_existing(struct nouveau_device **pdev, int close, int fd, | 66 | nouveau_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 | ||
72 | drm_public int | 72 | int |
73 | nouveau_device_wrap(int fd, int close, struct nouveau_device **pdev) | 73 | nouveau_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 | ||
150 | drm_public int | 150 | int |
151 | nouveau_device_open(const char *busid, struct nouveau_device **pdev) | 151 | nouveau_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 | ||
162 | drm_public void | 162 | void |
163 | nouveau_device_del(struct nouveau_device **pdev) | 163 | nouveau_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 | ||
176 | drm_public int | 176 | int |
177 | nouveau_getparam(struct nouveau_device *dev, uint64_t param, uint64_t *value) | 177 | nouveau_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 | ||
186 | drm_public int | 186 | int |
187 | nouveau_setparam(struct nouveau_device *dev, uint64_t param, uint64_t value) | 187 | nouveau_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 | ||
193 | drm_public int | 193 | int |
194 | nouveau_client_new(struct nouveau_device *dev, struct nouveau_client **pclient) | 194 | nouveau_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 | ||
232 | drm_public void | 232 | void |
233 | nouveau_client_del(struct nouveau_client **pclient) | 233 | nouveau_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 | ||
248 | drm_public int | 248 | int |
249 | nouveau_object_new(struct nouveau_object *parent, uint64_t handle, | 249 | nouveau_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 | ||
310 | drm_public void | 310 | void |
311 | nouveau_object_del(struct nouveau_object **pobj) | 311 | nouveau_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 | ||
334 | drm_public void * | 334 | void * |
335 | nouveau_object_find(struct nouveau_object *obj, uint32_t pclass) | 335 | nouveau_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 | ||
375 | drm_public int | 375 | int |
376 | nouveau_bo_new(struct nouveau_device *dev, uint32_t flags, uint32_t align, | 376 | nouveau_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 | ||
465 | drm_public int | 465 | int |
466 | nouveau_bo_wrap(struct nouveau_device *dev, uint32_t handle, | 466 | nouveau_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 | ||
477 | drm_public int | 477 | int |
478 | nouveau_bo_name_ref(struct nouveau_device *dev, uint32_t name, | 478 | nouveau_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 | ||
495 | drm_public int | 495 | int |
496 | nouveau_bo_name_get(struct nouveau_bo *bo, uint32_t *name) | 496 | nouveau_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 | ||
516 | drm_public void | 516 | void |
517 | nouveau_bo_ref(struct nouveau_bo *bo, struct nouveau_bo **pref) | 517 | nouveau_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 | ||
530 | drm_public int | 530 | int |
531 | nouveau_bo_prime_handle_ref(struct nouveau_device *dev, int prime_fd, | 531 | nouveau_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 | ||
549 | drm_public int | 549 | int |
550 | nouveau_bo_set_prime(struct nouveau_bo *bo, int *prime_fd) | 550 | nouveau_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 | ||
563 | drm_public int | 563 | int |
564 | nouveau_bo_wait(struct nouveau_bo *bo, uint32_t access, | 564 | nouveau_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 | ||
597 | drm_public int | 597 | int |
598 | nouveau_bo_map(struct nouveau_bo *bo, uint32_t access, | 598 | nouveau_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 | ||
532 | drm_public int | 532 | int |
533 | nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan, | 533 | nouveau_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 | ||
603 | drm_public void | 603 | void |
604 | nouveau_pushbuf_del(struct nouveau_pushbuf **ppush) | 604 | nouveau_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 | ||
629 | drm_public struct nouveau_bufctx * | 629 | struct nouveau_bufctx * |
630 | nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx) | 630 | nouveau_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 | ||
637 | drm_public int | 637 | int |
638 | nouveau_pushbuf_space(struct nouveau_pushbuf *push, | 638 | nouveau_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 | ||
701 | drm_public void | 701 | void |
702 | nouveau_pushbuf_data(struct nouveau_pushbuf *push, struct nouveau_bo *bo, | 702 | nouveau_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 | ||
731 | drm_public int | 731 | int |
732 | nouveau_pushbuf_refn(struct nouveau_pushbuf *push, | 732 | nouveau_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 | ||
738 | drm_public void | 738 | void |
739 | nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo, | 739 | nouveau_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 | ||
746 | drm_public int | 746 | int |
747 | nouveau_pushbuf_validate(struct nouveau_pushbuf *push) | 747 | nouveau_pushbuf_validate(struct nouveau_pushbuf *push) |
748 | { | 748 | { |
749 | return pushbuf_validate(push, true); | 749 | return pushbuf_validate(push, true); |
750 | } | 750 | } |
751 | 751 | ||
752 | drm_public uint32_t | 752 | uint32_t |
753 | nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo) | 753 | nouveau_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 | ||
769 | drm_public int | 769 | int |
770 | nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan) | 770 | nouveau_pushbuf_kick(struct nouveau_pushbuf *push, struct nouveau_object *chan) |
771 | { | 771 | { |
772 | if (!push->channel) | 772 | if (!push->channel) |