Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

595 lines
21 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: hw.h
  3. *
  4. * All the hardware specific driver file stuff.
  5. *
  6. * Copyright (c) 1992-1994 Microsoft Corporation
  7. *
  8. \**************************************************************************/
  9. ////////////////////////////////////////////////////////////////////////
  10. // Chip equates:
  11. #define STATUS_1 0x3DA
  12. #define VSY_NOT 0x08
  13. #define CRTC_INDEX 0x3D4
  14. #define CRTC_DATA 0x3D5
  15. // Command types:
  16. #define DRAW_LINE 0x2000
  17. #define RECTANGLE_FILL 0x4000
  18. #define BITBLT 0xC000
  19. #define PATTERN_FILL 0xE000
  20. #define BYTE_SWAP 0x1000
  21. #define BUS_SIZE_16 0x0200
  22. #define BUS_SIZE_8 0x0000
  23. #define WAIT 0x0100
  24. // Drawing directions (radial):
  25. #define DRAWING_DIRECTION_0 0x0000
  26. #define DRAWING_DIRECTION_45 0x0020
  27. #define DRAWING_DIRECTION_90 0x0040
  28. #define DRAWING_DIRECTION_135 0x0060
  29. #define DRAWING_DIRECTION_180 0x0080
  30. #define DRAWING_DIRECTION_225 0x00A0
  31. #define DRAWING_DIRECTION_270 0x00C0
  32. #define DRAWING_DIRECTION_315 0x00E0
  33. // Drawing directions (x/y):
  34. #define DRAWING_DIR_BTRLXM 0x0000
  35. #define DRAWING_DIR_BTLRXM 0x0020
  36. #define DRAWING_DIR_BTRLYM 0x0040
  37. #define DRAWING_DIR_BTLRYM 0x0060
  38. #define DRAWING_DIR_TBRLXM 0x0080
  39. #define DRAWING_DIR_TBLRXM 0x00A0
  40. #define DRAWING_DIR_TBRLYM 0x00C0
  41. #define DRAWING_DIR_TBLRYM 0x00E0
  42. // Drawing direction bits:
  43. #define PLUS_X 0x0020
  44. #define PLUS_Y 0x0080
  45. #define MAJOR_Y 0x0040
  46. // Draw:
  47. #define DRAW 0x0010
  48. // Direction type:
  49. #define DIR_TYPE_RADIAL 0x0008
  50. #define DIR_TYPE_XY 0x0000
  51. // Last pixel:
  52. #define LAST_PIXEL_OFF 0x0004
  53. #define LAST_PIXEL_ON 0x0000
  54. // Pixel mode:
  55. #define MULTIPLE_PIXELS 0x0002
  56. #define SINGLE_PIXEL 0x0000
  57. // Read/write:
  58. #define READ 0x0000
  59. #define WRITE 0x0001
  60. // Graphics processor status:
  61. #define HARDWARE_BUSY 0x200
  62. #define READ_DATA_AVAILABLE 0x100
  63. // Fifo status in terms of empty entries:
  64. #define FIFO_1_EMPTY 0x080
  65. #define FIFO_2_EMPTY 0x040
  66. #define FIFO_3_EMPTY 0x020
  67. #define FIFO_4_EMPTY 0x010
  68. #define FIFO_5_EMPTY 0x008
  69. #define FIFO_6_EMPTY 0x004
  70. #define FIFO_7_EMPTY 0x002
  71. #define FIFO_8_EMPTY 0x001
  72. // These are the defines for the multifunction control register.
  73. // The 4 MSBs define the function of the register.
  74. #define RECT_HEIGHT 0x0000
  75. #define CLIP_TOP 0x1000
  76. #define CLIP_LEFT 0x2000
  77. #define CLIP_BOTTOM 0x3000
  78. #define CLIP_RIGHT 0x4000
  79. #define DATA_EXTENSION 0xA000
  80. #define MULT_MISC_INDEX 0xE000
  81. #define READ_SEL_INDEX 0xF000
  82. #define ALL_ONES 0x0000
  83. #define CPU_DATA 0x0080
  84. #define DISPLAY_MEMORY 0x00C0
  85. // Colour source:
  86. #define BACKGROUND_COLOR 0x00
  87. #define FOREGROUND_COLOR 0x20
  88. #define SRC_CPU_DATA 0x40
  89. #define SRC_DISPLAY_MEMORY 0x60
  90. // Mix modes:
  91. #define NOT_SCREEN 0x00
  92. #define LOGICAL_0 0x01
  93. #define LOGICAL_1 0x02
  94. #define LEAVE_ALONE 0x03
  95. #define NOT_NEW 0x04
  96. #define SCREEN_XOR_NEW 0x05
  97. #define NOT_SCREEN_XOR_NEW 0x06
  98. #define OVERPAINT 0x07
  99. #define NOT_SCREEN_OR_NOT_NEW 0x08
  100. #define SCREEN_OR_NOT_NEW 0x09
  101. #define NOT_SCREEN_OR_NEW 0x0A
  102. #define SCREEN_OR_NEW 0x0B
  103. #define SCREEN_AND_NEW 0x0C
  104. #define NOT_SCREEN_AND_NEW 0x0D
  105. #define SCREEN_AND_NOT_NEW 0x0E
  106. #define NOT_SCREEN_AND_NOT_NEW 0x0F
  107. // When one of the following bits is set in a hardware mix, it means
  108. // that a pattern is needed (i.e., is none of NOT_SCREEN, LOGICAL_0,
  109. // LOGICAL_1 or LEAVE_ALONE):
  110. #define MIX_NEEDSPATTERN 0x0C
  111. ////////////////////////////////////////////////////////////////////
  112. // 8514/A port control
  113. ////////////////////////////////////////////////////////////////////
  114. // Accelerator port addresses:
  115. #define SUBSYS_CNTL 0x42E8
  116. #define CUR_Y 0x82E8
  117. #define CUR_X 0x86E8
  118. #define DEST_Y 0x8AE8
  119. #define DEST_X 0x8EE8
  120. #define AXSTP 0x8AE8
  121. #define DIASTP 0x8EE8
  122. #define ERR_TERM 0x92E8
  123. #define MAJ_AXIS_PCNT 0x96E8
  124. #define CMD 0x9AE8
  125. #define SHORT_STROKE 0x9EE8
  126. #define BKGD_COLOR 0xA2E8
  127. #define FRGD_COLOR 0xA6E8
  128. #define WRT_MASK 0xAAE8
  129. #define RD_MASK 0xAEE8
  130. #define COLOR_CMP 0xB2E8
  131. #define BKGD_MIX 0xB6E8
  132. #define FRGD_MIX 0xBAE8
  133. #define MULTIFUNC_CNTL 0xBEE8
  134. #define MIN_AXIS_PCNT 0xBEE8
  135. #define SCISSORS_T 0xBEE8
  136. #define SCISSORS_L 0xBEE8
  137. #define SCISSORS_B 0xBEE8
  138. #define SCISSORS_R 0xBEE8
  139. #define PIX_CNTL 0xBEE8
  140. #define PIX_TRANS 0xE2E8
  141. ////////////////////////////////////////////////////////////////////
  142. // Macros for accessing accelerator registers:
  143. #if defined(i386)
  144. /////////////////////////////////////////////////////////////////////////
  145. // x86
  146. // Note: Don't cast (x) to a USHORT or compiler optimizations will
  147. // be lost (the x86 compiler will convert any argument expressions
  148. // to word operations, which will incur a one byte/one cycle
  149. // size/performance hit from the resulting 0x66 size prefixes).
  150. #define OUTPW(p, x) WRITE_PORT_USHORT((p), (x))
  151. #define OUTP(p, x) WRITE_PORT_UCHAR((p), (x))
  152. #define INPW(p) READ_PORT_USHORT(p)
  153. #define INP(p) READ_PORT_UCHAR(p)
  154. #define IN_WORD(p) INPW(p)
  155. #define OUT_WORD(p, v) OUTPW((p), (v))
  156. // Our x86 C compiler was insisting on turning any expression
  157. // arguments into word operations -- e.g., WRITE_WORD(x + xOffset)
  158. // where both 'x' and 'xOffset' were dwords would get converted to
  159. // a word add operation before the word was written to memory. With a
  160. // 32-bit segment, every word operation costs us a byte in size and a
  161. // cycle in performance.
  162. //
  163. // The following expression was the only one I could find that gave me
  164. // the asm I was looking for -- the only word operation is the final
  165. // word write to memory.
  166. #define WRITE_WORD(address, x) \
  167. { \
  168. LONG l = (LONG) x; \
  169. WRITE_REGISTER_USHORT((address), (USHORT) (l)); \
  170. }
  171. #else
  172. /////////////////////////////////////////////////////////////////////////
  173. // Alpha and Mips
  174. //
  175. // The code makes extensive use of the inp, inpw, outp and outpw x86
  176. // intrinsic functions. Since these don't exist on the Alpha platform,
  177. // map them into something we can handle. Since the CSRs are mapped
  178. // on Alpha, we have to add the register base to the register number
  179. // passed in the source.
  180. extern UCHAR* gpucCsrBase;
  181. #define INP(p) READ_PORT_UCHAR(gpucCsrBase + (p))
  182. #define INPW(p) READ_PORT_USHORT(gpucCsrBase + (p))
  183. #define OUTP(p,v ) WRITE_PORT_UCHAR(gpucCsrBase + (p), (v))
  184. #define OUTPW(p, v) WRITE_PORT_USHORT(gpucCsrBase + (p), (v))
  185. // OUT_WORD is a quick OUT routine where we can explicitly handle
  186. // MEMORY_BARRIERs ourselves. It is best to use OUTPW for non-critical
  187. // code, because it's easy to overwrite the IO cache when MEMORY_BARRIERs
  188. // aren't bracketing everything. Note that the IO_ routines provide
  189. // the necessary abstraction so that you don't usually have to think
  190. // about memory barriers.
  191. #define OUT_WORD(p, v) WRITE_REGISTER_USHORT(gpucCsrBase + (p), (USHORT) (v))
  192. #define IN_WORD(p) READ_PORT_USHORT(gpucCsrBase + (p))
  193. #define WRITE_WORD(p, v) // Shouldn't be using this on non-x86
  194. // We redefine 'inp', 'inpw', 'outp' and 'outpw' just in case someone
  195. // forgets to use the capitalized versions (so that it still works on
  196. // the Mips/Alpha):
  197. #define inp(p) INP(p)
  198. #define inpw(p) INPW(p)
  199. #define outp(p, v) OUTP((p), (v))
  200. #define outpw(p, v) OUTPW((p), (v))
  201. #endif
  202. #define OUT_DWORD(p, x) // 8514/a doesn't do 32bpp
  203. #define WRITE_DWORD(p, x) // 8514/a doesn't do 32bpp
  204. // DEPTH32(ppdev) returns TRUE if running at 32bpp, meaning that DEPTH32
  205. // macros must be used, and returns FALSE if running at 8 or 16bpp,
  206. // meaning that DEPTH macros must be used:
  207. #define DEPTH32(ppdev) (FALSE)
  208. #define MM_BKGD_COLOR32(ppdev, pjMmBase, x) // Not used
  209. #define MM_FRGD_COLOR32(ppdev, pjMmBase, x) // Not used
  210. #define MM_WRT_MASK32(ppdev, pjMmBase, x) // Not used
  211. #define MM_RD_MASK32(ppdev, pjMmBase, x) // Not used
  212. #define MM_FRGD_MIX(ppdev, pjMmBase, x) // Not used
  213. #define MM_BKGD_MIX(ppdev, pjMmBase, x) // Not used
  214. #if DBG
  215. /////////////////////////////////////////////////////////////////////////
  216. // Checked Build
  217. //
  218. // We hook some of the accelerator macros on checked (debug) builds
  219. // for sanity checking.
  220. VOID vOutAccel(ULONG, ULONG);
  221. VOID vOutDepth(PDEV*, ULONG, ULONG);
  222. VOID vOutDepth32(PDEV*, ULONG, ULONG);
  223. VOID vWriteAccel(VOID*, ULONG);
  224. VOID vWriteDepth(PDEV*, VOID*, ULONG);
  225. VOID vWriteDepth32(PDEV*, VOID*, ULONG);
  226. VOID vFifoWait(PDEV*, LONG);
  227. VOID vGpWait(PDEV*);
  228. VOID vCheckDataReady(PDEV*);
  229. VOID vCheckDataComplete(PDEV*);
  230. #define IN_ACCEL(p) IN_WORD(p)
  231. #define OUT_ACCEL(p, v) vOutAccel((p), (ULONG) (v))
  232. #define OUT_DEPTH(ppdev, p, v) vOutDepth((ppdev), (p), (ULONG) (v))
  233. #define OUT_DEPTH32(ppdev, p, v) vOutDepth32((ppdev), (p), (ULONG) (v))
  234. #define WRITE_ACCEL(p, v) vWriteAccel((p), (ULONG) (v))
  235. #define WRITE_DEPTH(ppdev, p, v) vWriteDepth((ppdev), (p), (ULONG) (v))
  236. #define WRITE_DEPTH32(ppdev, p, v) vWriteDepth32((ppdev), (p), (ULONG) (v))
  237. #define IO_FIFO_WAIT(ppdev, level) vFifoWait((ppdev), (level))
  238. #define IO_GP_WAIT(ppdev) vGpWait(ppdev)
  239. #define CHECK_DATA_READY(ppdev) vCheckDataReady(ppdev)
  240. #define CHECK_DATA_COMPLETE(ppdev) vCheckDataComplete(ppdev)
  241. #else
  242. /////////////////////////////////////////////////////////////////////////
  243. // Free Build
  244. //
  245. // For a free (non-debug build), we make everything in-line.
  246. #define IN_ACCEL(p) IN_WORD(p)
  247. #define OUT_ACCEL(p, v) OUT_WORD((p), (v))
  248. #define OUT_DEPTH(ppdev, p, x) OUT_WORD((p), (x))
  249. #define OUT_DEPTH32(ppdev, p, x) OUT_DWORD((p), (x))
  250. #define WRITE_ACCEL(p, v) WRITE_WORD((p), (v))
  251. #define WRITE_DEPTH(ppdev, p, x) WRITE_WORD((p), (x))
  252. #define WRITE_DEPTH32(ppdev, p, x) WRITE_DWORD((p), (x))
  253. #define IO_FIFO_WAIT(ppdev, level) \
  254. while (IO_GP_STAT(ppdev) & ((FIFO_1_EMPTY << 1) >> (level)));
  255. #define IO_GP_WAIT(ppdev) \
  256. while (IO_GP_STAT(ppdev) & HARDWARE_BUSY);
  257. #define CHECK_DATA_READY(ppdev) // Expands to nothing
  258. #define CHECK_DATA_COMPLETE(ppdev) // Expands to nothing
  259. #endif
  260. // IO_TEST_WAIT is a useful replacement to IO_FIFO_WAIT that can give
  261. // some indication of how often we have to wait for the hardware to
  262. // finish drawing in key areas:
  263. #define IO_TEST_WAIT(ppdev, level, cTotal, cWait) \
  264. { \
  265. cTotal++; \
  266. if (IO_GP_STAT(ppdev) & ((FIFO_1_EMPTY << 1) >> (level))) \
  267. { \
  268. cWait++; \
  269. IO_FIFO_WAIT(ppdev, level); \
  270. } \
  271. }
  272. ////////////////////////////////////////////////////////////////////
  273. // Port access using I/O
  274. // The following are ABSOLUTE positioning macros. They do NOT take
  275. // the surface's offset into account (for off-screen device-format
  276. // bitmaps):
  277. #define IO_ABS_CUR_Y(ppdev, y) \
  278. OUT_ACCEL(CUR_Y, (y))
  279. #define IO_ABS_CUR_X(ppdev, x) \
  280. OUT_ACCEL(CUR_X, (x))
  281. #define IO_ABS_DEST_Y(ppdev, y) \
  282. OUT_ACCEL(DEST_Y, (y))
  283. #define IO_ABS_DEST_X(ppdev, x) \
  284. OUT_ACCEL(DEST_X, (x))
  285. #define IO_ABS_SCISSORS_T(ppdev, y) \
  286. { \
  287. OUT_ACCEL(SCISSORS_T, (y) | CLIP_TOP); \
  288. }
  289. #define IO_ABS_SCISSORS_L(ppdev, x) \
  290. { \
  291. OUT_ACCEL(SCISSORS_L, (x) | CLIP_LEFT); \
  292. }
  293. #define IO_ABS_SCISSORS_B(ppdev, y) \
  294. { \
  295. OUT_ACCEL(SCISSORS_B, (y) | CLIP_BOTTOM); \
  296. }
  297. #define IO_ABS_SCISSORS_R(ppdev, x) \
  298. { \
  299. OUT_ACCEL(SCISSORS_R, (x) | CLIP_RIGHT);\
  300. }
  301. // The following are RELATIVE positioning macros. They DO take
  302. // the surface's offset into account:
  303. #define IO_CUR_Y(ppdev, y) \
  304. IO_ABS_CUR_Y(ppdev, (y) + ppdev->yOffset)
  305. #define IO_CUR_X(ppdev, x) \
  306. IO_ABS_CUR_X(ppdev, (x) + ppdev->xOffset)
  307. #define IO_DEST_Y(ppdev, y) \
  308. IO_ABS_DEST_Y(ppdev, (y) + ppdev->yOffset)
  309. #define IO_DEST_X(ppdev, x) \
  310. IO_ABS_DEST_X(ppdev, (x) + ppdev->xOffset)
  311. #define IO_SCISSORS_T(ppdev, y) \
  312. IO_ABS_SCISSORS_T(ppdev, (y) + ppdev->yOffset)
  313. #define IO_SCISSORS_L(ppdev, x) \
  314. IO_ABS_SCISSORS_L(ppdev, (x) + ppdev->xOffset)
  315. #define IO_SCISSORS_B(ppdev, y) \
  316. IO_ABS_SCISSORS_B(ppdev, (y) + ppdev->yOffset)
  317. #define IO_SCISSORS_R(ppdev, x) \
  318. IO_ABS_SCISSORS_R(ppdev, (x) + ppdev->xOffset)
  319. #define IO_AXSTP(ppdev, x) \
  320. OUT_ACCEL(AXSTP, (x))
  321. #define IO_DIASTP(ppdev, x) \
  322. OUT_ACCEL(DIASTP, (x))
  323. #define IO_ERR_TERM(ppdev, x) \
  324. OUT_ACCEL(ERR_TERM, (x))
  325. #define IO_MAJ_AXIS_PCNT(ppdev, x) \
  326. OUT_ACCEL(MAJ_AXIS_PCNT, (x))
  327. #define IO_GP_STAT(ppdev) \
  328. IN_ACCEL(CMD)
  329. // Note that we have to put memory barriers before and after the
  330. // command output. The first memory barrier ensures that all the
  331. // settings registers have been set before the command is executed,
  332. // and the second ensures that no subsequent changes to the settings
  333. // registers will mess up the current command:
  334. #define IO_CMD(ppdev, x) \
  335. { \
  336. OUT_ACCEL(CMD, (x)); \
  337. }
  338. #define IO_SHORT_STROKE(ppdev, x) \
  339. OUT_ACCEL(SHORT_STROKE, (x))
  340. #define IO_BKGD_MIX(ppdev, x) \
  341. OUT_ACCEL(BKGD_MIX, (x))
  342. #define IO_FRGD_MIX(ppdev, x) \
  343. OUT_ACCEL(FRGD_MIX, (x))
  344. #define IO_MIN_AXIS_PCNT(ppdev, x) \
  345. { \
  346. OUT_ACCEL(MIN_AXIS_PCNT, (x) | RECT_HEIGHT); \
  347. }
  348. #define IO_PIX_CNTL(ppdev, x) \
  349. { \
  350. OUT_ACCEL(PIX_CNTL, (x) | DATA_EXTENSION); \
  351. }
  352. #define IO_READ_SEL(ppdev, x) // Not used
  353. #define IO_MULT_MISC(ppdev, x) // Not used
  354. #define IO_RD_REG_DT(ppdev, x) // Not used
  355. #define IO_PIX_TRANS(ppdev, x) \
  356. { \
  357. /* Can't use OUT_ACCEL: */ \
  358. OUT_WORD(PIX_TRANS, (x)); \
  359. }
  360. // Macros for outputing colour-depth dependent values at 8bpp and 16bpp:
  361. #define IO_BKGD_COLOR(ppdev, x) \
  362. OUT_DEPTH(ppdev, BKGD_COLOR, (x))
  363. #define IO_FRGD_COLOR(ppdev, x) \
  364. OUT_DEPTH(ppdev, FRGD_COLOR, (x))
  365. #define IO_WRT_MASK(ppdev, x) \
  366. OUT_DEPTH(ppdev, WRT_MASK, (x))
  367. #define IO_RD_MASK(ppdev, x) \
  368. OUT_DEPTH(ppdev, RD_MASK, (x))
  369. ////////////////////////////////////////////////////////////////////
  370. // Thunk this!
  371. #define WAIT_FOR_DATA_AVAILABLE(ppdev) \
  372. { \
  373. while (!(IO_GP_STAT(ppdev) & READ_DATA_AVAILABLE)) \
  374. ; \
  375. }
  376. #define IO_PIX_TRANS_IN(ppdev, x) \
  377. { \
  378. (WORD) x = IN_ACCEL(PIX_TRANS); \
  379. }
  380. #define IO_PIX_TRANS_OUT(ppdev, x) \
  381. { \
  382. /* Can't use OUT_ACCEL: */ \
  383. OUT_WORD(PIX_TRANS, (x)); \
  384. }
  385. ///////////////////////////////////////////////////////////////////
  386. // ATI extensions
  387. ///////////////////////////////////////////////////////////////////
  388. #define FG_COLOR_SRC 0xE000
  389. #define SHIFT_FG_COLOR_SRC 0x000D
  390. #define DATA_ORDER 0x1000
  391. #define DATA_WIDTH 0x0200
  392. #define BG_COLOR_SRC 0x0180
  393. #define SHIFT_BG_COLOR_SRC 0x0007
  394. #define EXT_MONO_SRC 0x0060
  395. #define SHIFT_EXT_MONO_SRC 0x0005
  396. #define DRAW 0x0010
  397. #define READ_MODE 0x0004
  398. #define POLY_FILL_MODE 0x0002
  399. #define SRC_SWAP 0x0800
  400. #define FG_COLOR_SRC_BG 0x0000
  401. #define FG_COLOR_SRC_FG 0x2000
  402. #define FG_COLOR_SRC_HOST 0x4000
  403. #define FG_COLOR_SRC_BLIT 0x6000
  404. #define FG_COLOR_SRC_GS 0x8000
  405. #define FG_COLOR_SRC_PATT 0xA000
  406. #define FG_COLOR_SRC_CLUH 0xC000
  407. #define FG_COLOR_SRC_CLUB 0xE000
  408. #define BG_COLOR_SRC_BG 0x0000
  409. #define BG_COLOR_SRC_FG 0x0080
  410. #define BG_COLOR_SRC_HOST 0x0100
  411. #define BG_COLOR_SRC_BLIT 0x0180
  412. #define EXT_MONO_SRC_ONE 0x0000
  413. #define EXT_MONO_SRC_PATT 0x0020
  414. #define EXT_MONO_SRC_HOST 0x0040
  415. #define EXT_MONO_SRC_BLIT 0x0060
  416. #define ONE_WORD 0x8000
  417. #define TWO_WORDS 0xC000
  418. #define THREE_WORDS 0xE000
  419. #define FOUR_WORDS 0xF000
  420. #define FIVE_WORDS 0xF800
  421. #define SIX_WORDS 0xFC00
  422. #define SEVEN_WORDS 0xFE00
  423. #define EIGHT_WORDS 0xFF00
  424. #define NINE_WORDS 0xFF80
  425. #define TEN_WORDS 0xFFC0
  426. #define ELEVEN_WORDS 0xFFE0
  427. #define TWELVE_WORDS 0xFFF0
  428. #define THIRTEEN_WORDS 0xFFF8
  429. #define FOURTEEN_WORDS 0xFFFC
  430. #define FIFTEEN_WORDS 0xFFFE
  431. #define SIXTEEN_WORDS 0xFFFF
  432. #define SRC_Y 0x8AE8
  433. #define SRC_X 0x8EE8
  434. #define EXT_FIFO_STATUS 0x9AEE
  435. #define DEST_X_START 0xA6EE
  436. #define DEST_X_END 0xAAEE
  437. #define DEST_Y_END 0xAEEE
  438. #define SRC_X_START 0xB2EE
  439. #define ALU_BG_FN 0xB6EE
  440. #define ALU_FG_FN 0xBAEE
  441. #define SRC_X_END 0xBEEE
  442. #define SRC_Y_DIR 0xC2EE
  443. #define R_V_TOTAL 0xC2EE
  444. #define EXT_SSV 0xC6EE
  445. #define EXT_SHORT_STROKE 0xC6EE
  446. #define R_V_DISP 0xC6EE
  447. #define SCAN_X 0xCAEE
  448. #define R_V_SYNC_STRT 0xCAEE
  449. #define DP_CONFIG 0xCEEE
  450. #define VERT_LINE_CNTR 0xCEEE
  451. #define PATT_LENGTH 0xD2EE
  452. #define R_V_SYNC_WID 0xD2EE
  453. #define PATT_INDEX 0xD6EE
  454. #define EXT_SCISSOR_L 0xDAEE
  455. #define R_SRC_X 0xDAEE
  456. #define EXT_SCISSOR_T 0xDEEE
  457. #define R_SRC_Y 0xDEEE
  458. #define PIX_TRANS 0xE2E8
  459. #define EXT_SCISSOR_R 0xE2EE
  460. #define EXT_SCISSOR_B 0xE6EE
  461. #define SRC_CMP_COLOR 0xEAEE
  462. #define DEST_CMP_FN 0xEEEE
  463. #define LINEDRAW 0xFEEE
  464. #define TOP_TO_BOTTOM 0x01
  465. #define BOTTOM_TO_TOP 0x00