libre.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. diff --git a/src/video/fbcon/SDL_fbriva.c b/src/video/fbcon/SDL_fbriva.c
  2. index eb4b71f1b..59469759c 100644
  3. --- a/src/video/fbcon/SDL_fbriva.c
  4. +++ b/src/video/fbcon/SDL_fbriva.c
  5. @@ -24,12 +24,10 @@
  6. #include "SDL_video.h"
  7. #include "../SDL_blit.h"
  8. #include "SDL_fbriva.h"
  9. -#include "riva_mmio.h"
  10. #include "riva_regs.h"
  11. static int FifoEmptyCount = 0;
  12. -static int FifoFreeCount = 0;
  13. /* Wait for vertical retrace */
  14. static void WaitVBL(_THIS)
  15. @@ -41,20 +39,6 @@ static void WaitVBL(_THIS)
  16. while ( !(*port & 0x08) )
  17. ;
  18. }
  19. -static void NV3WaitIdle(_THIS)
  20. -{
  21. - RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET);
  22. - while ( (Rop->FifoFree < FifoEmptyCount) ||
  23. - (*(mapped_io + PGRAPH_OFFSET + 0x000006B0) & 0x01) )
  24. - ;
  25. -}
  26. -static void NV4WaitIdle(_THIS)
  27. -{
  28. - RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET);
  29. - while ( (Rop->FifoFree < FifoEmptyCount) ||
  30. - (*(mapped_io + PGRAPH_OFFSET + 0x00000700) & 0x01) )
  31. - ;
  32. -}
  33. #if 0 /* Not yet implemented? */
  34. /* Sets video mem colorkey and accelerated blit function */
  35. @@ -74,7 +58,6 @@ static int FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color)
  36. {
  37. int dstX, dstY;
  38. int dstW, dstH;
  39. - RivaBitmap *Bitmap = (RivaBitmap *)(mapped_io + BITMAP_OFFSET);
  40. /* Don't blit to the display surface when switched away */
  41. if ( switched_away ) {
  42. @@ -93,13 +76,6 @@ static int FillHWRect(_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color)
  43. dstX += rect->x;
  44. dstY += rect->y;
  45. - RIVA_FIFO_FREE(Bitmap, 1);
  46. - Bitmap->Color1A = color;
  47. -
  48. - RIVA_FIFO_FREE(Bitmap, 2);
  49. - Bitmap->UnclippedRectangle[0].TopLeft = (dstX << 16) | dstY;
  50. - Bitmap->UnclippedRectangle[0].WidthHeight = (dstW << 16) | dstH;
  51. -
  52. FB_AddBusySurface(dst);
  53. if ( dst == this->screen ) {
  54. @@ -115,7 +91,6 @@ static int HWAccelBlit(SDL_Surface *src, SDL_Rect *srcrect,
  55. int srcX, srcY;
  56. int dstX, dstY;
  57. int dstW, dstH;
  58. - RivaScreenBlt *Blt = (RivaScreenBlt *)(mapped_io + BLT_OFFSET);
  59. /* FIXME: For now, only blit to display surface */
  60. if ( dst->pitch != SDL_VideoSurface->pitch ) {
  61. @@ -142,11 +117,6 @@ static int HWAccelBlit(SDL_Surface *src, SDL_Rect *srcrect,
  62. dstX += dstrect->x;
  63. dstY += dstrect->y;
  64. - RIVA_FIFO_FREE(Blt, 3);
  65. - Blt->TopLeftSrc = (srcY << 16) | srcX;
  66. - Blt->TopLeftDst = (dstY << 16) | dstX;
  67. - Blt->WidthHeight = (dstH << 16) | dstW;
  68. -
  69. FB_AddBusySurface(src);
  70. FB_AddBusySurface(dst);
  71. @@ -185,23 +155,15 @@ static int CheckHWBlit(_THIS, SDL_Surface *src, SDL_Surface *dst)
  72. void FB_RivaAccel(_THIS, __u32 card)
  73. {
  74. - RivaRop *Rop = (RivaRop *)(mapped_io + ROP_OFFSET);
  75. /* We have hardware accelerated surface functions */
  76. this->CheckHWBlit = CheckHWBlit;
  77. wait_vbl = WaitVBL;
  78. switch (card) {
  79. - case FB_ACCEL_NV3:
  80. - wait_idle = NV3WaitIdle;
  81. - break;
  82. - case FB_ACCEL_NV4:
  83. - wait_idle = NV4WaitIdle;
  84. - break;
  85. default:
  86. /* Hmm... FIXME */
  87. break;
  88. }
  89. - FifoEmptyCount = Rop->FifoFree;
  90. /* The Riva has an accelerated color fill */
  91. this->info.blit_fill = 1;
  92. diff --git a/src/video/fbcon/SDL_fbvideo.c b/src/video/fbcon/SDL_fbvideo.c
  93. index 5e5880908..dee999cbd 100644
  94. --- a/src/video/fbcon/SDL_fbvideo.c
  95. +++ b/src/video/fbcon/SDL_fbvideo.c
  96. @@ -46,7 +46,6 @@
  97. #include "SDL_fbevents_c.h"
  98. #include "SDL_fb3dfx.h"
  99. #include "SDL_fbmatrox.h"
  100. -#include "SDL_fbriva.h"
  101. /*#define FBCON_DEBUG*/
  102. @@ -769,13 +768,6 @@ static int FB_VideoInit(_THIS, SDL_PixelFormat *vformat)
  103. #endif
  104. FB_3DfxAccel(this, finfo.accel);
  105. break;
  106. - case FB_ACCEL_NV3:
  107. - case FB_ACCEL_NV4:
  108. -#ifdef FBACCEL_DEBUG
  109. - printf("NVidia hardware accelerator!\n");
  110. -#endif
  111. - FB_RivaAccel(this, finfo.accel);
  112. - break;
  113. default:
  114. #ifdef FBACCEL_DEBUG
  115. printf("Unknown hardware accelerator.\n");