sis_accel.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:17k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /*
  2.  * SiS 300/630/730/540/315/550/650/740 frame buffer driver
  3.  * for Linux kernels 2.4.x and 2.5.x
  4.  *
  5.  * 2D acceleration part
  6.  *
  7.  * Based on the X driver's sis300_accel.h which is
  8.  *     Copyright Xavier Ducoin <x.ducoin@lectra.com>
  9.  *     Copyright 2002 by Thomas Winischhofer, Vienna, Austria
  10.  * and sis310_accel.h which is
  11.  *     Copyright 2002 by Thomas Winischhofer, Vienna, Austria
  12.  *
  13.  * Author:   Thomas Winischhofer <thomas@winischhofer.net>:
  14.  * (see http://www.winischhofer.net/
  15.  * for more information and updates)
  16.  */
  17. #ifndef _SISFB_ACCEL_H
  18. #define _SISFB_ACCEL_H
  19. /* Guard accelerator accesses with spin_lock_irqsave? Works well without. */
  20. #undef SISFB_USE_SPINLOCKS
  21. #ifdef SISFB_USE_SPINLOCKS
  22. #include <linux/spinlock.h>
  23. #define CRITBEGIN  spin_lock_irqsave(&ivideo.lockaccel), critflags);
  24. #define CRITEND    spin_unlock_irqrestore(&ivideo.lockaccel), critflags);
  25. #define CRITFLAGS  unsigned long critflags;
  26. #else
  27. #define CRITBEGIN
  28. #define CRITEND
  29. #define CRITFLAGS
  30. #endif
  31. /* Definitions for the SIS engine communication. */
  32. #define PATREGSIZE      384  /* Pattern register size. 384 bytes @ 0x8300 */
  33. #define BR(x)   (0x8200 | (x) << 2)
  34. #define PBR(x)  (0x8300 | (x) << 2)
  35. /* SiS300 engine commands */
  36. #define BITBLT                  0x00000000  /* Blit */
  37. #define COLOREXP                0x00000001  /* Color expand */
  38. #define ENCOLOREXP              0x00000002  /* Enhanced color expand */
  39. #define MULTIPLE_SCANLINE       0x00000003  /* ? */
  40. #define LINE                    0x00000004  /* Draw line */
  41. #define TRAPAZOID_FILL          0x00000005  /* Fill trapezoid */
  42. #define TRANSPARENT_BITBLT      0x00000006  /* Transparent Blit */
  43. /* Additional engine commands for 310/325 */
  44. #define ALPHA_BLEND 0x00000007  /* Alpha blend ? */
  45. #define A3D_FUNCTION 0x00000008  /* 3D command ? */
  46. #define CLEAR_Z_BUFFER 0x00000009  /* ? */
  47. #define GRADIENT_FILL 0x0000000A  /* Gradient fill */
  48. #define STRETCH_BITBLT 0x0000000B  /* Stretched Blit */
  49. /* source select */
  50. #define SRCVIDEO                0x00000000  /* source is video RAM */
  51. #define SRCSYSTEM               0x00000010  /* source is system memory */
  52. #define SRCCPUBLITBUF           SRCSYSTEM   /* source is CPU-driven BitBuffer (for color expand) */
  53. #define SRCAGP                  0x00000020  /* source is AGP memory (?) */
  54. /* Pattern flags */
  55. #define PATFG                   0x00000000  /* foreground color */
  56. #define PATPATREG               0x00000040  /* pattern in pattern buffer (0x8300) */
  57. #define PATMONO                 0x00000080  /* mono pattern */
  58. /* blitting direction (300 series only) */
  59. #define X_INC                   0x00010000
  60. #define X_DEC                   0x00000000
  61. #define Y_INC                   0x00020000
  62. #define Y_DEC                   0x00000000
  63. /* Clipping flags */
  64. #define NOCLIP                  0x00000000
  65. #define NOMERGECLIP             0x04000000
  66. #define CLIPENABLE              0x00040000
  67. #define CLIPWITHOUTMERGE        0x04040000
  68. /* Transparency */
  69. #define OPAQUE                  0x00000000
  70. #define TRANSPARENT             0x00100000
  71. /* ? */
  72. #define DSTAGP                  0x02000000
  73. #define DSTVIDEO                0x02000000
  74. /* Line */
  75. #define LINE_STYLE              0x00800000
  76. #define NO_RESET_COUNTER        0x00400000
  77. #define NO_LAST_PIXEL           0x00200000
  78. /* Subfunctions for Color/Enhanced Color Expansion (310/325 only) */
  79. #define COLOR_TO_MONO 0x00100000
  80. #define AA_TEXT 0x00200000
  81. /* Some general registers for 310/325 series */
  82. #define SRC_ADDR 0x8200
  83. #define SRC_PITCH 0x8204
  84. #define AGP_BASE 0x8206 /* color-depth dependent value */
  85. #define SRC_Y 0x8208
  86. #define SRC_X 0x820A
  87. #define DST_Y 0x820C
  88. #define DST_X 0x820E
  89. #define DST_ADDR 0x8210
  90. #define DST_PITCH 0x8214
  91. #define DST_HEIGHT 0x8216
  92. #define RECT_WIDTH 0x8218
  93. #define RECT_HEIGHT 0x821A
  94. #define PAT_FGCOLOR 0x821C
  95. #define PAT_BGCOLOR 0x8220
  96. #define SRC_FGCOLOR 0x8224
  97. #define SRC_BGCOLOR 0x8228
  98. #define MONO_MASK 0x822C
  99. #define LEFT_CLIP 0x8234
  100. #define TOP_CLIP 0x8236
  101. #define RIGHT_CLIP 0x8238
  102. #define BOTTOM_CLIP 0x823A
  103. #define COMMAND_READY 0x823C
  104. #define FIRE_TRIGGER       0x8240
  105. #define PATTERN_REG 0x8300  /* 384 bytes pattern buffer */
  106. /* Line registers */
  107. #define LINE_X0 SRC_Y
  108. #define LINE_X1 DST_Y
  109. #define LINE_Y0 SRC_X
  110. #define LINE_Y1 DST_X
  111. #define LINE_COUNT RECT_WIDTH
  112. #define LINE_STYLE_PERIOD RECT_HEIGHT
  113. #define LINE_STYLE_0 MONO_MASK
  114. #define LINE_STYLE_1 0x8230
  115. #define LINE_XN PATTERN_REG
  116. #define LINE_YN PATTERN_REG+2
  117. /* Transparent bitblit registers */
  118. #define TRANS_DST_KEY_HIGH PAT_FGCOLOR
  119. #define TRANS_DST_KEY_LOW PAT_BGCOLOR
  120. #define TRANS_SRC_KEY_HIGH SRC_FGCOLOR
  121. #define TRANS_SRC_KEY_LOW SRC_BGCOLOR
  122. /* Queue */
  123. #define Q_BASE_ADDR 0x85C0  /* Base address of software queue (?) */
  124. #define Q_WRITE_PTR 0x85C4  /* Current write pointer (?) */
  125. #define Q_READ_PTR 0x85C8  /* Current read pointer (?) */
  126. #define Q_STATUS 0x85CC  /* queue status */
  127. #define MMIO_IN8(base, offset) 
  128. *(volatile u8 *)(((u8*)(base)) + (offset))
  129. #define MMIO_IN16(base, offset) 
  130. *(volatile u16 *)(void *)(((u8*)(base)) + (offset))
  131. #define MMIO_IN32(base, offset) 
  132. *(volatile u32 *)(void *)(((u8*)(base)) + (offset))
  133. #define MMIO_OUT8(base, offset, val) 
  134. *(volatile u8 *)(((u8*)(base)) + (offset)) = (val)
  135. #define MMIO_OUT16(base, offset, val) 
  136. *(volatile u16 *)(void *)(((u8*)(base)) + (offset)) = (val)
  137. #define MMIO_OUT32(base, offset, val) 
  138. *(volatile u32 *)(void *)(((u8*)(base)) + (offset)) = (val)
  139. /* ------------- SiS 300 series -------------- */
  140. /* Macros to do useful things with the SIS BitBLT engine */
  141. /* BR(16) (0x8420):
  142.    bit 31 2D engine: 1 is idle,
  143.    bit 30 3D engine: 1 is idle,
  144.    bit 29 Command queue: 1 is empty
  145.    bits 28:24: Current CPU driven BitBlt buffer stage bit[4:0]
  146.    bits 15:0:  Current command queue length
  147. */
  148. /* TW: BR(16)+2 = 0x8242 */
  149. int     CmdQueLen;
  150. #define SiS300Idle 
  151.   { 
  152.   while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; 
  153.   while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; 
  154.   while( (MMIO_IN16(ivideo.mmio_vbase, BR(16)+2) & 0xE000) != 0xE000){}; 
  155.   CmdQueLen=MMIO_IN16(ivideo.mmio_vbase, 0x8240); 
  156.   }
  157. /* TW: (do three times, because 2D engine seems quite unsure about whether or not it's idle) */
  158. #define SiS300SetupSRCBase(base) 
  159.                 if (CmdQueLen <= 0)  SiS300Idle;
  160.                 MMIO_OUT32(ivideo.mmio_vbase, BR(0), base);
  161.                 CmdQueLen --;
  162. #define SiS300SetupSRCPitch(pitch) 
  163.                 if (CmdQueLen <= 0)  SiS300Idle;
  164.                 MMIO_OUT16(ivideo.mmio_vbase, BR(1), pitch);
  165.                 CmdQueLen --;
  166. #define SiS300SetupSRCXY(x,y) 
  167.                 if (CmdQueLen <= 0)  SiS300Idle;
  168.                 MMIO_OUT32(ivideo.mmio_vbase, BR(2), (x)<<16 | (y) );
  169.                 CmdQueLen --;
  170. #define SiS300SetupDSTBase(base) 
  171.                 if (CmdQueLen <= 0)  SiS300Idle;
  172.                 MMIO_OUT32(ivideo.mmio_vbase, BR(4), base);
  173.                 CmdQueLen --;
  174. #define SiS300SetupDSTXY(x,y) 
  175.                 if (CmdQueLen <= 0)  SiS300Idle;
  176.                 MMIO_OUT32(ivideo.mmio_vbase, BR(3), (x)<<16 | (y) );
  177.                 CmdQueLen --;
  178. #define SiS300SetupDSTRect(x,y) 
  179.                 if (CmdQueLen <= 0)  SiS300Idle;
  180.                 MMIO_OUT32(ivideo.mmio_vbase, BR(5), (y)<<16 | (x) );
  181.                 CmdQueLen --;
  182. #define SiS300SetupDSTColorDepth(bpp) 
  183.                 if (CmdQueLen <= 0)  SiS300Idle;
  184.                 MMIO_OUT16(ivideo.mmio_vbase, BR(1)+2, bpp);
  185.                 CmdQueLen --;
  186. #define SiS300SetupRect(w,h) 
  187.                 if (CmdQueLen <= 0)  SiS300Idle;
  188.                 MMIO_OUT32(ivideo.mmio_vbase, BR(6), (h)<<16 | (w) );
  189.                 CmdQueLen --;
  190. #define SiS300SetupPATFG(color) 
  191.                 if (CmdQueLen <= 0)  SiS300Idle;
  192.                 MMIO_OUT32(ivideo.mmio_vbase, BR(7), color);
  193.                 CmdQueLen --;
  194. #define SiS300SetupPATBG(color) 
  195.                 if (CmdQueLen <= 0)  SiS300Idle;
  196.                 MMIO_OUT32(ivideo.mmio_vbase, BR(8), color);
  197.                 CmdQueLen --;
  198. #define SiS300SetupSRCFG(color) 
  199.                 if (CmdQueLen <= 0)  SiS300Idle;
  200.                 MMIO_OUT32(ivideo.mmio_vbase, BR(9), color);
  201.                 CmdQueLen --;
  202. #define SiS300SetupSRCBG(color) 
  203.                 if (CmdQueLen <= 0)  SiS300Idle;
  204.                 MMIO_OUT32(ivideo.mmio_vbase, BR(10), color);
  205.                 CmdQueLen --;
  206. /* 0x8224 src colorkey high */
  207. /* 0x8228 src colorkey low */
  208. /* 0x821c dest colorkey high */
  209. /* 0x8220 dest colorkey low */
  210. #define SiS300SetupSRCTrans(color) 
  211.                 if (CmdQueLen <= 1)  SiS300Idle;
  212.                 MMIO_OUT32(ivideo.mmio_vbase, 0x8224, color);
  213. MMIO_OUT32(ivideo.mmio_vbase, 0x8228, color);
  214. CmdQueLen -= 2;
  215. #define SiS300SetupDSTTrans(color) 
  216. if (CmdQueLen <= 1)  SiS300Idle;
  217. MMIO_OUT32(ivideo.mmio_vbase, 0x821C, color); 
  218. MMIO_OUT32(ivideo.mmio_vbase, 0x8220, color); 
  219.                 CmdQueLen -= 2;
  220. #define SiS300SetupMONOPAT(p0,p1) 
  221.                 if (CmdQueLen <= 1)  SiS300Idle;
  222.                 MMIO_OUT32(ivideo.mmio_vbase, BR(11), p0);
  223.                 MMIO_OUT32(ivideo.mmio_vbase, BR(12), p1);
  224.                 CmdQueLen -= 2;
  225. #define SiS300SetupClipLT(left,top) 
  226.                 if (CmdQueLen <= 0)  SiS300Idle;
  227.                 MMIO_OUT32(ivideo.mmio_vbase, BR(13), ((left) & 0xFFFF) | (top)<<16 );
  228.                 CmdQueLen--;
  229. #define SiS300SetupClipRB(right,bottom) 
  230.                 if (CmdQueLen <= 0)  SiS300Idle;
  231.                 MMIO_OUT32(ivideo.mmio_vbase, BR(14), ((right) & 0xFFFF) | (bottom)<<16 );
  232.                 CmdQueLen--;
  233. /* General */
  234. #define SiS300SetupROP(rop) 
  235.                 ivideo.CommandReg = (rop) << 8;
  236. #define SiS300SetupCMDFlag(flags) 
  237.                 ivideo.CommandReg |= (flags);
  238. #define SiS300DoCMD 
  239.                 if (CmdQueLen <= 1)  SiS300Idle;
  240.                 MMIO_OUT32(ivideo.mmio_vbase, BR(15), ivideo.CommandReg); 
  241.                 MMIO_OUT32(ivideo.mmio_vbase, BR(16), 0);
  242.                 CmdQueLen -= 2;
  243. /* Line */
  244. #define SiS300SetupX0Y0(x,y) 
  245.                 if (CmdQueLen <= 0)  SiS300Idle;
  246.                 MMIO_OUT32(ivideo.mmio_vbase, BR(2), (y)<<16 | (x) );
  247.                 CmdQueLen--;
  248. #define SiS300SetupX1Y1(x,y) 
  249.                 if (CmdQueLen <= 0)  SiS300Idle;
  250.                 MMIO_OUT32(ivideo.mmio_vbase, BR(3), (y)<<16 | (x) );
  251.                 CmdQueLen--;
  252. #define SiS300SetupLineCount(c) 
  253.                 if (CmdQueLen <= 0)  SiS300Idle;
  254.                 MMIO_OUT16(ivideo.mmio_vbase, BR(6), c);
  255.                 CmdQueLen--;
  256. #define SiS300SetupStylePeriod(p) 
  257.                 if (CmdQueLen <= 0)  SiS300Idle;
  258.                 MMIO_OUT16(ivideo.mmio_vbase, BR(6)+2, p);
  259.                 CmdQueLen--;
  260. #define SiS300SetupStyleLow(ls) 
  261.                 if (CmdQueLen <= 0)  SiS300Idle;
  262.                 MMIO_OUT32(ivideo.mmio_vbase, BR(11), ls);
  263.                 CmdQueLen--;
  264. #define SiS300SetupStyleHigh(ls) 
  265.                 if (CmdQueLen <= 0)  SiS300Idle;
  266.                 MMIO_OUT32(ivideo.mmio_vbase, BR(12), ls);
  267.                 CmdQueLen--;
  268. /* ----------- SiS 310/325 series --------------- */
  269. /* Q_STATUS:
  270.    bit 31 = 1: All engines idle and all queues empty
  271.    bit 30 = 1: Hardware Queue (=HW CQ, 2D queue, 3D queue) empty
  272.    bit 29 = 1: 2D engine is idle
  273.    bit 28 = 1: 3D engine is idle
  274.    bit 27 = 1: HW command queue empty
  275.    bit 26 = 1: 2D queue empty
  276.    bit 25 = 1: 3D queue empty
  277.    bit 24 = 1: SW command queue empty
  278.    bits 23:16: 2D counter 3
  279.    bits 15:8:  2D counter 2
  280.    bits 7:0:   2D counter 1
  281.    Where is the command queue length (current amount of commands the queue
  282.    can accept) on the 310/325 series? (The current implementation is taken
  283.    from 300 series and certainly wrong...)
  284. */
  285. /* TW: FIXME: CmdQueLen is... where....? */
  286. #define SiS310Idle 
  287.   { 
  288.   while( (MMIO_IN16(ivideo.mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; 
  289.   while( (MMIO_IN16(ivideo.mmio_vbase, Q_STATUS+2) & 0x8000) != 0x8000){}; 
  290.   CmdQueLen=MMIO_IN16(ivideo.mmio_vbase, Q_STATUS); 
  291.   }
  292. #define SiS310SetupSRCBase(base) 
  293.       if (CmdQueLen <= 0)  SiS310Idle;
  294.       MMIO_OUT32(ivideo.mmio_vbase, SRC_ADDR, base);
  295.       CmdQueLen--;
  296. #define SiS310SetupSRCPitch(pitch) 
  297.       if (CmdQueLen <= 0)  SiS310Idle;
  298.       MMIO_OUT16(ivideo.mmio_vbase, SRC_PITCH, pitch);
  299.       CmdQueLen--;
  300. #define SiS310SetupSRCXY(x,y) 
  301.       if (CmdQueLen <= 0)  SiS310Idle;
  302.       MMIO_OUT32(ivideo.mmio_vbase, SRC_Y, (x)<<16 | (y) );
  303.       CmdQueLen--;
  304. #define SiS310SetupDSTBase(base) 
  305.       if (CmdQueLen <= 0)  SiS310Idle;
  306.       MMIO_OUT32(ivideo.mmio_vbase, DST_ADDR, base);
  307.       CmdQueLen--;
  308. #define SiS310SetupDSTXY(x,y) 
  309.       if (CmdQueLen <= 0)  SiS310Idle;
  310.       MMIO_OUT32(ivideo.mmio_vbase, DST_Y, (x)<<16 | (y) );
  311.       CmdQueLen--;
  312. #define SiS310SetupDSTRect(x,y) 
  313.       if (CmdQueLen <= 0)  SiS310Idle;
  314.       MMIO_OUT32(ivideo.mmio_vbase, DST_PITCH, (y)<<16 | (x) );
  315.       CmdQueLen--;
  316. #define SiS310SetupDSTColorDepth(bpp) 
  317.       if (CmdQueLen <= 0)  SiS310Idle;
  318.       MMIO_OUT16(ivideo.mmio_vbase, AGP_BASE, bpp);
  319.       CmdQueLen--;
  320. #define SiS310SetupRect(w,h) 
  321.       if (CmdQueLen <= 0)  SiS310Idle;
  322.       MMIO_OUT32(ivideo.mmio_vbase, RECT_WIDTH, (h)<<16 | (w) );
  323.       CmdQueLen--;
  324. #define SiS310SetupPATFG(color) 
  325.       if (CmdQueLen <= 0)  SiS310Idle;
  326.       MMIO_OUT32(ivideo.mmio_vbase, PAT_FGCOLOR, color);
  327.       CmdQueLen--;
  328. #define SiS310SetupPATBG(color) 
  329.       if (CmdQueLen <= 0)  SiS310Idle;
  330.       MMIO_OUT32(ivideo.mmio_vbase, PAT_BGCOLOR, color);
  331.       CmdQueLen--;
  332. #define SiS310SetupSRCFG(color) 
  333.       if (CmdQueLen <= 0)  SiS310Idle;
  334.       MMIO_OUT32(ivideo.mmio_vbase, SRC_FGCOLOR, color);
  335.       CmdQueLen--;
  336. #define SiS310SetupSRCBG(color) 
  337.       if (CmdQueLen <= 0)  SiS310Idle;
  338.       MMIO_OUT32(ivideo.mmio_vbase, SRC_BGCOLOR, color);
  339.       CmdQueLen--;
  340. #define SiS310SetupSRCTrans(color) 
  341.       if (CmdQueLen <= 1)  SiS310Idle;
  342.       MMIO_OUT32(ivideo.mmio_vbase, TRANS_SRC_KEY_HIGH, color);
  343.       MMIO_OUT32(ivideo.mmio_vbase, TRANS_SRC_KEY_LOW, color);
  344.       CmdQueLen -= 2;
  345. #define SiS310SetupDSTTrans(color) 
  346.       if (CmdQueLen <= 1)  SiS310Idle;
  347.       MMIO_OUT32(ivideo.mmio_vbase, TRANS_DST_KEY_HIGH, color); 
  348.       MMIO_OUT32(ivideo.mmio_vbase, TRANS_DST_KEY_LOW, color); 
  349.       CmdQueLen -= 2;
  350. #define SiS310SetupMONOPAT(p0,p1) 
  351.       if (CmdQueLen <= 1)  SiS310Idle;
  352.       MMIO_OUT32(ivideo.mmio_vbase, MONO_MASK, p0);
  353.       MMIO_OUT32(ivideo.mmio_vbase, MONO_MASK+4, p1);
  354.       CmdQueLen -= 2;
  355. #define SiS310SetupClipLT(left,top) 
  356.       if (CmdQueLen <= 0)  SiS310Idle;
  357.       MMIO_OUT32(ivideo.mmio_vbase, LEFT_CLIP, ((left) & 0xFFFF) | (top)<<16 );
  358.       CmdQueLen--;
  359. #define SiS310SetupClipRB(right,bottom) 
  360.       if (CmdQueLen <= 0)  SiS310Idle;
  361.       MMIO_OUT32(ivideo.mmio_vbase, RIGHT_CLIP, ((right) & 0xFFFF) | (bottom)<<16 );
  362.       CmdQueLen--;
  363. #define SiS310SetupROP(rop) 
  364.       ivideo.CommandReg = (rop) << 8;
  365. #define SiS310SetupCMDFlag(flags) 
  366.       ivideo.CommandReg |= (flags);
  367. #define SiS310DoCMD 
  368.       if (CmdQueLen <= 1)  SiS310Idle;
  369.       MMIO_OUT32(ivideo.mmio_vbase, COMMAND_READY, ivideo.CommandReg); 
  370.       MMIO_OUT32(ivideo.mmio_vbase, FIRE_TRIGGER, 0); 
  371.       CmdQueLen -= 2;
  372. #define SiS310SetupX0Y0(x,y) 
  373.       if (CmdQueLen <= 0)  SiS310Idle;
  374.       MMIO_OUT32(ivideo.mmio_vbase, LINE_X0, (y)<<16 | (x) );
  375.       CmdQueLen--;
  376. #define SiS310SetupX1Y1(x,y) 
  377.       if (CmdQueLen <= 0)  SiS310Idle;
  378.       MMIO_OUT32(ivideo.mmio_vbase, LINE_X1, (y)<<16 | (x) );
  379.       CmdQueLen--;
  380. #define SiS310SetupLineCount(c) 
  381.       if (CmdQueLen <= 0)  SiS310Idle;
  382.       MMIO_OUT16(ivideo.mmio_vbase, LINE_COUNT, c);
  383.       CmdQueLen--;
  384. #define SiS310SetupStylePeriod(p) 
  385.       if (CmdQueLen <= 0)  SiS310Idle;
  386.       MMIO_OUT16(ivideo.mmio_vbase, LINE_STYLE_PERIOD, p);
  387.       CmdQueLen--;
  388. #define SiS310SetupStyleLow(ls) 
  389.       if (CmdQueLen <= 0)  SiS310Idle;
  390.       MMIO_OUT32(ivideo.mmio_vbase, LINE_STYLE_0, ls);
  391.       CmdQueLen--;
  392. #define SiS310SetupStyleHigh(ls) 
  393.       if (CmdQueLen <= 0)  SiS310Idle;
  394.       MMIO_OUT32(ivideo.mmio_vbase, LINE_STYLE_1, ls);
  395.       CmdQueLen--;
  396. int  sisfb_initaccel(void);
  397. #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,33)
  398. void fbcon_sis_bmove(struct display *p, int srcy, int srcx, int dsty,
  399.                      int dstx, int height, int width);
  400. void fbcon_sis_revc(struct display *p, int srcy, int srcx);
  401. void fbcon_sis_clear8(struct vc_data *conp, struct display *p, int srcy,
  402.                       int srcx, int height, int width);
  403. void fbcon_sis_clear16(struct vc_data *conp, struct display *p, int srcy,
  404.                        int srcx, int height, int width);
  405. void fbcon_sis_clear32(struct vc_data *conp, struct display *p, int srcy,
  406.                        int srcx, int height, int width);
  407. #endif
  408. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
  409. extern int sisfb_accel;
  410. void fbcon_sis_fillrect(struct fb_info *info, struct fb_fillrect *rect);
  411. void fbcon_sis_copyarea(struct fb_info *info, struct fb_copyarea *area);
  412. extern void cfb_fillrect(struct fb_info *info, struct fb_fillrect *rect);
  413. extern void cfb_copyarea(struct fb_info *info, struct fb_copyarea *area);
  414. #endif
  415. #endif