]> git.pld-linux.org Git - packages/xorg-driver-video-nvidia.git/blame_incremental - X11-driver-nvidia-api_calls.patch
- renamed.
[packages/xorg-driver-video-nvidia.git] / X11-driver-nvidia-api_calls.patch
... / ...
CommitLineData
1--- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c.orig 2004-03-08 15:48:46.000000000 +0100
2+++ NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/nv.c 2004-03-08 15:55:11.718705016 +0100
3@@ -2007,7 +2007,7 @@
4 * waiting on the wait queue
5 */
6
7-void nv_set_hotkey_occurred_flag(void)
8+void NV_API_CALL nv_set_hotkey_occurred_flag(void)
9 {
10 nv_printf(NV_DBG_EVENTINFO,"setting the hotkey occurred flag!\n");
11
12@@ -2191,7 +2191,7 @@
13 *** EXPORTS to rest of resman
14 ***/
15
16-void *nv_find_nv_mapping(
17+void * NV_API_CALL nv_find_nv_mapping(
18 nv_state_t *nv,
19 unsigned long address
20 )
21@@ -2262,7 +2262,7 @@
22 * the TYPE_AGP flag to differeniate it from a PCI allocation.
23 * failure is fine, we may just be checking if a given page is agp
24 */
25-void *
26+void * NV_API_CALL
27 nv_find_agp_kernel_mapping(
28 nv_state_t *nv,
29 unsigned long address
30@@ -2339,7 +2339,7 @@
31 return (unsigned long) NULL;
32 }
33
34-unsigned long
35+unsigned long NV_API_CALL
36 nv_get_kern_phys_address(
37 unsigned long address
38 )
39@@ -2369,7 +2369,7 @@
40 return _get_phys_address(address, 1);
41 }
42
43-unsigned long
44+unsigned long NV_API_CALL
45 nv_get_user_phys_address(
46 unsigned long address
47 )
48@@ -2392,7 +2392,7 @@
49
50
51 /* allocate memory for DMA push buffers */
52-int
53+int NV_API_CALL
54 nv_alloc_pages(
55 nv_state_t *nv,
56 void **pAddress,
57@@ -2584,7 +2584,7 @@
58 return -1; \
59 }
60
61-int
62+int NV_API_CALL
63 nv_free_pages(
64 nv_state_t *nv,
65 void **pAddress,
66@@ -2687,7 +2687,7 @@
67 nvl->rm_lock_count = 0;
68 }
69
70-void nv_lock_rm(
71+void NV_API_CALL nv_lock_rm(
72 nv_state_t *nv
73 )
74 {
75@@ -2707,7 +2707,7 @@
76 nvl->rm_lock_count = 1;
77 }
78
79-void nv_unlock_rm(
80+void NV_API_CALL nv_unlock_rm(
81 nv_state_t *nv
82 )
83 {
84@@ -2721,7 +2721,7 @@
85 spin_unlock_irq(&nvl->rm_lock);
86 }
87
88-void nv_lock_heap(
89+void NV_API_CALL nv_lock_heap(
90 nv_state_t *nv
91 )
92 {
93@@ -2731,7 +2731,7 @@
94 nv_lock(nvl->heap_lock);
95 }
96
97-void nv_unlock_heap(
98+void NV_API_CALL nv_unlock_heap(
99 nv_state_t *nv
100 )
101 {
102@@ -2744,7 +2744,7 @@
103 /*
104 ** post the event
105 */
106-void nv_post_event(
107+void NV_API_CALL nv_post_event(
108 nv_state_t *nv,
109 nv_event_t *event,
110 U032 handle,
111@@ -2782,7 +2782,7 @@
112 nv_unlock_irq(nvfp->fp_lock, eflags);
113 }
114
115-int nv_get_event(
116+int NV_API_CALL nv_get_event(
117 nv_state_t *nv,
118 VOID *void_file,
119 nv_event_t *event,
120@@ -2823,7 +2823,7 @@
121 }
122
123
124-int
125+int NV_API_CALL
126 nv_agp_init(
127 nv_state_t *nv,
128 VOID **phys_start,
129@@ -2889,7 +2889,7 @@
130 return status;
131 }
132
133-int
134+int NV_API_CALL
135 nv_agp_teardown(
136 nv_state_t *nv
137 )
138@@ -2927,7 +2927,7 @@
139 * (if the linear mapping was real, this is the page that would have been
140 * addressed by the virtual address. I know, confusing).
141 */
142-int
143+int NV_API_CALL
144 nv_agp_translate_address(
145 nv_state_t *nv,
146 void *base,
147@@ -2957,7 +2957,7 @@
148 }
149
150
151-int
152+int NV_API_CALL
153 nv_int10h_call(
154 nv_state_t *nv,
155 U032 *eax,
156@@ -2971,7 +2971,7 @@
157 }
158
159 /* set a timer to go off every second */
160-int
161+int NV_API_CALL
162 nv_start_rc_timer(
163 nv_state_t *nv
164 )
165@@ -2992,7 +2992,7 @@
166 return 0;
167 }
168
169-int
170+int NV_API_CALL
171 nv_stop_rc_timer(
172 nv_state_t *nv
173 )
174--- NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/os-interface.c.orig 2004-01-15 04:29:11.000000000 +0100
175+++ NVIDIA-Linux-x86-1.0-5336-pkg1/usr/src/nv/os-interface.c 2004-03-08 16:10:44.435910448 +0100
176@@ -35,7 +35,7 @@
177 }
178 #endif
179
180-RM_STATUS os_raise_smp_barrier(VOID)
181+RM_STATUS NV_API_CALL os_raise_smp_barrier(VOID)
182 {
183 os_block_on_smp_barrier = 1;
184 #ifdef CONFIG_SMP
185@@ -45,26 +45,26 @@
186 return RM_OK;
187 }
188
189-RM_STATUS os_clear_smp_barrier(VOID)
190+RM_STATUS NV_API_CALL os_clear_smp_barrier(VOID)
191 {
192 os_block_on_smp_barrier = 0;
193 return RM_OK;
194 }
195
196 // return TRUE if the caller is the super-user
197-BOOL os_is_administrator(
198+BOOL NV_API_CALL os_is_administrator(
199 PHWINFO pDev
200 )
201 {
202 return NV_IS_SUSER();
203 }
204
205-U032 os_get_page_size(VOID)
206+U032 NV_API_CALL os_get_page_size(VOID)
207 {
208 return PAGE_SIZE;
209 }
210
211-ULONG os_get_page_mask(VOID)
212+ULONG NV_API_CALL os_get_page_mask(VOID)
213 {
214 return PAGE_MASK;
215 }
216@@ -78,7 +78,7 @@
217 // just replace the code within osStringCopy with a call to the C library
218 // function strcpy.
219 //
220-U008* os_string_copy(
221+U008* NV_API_CALL os_string_copy(
222 U008 *dst,
223 const U008 *src
224 )
225@@ -86,7 +86,7 @@
226 return strcpy(dst, src);
227 }
228
229-RM_STATUS os_strncpy_from_user(
230+RM_STATUS NV_API_CALL os_strncpy_from_user(
231 U008 *dst,
232 const U008 *src,
233 U032 n
234@@ -99,7 +99,7 @@
235 #endif
236 }
237
238-S032 os_string_compare(
239+S032 NV_API_CALL os_string_compare(
240 const U008 *s1,
241 const U008 *s2
242 )
243@@ -107,14 +107,14 @@
244 return strcmp(s1, s2);
245 }
246
247-U032 os_string_length(
248+U032 NV_API_CALL os_string_length(
249 const U008* str
250 )
251 {
252 return strlen(str);
253 }
254
255-U008* os_mem_copy(
256+U008* NV_API_CALL os_mem_copy(
257 U008 *dst,
258 const U008 *src,
259 U032 length
260@@ -123,7 +123,7 @@
261 return memcpy(dst, src, length);
262 }
263
264-RM_STATUS os_memcpy_from_user(
265+RM_STATUS NV_API_CALL os_memcpy_from_user(
266 VOID *dst,
267 const VOID* src,
268 U032 length
269@@ -132,7 +132,7 @@
270 return copy_from_user(dst, src, length) ? RM_ERR_BAD_ADDRESS : RM_OK;
271 }
272
273-RM_STATUS os_memcpy_to_user(
274+RM_STATUS NV_API_CALL os_memcpy_to_user(
275 VOID *dst,
276 const VOID* src,
277 U032 length
278@@ -141,7 +141,7 @@
279 return copy_to_user(dst, src, length) ? RM_ERR_BAD_ADDRESS : RM_OK;
280 }
281
282-VOID* os_mem_set(
283+VOID* NV_API_CALL os_mem_set(
284 VOID* dst,
285 U008 c,
286 U032 length
287@@ -150,7 +150,7 @@
288 return memset(dst, (int)c, length);
289 }
290
291-S032 os_mem_cmp(
292+S032 NV_API_CALL os_mem_cmp(
293 const U008 *buf0,
294 const U008* buf1,
295 U032 length
296@@ -159,7 +159,7 @@
297 return memcmp(buf0, buf1, length);
298 }
299
300-VOID* os_copy_in_ioctl_param(
301+VOID* NV_API_CALL os_copy_in_ioctl_param(
302 VOID *dst,
303 VOID *src,
304 U032 length
305@@ -172,7 +172,7 @@
306 }
307 }
308
309-VOID* os_copy_out_ioctl_param(
310+VOID* NV_API_CALL os_copy_out_ioctl_param(
311 VOID *dst,
312 VOID *src,
313 U032 length
314@@ -204,7 +204,7 @@
315
316 #define KMALLOC_LIMIT 131072
317
318-RM_STATUS os_alloc_mem(
319+RM_STATUS NV_API_CALL os_alloc_mem(
320 VOID **address,
321 U032 size
322 )
323@@ -251,7 +251,7 @@
324 return *address ? RM_OK : RM_ERR_NO_FREE_MEM;
325 }
326
327-void os_free_mem(VOID *address)
328+void NV_API_CALL os_free_mem(VOID *address)
329 {
330 unsigned long va;
331 int size;
332@@ -273,7 +273,7 @@
333 * we may allocate more pages than the caller really asked for.
334 * we'll only lock down the number of pages the caller asked for.
335 */
336-RM_STATUS os_alloc_contig_pages(
337+RM_STATUS NV_API_CALL os_alloc_contig_pages(
338 VOID **address,
339 U032 size
340 )
341@@ -310,7 +310,7 @@
342 * the same number of pages we locked, and to calculate the order we
343 * allocated, so we properly free the allocation.
344 */
345-VOID os_free_contig_pages(
346+VOID NV_API_CALL os_free_contig_pages(
347 VOID *address,
348 U032 size
349 )
350@@ -335,7 +335,7 @@
351 *
352 *****************************************************************************/
353
354-RM_STATUS os_get_current_time(
355+RM_STATUS NV_API_CALL os_get_current_time(
356 U032 *seconds,
357 U032 *useconds
358 )
359@@ -371,7 +371,7 @@
360 * this, we use mdelay() for any full millisecond to be safe.
361 */
362
363-RM_STATUS os_delay_us(U032 MicroSeconds)
364+RM_STATUS NV_API_CALL os_delay_us(U032 MicroSeconds)
365 {
366 unsigned long mdelay_safe_msec;
367 unsigned long usec;
368@@ -411,7 +411,7 @@
369 * remainder will be accounted for with mdelay().
370 */
371
372-RM_STATUS os_delay(U032 MilliSeconds)
373+RM_STATUS NV_API_CALL os_delay(U032 MilliSeconds)
374 {
375 unsigned long MicroSeconds;
376 unsigned long jiffies;
377@@ -481,7 +481,7 @@
378 }
379
380 /* return CPU frequency in MHz */
381-U032 os_get_cpu_frequency(VOID)
382+U032 NV_API_CALL os_get_cpu_frequency(VOID)
383 {
384 u64 tsc[2];
385 u32 tsc_d;
386@@ -500,13 +500,13 @@
387 return cpu_mhz;
388 }
389
390-RM_STATUS os_get_current_process(U032 *pPid)
391+RM_STATUS NV_API_CALL os_get_current_process(U032 *pPid)
392 {
393 *pPid = current->pid;
394 return RM_OK;
395 }
396
397-RM_STATUS os_kill_process(
398+RM_STATUS NV_API_CALL os_kill_process(
399 U032 pid,
400 U032 sig
401 )
402@@ -531,7 +531,7 @@
403 //
404 // this is what actually outputs the data.
405 //
406-inline void out_string(const char *str)
407+inline void NV_API_CALL out_string(const char *str)
408 {
409 printk("%d: %s", smp_processor_id(), str);
410 }
411@@ -546,7 +546,7 @@
412 * Returns the number of characters written.
413 */
414
415-int nv_printf(
416+int NV_API_CALL nv_printf(
417 int debuglevel,
418 const char *printf_format,
419 ...
420@@ -571,7 +571,7 @@
421 return chars_written;
422 }
423
424-BOOL os_pci_device_present(
425+BOOL NV_API_CALL os_pci_device_present(
426 U016 vendor,
427 U016 device
428 )
429@@ -587,7 +587,7 @@
430 return ret; \
431 }
432
433-VOID* os_pci_init_handle(
434+VOID* NV_API_CALL os_pci_init_handle(
435 U008 bus,
436 U008 slot,
437 U008 function,
438@@ -604,7 +604,7 @@
439 return (VOID *) dev;
440 }
441
442-U008 os_pci_read_byte(
443+U008 NV_API_CALL os_pci_read_byte(
444 VOID *handle,
445 U008 offset
446 )
447@@ -615,7 +615,7 @@
448 return value;
449 }
450
451-U016 os_pci_read_word(
452+U016 NV_API_CALL os_pci_read_word(
453 VOID *handle,
454 U008 offset
455 )
456@@ -626,7 +626,7 @@
457 return value;
458 }
459
460-U032 os_pci_read_dword(
461+U032 NV_API_CALL os_pci_read_dword(
462 VOID *handle,
463 U008 offset
464 )
465@@ -637,7 +637,7 @@
466 return value;
467 }
468
469-VOID os_pci_write_byte(
470+VOID NV_API_CALL os_pci_write_byte(
471 VOID *handle,
472 U008 offset,
473 U008 value
474@@ -647,7 +647,7 @@
475 pci_write_config_byte( (struct pci_dev *) handle, offset, value);
476 }
477
478-VOID os_pci_write_word(
479+VOID NV_API_CALL os_pci_write_word(
480 VOID *handle,
481 U008 offset,
482 U016 value
483@@ -657,7 +657,7 @@
484 pci_write_config_word( (struct pci_dev *) handle, offset, value);
485 }
486
487-VOID os_pci_write_dword(
488+VOID NV_API_CALL os_pci_write_dword(
489 VOID *handle,
490 U008 offset,
491 U032 value
492@@ -667,7 +667,7 @@
493 pci_write_config_dword( (struct pci_dev *) handle, offset, value);
494 }
495
496-VOID os_io_write_byte(
497+VOID NV_API_CALL os_io_write_byte(
498 PHWINFO pdev,
499 U032 address,
500 U008 value
501@@ -676,7 +676,7 @@
502 outb(value, address);
503 }
504
505-VOID os_io_write_word(
506+VOID NV_API_CALL os_io_write_word(
507 PHWINFO pdev,
508 U032 address,
509 U016 value
510@@ -685,7 +685,7 @@
511 outw(value, address);
512 }
513
514-VOID os_io_write_dword(
515+VOID NV_API_CALL os_io_write_dword(
516 PHWINFO pdev,
517 U032 address,
518 U032 value
519@@ -694,7 +694,7 @@
520 outl(value, address);
521 }
522
523-U008 os_io_read_byte(
524+U008 NV_API_CALL os_io_read_byte(
525 PHWINFO pdev,
526 U032 address
527 )
528@@ -702,7 +702,7 @@
529 return inb(address);
530 }
531
532-U016 os_io_read_word(
533+U016 NV_API_CALL os_io_read_word(
534 PHWINFO pdev,
535 U032 address
536 )
537@@ -710,7 +710,7 @@
538 return inw(address);
539 }
540
541-U032 os_io_read_dword(
542+U032 NV_API_CALL os_io_read_dword(
543 PHWINFO pdev,
544 U032 address
545 )
546@@ -718,14 +718,14 @@
547 return inl(address);
548 }
549
550-ULONG os_cli(ULONG flags)
551+ULONG NV_API_CALL os_cli(ULONG flags)
552 {
553 NV_SAVE_FLAGS(flags);
554 NV_CLI();
555 return flags;
556 }
557
558-ULONG os_sti(ULONG flags)
559+ULONG NV_API_CALL os_sti(ULONG flags)
560 {
561 NV_RESTORE_FLAGS(flags);
562 return flags;
563@@ -789,7 +789,7 @@
564 * achieve the same results on a PIII or higher
565 */
566
567-RM_STATUS os_set_mem_range(
568+RM_STATUS NV_API_CALL os_set_mem_range(
569 U032 start,
570 U032 size,
571 U032 mode
572@@ -817,7 +817,7 @@
573 return RM_ERROR;
574 }
575
576-RM_STATUS os_unset_mem_range(
577+RM_STATUS NV_API_CALL os_unset_mem_range(
578 U032 start,
579 U032 size
580 )
581@@ -839,7 +839,7 @@
582 * should this also check for Write-Combining??
583 */
584
585-VOID *os_map_kernel_space(
586+VOID * NV_API_CALL os_map_kernel_space(
587 U032 start,
588 U032 size_bytes,
589 U032 mode
590@@ -864,7 +864,7 @@
591 return vaddr;
592 }
593
594-VOID os_unmap_kernel_space(
595+VOID NV_API_CALL os_unmap_kernel_space(
596 VOID *addr,
597 U032 size_bytes
598 )
599@@ -872,7 +872,7 @@
600 NV_IOUNMAP(addr, size_bytes);
601 }
602
603-VOID* os_map_user_space(
604+VOID* NV_API_CALL os_map_user_space(
605 VOID *kaddr,
606 VOID **priv,
607 U032 size_bytes,
608@@ -883,14 +883,14 @@
609 return NULL;
610 }
611
612-VOID os_unmap_user_space(
613+VOID NV_API_CALL os_unmap_user_space(
614 VOID *uaddr,
615 VOID *priv
616 )
617 {
618 }
619
620-VOID* os_map_io_space(
621+VOID* NV_API_CALL os_map_io_space(
622 U032 start,
623 U032 size_bytes,
624 VOID **priv,
625@@ -920,7 +920,7 @@
626 return (void *)(NV_UINTPTR_T) vma->vm_start;
627 }
628
629-VOID os_unmap_io_space(
630+VOID NV_API_CALL os_unmap_io_space(
631 VOID *addr,
632 U032 size_bytes,
633 VOID *priv,
634@@ -937,7 +937,7 @@
635 }
636
637 // override initial debug level from registry
638-VOID os_dbg_init(void)
639+VOID NV_API_CALL os_dbg_init(void)
640 {
641 U032 new_debuglevel;
642 if (RM_OK == rm_read_registry_dword(0,
643@@ -950,7 +950,7 @@
644 }
645 }
646
647-VOID os_dbg_set_level(U032 new_debuglevel)
648+VOID NV_API_CALL os_dbg_set_level(U032 new_debuglevel)
649 {
650 nv_printf(NV_DBG_SETUP, "Changing debuglevel from 0x%x to 0x%x\n", cur_debuglevel, new_debuglevel);
651 cur_debuglevel = new_debuglevel;
652@@ -962,7 +962,7 @@
653 * a lock or which threw the breakpoint. I should probably scan the list of
654 * nv_state_t's and drop any held locks before throwing this breakpoint.
655 */
656-VOID os_dbg_breakpoint(void)
657+VOID NV_API_CALL os_dbg_breakpoint(void)
658 {
659 #ifdef DEBUG
660 out_string("Break\n");
This page took 0.043262 seconds and 4 git commands to generate.