rv515d.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638
  1. /*
  2. * Copyright 2008 Advanced Micro Devices, Inc.
  3. * Copyright 2008 Red Hat Inc.
  4. * Copyright 2009 Jerome Glisse.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  20. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  21. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  22. * OTHER DEALINGS IN THE SOFTWARE.
  23. *
  24. * Authors: Dave Airlie
  25. * Alex Deucher
  26. * Jerome Glisse
  27. */
  28. #ifndef __RV515D_H__
  29. #define __RV515D_H__
  30. /*
  31. * RV515 registers
  32. */
  33. #define PCIE_INDEX 0x0030
  34. #define PCIE_DATA 0x0034
  35. #define MC_IND_INDEX 0x0070
  36. #define MC_IND_WR_EN (1 << 24)
  37. #define MC_IND_DATA 0x0074
  38. #define RBBM_SOFT_RESET 0x00F0
  39. #define CONFIG_MEMSIZE 0x00F8
  40. #define HDP_FB_LOCATION 0x0134
  41. #define CP_CSQ_CNTL 0x0740
  42. #define CP_CSQ_MODE 0x0744
  43. #define CP_CSQ_ADDR 0x07F0
  44. #define CP_CSQ_DATA 0x07F4
  45. #define CP_CSQ_STAT 0x07F8
  46. #define CP_CSQ2_STAT 0x07FC
  47. #define RBBM_STATUS 0x0E40
  48. #define DST_PIPE_CONFIG 0x170C
  49. #define WAIT_UNTIL 0x1720
  50. #define WAIT_2D_IDLE (1 << 14)
  51. #define WAIT_3D_IDLE (1 << 15)
  52. #define WAIT_2D_IDLECLEAN (1 << 16)
  53. #define WAIT_3D_IDLECLEAN (1 << 17)
  54. #define ISYNC_CNTL 0x1724
  55. #define ISYNC_ANY2D_IDLE3D (1 << 0)
  56. #define ISYNC_ANY3D_IDLE2D (1 << 1)
  57. #define ISYNC_TRIG2D_IDLE3D (1 << 2)
  58. #define ISYNC_TRIG3D_IDLE2D (1 << 3)
  59. #define ISYNC_WAIT_IDLEGUI (1 << 4)
  60. #define ISYNC_CPSCRATCH_IDLEGUI (1 << 5)
  61. #define VAP_INDEX_OFFSET 0x208C
  62. #define VAP_PVS_STATE_FLUSH_REG 0x2284
  63. #define GB_ENABLE 0x4008
  64. #define GB_MSPOS0 0x4010
  65. #define MS_X0_SHIFT 0
  66. #define MS_Y0_SHIFT 4
  67. #define MS_X1_SHIFT 8
  68. #define MS_Y1_SHIFT 12
  69. #define MS_X2_SHIFT 16
  70. #define MS_Y2_SHIFT 20
  71. #define MSBD0_Y_SHIFT 24
  72. #define MSBD0_X_SHIFT 28
  73. #define GB_MSPOS1 0x4014
  74. #define MS_X3_SHIFT 0
  75. #define MS_Y3_SHIFT 4
  76. #define MS_X4_SHIFT 8
  77. #define MS_Y4_SHIFT 12
  78. #define MS_X5_SHIFT 16
  79. #define MS_Y5_SHIFT 20
  80. #define MSBD1_SHIFT 24
  81. #define GB_TILE_CONFIG 0x4018
  82. #define ENABLE_TILING (1 << 0)
  83. #define PIPE_COUNT_MASK 0x0000000E
  84. #define PIPE_COUNT_SHIFT 1
  85. #define TILE_SIZE_8 (0 << 4)
  86. #define TILE_SIZE_16 (1 << 4)
  87. #define TILE_SIZE_32 (2 << 4)
  88. #define SUBPIXEL_1_12 (0 << 16)
  89. #define SUBPIXEL_1_16 (1 << 16)
  90. #define GB_SELECT 0x401C
  91. #define GB_AA_CONFIG 0x4020
  92. #define GB_PIPE_SELECT 0x402C
  93. #define GA_ENHANCE 0x4274
  94. #define GA_DEADLOCK_CNTL (1 << 0)
  95. #define GA_FASTSYNC_CNTL (1 << 1)
  96. #define GA_POLY_MODE 0x4288
  97. #define FRONT_PTYPE_POINT (0 << 4)
  98. #define FRONT_PTYPE_LINE (1 << 4)
  99. #define FRONT_PTYPE_TRIANGE (2 << 4)
  100. #define BACK_PTYPE_POINT (0 << 7)
  101. #define BACK_PTYPE_LINE (1 << 7)
  102. #define BACK_PTYPE_TRIANGE (2 << 7)
  103. #define GA_ROUND_MODE 0x428C
  104. #define GEOMETRY_ROUND_TRUNC (0 << 0)
  105. #define GEOMETRY_ROUND_NEAREST (1 << 0)
  106. #define COLOR_ROUND_TRUNC (0 << 2)
  107. #define COLOR_ROUND_NEAREST (1 << 2)
  108. #define SU_REG_DEST 0x42C8
  109. #define RB3D_DSTCACHE_CTLSTAT 0x4E4C
  110. #define RB3D_DC_FLUSH (2 << 0)
  111. #define RB3D_DC_FREE (2 << 2)
  112. #define RB3D_DC_FINISH (1 << 4)
  113. #define ZB_ZCACHE_CTLSTAT 0x4F18
  114. #define ZC_FLUSH (1 << 0)
  115. #define ZC_FREE (1 << 1)
  116. #define DC_LB_MEMORY_SPLIT 0x6520
  117. #define DC_LB_MEMORY_SPLIT_MASK 0x00000003
  118. #define DC_LB_MEMORY_SPLIT_SHIFT 0
  119. #define DC_LB_MEMORY_SPLIT_D1HALF_D2HALF 0
  120. #define DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q 1
  121. #define DC_LB_MEMORY_SPLIT_D1_ONLY 2
  122. #define DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q 3
  123. #define DC_LB_MEMORY_SPLIT_SHIFT_MODE (1 << 2)
  124. #define DC_LB_DISP1_END_ADR_SHIFT 4
  125. #define DC_LB_DISP1_END_ADR_MASK 0x00007FF0
  126. #define D1MODE_PRIORITY_A_CNT 0x6548
  127. #define MODE_PRIORITY_MARK_MASK 0x00007FFF
  128. #define MODE_PRIORITY_OFF (1 << 16)
  129. #define MODE_PRIORITY_ALWAYS_ON (1 << 20)
  130. #define MODE_PRIORITY_FORCE_MASK (1 << 24)
  131. #define D1MODE_PRIORITY_B_CNT 0x654C
  132. #define LB_MAX_REQ_OUTSTANDING 0x6D58
  133. #define LB_D1_MAX_REQ_OUTSTANDING_MASK 0x0000000F
  134. #define LB_D1_MAX_REQ_OUTSTANDING_SHIFT 0
  135. #define LB_D2_MAX_REQ_OUTSTANDING_MASK 0x000F0000
  136. #define LB_D2_MAX_REQ_OUTSTANDING_SHIFT 16
  137. #define D2MODE_PRIORITY_A_CNT 0x6D48
  138. #define D2MODE_PRIORITY_B_CNT 0x6D4C
  139. /* ix[MC] registers */
  140. #define MC_FB_LOCATION 0x01
  141. #define MC_FB_START_MASK 0x0000FFFF
  142. #define MC_FB_START_SHIFT 0
  143. #define MC_FB_TOP_MASK 0xFFFF0000
  144. #define MC_FB_TOP_SHIFT 16
  145. #define MC_AGP_LOCATION 0x02
  146. #define MC_AGP_START_MASK 0x0000FFFF
  147. #define MC_AGP_START_SHIFT 0
  148. #define MC_AGP_TOP_MASK 0xFFFF0000
  149. #define MC_AGP_TOP_SHIFT 16
  150. #define MC_AGP_BASE 0x03
  151. #define MC_AGP_BASE_2 0x04
  152. #define MC_CNTL 0x5
  153. #define MEM_NUM_CHANNELS_MASK 0x00000003
  154. #define MC_STATUS 0x08
  155. #define MC_STATUS_IDLE (1 << 4)
  156. #define MC_MISC_LAT_TIMER 0x09
  157. #define MC_CPR_INIT_LAT_MASK 0x0000000F
  158. #define MC_VF_INIT_LAT_MASK 0x000000F0
  159. #define MC_DISP0R_INIT_LAT_MASK 0x00000F00
  160. #define MC_DISP0R_INIT_LAT_SHIFT 8
  161. #define MC_DISP1R_INIT_LAT_MASK 0x0000F000
  162. #define MC_DISP1R_INIT_LAT_SHIFT 12
  163. #define MC_FIXED_INIT_LAT_MASK 0x000F0000
  164. #define MC_E2R_INIT_LAT_MASK 0x00F00000
  165. #define SAME_PAGE_PRIO_MASK 0x0F000000
  166. #define MC_GLOBW_INIT_LAT_MASK 0xF0000000
  167. /*
  168. * PM4 packet
  169. */
  170. #define CP_PACKET0 0x00000000
  171. #define PACKET0_BASE_INDEX_SHIFT 0
  172. #define PACKET0_BASE_INDEX_MASK (0x1ffff << 0)
  173. #define PACKET0_COUNT_SHIFT 16
  174. #define PACKET0_COUNT_MASK (0x3fff << 16)
  175. #define CP_PACKET1 0x40000000
  176. #define CP_PACKET2 0x80000000
  177. #define PACKET2_PAD_SHIFT 0
  178. #define PACKET2_PAD_MASK (0x3fffffff << 0)
  179. #define CP_PACKET3 0xC0000000
  180. #define PACKET3_IT_OPCODE_SHIFT 8
  181. #define PACKET3_IT_OPCODE_MASK (0xff << 8)
  182. #define PACKET3_COUNT_SHIFT 16
  183. #define PACKET3_COUNT_MASK (0x3fff << 16)
  184. /* PACKET3 op code */
  185. #define PACKET3_NOP 0x10
  186. #define PACKET3_3D_DRAW_VBUF 0x28
  187. #define PACKET3_3D_DRAW_IMMD 0x29
  188. #define PACKET3_3D_DRAW_INDX 0x2A
  189. #define PACKET3_3D_LOAD_VBPNTR 0x2F
  190. #define PACKET3_INDX_BUFFER 0x33
  191. #define PACKET3_3D_DRAW_VBUF_2 0x34
  192. #define PACKET3_3D_DRAW_IMMD_2 0x35
  193. #define PACKET3_3D_DRAW_INDX_2 0x36
  194. #define PACKET3_BITBLT_MULTI 0x9B
  195. #define PACKET0(reg, n) (CP_PACKET0 | \
  196. REG_SET(PACKET0_BASE_INDEX, (reg) >> 2) | \
  197. REG_SET(PACKET0_COUNT, (n)))
  198. #define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v)))
  199. #define PACKET3(op, n) (CP_PACKET3 | \
  200. REG_SET(PACKET3_IT_OPCODE, (op)) | \
  201. REG_SET(PACKET3_COUNT, (n)))
  202. /* Registers */
  203. #define R_0000F0_RBBM_SOFT_RESET 0x0000F0
  204. #define S_0000F0_SOFT_RESET_CP(x) (((x) & 0x1) << 0)
  205. #define G_0000F0_SOFT_RESET_CP(x) (((x) >> 0) & 0x1)
  206. #define C_0000F0_SOFT_RESET_CP 0xFFFFFFFE
  207. #define S_0000F0_SOFT_RESET_HI(x) (((x) & 0x1) << 1)
  208. #define G_0000F0_SOFT_RESET_HI(x) (((x) >> 1) & 0x1)
  209. #define C_0000F0_SOFT_RESET_HI 0xFFFFFFFD
  210. #define S_0000F0_SOFT_RESET_VAP(x) (((x) & 0x1) << 2)
  211. #define G_0000F0_SOFT_RESET_VAP(x) (((x) >> 2) & 0x1)
  212. #define C_0000F0_SOFT_RESET_VAP 0xFFFFFFFB
  213. #define S_0000F0_SOFT_RESET_RE(x) (((x) & 0x1) << 3)
  214. #define G_0000F0_SOFT_RESET_RE(x) (((x) >> 3) & 0x1)
  215. #define C_0000F0_SOFT_RESET_RE 0xFFFFFFF7
  216. #define S_0000F0_SOFT_RESET_PP(x) (((x) & 0x1) << 4)
  217. #define G_0000F0_SOFT_RESET_PP(x) (((x) >> 4) & 0x1)
  218. #define C_0000F0_SOFT_RESET_PP 0xFFFFFFEF
  219. #define S_0000F0_SOFT_RESET_E2(x) (((x) & 0x1) << 5)
  220. #define G_0000F0_SOFT_RESET_E2(x) (((x) >> 5) & 0x1)
  221. #define C_0000F0_SOFT_RESET_E2 0xFFFFFFDF
  222. #define S_0000F0_SOFT_RESET_RB(x) (((x) & 0x1) << 6)
  223. #define G_0000F0_SOFT_RESET_RB(x) (((x) >> 6) & 0x1)
  224. #define C_0000F0_SOFT_RESET_RB 0xFFFFFFBF
  225. #define S_0000F0_SOFT_RESET_HDP(x) (((x) & 0x1) << 7)
  226. #define G_0000F0_SOFT_RESET_HDP(x) (((x) >> 7) & 0x1)
  227. #define C_0000F0_SOFT_RESET_HDP 0xFFFFFF7F
  228. #define S_0000F0_SOFT_RESET_MC(x) (((x) & 0x1) << 8)
  229. #define G_0000F0_SOFT_RESET_MC(x) (((x) >> 8) & 0x1)
  230. #define C_0000F0_SOFT_RESET_MC 0xFFFFFEFF
  231. #define S_0000F0_SOFT_RESET_AIC(x) (((x) & 0x1) << 9)
  232. #define G_0000F0_SOFT_RESET_AIC(x) (((x) >> 9) & 0x1)
  233. #define C_0000F0_SOFT_RESET_AIC 0xFFFFFDFF
  234. #define S_0000F0_SOFT_RESET_VIP(x) (((x) & 0x1) << 10)
  235. #define G_0000F0_SOFT_RESET_VIP(x) (((x) >> 10) & 0x1)
  236. #define C_0000F0_SOFT_RESET_VIP 0xFFFFFBFF
  237. #define S_0000F0_SOFT_RESET_DISP(x) (((x) & 0x1) << 11)
  238. #define G_0000F0_SOFT_RESET_DISP(x) (((x) >> 11) & 0x1)
  239. #define C_0000F0_SOFT_RESET_DISP 0xFFFFF7FF
  240. #define S_0000F0_SOFT_RESET_CG(x) (((x) & 0x1) << 12)
  241. #define G_0000F0_SOFT_RESET_CG(x) (((x) >> 12) & 0x1)
  242. #define C_0000F0_SOFT_RESET_CG 0xFFFFEFFF
  243. #define S_0000F0_SOFT_RESET_GA(x) (((x) & 0x1) << 13)
  244. #define G_0000F0_SOFT_RESET_GA(x) (((x) >> 13) & 0x1)
  245. #define C_0000F0_SOFT_RESET_GA 0xFFFFDFFF
  246. #define S_0000F0_SOFT_RESET_IDCT(x) (((x) & 0x1) << 14)
  247. #define G_0000F0_SOFT_RESET_IDCT(x) (((x) >> 14) & 0x1)
  248. #define C_0000F0_SOFT_RESET_IDCT 0xFFFFBFFF
  249. #define R_0000F8_CONFIG_MEMSIZE 0x0000F8
  250. #define S_0000F8_CONFIG_MEMSIZE(x) (((x) & 0xFFFFFFFF) << 0)
  251. #define G_0000F8_CONFIG_MEMSIZE(x) (((x) >> 0) & 0xFFFFFFFF)
  252. #define C_0000F8_CONFIG_MEMSIZE 0x00000000
  253. #define R_000134_HDP_FB_LOCATION 0x000134
  254. #define S_000134_HDP_FB_START(x) (((x) & 0xFFFF) << 0)
  255. #define G_000134_HDP_FB_START(x) (((x) >> 0) & 0xFFFF)
  256. #define C_000134_HDP_FB_START 0xFFFF0000
  257. #define R_000300_VGA_RENDER_CONTROL 0x000300
  258. #define S_000300_VGA_BLINK_RATE(x) (((x) & 0x1F) << 0)
  259. #define G_000300_VGA_BLINK_RATE(x) (((x) >> 0) & 0x1F)
  260. #define C_000300_VGA_BLINK_RATE 0xFFFFFFE0
  261. #define S_000300_VGA_BLINK_MODE(x) (((x) & 0x3) << 5)
  262. #define G_000300_VGA_BLINK_MODE(x) (((x) >> 5) & 0x3)
  263. #define C_000300_VGA_BLINK_MODE 0xFFFFFF9F
  264. #define S_000300_VGA_CURSOR_BLINK_INVERT(x) (((x) & 0x1) << 7)
  265. #define G_000300_VGA_CURSOR_BLINK_INVERT(x) (((x) >> 7) & 0x1)
  266. #define C_000300_VGA_CURSOR_BLINK_INVERT 0xFFFFFF7F
  267. #define S_000300_VGA_EXTD_ADDR_COUNT_ENABLE(x) (((x) & 0x1) << 8)
  268. #define G_000300_VGA_EXTD_ADDR_COUNT_ENABLE(x) (((x) >> 8) & 0x1)
  269. #define C_000300_VGA_EXTD_ADDR_COUNT_ENABLE 0xFFFFFEFF
  270. #define S_000300_VGA_VSTATUS_CNTL(x) (((x) & 0x3) << 16)
  271. #define G_000300_VGA_VSTATUS_CNTL(x) (((x) >> 16) & 0x3)
  272. #define C_000300_VGA_VSTATUS_CNTL 0xFFFCFFFF
  273. #define S_000300_VGA_LOCK_8DOT(x) (((x) & 0x1) << 24)
  274. #define G_000300_VGA_LOCK_8DOT(x) (((x) >> 24) & 0x1)
  275. #define C_000300_VGA_LOCK_8DOT 0xFEFFFFFF
  276. #define S_000300_VGAREG_LINECMP_COMPATIBILITY_SEL(x) (((x) & 0x1) << 25)
  277. #define G_000300_VGAREG_LINECMP_COMPATIBILITY_SEL(x) (((x) >> 25) & 0x1)
  278. #define C_000300_VGAREG_LINECMP_COMPATIBILITY_SEL 0xFDFFFFFF
  279. #define R_000310_VGA_MEMORY_BASE_ADDRESS 0x000310
  280. #define S_000310_VGA_MEMORY_BASE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0)
  281. #define G_000310_VGA_MEMORY_BASE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF)
  282. #define C_000310_VGA_MEMORY_BASE_ADDRESS 0x00000000
  283. #define R_000328_VGA_HDP_CONTROL 0x000328
  284. #define S_000328_VGA_MEM_PAGE_SELECT_EN(x) (((x) & 0x1) << 0)
  285. #define G_000328_VGA_MEM_PAGE_SELECT_EN(x) (((x) >> 0) & 0x1)
  286. #define C_000328_VGA_MEM_PAGE_SELECT_EN 0xFFFFFFFE
  287. #define S_000328_VGA_RBBM_LOCK_DISABLE(x) (((x) & 0x1) << 8)
  288. #define G_000328_VGA_RBBM_LOCK_DISABLE(x) (((x) >> 8) & 0x1)
  289. #define C_000328_VGA_RBBM_LOCK_DISABLE 0xFFFFFEFF
  290. #define S_000328_VGA_SOFT_RESET(x) (((x) & 0x1) << 16)
  291. #define G_000328_VGA_SOFT_RESET(x) (((x) >> 16) & 0x1)
  292. #define C_000328_VGA_SOFT_RESET 0xFFFEFFFF
  293. #define S_000328_VGA_TEST_RESET_CONTROL(x) (((x) & 0x1) << 24)
  294. #define G_000328_VGA_TEST_RESET_CONTROL(x) (((x) >> 24) & 0x1)
  295. #define C_000328_VGA_TEST_RESET_CONTROL 0xFEFFFFFF
  296. #define R_000330_D1VGA_CONTROL 0x000330
  297. #define S_000330_D1VGA_MODE_ENABLE(x) (((x) & 0x1) << 0)
  298. #define G_000330_D1VGA_MODE_ENABLE(x) (((x) >> 0) & 0x1)
  299. #define C_000330_D1VGA_MODE_ENABLE 0xFFFFFFFE
  300. #define S_000330_D1VGA_TIMING_SELECT(x) (((x) & 0x1) << 8)
  301. #define G_000330_D1VGA_TIMING_SELECT(x) (((x) >> 8) & 0x1)
  302. #define C_000330_D1VGA_TIMING_SELECT 0xFFFFFEFF
  303. #define S_000330_D1VGA_SYNC_POLARITY_SELECT(x) (((x) & 0x1) << 9)
  304. #define G_000330_D1VGA_SYNC_POLARITY_SELECT(x) (((x) >> 9) & 0x1)
  305. #define C_000330_D1VGA_SYNC_POLARITY_SELECT 0xFFFFFDFF
  306. #define S_000330_D1VGA_OVERSCAN_TIMING_SELECT(x) (((x) & 0x1) << 10)
  307. #define G_000330_D1VGA_OVERSCAN_TIMING_SELECT(x) (((x) >> 10) & 0x1)
  308. #define C_000330_D1VGA_OVERSCAN_TIMING_SELECT 0xFFFFFBFF
  309. #define S_000330_D1VGA_OVERSCAN_COLOR_EN(x) (((x) & 0x1) << 16)
  310. #define G_000330_D1VGA_OVERSCAN_COLOR_EN(x) (((x) >> 16) & 0x1)
  311. #define C_000330_D1VGA_OVERSCAN_COLOR_EN 0xFFFEFFFF
  312. #define S_000330_D1VGA_ROTATE(x) (((x) & 0x3) << 24)
  313. #define G_000330_D1VGA_ROTATE(x) (((x) >> 24) & 0x3)
  314. #define C_000330_D1VGA_ROTATE 0xFCFFFFFF
  315. #define R_000338_D2VGA_CONTROL 0x000338
  316. #define S_000338_D2VGA_MODE_ENABLE(x) (((x) & 0x1) << 0)
  317. #define G_000338_D2VGA_MODE_ENABLE(x) (((x) >> 0) & 0x1)
  318. #define C_000338_D2VGA_MODE_ENABLE 0xFFFFFFFE
  319. #define S_000338_D2VGA_TIMING_SELECT(x) (((x) & 0x1) << 8)
  320. #define G_000338_D2VGA_TIMING_SELECT(x) (((x) >> 8) & 0x1)
  321. #define C_000338_D2VGA_TIMING_SELECT 0xFFFFFEFF
  322. #define S_000338_D2VGA_SYNC_POLARITY_SELECT(x) (((x) & 0x1) << 9)
  323. #define G_000338_D2VGA_SYNC_POLARITY_SELECT(x) (((x) >> 9) & 0x1)
  324. #define C_000338_D2VGA_SYNC_POLARITY_SELECT 0xFFFFFDFF
  325. #define S_000338_D2VGA_OVERSCAN_TIMING_SELECT(x) (((x) & 0x1) << 10)
  326. #define G_000338_D2VGA_OVERSCAN_TIMING_SELECT(x) (((x) >> 10) & 0x1)
  327. #define C_000338_D2VGA_OVERSCAN_TIMING_SELECT 0xFFFFFBFF
  328. #define S_000338_D2VGA_OVERSCAN_COLOR_EN(x) (((x) & 0x1) << 16)
  329. #define G_000338_D2VGA_OVERSCAN_COLOR_EN(x) (((x) >> 16) & 0x1)
  330. #define C_000338_D2VGA_OVERSCAN_COLOR_EN 0xFFFEFFFF
  331. #define S_000338_D2VGA_ROTATE(x) (((x) & 0x3) << 24)
  332. #define G_000338_D2VGA_ROTATE(x) (((x) >> 24) & 0x3)
  333. #define C_000338_D2VGA_ROTATE 0xFCFFFFFF
  334. #define R_0007C0_CP_STAT 0x0007C0
  335. #define S_0007C0_MRU_BUSY(x) (((x) & 0x1) << 0)
  336. #define G_0007C0_MRU_BUSY(x) (((x) >> 0) & 0x1)
  337. #define C_0007C0_MRU_BUSY 0xFFFFFFFE
  338. #define S_0007C0_MWU_BUSY(x) (((x) & 0x1) << 1)
  339. #define G_0007C0_MWU_BUSY(x) (((x) >> 1) & 0x1)
  340. #define C_0007C0_MWU_BUSY 0xFFFFFFFD
  341. #define S_0007C0_RSIU_BUSY(x) (((x) & 0x1) << 2)
  342. #define G_0007C0_RSIU_BUSY(x) (((x) >> 2) & 0x1)
  343. #define C_0007C0_RSIU_BUSY 0xFFFFFFFB
  344. #define S_0007C0_RCIU_BUSY(x) (((x) & 0x1) << 3)
  345. #define G_0007C0_RCIU_BUSY(x) (((x) >> 3) & 0x1)
  346. #define C_0007C0_RCIU_BUSY 0xFFFFFFF7
  347. #define S_0007C0_CSF_PRIMARY_BUSY(x) (((x) & 0x1) << 9)
  348. #define G_0007C0_CSF_PRIMARY_BUSY(x) (((x) >> 9) & 0x1)
  349. #define C_0007C0_CSF_PRIMARY_BUSY 0xFFFFFDFF
  350. #define S_0007C0_CSF_INDIRECT_BUSY(x) (((x) & 0x1) << 10)
  351. #define G_0007C0_CSF_INDIRECT_BUSY(x) (((x) >> 10) & 0x1)
  352. #define C_0007C0_CSF_INDIRECT_BUSY 0xFFFFFBFF
  353. #define S_0007C0_CSQ_PRIMARY_BUSY(x) (((x) & 0x1) << 11)
  354. #define G_0007C0_CSQ_PRIMARY_BUSY(x) (((x) >> 11) & 0x1)
  355. #define C_0007C0_CSQ_PRIMARY_BUSY 0xFFFFF7FF
  356. #define S_0007C0_CSQ_INDIRECT_BUSY(x) (((x) & 0x1) << 12)
  357. #define G_0007C0_CSQ_INDIRECT_BUSY(x) (((x) >> 12) & 0x1)
  358. #define C_0007C0_CSQ_INDIRECT_BUSY 0xFFFFEFFF
  359. #define S_0007C0_CSI_BUSY(x) (((x) & 0x1) << 13)
  360. #define G_0007C0_CSI_BUSY(x) (((x) >> 13) & 0x1)
  361. #define C_0007C0_CSI_BUSY 0xFFFFDFFF
  362. #define S_0007C0_CSF_INDIRECT2_BUSY(x) (((x) & 0x1) << 14)
  363. #define G_0007C0_CSF_INDIRECT2_BUSY(x) (((x) >> 14) & 0x1)
  364. #define C_0007C0_CSF_INDIRECT2_BUSY 0xFFFFBFFF
  365. #define S_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) & 0x1) << 15)
  366. #define G_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) >> 15) & 0x1)
  367. #define C_0007C0_CSQ_INDIRECT2_BUSY 0xFFFF7FFF
  368. #define S_0007C0_GUIDMA_BUSY(x) (((x) & 0x1) << 28)
  369. #define G_0007C0_GUIDMA_BUSY(x) (((x) >> 28) & 0x1)
  370. #define C_0007C0_GUIDMA_BUSY 0xEFFFFFFF
  371. #define S_0007C0_VIDDMA_BUSY(x) (((x) & 0x1) << 29)
  372. #define G_0007C0_VIDDMA_BUSY(x) (((x) >> 29) & 0x1)
  373. #define C_0007C0_VIDDMA_BUSY 0xDFFFFFFF
  374. #define S_0007C0_CMDSTRM_BUSY(x) (((x) & 0x1) << 30)
  375. #define G_0007C0_CMDSTRM_BUSY(x) (((x) >> 30) & 0x1)
  376. #define C_0007C0_CMDSTRM_BUSY 0xBFFFFFFF
  377. #define S_0007C0_CP_BUSY(x) (((x) & 0x1) << 31)
  378. #define G_0007C0_CP_BUSY(x) (((x) >> 31) & 0x1)
  379. #define C_0007C0_CP_BUSY 0x7FFFFFFF
  380. #define R_000E40_RBBM_STATUS 0x000E40
  381. #define S_000E40_CMDFIFO_AVAIL(x) (((x) & 0x7F) << 0)
  382. #define G_000E40_CMDFIFO_AVAIL(x) (((x) >> 0) & 0x7F)
  383. #define C_000E40_CMDFIFO_AVAIL 0xFFFFFF80
  384. #define S_000E40_HIRQ_ON_RBB(x) (((x) & 0x1) << 8)
  385. #define G_000E40_HIRQ_ON_RBB(x) (((x) >> 8) & 0x1)
  386. #define C_000E40_HIRQ_ON_RBB 0xFFFFFEFF
  387. #define S_000E40_CPRQ_ON_RBB(x) (((x) & 0x1) << 9)
  388. #define G_000E40_CPRQ_ON_RBB(x) (((x) >> 9) & 0x1)
  389. #define C_000E40_CPRQ_ON_RBB 0xFFFFFDFF
  390. #define S_000E40_CFRQ_ON_RBB(x) (((x) & 0x1) << 10)
  391. #define G_000E40_CFRQ_ON_RBB(x) (((x) >> 10) & 0x1)
  392. #define C_000E40_CFRQ_ON_RBB 0xFFFFFBFF
  393. #define S_000E40_HIRQ_IN_RTBUF(x) (((x) & 0x1) << 11)
  394. #define G_000E40_HIRQ_IN_RTBUF(x) (((x) >> 11) & 0x1)
  395. #define C_000E40_HIRQ_IN_RTBUF 0xFFFFF7FF
  396. #define S_000E40_CPRQ_IN_RTBUF(x) (((x) & 0x1) << 12)
  397. #define G_000E40_CPRQ_IN_RTBUF(x) (((x) >> 12) & 0x1)
  398. #define C_000E40_CPRQ_IN_RTBUF 0xFFFFEFFF
  399. #define S_000E40_CFRQ_IN_RTBUF(x) (((x) & 0x1) << 13)
  400. #define G_000E40_CFRQ_IN_RTBUF(x) (((x) >> 13) & 0x1)
  401. #define C_000E40_CFRQ_IN_RTBUF 0xFFFFDFFF
  402. #define S_000E40_CF_PIPE_BUSY(x) (((x) & 0x1) << 14)
  403. #define G_000E40_CF_PIPE_BUSY(x) (((x) >> 14) & 0x1)
  404. #define C_000E40_CF_PIPE_BUSY 0xFFFFBFFF
  405. #define S_000E40_ENG_EV_BUSY(x) (((x) & 0x1) << 15)
  406. #define G_000E40_ENG_EV_BUSY(x) (((x) >> 15) & 0x1)
  407. #define C_000E40_ENG_EV_BUSY 0xFFFF7FFF
  408. #define S_000E40_CP_CMDSTRM_BUSY(x) (((x) & 0x1) << 16)
  409. #define G_000E40_CP_CMDSTRM_BUSY(x) (((x) >> 16) & 0x1)
  410. #define C_000E40_CP_CMDSTRM_BUSY 0xFFFEFFFF
  411. #define S_000E40_E2_BUSY(x) (((x) & 0x1) << 17)
  412. #define G_000E40_E2_BUSY(x) (((x) >> 17) & 0x1)
  413. #define C_000E40_E2_BUSY 0xFFFDFFFF
  414. #define S_000E40_RB2D_BUSY(x) (((x) & 0x1) << 18)
  415. #define G_000E40_RB2D_BUSY(x) (((x) >> 18) & 0x1)
  416. #define C_000E40_RB2D_BUSY 0xFFFBFFFF
  417. #define S_000E40_RB3D_BUSY(x) (((x) & 0x1) << 19)
  418. #define G_000E40_RB3D_BUSY(x) (((x) >> 19) & 0x1)
  419. #define C_000E40_RB3D_BUSY 0xFFF7FFFF
  420. #define S_000E40_VAP_BUSY(x) (((x) & 0x1) << 20)
  421. #define G_000E40_VAP_BUSY(x) (((x) >> 20) & 0x1)
  422. #define C_000E40_VAP_BUSY 0xFFEFFFFF
  423. #define S_000E40_RE_BUSY(x) (((x) & 0x1) << 21)
  424. #define G_000E40_RE_BUSY(x) (((x) >> 21) & 0x1)
  425. #define C_000E40_RE_BUSY 0xFFDFFFFF
  426. #define S_000E40_TAM_BUSY(x) (((x) & 0x1) << 22)
  427. #define G_000E40_TAM_BUSY(x) (((x) >> 22) & 0x1)
  428. #define C_000E40_TAM_BUSY 0xFFBFFFFF
  429. #define S_000E40_TDM_BUSY(x) (((x) & 0x1) << 23)
  430. #define G_000E40_TDM_BUSY(x) (((x) >> 23) & 0x1)
  431. #define C_000E40_TDM_BUSY 0xFF7FFFFF
  432. #define S_000E40_PB_BUSY(x) (((x) & 0x1) << 24)
  433. #define G_000E40_PB_BUSY(x) (((x) >> 24) & 0x1)
  434. #define C_000E40_PB_BUSY 0xFEFFFFFF
  435. #define S_000E40_TIM_BUSY(x) (((x) & 0x1) << 25)
  436. #define G_000E40_TIM_BUSY(x) (((x) >> 25) & 0x1)
  437. #define C_000E40_TIM_BUSY 0xFDFFFFFF
  438. #define S_000E40_GA_BUSY(x) (((x) & 0x1) << 26)
  439. #define G_000E40_GA_BUSY(x) (((x) >> 26) & 0x1)
  440. #define C_000E40_GA_BUSY 0xFBFFFFFF
  441. #define S_000E40_CBA2D_BUSY(x) (((x) & 0x1) << 27)
  442. #define G_000E40_CBA2D_BUSY(x) (((x) >> 27) & 0x1)
  443. #define C_000E40_CBA2D_BUSY 0xF7FFFFFF
  444. #define S_000E40_RBBM_HIBUSY(x) (((x) & 0x1) << 28)
  445. #define G_000E40_RBBM_HIBUSY(x) (((x) >> 28) & 0x1)
  446. #define C_000E40_RBBM_HIBUSY 0xEFFFFFFF
  447. #define S_000E40_SKID_CFBUSY(x) (((x) & 0x1) << 29)
  448. #define G_000E40_SKID_CFBUSY(x) (((x) >> 29) & 0x1)
  449. #define C_000E40_SKID_CFBUSY 0xDFFFFFFF
  450. #define S_000E40_VAP_VF_BUSY(x) (((x) & 0x1) << 30)
  451. #define G_000E40_VAP_VF_BUSY(x) (((x) >> 30) & 0x1)
  452. #define C_000E40_VAP_VF_BUSY 0xBFFFFFFF
  453. #define S_000E40_GUI_ACTIVE(x) (((x) & 0x1) << 31)
  454. #define G_000E40_GUI_ACTIVE(x) (((x) >> 31) & 0x1)
  455. #define C_000E40_GUI_ACTIVE 0x7FFFFFFF
  456. #define R_006080_D1CRTC_CONTROL 0x006080
  457. #define S_006080_D1CRTC_MASTER_EN(x) (((x) & 0x1) << 0)
  458. #define G_006080_D1CRTC_MASTER_EN(x) (((x) >> 0) & 0x1)
  459. #define C_006080_D1CRTC_MASTER_EN 0xFFFFFFFE
  460. #define S_006080_D1CRTC_SYNC_RESET_SEL(x) (((x) & 0x1) << 4)
  461. #define G_006080_D1CRTC_SYNC_RESET_SEL(x) (((x) >> 4) & 0x1)
  462. #define C_006080_D1CRTC_SYNC_RESET_SEL 0xFFFFFFEF
  463. #define S_006080_D1CRTC_DISABLE_POINT_CNTL(x) (((x) & 0x3) << 8)
  464. #define G_006080_D1CRTC_DISABLE_POINT_CNTL(x) (((x) >> 8) & 0x3)
  465. #define C_006080_D1CRTC_DISABLE_POINT_CNTL 0xFFFFFCFF
  466. #define S_006080_D1CRTC_CURRENT_MASTER_EN_STATE(x) (((x) & 0x1) << 16)
  467. #define G_006080_D1CRTC_CURRENT_MASTER_EN_STATE(x) (((x) >> 16) & 0x1)
  468. #define C_006080_D1CRTC_CURRENT_MASTER_EN_STATE 0xFFFEFFFF
  469. #define S_006080_D1CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) & 0x1) << 24)
  470. #define G_006080_D1CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) >> 24) & 0x1)
  471. #define C_006080_D1CRTC_DISP_READ_REQUEST_DISABLE 0xFEFFFFFF
  472. #define R_0060E8_D1CRTC_UPDATE_LOCK 0x0060E8
  473. #define S_0060E8_D1CRTC_UPDATE_LOCK(x) (((x) & 0x1) << 0)
  474. #define G_0060E8_D1CRTC_UPDATE_LOCK(x) (((x) >> 0) & 0x1)
  475. #define C_0060E8_D1CRTC_UPDATE_LOCK 0xFFFFFFFE
  476. #define R_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS 0x006110
  477. #define S_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0)
  478. #define G_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF)
  479. #define C_006110_D1GRPH_PRIMARY_SURFACE_ADDRESS 0x00000000
  480. #define R_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS 0x006118
  481. #define S_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0)
  482. #define G_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF)
  483. #define C_006118_D1GRPH_SECONDARY_SURFACE_ADDRESS 0x00000000
  484. #define R_006880_D2CRTC_CONTROL 0x006880
  485. #define S_006880_D2CRTC_MASTER_EN(x) (((x) & 0x1) << 0)
  486. #define G_006880_D2CRTC_MASTER_EN(x) (((x) >> 0) & 0x1)
  487. #define C_006880_D2CRTC_MASTER_EN 0xFFFFFFFE
  488. #define S_006880_D2CRTC_SYNC_RESET_SEL(x) (((x) & 0x1) << 4)
  489. #define G_006880_D2CRTC_SYNC_RESET_SEL(x) (((x) >> 4) & 0x1)
  490. #define C_006880_D2CRTC_SYNC_RESET_SEL 0xFFFFFFEF
  491. #define S_006880_D2CRTC_DISABLE_POINT_CNTL(x) (((x) & 0x3) << 8)
  492. #define G_006880_D2CRTC_DISABLE_POINT_CNTL(x) (((x) >> 8) & 0x3)
  493. #define C_006880_D2CRTC_DISABLE_POINT_CNTL 0xFFFFFCFF
  494. #define S_006880_D2CRTC_CURRENT_MASTER_EN_STATE(x) (((x) & 0x1) << 16)
  495. #define G_006880_D2CRTC_CURRENT_MASTER_EN_STATE(x) (((x) >> 16) & 0x1)
  496. #define C_006880_D2CRTC_CURRENT_MASTER_EN_STATE 0xFFFEFFFF
  497. #define S_006880_D2CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) & 0x1) << 24)
  498. #define G_006880_D2CRTC_DISP_READ_REQUEST_DISABLE(x) (((x) >> 24) & 0x1)
  499. #define C_006880_D2CRTC_DISP_READ_REQUEST_DISABLE 0xFEFFFFFF
  500. #define R_0068E8_D2CRTC_UPDATE_LOCK 0x0068E8
  501. #define S_0068E8_D2CRTC_UPDATE_LOCK(x) (((x) & 0x1) << 0)
  502. #define G_0068E8_D2CRTC_UPDATE_LOCK(x) (((x) >> 0) & 0x1)
  503. #define C_0068E8_D2CRTC_UPDATE_LOCK 0xFFFFFFFE
  504. #define R_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS 0x006910
  505. #define S_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0)
  506. #define G_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF)
  507. #define C_006910_D2GRPH_PRIMARY_SURFACE_ADDRESS 0x00000000
  508. #define R_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS 0x006918
  509. #define S_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) & 0xFFFFFFFF) << 0)
  510. #define G_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS(x) (((x) >> 0) & 0xFFFFFFFF)
  511. #define C_006918_D2GRPH_SECONDARY_SURFACE_ADDRESS 0x00000000
  512. #define R_000001_MC_FB_LOCATION 0x000001
  513. #define S_000001_MC_FB_START(x) (((x) & 0xFFFF) << 0)
  514. #define G_000001_MC_FB_START(x) (((x) >> 0) & 0xFFFF)
  515. #define C_000001_MC_FB_START 0xFFFF0000
  516. #define S_000001_MC_FB_TOP(x) (((x) & 0xFFFF) << 16)
  517. #define G_000001_MC_FB_TOP(x) (((x) >> 16) & 0xFFFF)
  518. #define C_000001_MC_FB_TOP 0x0000FFFF
  519. #define R_000002_MC_AGP_LOCATION 0x000002
  520. #define S_000002_MC_AGP_START(x) (((x) & 0xFFFF) << 0)
  521. #define G_000002_MC_AGP_START(x) (((x) >> 0) & 0xFFFF)
  522. #define C_000002_MC_AGP_START 0xFFFF0000
  523. #define S_000002_MC_AGP_TOP(x) (((x) & 0xFFFF) << 16)
  524. #define G_000002_MC_AGP_TOP(x) (((x) >> 16) & 0xFFFF)
  525. #define C_000002_MC_AGP_TOP 0x0000FFFF
  526. #define R_000003_MC_AGP_BASE 0x000003
  527. #define S_000003_AGP_BASE_ADDR(x) (((x) & 0xFFFFFFFF) << 0)
  528. #define G_000003_AGP_BASE_ADDR(x) (((x) >> 0) & 0xFFFFFFFF)
  529. #define C_000003_AGP_BASE_ADDR 0x00000000
  530. #define R_000004_MC_AGP_BASE_2 0x000004
  531. #define S_000004_AGP_BASE_ADDR_2(x) (((x) & 0xF) << 0)
  532. #define G_000004_AGP_BASE_ADDR_2(x) (((x) >> 0) & 0xF)
  533. #define C_000004_AGP_BASE_ADDR_2 0xFFFFFFF0
  534. #define R_00000F_CP_DYN_CNTL 0x00000F
  535. #define S_00000F_CP_FORCEON(x) (((x) & 0x1) << 0)
  536. #define G_00000F_CP_FORCEON(x) (((x) >> 0) & 0x1)
  537. #define C_00000F_CP_FORCEON 0xFFFFFFFE
  538. #define S_00000F_CP_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1)
  539. #define G_00000F_CP_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1)
  540. #define C_00000F_CP_MAX_DYN_STOP_LAT 0xFFFFFFFD
  541. #define S_00000F_CP_CLOCK_STATUS(x) (((x) & 0x1) << 2)
  542. #define G_00000F_CP_CLOCK_STATUS(x) (((x) >> 2) & 0x1)
  543. #define C_00000F_CP_CLOCK_STATUS 0xFFFFFFFB
  544. #define S_00000F_CP_PROG_SHUTOFF(x) (((x) & 0x1) << 3)
  545. #define G_00000F_CP_PROG_SHUTOFF(x) (((x) >> 3) & 0x1)
  546. #define C_00000F_CP_PROG_SHUTOFF 0xFFFFFFF7
  547. #define S_00000F_CP_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4)
  548. #define G_00000F_CP_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF)
  549. #define C_00000F_CP_PROG_DELAY_VALUE 0xFFFFF00F
  550. #define S_00000F_CP_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12)
  551. #define G_00000F_CP_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF)
  552. #define C_00000F_CP_LOWER_POWER_IDLE 0xFFF00FFF
  553. #define S_00000F_CP_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20)
  554. #define G_00000F_CP_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1)
  555. #define C_00000F_CP_LOWER_POWER_IGNORE 0xFFEFFFFF
  556. #define S_00000F_CP_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21)
  557. #define G_00000F_CP_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1)
  558. #define C_00000F_CP_NORMAL_POWER_IGNORE 0xFFDFFFFF
  559. #define S_00000F_SPARE(x) (((x) & 0x3) << 22)
  560. #define G_00000F_SPARE(x) (((x) >> 22) & 0x3)
  561. #define C_00000F_SPARE 0xFF3FFFFF
  562. #define S_00000F_CP_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24)
  563. #define G_00000F_CP_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF)
  564. #define C_00000F_CP_NORMAL_POWER_BUSY 0x00FFFFFF
  565. #define R_000011_E2_DYN_CNTL 0x000011
  566. #define S_000011_E2_FORCEON(x) (((x) & 0x1) << 0)
  567. #define G_000011_E2_FORCEON(x) (((x) >> 0) & 0x1)
  568. #define C_000011_E2_FORCEON 0xFFFFFFFE
  569. #define S_000011_E2_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1)
  570. #define G_000011_E2_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1)
  571. #define C_000011_E2_MAX_DYN_STOP_LAT 0xFFFFFFFD
  572. #define S_000011_E2_CLOCK_STATUS(x) (((x) & 0x1) << 2)
  573. #define G_000011_E2_CLOCK_STATUS(x) (((x) >> 2) & 0x1)
  574. #define C_000011_E2_CLOCK_STATUS 0xFFFFFFFB
  575. #define S_000011_E2_PROG_SHUTOFF(x) (((x) & 0x1) << 3)
  576. #define G_000011_E2_PROG_SHUTOFF(x) (((x) >> 3) & 0x1)
  577. #define C_000011_E2_PROG_SHUTOFF 0xFFFFFFF7
  578. #define S_000011_E2_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4)
  579. #define G_000011_E2_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF)
  580. #define C_000011_E2_PROG_DELAY_VALUE 0xFFFFF00F
  581. #define S_000011_E2_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12)
  582. #define G_000011_E2_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF)
  583. #define C_000011_E2_LOWER_POWER_IDLE 0xFFF00FFF
  584. #define S_000011_E2_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20)
  585. #define G_000011_E2_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1)
  586. #define C_000011_E2_LOWER_POWER_IGNORE 0xFFEFFFFF
  587. #define S_000011_E2_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21)
  588. #define G_000011_E2_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1)
  589. #define C_000011_E2_NORMAL_POWER_IGNORE 0xFFDFFFFF
  590. #define S_000011_SPARE(x) (((x) & 0x3) << 22)
  591. #define G_000011_SPARE(x) (((x) >> 22) & 0x3)
  592. #define C_000011_SPARE 0xFF3FFFFF
  593. #define S_000011_E2_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24)
  594. #define G_000011_E2_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF)
  595. #define C_000011_E2_NORMAL_POWER_BUSY 0x00FFFFFF
  596. #define R_000013_IDCT_DYN_CNTL 0x000013
  597. #define S_000013_IDCT_FORCEON(x) (((x) & 0x1) << 0)
  598. #define G_000013_IDCT_FORCEON(x) (((x) >> 0) & 0x1)
  599. #define C_000013_IDCT_FORCEON 0xFFFFFFFE
  600. #define S_000013_IDCT_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 1)
  601. #define G_000013_IDCT_MAX_DYN_STOP_LAT(x) (((x) >> 1) & 0x1)
  602. #define C_000013_IDCT_MAX_DYN_STOP_LAT 0xFFFFFFFD
  603. #define S_000013_IDCT_CLOCK_STATUS(x) (((x) & 0x1) << 2)
  604. #define G_000013_IDCT_CLOCK_STATUS(x) (((x) >> 2) & 0x1)
  605. #define C_000013_IDCT_CLOCK_STATUS 0xFFFFFFFB
  606. #define S_000013_IDCT_PROG_SHUTOFF(x) (((x) & 0x1) << 3)
  607. #define G_000013_IDCT_PROG_SHUTOFF(x) (((x) >> 3) & 0x1)
  608. #define C_000013_IDCT_PROG_SHUTOFF 0xFFFFFFF7
  609. #define S_000013_IDCT_PROG_DELAY_VALUE(x) (((x) & 0xFF) << 4)
  610. #define G_000013_IDCT_PROG_DELAY_VALUE(x) (((x) >> 4) & 0xFF)
  611. #define C_000013_IDCT_PROG_DELAY_VALUE 0xFFFFF00F
  612. #define S_000013_IDCT_LOWER_POWER_IDLE(x) (((x) & 0xFF) << 12)
  613. #define G_000013_IDCT_LOWER_POWER_IDLE(x) (((x) >> 12) & 0xFF)
  614. #define C_000013_IDCT_LOWER_POWER_IDLE 0xFFF00FFF
  615. #define S_000013_IDCT_LOWER_POWER_IGNORE(x) (((x) & 0x1) << 20)
  616. #define G_000013_IDCT_LOWER_POWER_IGNORE(x) (((x) >> 20) & 0x1)
  617. #define C_000013_IDCT_LOWER_POWER_IGNORE 0xFFEFFFFF
  618. #define S_000013_IDCT_NORMAL_POWER_IGNORE(x) (((x) & 0x1) << 21)
  619. #define G_000013_IDCT_NORMAL_POWER_IGNORE(x) (((x) >> 21) & 0x1)
  620. #define C_000013_IDCT_NORMAL_POWER_IGNORE 0xFFDFFFFF
  621. #define S_000013_SPARE(x) (((x) & 0x3) << 22)
  622. #define G_000013_SPARE(x) (((x) >> 22) & 0x3)
  623. #define C_000013_SPARE 0xFF3FFFFF
  624. #define S_000013_IDCT_NORMAL_POWER_BUSY(x) (((x) & 0xFF) << 24)
  625. #define G_000013_IDCT_NORMAL_POWER_BUSY(x) (((x) >> 24) & 0xFF)
  626. #define C_000013_IDCT_NORMAL_POWER_BUSY 0x00FFFFFF
  627. #endif