nv_dma.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /***************************************************************************\
  2. |* *|
  3. |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
  4. |* *|
  5. |* NOTICE TO USER: The source code is copyrighted under U.S. and *|
  6. |* international laws. Users and possessors of this source code are *|
  7. |* hereby granted a nonexclusive, royalty-free copyright license to *|
  8. |* use this code in individual and commercial software. *|
  9. |* *|
  10. |* Any use of this source code must include, in the user documenta- *|
  11. |* tion and internal comments to the code, notices to the end user *|
  12. |* as follows: *|
  13. |* *|
  14. |* Copyright 2003 NVIDIA, Corporation. All rights reserved. *|
  15. |* *|
  16. |* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
  17. |* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
  18. |* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
  19. |* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
  20. |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
  21. |* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
  22. |* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
  23. |* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
  24. |* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
  25. |* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
  26. |* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
  27. |* *|
  28. |* U.S. Government End Users. This source code is a "commercial *|
  29. |* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
  30. |* consisting of "commercial computer software" and "commercial *|
  31. |* computer software documentation," as such terms are used in *|
  32. |* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
  33. |* ment only as a commercial end item. Consistent with 48 C.F.R. *|
  34. |* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
  35. |* all U.S. Government End Users acquire the source code with only *|
  36. |* those rights set forth herein. *|
  37. |* *|
  38. \***************************************************************************/
  39. /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_dma.h,v 1.2 2003/07/31 21:41:26 mvojkovi Exp $ */
  40. #define SURFACE_FORMAT 0x00000300
  41. #define SURFACE_FORMAT_DEPTH8 0x00000001
  42. #define SURFACE_FORMAT_DEPTH15 0x00000002
  43. #define SURFACE_FORMAT_DEPTH16 0x00000004
  44. #define SURFACE_FORMAT_DEPTH24 0x00000006
  45. #define SURFACE_PITCH 0x00000304
  46. #define SURFACE_PITCH_SRC 15:0
  47. #define SURFACE_PITCH_DST 31:16
  48. #define SURFACE_OFFSET_SRC 0x00000308
  49. #define SURFACE_OFFSET_DST 0x0000030C
  50. #define ROP_SET 0x00002300
  51. #define PATTERN_FORMAT 0x00004300
  52. #define PATTERN_FORMAT_DEPTH8 0x00000003
  53. #define PATTERN_FORMAT_DEPTH16 0x00000001
  54. #define PATTERN_FORMAT_DEPTH24 0x00000003
  55. #define PATTERN_COLOR_0 0x00004310
  56. #define PATTERN_COLOR_1 0x00004314
  57. #define PATTERN_PATTERN_0 0x00004318
  58. #define PATTERN_PATTERN_1 0x0000431C
  59. #define CLIP_POINT 0x00006300
  60. #define CLIP_POINT_X 15:0
  61. #define CLIP_POINT_Y 31:16
  62. #define CLIP_SIZE 0x00006304
  63. #define CLIP_SIZE_WIDTH 15:0
  64. #define CLIP_SIZE_HEIGHT 31:16
  65. #define LINE_FORMAT 0x00008300
  66. #define LINE_FORMAT_DEPTH8 0x00000003
  67. #define LINE_FORMAT_DEPTH16 0x00000001
  68. #define LINE_FORMAT_DEPTH24 0x00000003
  69. #define LINE_COLOR 0x00008304
  70. #define LINE_MAX_LINES 16
  71. #define LINE_LINES(i) 0x00008400\
  72. +(i)*8
  73. #define LINE_LINES_POINT0_X 15:0
  74. #define LINE_LINES_POINT0_Y 31:16
  75. #define LINE_LINES_POINT1_X 47:32
  76. #define LINE_LINES_POINT1_Y 63:48
  77. #define BLIT_POINT_SRC 0x0000A300
  78. #define BLIT_POINT_SRC_X 15:0
  79. #define BLIT_POINT_SRC_Y 31:16
  80. #define BLIT_POINT_DST 0x0000A304
  81. #define BLIT_POINT_DST_X 15:0
  82. #define BLIT_POINT_DST_Y 31:16
  83. #define BLIT_SIZE 0x0000A308
  84. #define BLIT_SIZE_WIDTH 15:0
  85. #define BLIT_SIZE_HEIGHT 31:16
  86. #define RECT_FORMAT 0x0000C300
  87. #define RECT_FORMAT_DEPTH8 0x00000003
  88. #define RECT_FORMAT_DEPTH16 0x00000001
  89. #define RECT_FORMAT_DEPTH24 0x00000003
  90. #define RECT_SOLID_COLOR 0x0000C3FC
  91. #define RECT_SOLID_RECTS_MAX_RECTS 32
  92. #define RECT_SOLID_RECTS(i) 0x0000C400\
  93. +(i)*8
  94. #define RECT_SOLID_RECTS_Y 15:0
  95. #define RECT_SOLID_RECTS_X 31:16
  96. #define RECT_SOLID_RECTS_HEIGHT 47:32
  97. #define RECT_SOLID_RECTS_WIDTH 63:48
  98. #define RECT_EXPAND_ONE_COLOR_CLIP 0x0000C7EC
  99. #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_X 15:0
  100. #define RECT_EXPAND_ONE_COLOR_CLIP_POINT0_Y 31:16
  101. #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_X 47:32
  102. #define RECT_EXPAND_ONE_COLOR_CLIP_POINT1_Y 63:48
  103. #define RECT_EXPAND_ONE_COLOR_COLOR 0x0000C7F4
  104. #define RECT_EXPAND_ONE_COLOR_SIZE 0x0000C7F8
  105. #define RECT_EXPAND_ONE_COLOR_SIZE_WIDTH 15:0
  106. #define RECT_EXPAND_ONE_COLOR_SIZE_HEIGHT 31:16
  107. #define RECT_EXPAND_ONE_COLOR_POINT 0x0000C7FC
  108. #define RECT_EXPAND_ONE_COLOR_POINT_X 15:0
  109. #define RECT_EXPAND_ONE_COLOR_POINT_Y 31:16
  110. #define RECT_EXPAND_ONE_COLOR_DATA_MAX_DWORDS 128
  111. #define RECT_EXPAND_ONE_COLOR_DATA(i) 0x0000C800\
  112. +(i)*4
  113. #define RECT_EXPAND_TWO_COLOR_CLIP 0x0000CBE4
  114. #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_X 15:0
  115. #define RECT_EXPAND_TWO_COLOR_CLIP_POINT0_Y 31:16
  116. #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_X 47:32
  117. #define RECT_EXPAND_TWO_COLOR_CLIP_POINT1_Y 63:48
  118. #define RECT_EXPAND_TWO_COLOR_COLOR_0 0x0000CBEC
  119. #define RECT_EXPAND_TWO_COLOR_COLOR_1 0x0000CBF0
  120. #define RECT_EXPAND_TWO_COLOR_SIZE_IN 0x0000CBF4
  121. #define RECT_EXPAND_TWO_COLOR_SIZE_IN_WIDTH 15:0
  122. #define RECT_EXPAND_TWO_COLOR_SIZE_IN_HEIGHT 31:16
  123. #define RECT_EXPAND_TWO_COLOR_SIZE_OUT 0x0000CBF8
  124. #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_WIDTH 15:0
  125. #define RECT_EXPAND_TWO_COLOR_SIZE_OUT_HEIGHT 31:16
  126. #define RECT_EXPAND_TWO_COLOR_POINT 0x0000CBFC
  127. #define RECT_EXPAND_TWO_COLOR_POINT_X 15:0
  128. #define RECT_EXPAND_TWO_COLOR_POINT_Y 31:16
  129. #define RECT_EXPAND_TWO_COLOR_DATA_MAX_DWORDS 128
  130. #define RECT_EXPAND_TWO_COLOR_DATA(i) 0x0000CC00\
  131. +(i)*4
  132. #define STRETCH_BLIT_FORMAT 0x0000E300
  133. #define STRETCH_BLIT_FORMAT_DEPTH8 0x00000004
  134. #define STRETCH_BLIT_FORMAT_DEPTH16 0x00000007
  135. #define STRETCH_BLIT_FORMAT_DEPTH24 0x00000004
  136. #define STRETCH_BLIT_FORMAT_X8R8G8B8 0x00000004
  137. #define STRETCH_BLIT_FORMAT_YUYV 0x00000005
  138. #define STRETCH_BLIT_FORMAT_UYVY 0x00000006
  139. #define STRETCH_BLIT_CLIP_POINT 0x0000E308
  140. #define STRETCH_BLIT_CLIP_POINT_X 15:0
  141. #define STRETCH_BLIT_CLIP_POINT_Y 31:16
  142. #define STRETCH_BLIT_CLIP_SIZE 0x0000E30C
  143. #define STRETCH_BLIT_CLIP_SIZE_WIDTH 15:0
  144. #define STRETCH_BLIT_CLIP_SIZE_HEIGHT 31:16
  145. #define STRETCH_BLIT_DST_POINT 0x0000E310
  146. #define STRETCH_BLIT_DST_POINT_X 15:0
  147. #define STRETCH_BLIT_DST_POINT_Y 31:16
  148. #define STRETCH_BLIT_DST_SIZE 0x0000E314
  149. #define STRETCH_BLIT_DST_SIZE_WIDTH 15:0
  150. #define STRETCH_BLIT_DST_SIZE_HEIGHT 31:16
  151. #define STRETCH_BLIT_DU_DX 0x0000E318
  152. #define STRETCH_BLIT_DV_DY 0x0000E31C
  153. #define STRETCH_BLIT_SRC_SIZE 0x0000E400
  154. #define STRETCH_BLIT_SRC_SIZE_WIDTH 15:0
  155. #define STRETCH_BLIT_SRC_SIZE_HEIGHT 31:16
  156. #define STRETCH_BLIT_SRC_FORMAT 0x0000E404
  157. #define STRETCH_BLIT_SRC_FORMAT_PITCH 15:0
  158. #define STRETCH_BLIT_SRC_FORMAT_ORIGIN 23:16
  159. #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CENTER 0x00000001
  160. #define STRETCH_BLIT_SRC_FORMAT_ORIGIN_CORNER 0x00000002
  161. #define STRETCH_BLIT_SRC_FORMAT_FILTER 31:24
  162. #define STRETCH_BLIT_SRC_FORMAT_FILTER_POINT_SAMPLE 0x00000000
  163. #define STRETCH_BLIT_SRC_FORMAT_FILTER_BILINEAR 0x00000001
  164. #define STRETCH_BLIT_SRC_OFFSET 0x0000E408
  165. #define STRETCH_BLIT_SRC_POINT 0x0000E40C
  166. #define STRETCH_BLIT_SRC_POINT_U 15:0
  167. #define STRETCH_BLIT_SRC_POINT_V 31:16