Mercurial > mplayer.hg
comparison drivers/radeon_vid.c @ 25862:4be9faee0360
Rename some identifiers to not use leading underscores.
author | diego |
---|---|
date | Sun, 27 Jan 2008 18:23:03 +0000 |
parents | 544914dadb52 |
children | a506a6ab14e1 |
comparison
equal
deleted
inserted
replaced
25861:5442946cade2 | 25862:4be9faee0360 |
---|---|
115 | 115 |
116 #ifndef RAGE128 | 116 #ifndef RAGE128 |
117 #if defined(__i386__) | 117 #if defined(__i386__) |
118 /* Ugly but only way */ | 118 /* Ugly but only way */ |
119 #undef AVOID_FPU | 119 #undef AVOID_FPU |
120 static double inline __FastSin(double x) | 120 static inline double FastSin(double x) |
121 { | 121 { |
122 register double res; | 122 register double res; |
123 __asm __volatile("fsin":"=t"(res):"0"(x)); | 123 __asm __volatile("fsin":"=t"(res):"0"(x)); |
124 return res; | 124 return res; |
125 } | 125 } |
126 #undef sin | 126 #undef sin |
127 #define sin(x) __FastSin(x) | 127 #define sin(x) FastSin(x) |
128 | 128 |
129 static double inline __FastCos(double x) | 129 static inline double FastCos(double x) |
130 { | 130 { |
131 register double res; | 131 register double res; |
132 __asm __volatile("fcos":"=t"(res):"0"(x)); | 132 __asm __volatile("fcos":"=t"(res):"0"(x)); |
133 return res; | 133 return res; |
134 } | 134 } |
135 #undef cos | 135 #undef cos |
136 #define cos(x) __FastCos(x) | 136 #define cos(x) FastCos(x) |
137 #else | 137 #else |
138 #include "generic_math.h" | 138 #include "generic_math.h" |
139 #endif /*__386__*/ | 139 #endif /*__386__*/ |
140 #endif /*RAGE128*/ | 140 #endif /*RAGE128*/ |
141 | 141 |
379 #define OUTREG8(addr,val) writeb(val, (radeon_mmio_base)+addr) | 379 #define OUTREG8(addr,val) writeb(val, (radeon_mmio_base)+addr) |
380 #define INREG(addr) readl((radeon_mmio_base)+addr) | 380 #define INREG(addr) readl((radeon_mmio_base)+addr) |
381 #define OUTREG(addr,val) writel(val, (radeon_mmio_base)+addr) | 381 #define OUTREG(addr,val) writel(val, (radeon_mmio_base)+addr) |
382 #define OUTREGP(addr,val,mask) \ | 382 #define OUTREGP(addr,val,mask) \ |
383 do { \ | 383 do { \ |
384 unsigned int _tmp = INREG(addr); \ | 384 unsigned int tmp = INREG(addr); \ |
385 _tmp &= (mask); \ | 385 tmp &= (mask); \ |
386 _tmp |= (val); \ | 386 tmp |= (val); \ |
387 OUTREG(addr, _tmp); \ | 387 OUTREG(addr, tmp); \ |
388 } while (0) | 388 } while (0) |
389 | 389 |
390 static uint32_t radeon_vid_get_dbpp( void ) | 390 static uint32_t radeon_vid_get_dbpp( void ) |
391 { | 391 { |
392 uint32_t dbpp,retval; | 392 uint32_t dbpp,retval; |
425 break; | 425 break; |
426 } | 426 } |
427 } | 427 } |
428 | 428 |
429 | 429 |
430 static __inline__ void _radeon_fifo_wait (int entries) | 430 static __inline__ void radeon_fifo_wait (int entries) |
431 { | 431 { |
432 int i; | 432 int i; |
433 | 433 |
434 for (i=0; i<2000000; i++) | 434 for (i=0; i<2000000; i++) |
435 if ((INREG(RBBM_STATUS) & 0x7f) >= entries) | 435 if ((INREG(RBBM_STATUS) & 0x7f) >= entries) |
436 return; | 436 return; |
437 } | 437 } |
438 | 438 |
439 | 439 |
440 static __inline__ void _radeon_engine_idle ( void ) | 440 static __inline__ void radeon_engine_idle ( void ) |
441 { | 441 { |
442 int i; | 442 int i; |
443 | 443 |
444 /* ensure FIFO is empty before waiting for idle */ | 444 /* ensure FIFO is empty before waiting for idle */ |
445 _radeon_fifo_wait (64); | 445 radeon_fifo_wait (64); |
446 | 446 |
447 for (i=0; i<2000000; i++) { | 447 for (i=0; i<2000000; i++) { |
448 if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) { | 448 if (((INREG(RBBM_STATUS) & GUI_ACTIVE)) == 0) { |
449 radeon_engine_flush (); | 449 radeon_engine_flush (); |
450 return; | 450 return; |
451 } | 451 } |
452 } | 452 } |
453 } | 453 } |
454 | |
455 #define radeon_engine_idle() _radeon_engine_idle() | |
456 #define radeon_fifo_wait(entries) _radeon_fifo_wait(entries) | |
457 | 454 |
458 #if 0 | 455 #if 0 |
459 static void __init radeon_vid_save_state( void ) | 456 static void __init radeon_vid_save_state( void ) |
460 { | 457 { |
461 size_t i; | 458 size_t i; |