Home | History | Annotate | Download | only in common
      1 /*
      2  * Vega 3D Registers
      3  *
      4  * Copyright (C) 2016  Advanced Micro Devices, Inc.
      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
     14  * in all copies or substantial portions of the Software.
     15  *
     16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     17  * OR 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) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
     20  * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     21  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     22  */
     23 
     24 #ifndef GFX9D_H
     25 #define GFX9D_H
     26 
     27 #define R_008008_GRBM_STATUS2                                           0x008008
     28 #define   S_008008_ME0PIPE1_CMDFIFO_AVAIL(x)                          (((unsigned)(x) & 0x0F) << 0)
     29 #define   G_008008_ME0PIPE1_CMDFIFO_AVAIL(x)                          (((x) >> 0) & 0x0F)
     30 #define   C_008008_ME0PIPE1_CMDFIFO_AVAIL                             0xFFFFFFF0
     31 #define   S_008008_ME0PIPE1_CF_RQ_PENDING(x)                          (((unsigned)(x) & 0x1) << 4)
     32 #define   G_008008_ME0PIPE1_CF_RQ_PENDING(x)                          (((x) >> 4) & 0x1)
     33 #define   C_008008_ME0PIPE1_CF_RQ_PENDING                             0xFFFFFFEF
     34 #define   S_008008_ME0PIPE1_PF_RQ_PENDING(x)                          (((unsigned)(x) & 0x1) << 5)
     35 #define   G_008008_ME0PIPE1_PF_RQ_PENDING(x)                          (((x) >> 5) & 0x1)
     36 #define   C_008008_ME0PIPE1_PF_RQ_PENDING                             0xFFFFFFDF
     37 #define   S_008008_ME1PIPE0_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 6)
     38 #define   G_008008_ME1PIPE0_RQ_PENDING(x)                             (((x) >> 6) & 0x1)
     39 #define   C_008008_ME1PIPE0_RQ_PENDING                                0xFFFFFFBF
     40 #define   S_008008_ME1PIPE1_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 7)
     41 #define   G_008008_ME1PIPE1_RQ_PENDING(x)                             (((x) >> 7) & 0x1)
     42 #define   C_008008_ME1PIPE1_RQ_PENDING                                0xFFFFFF7F
     43 #define   S_008008_ME1PIPE2_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 8)
     44 #define   G_008008_ME1PIPE2_RQ_PENDING(x)                             (((x) >> 8) & 0x1)
     45 #define   C_008008_ME1PIPE2_RQ_PENDING                                0xFFFFFEFF
     46 #define   S_008008_ME1PIPE3_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 9)
     47 #define   G_008008_ME1PIPE3_RQ_PENDING(x)                             (((x) >> 9) & 0x1)
     48 #define   C_008008_ME1PIPE3_RQ_PENDING                                0xFFFFFDFF
     49 #define   S_008008_ME2PIPE0_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 10)
     50 #define   G_008008_ME2PIPE0_RQ_PENDING(x)                             (((x) >> 10) & 0x1)
     51 #define   C_008008_ME2PIPE0_RQ_PENDING                                0xFFFFFBFF
     52 #define   S_008008_ME2PIPE1_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 11)
     53 #define   G_008008_ME2PIPE1_RQ_PENDING(x)                             (((x) >> 11) & 0x1)
     54 #define   C_008008_ME2PIPE1_RQ_PENDING                                0xFFFFF7FF
     55 #define   S_008008_ME2PIPE2_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 12)
     56 #define   G_008008_ME2PIPE2_RQ_PENDING(x)                             (((x) >> 12) & 0x1)
     57 #define   C_008008_ME2PIPE2_RQ_PENDING                                0xFFFFEFFF
     58 #define   S_008008_ME2PIPE3_RQ_PENDING(x)                             (((unsigned)(x) & 0x1) << 13)
     59 #define   G_008008_ME2PIPE3_RQ_PENDING(x)                             (((x) >> 13) & 0x1)
     60 #define   C_008008_ME2PIPE3_RQ_PENDING                                0xFFFFDFFF
     61 #define   S_008008_RLC_RQ_PENDING(x)                                  (((unsigned)(x) & 0x1) << 14)
     62 #define   G_008008_RLC_RQ_PENDING(x)                                  (((x) >> 14) & 0x1)
     63 #define   C_008008_RLC_RQ_PENDING                                     0xFFFFBFFF
     64 #define   S_008008_UTCL2_BUSY(x)                                      (((unsigned)(x) & 0x1) << 15)
     65 #define   G_008008_UTCL2_BUSY(x)                                      (((x) >> 15) & 0x1)
     66 #define   C_008008_UTCL2_BUSY                                         0xFFFF7FFF
     67 #define   S_008008_EA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 16)
     68 #define   G_008008_EA_BUSY(x)                                         (((x) >> 16) & 0x1)
     69 #define   C_008008_EA_BUSY                                            0xFFFEFFFF
     70 #define   S_008008_RMI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 17)
     71 #define   G_008008_RMI_BUSY(x)                                        (((x) >> 17) & 0x1)
     72 #define   C_008008_RMI_BUSY                                           0xFFFDFFFF
     73 #define   S_008008_UTCL2_RQ_PENDING(x)                                (((unsigned)(x) & 0x1) << 18)
     74 #define   G_008008_UTCL2_RQ_PENDING(x)                                (((x) >> 18) & 0x1)
     75 #define   C_008008_UTCL2_RQ_PENDING                                   0xFFFBFFFF
     76 #define   S_008008_CPF_RQ_PENDING(x)                                  (((unsigned)(x) & 0x1) << 19)
     77 #define   G_008008_CPF_RQ_PENDING(x)                                  (((x) >> 19) & 0x1)
     78 #define   C_008008_CPF_RQ_PENDING                                     0xFFF7FFFF
     79 #define   S_008008_EA_LINK_BUSY(x)                                    (((unsigned)(x) & 0x1) << 20)
     80 #define   G_008008_EA_LINK_BUSY(x)                                    (((x) >> 20) & 0x1)
     81 #define   C_008008_EA_LINK_BUSY                                       0xFFEFFFFF
     82 #define   S_008008_RLC_BUSY(x)                                        (((unsigned)(x) & 0x1) << 24)
     83 #define   G_008008_RLC_BUSY(x)                                        (((x) >> 24) & 0x1)
     84 #define   C_008008_RLC_BUSY                                           0xFEFFFFFF
     85 #define   S_008008_TC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
     86 #define   G_008008_TC_BUSY(x)                                         (((x) >> 25) & 0x1)
     87 #define   C_008008_TC_BUSY                                            0xFDFFFFFF
     88 #define   S_008008_TCC_CC_RESIDENT(x)                                 (((unsigned)(x) & 0x1) << 26)
     89 #define   G_008008_TCC_CC_RESIDENT(x)                                 (((x) >> 26) & 0x1)
     90 #define   C_008008_TCC_CC_RESIDENT                                    0xFBFFFFFF
     91 #define   S_008008_CPF_BUSY(x)                                        (((unsigned)(x) & 0x1) << 28)
     92 #define   G_008008_CPF_BUSY(x)                                        (((x) >> 28) & 0x1)
     93 #define   C_008008_CPF_BUSY                                           0xEFFFFFFF
     94 #define   S_008008_CPC_BUSY(x)                                        (((unsigned)(x) & 0x1) << 29)
     95 #define   G_008008_CPC_BUSY(x)                                        (((x) >> 29) & 0x1)
     96 #define   C_008008_CPC_BUSY                                           0xDFFFFFFF
     97 #define   S_008008_CPG_BUSY(x)                                        (((unsigned)(x) & 0x1) << 30)
     98 #define   G_008008_CPG_BUSY(x)                                        (((x) >> 30) & 0x1)
     99 #define   C_008008_CPG_BUSY                                           0xBFFFFFFF
    100 #define   S_008008_CPAXI_BUSY(x)                                      (((unsigned)(x) & 0x1) << 31)
    101 #define   G_008008_CPAXI_BUSY(x)                                      (((x) >> 31) & 0x1)
    102 #define   C_008008_CPAXI_BUSY                                         0x7FFFFFFF
    103 #define R_008010_GRBM_STATUS                                            0x008010
    104 #define   S_008010_ME0PIPE0_CMDFIFO_AVAIL(x)                          (((unsigned)(x) & 0x0F) << 0)
    105 #define   G_008010_ME0PIPE0_CMDFIFO_AVAIL(x)                          (((x) >> 0) & 0x0F)
    106 #define   C_008010_ME0PIPE0_CMDFIFO_AVAIL                             0xFFFFFFF0
    107 #define   S_008010_RSMU_RQ_PENDING(x)                                 (((unsigned)(x) & 0x1) << 5)
    108 #define   G_008010_RSMU_RQ_PENDING(x)                                 (((x) >> 5) & 0x1)
    109 #define   C_008010_RSMU_RQ_PENDING                                    0xFFFFFFDF
    110 #define   S_008010_ME0PIPE0_CF_RQ_PENDING(x)                          (((unsigned)(x) & 0x1) << 7)
    111 #define   G_008010_ME0PIPE0_CF_RQ_PENDING(x)                          (((x) >> 7) & 0x1)
    112 #define   C_008010_ME0PIPE0_CF_RQ_PENDING                             0xFFFFFF7F
    113 #define   S_008010_ME0PIPE0_PF_RQ_PENDING(x)                          (((unsigned)(x) & 0x1) << 8)
    114 #define   G_008010_ME0PIPE0_PF_RQ_PENDING(x)                          (((x) >> 8) & 0x1)
    115 #define   C_008010_ME0PIPE0_PF_RQ_PENDING                             0xFFFFFEFF
    116 #define   S_008010_GDS_DMA_RQ_PENDING(x)                              (((unsigned)(x) & 0x1) << 9)
    117 #define   G_008010_GDS_DMA_RQ_PENDING(x)                              (((x) >> 9) & 0x1)
    118 #define   C_008010_GDS_DMA_RQ_PENDING                                 0xFFFFFDFF
    119 #define   S_008010_DB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 12)
    120 #define   G_008010_DB_CLEAN(x)                                        (((x) >> 12) & 0x1)
    121 #define   C_008010_DB_CLEAN                                           0xFFFFEFFF
    122 #define   S_008010_CB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 13)
    123 #define   G_008010_CB_CLEAN(x)                                        (((x) >> 13) & 0x1)
    124 #define   C_008010_CB_CLEAN                                           0xFFFFDFFF
    125 #define   S_008010_TA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 14)
    126 #define   G_008010_TA_BUSY(x)                                         (((x) >> 14) & 0x1)
    127 #define   C_008010_TA_BUSY                                            0xFFFFBFFF
    128 #define   S_008010_GDS_BUSY(x)                                        (((unsigned)(x) & 0x1) << 15)
    129 #define   G_008010_GDS_BUSY(x)                                        (((x) >> 15) & 0x1)
    130 #define   C_008010_GDS_BUSY                                           0xFFFF7FFF
    131 #define   S_008010_WD_BUSY_NO_DMA(x)                                  (((unsigned)(x) & 0x1) << 16)
    132 #define   G_008010_WD_BUSY_NO_DMA(x)                                  (((x) >> 16) & 0x1)
    133 #define   C_008010_WD_BUSY_NO_DMA                                     0xFFFEFFFF
    134 #define   S_008010_VGT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 17)
    135 #define   G_008010_VGT_BUSY(x)                                        (((x) >> 17) & 0x1)
    136 #define   C_008010_VGT_BUSY                                           0xFFFDFFFF
    137 #define   S_008010_IA_BUSY_NO_DMA(x)                                  (((unsigned)(x) & 0x1) << 18)
    138 #define   G_008010_IA_BUSY_NO_DMA(x)                                  (((x) >> 18) & 0x1)
    139 #define   C_008010_IA_BUSY_NO_DMA                                     0xFFFBFFFF
    140 #define   S_008010_IA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 19)
    141 #define   G_008010_IA_BUSY(x)                                         (((x) >> 19) & 0x1)
    142 #define   C_008010_IA_BUSY                                            0xFFF7FFFF
    143 #define   S_008010_SX_BUSY(x)                                         (((unsigned)(x) & 0x1) << 20)
    144 #define   G_008010_SX_BUSY(x)                                         (((x) >> 20) & 0x1)
    145 #define   C_008010_SX_BUSY                                            0xFFEFFFFF
    146 #define   S_008010_WD_BUSY(x)                                         (((unsigned)(x) & 0x1) << 21)
    147 #define   G_008010_WD_BUSY(x)                                         (((x) >> 21) & 0x1)
    148 #define   C_008010_WD_BUSY                                            0xFFDFFFFF
    149 #define   S_008010_SPI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    150 #define   G_008010_SPI_BUSY(x)                                        (((x) >> 22) & 0x1)
    151 #define   C_008010_SPI_BUSY                                           0xFFBFFFFF
    152 #define   S_008010_BCI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 23)
    153 #define   G_008010_BCI_BUSY(x)                                        (((x) >> 23) & 0x1)
    154 #define   C_008010_BCI_BUSY                                           0xFF7FFFFF
    155 #define   S_008010_SC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 24)
    156 #define   G_008010_SC_BUSY(x)                                         (((x) >> 24) & 0x1)
    157 #define   C_008010_SC_BUSY                                            0xFEFFFFFF
    158 #define   S_008010_PA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
    159 #define   G_008010_PA_BUSY(x)                                         (((x) >> 25) & 0x1)
    160 #define   C_008010_PA_BUSY                                            0xFDFFFFFF
    161 #define   S_008010_DB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
    162 #define   G_008010_DB_BUSY(x)                                         (((x) >> 26) & 0x1)
    163 #define   C_008010_DB_BUSY                                            0xFBFFFFFF
    164 #define   S_008010_CP_COHERENCY_BUSY(x)                               (((unsigned)(x) & 0x1) << 28)
    165 #define   G_008010_CP_COHERENCY_BUSY(x)                               (((x) >> 28) & 0x1)
    166 #define   C_008010_CP_COHERENCY_BUSY                                  0xEFFFFFFF
    167 #define   S_008010_CP_BUSY(x)                                         (((unsigned)(x) & 0x1) << 29)
    168 #define   G_008010_CP_BUSY(x)                                         (((x) >> 29) & 0x1)
    169 #define   C_008010_CP_BUSY                                            0xDFFFFFFF
    170 #define   S_008010_CB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 30)
    171 #define   G_008010_CB_BUSY(x)                                         (((x) >> 30) & 0x1)
    172 #define   C_008010_CB_BUSY                                            0xBFFFFFFF
    173 #define   S_008010_GUI_ACTIVE(x)                                      (((unsigned)(x) & 0x1) << 31)
    174 #define   G_008010_GUI_ACTIVE(x)                                      (((x) >> 31) & 0x1)
    175 #define   C_008010_GUI_ACTIVE                                         0x7FFFFFFF
    176 #define R_008014_GRBM_STATUS_SE0                                        0x008014
    177 #define   S_008014_DB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 1)
    178 #define   G_008014_DB_CLEAN(x)                                        (((x) >> 1) & 0x1)
    179 #define   C_008014_DB_CLEAN                                           0xFFFFFFFD
    180 #define   S_008014_CB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 2)
    181 #define   G_008014_CB_CLEAN(x)                                        (((x) >> 2) & 0x1)
    182 #define   C_008014_CB_CLEAN                                           0xFFFFFFFB
    183 #define   S_008014_RMI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 21)
    184 #define   G_008014_RMI_BUSY(x)                                        (((x) >> 21) & 0x1)
    185 #define   C_008014_RMI_BUSY                                           0xFFDFFFFF
    186 #define   S_008014_BCI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    187 #define   G_008014_BCI_BUSY(x)                                        (((x) >> 22) & 0x1)
    188 #define   C_008014_BCI_BUSY                                           0xFFBFFFFF
    189 #define   S_008014_VGT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 23)
    190 #define   G_008014_VGT_BUSY(x)                                        (((x) >> 23) & 0x1)
    191 #define   C_008014_VGT_BUSY                                           0xFF7FFFFF
    192 #define   S_008014_PA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 24)
    193 #define   G_008014_PA_BUSY(x)                                         (((x) >> 24) & 0x1)
    194 #define   C_008014_PA_BUSY                                            0xFEFFFFFF
    195 #define   S_008014_TA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
    196 #define   G_008014_TA_BUSY(x)                                         (((x) >> 25) & 0x1)
    197 #define   C_008014_TA_BUSY                                            0xFDFFFFFF
    198 #define   S_008014_SX_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
    199 #define   G_008014_SX_BUSY(x)                                         (((x) >> 26) & 0x1)
    200 #define   C_008014_SX_BUSY                                            0xFBFFFFFF
    201 #define   S_008014_SPI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 27)
    202 #define   G_008014_SPI_BUSY(x)                                        (((x) >> 27) & 0x1)
    203 #define   C_008014_SPI_BUSY                                           0xF7FFFFFF
    204 #define   S_008014_SC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 29)
    205 #define   G_008014_SC_BUSY(x)                                         (((x) >> 29) & 0x1)
    206 #define   C_008014_SC_BUSY                                            0xDFFFFFFF
    207 #define   S_008014_DB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 30)
    208 #define   G_008014_DB_BUSY(x)                                         (((x) >> 30) & 0x1)
    209 #define   C_008014_DB_BUSY                                            0xBFFFFFFF
    210 #define   S_008014_CB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 31)
    211 #define   G_008014_CB_BUSY(x)                                         (((x) >> 31) & 0x1)
    212 #define   C_008014_CB_BUSY                                            0x7FFFFFFF
    213 #define R_008018_GRBM_STATUS_SE1                                        0x008018
    214 #define   S_008018_DB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 1)
    215 #define   G_008018_DB_CLEAN(x)                                        (((x) >> 1) & 0x1)
    216 #define   C_008018_DB_CLEAN                                           0xFFFFFFFD
    217 #define   S_008018_CB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 2)
    218 #define   G_008018_CB_CLEAN(x)                                        (((x) >> 2) & 0x1)
    219 #define   C_008018_CB_CLEAN                                           0xFFFFFFFB
    220 #define   S_008018_RMI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 21)
    221 #define   G_008018_RMI_BUSY(x)                                        (((x) >> 21) & 0x1)
    222 #define   C_008018_RMI_BUSY                                           0xFFDFFFFF
    223 #define   S_008018_BCI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    224 #define   G_008018_BCI_BUSY(x)                                        (((x) >> 22) & 0x1)
    225 #define   C_008018_BCI_BUSY                                           0xFFBFFFFF
    226 #define   S_008018_VGT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 23)
    227 #define   G_008018_VGT_BUSY(x)                                        (((x) >> 23) & 0x1)
    228 #define   C_008018_VGT_BUSY                                           0xFF7FFFFF
    229 #define   S_008018_PA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 24)
    230 #define   G_008018_PA_BUSY(x)                                         (((x) >> 24) & 0x1)
    231 #define   C_008018_PA_BUSY                                            0xFEFFFFFF
    232 #define   S_008018_TA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
    233 #define   G_008018_TA_BUSY(x)                                         (((x) >> 25) & 0x1)
    234 #define   C_008018_TA_BUSY                                            0xFDFFFFFF
    235 #define   S_008018_SX_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
    236 #define   G_008018_SX_BUSY(x)                                         (((x) >> 26) & 0x1)
    237 #define   C_008018_SX_BUSY                                            0xFBFFFFFF
    238 #define   S_008018_SPI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 27)
    239 #define   G_008018_SPI_BUSY(x)                                        (((x) >> 27) & 0x1)
    240 #define   C_008018_SPI_BUSY                                           0xF7FFFFFF
    241 #define   S_008018_SC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 29)
    242 #define   G_008018_SC_BUSY(x)                                         (((x) >> 29) & 0x1)
    243 #define   C_008018_SC_BUSY                                            0xDFFFFFFF
    244 #define   S_008018_DB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 30)
    245 #define   G_008018_DB_BUSY(x)                                         (((x) >> 30) & 0x1)
    246 #define   C_008018_DB_BUSY                                            0xBFFFFFFF
    247 #define   S_008018_CB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 31)
    248 #define   G_008018_CB_BUSY(x)                                         (((x) >> 31) & 0x1)
    249 #define   C_008018_CB_BUSY                                            0x7FFFFFFF
    250 #define R_008038_GRBM_STATUS_SE2                                        0x008038
    251 #define   S_008038_DB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 1)
    252 #define   G_008038_DB_CLEAN(x)                                        (((x) >> 1) & 0x1)
    253 #define   C_008038_DB_CLEAN                                           0xFFFFFFFD
    254 #define   S_008038_CB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 2)
    255 #define   G_008038_CB_CLEAN(x)                                        (((x) >> 2) & 0x1)
    256 #define   C_008038_CB_CLEAN                                           0xFFFFFFFB
    257 #define   S_008038_RMI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 21)
    258 #define   G_008038_RMI_BUSY(x)                                        (((x) >> 21) & 0x1)
    259 #define   C_008038_RMI_BUSY                                           0xFFDFFFFF
    260 #define   S_008038_BCI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    261 #define   G_008038_BCI_BUSY(x)                                        (((x) >> 22) & 0x1)
    262 #define   C_008038_BCI_BUSY                                           0xFFBFFFFF
    263 #define   S_008038_VGT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 23)
    264 #define   G_008038_VGT_BUSY(x)                                        (((x) >> 23) & 0x1)
    265 #define   C_008038_VGT_BUSY                                           0xFF7FFFFF
    266 #define   S_008038_PA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 24)
    267 #define   G_008038_PA_BUSY(x)                                         (((x) >> 24) & 0x1)
    268 #define   C_008038_PA_BUSY                                            0xFEFFFFFF
    269 #define   S_008038_TA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
    270 #define   G_008038_TA_BUSY(x)                                         (((x) >> 25) & 0x1)
    271 #define   C_008038_TA_BUSY                                            0xFDFFFFFF
    272 #define   S_008038_SX_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
    273 #define   G_008038_SX_BUSY(x)                                         (((x) >> 26) & 0x1)
    274 #define   C_008038_SX_BUSY                                            0xFBFFFFFF
    275 #define   S_008038_SPI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 27)
    276 #define   G_008038_SPI_BUSY(x)                                        (((x) >> 27) & 0x1)
    277 #define   C_008038_SPI_BUSY                                           0xF7FFFFFF
    278 #define   S_008038_SC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 29)
    279 #define   G_008038_SC_BUSY(x)                                         (((x) >> 29) & 0x1)
    280 #define   C_008038_SC_BUSY                                            0xDFFFFFFF
    281 #define   S_008038_DB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 30)
    282 #define   G_008038_DB_BUSY(x)                                         (((x) >> 30) & 0x1)
    283 #define   C_008038_DB_BUSY                                            0xBFFFFFFF
    284 #define   S_008038_CB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 31)
    285 #define   G_008038_CB_BUSY(x)                                         (((x) >> 31) & 0x1)
    286 #define   C_008038_CB_BUSY                                            0x7FFFFFFF
    287 #define R_00803C_GRBM_STATUS_SE3                                        0x00803C
    288 #define   S_00803C_DB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 1)
    289 #define   G_00803C_DB_CLEAN(x)                                        (((x) >> 1) & 0x1)
    290 #define   C_00803C_DB_CLEAN                                           0xFFFFFFFD
    291 #define   S_00803C_CB_CLEAN(x)                                        (((unsigned)(x) & 0x1) << 2)
    292 #define   G_00803C_CB_CLEAN(x)                                        (((x) >> 2) & 0x1)
    293 #define   C_00803C_CB_CLEAN                                           0xFFFFFFFB
    294 #define   S_00803C_RMI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 21)
    295 #define   G_00803C_RMI_BUSY(x)                                        (((x) >> 21) & 0x1)
    296 #define   C_00803C_RMI_BUSY                                           0xFFDFFFFF
    297 #define   S_00803C_BCI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    298 #define   G_00803C_BCI_BUSY(x)                                        (((x) >> 22) & 0x1)
    299 #define   C_00803C_BCI_BUSY                                           0xFFBFFFFF
    300 #define   S_00803C_VGT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 23)
    301 #define   G_00803C_VGT_BUSY(x)                                        (((x) >> 23) & 0x1)
    302 #define   C_00803C_VGT_BUSY                                           0xFF7FFFFF
    303 #define   S_00803C_PA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 24)
    304 #define   G_00803C_PA_BUSY(x)                                         (((x) >> 24) & 0x1)
    305 #define   C_00803C_PA_BUSY                                            0xFEFFFFFF
    306 #define   S_00803C_TA_BUSY(x)                                         (((unsigned)(x) & 0x1) << 25)
    307 #define   G_00803C_TA_BUSY(x)                                         (((x) >> 25) & 0x1)
    308 #define   C_00803C_TA_BUSY                                            0xFDFFFFFF
    309 #define   S_00803C_SX_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
    310 #define   G_00803C_SX_BUSY(x)                                         (((x) >> 26) & 0x1)
    311 #define   C_00803C_SX_BUSY                                            0xFBFFFFFF
    312 #define   S_00803C_SPI_BUSY(x)                                        (((unsigned)(x) & 0x1) << 27)
    313 #define   G_00803C_SPI_BUSY(x)                                        (((x) >> 27) & 0x1)
    314 #define   C_00803C_SPI_BUSY                                           0xF7FFFFFF
    315 #define   S_00803C_SC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 29)
    316 #define   G_00803C_SC_BUSY(x)                                         (((x) >> 29) & 0x1)
    317 #define   C_00803C_SC_BUSY                                            0xDFFFFFFF
    318 #define   S_00803C_DB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 30)
    319 #define   G_00803C_DB_BUSY(x)                                         (((x) >> 30) & 0x1)
    320 #define   C_00803C_DB_BUSY                                            0xBFFFFFFF
    321 #define   S_00803C_CB_BUSY(x)                                         (((unsigned)(x) & 0x1) << 31)
    322 #define   G_00803C_CB_BUSY(x)                                         (((x) >> 31) & 0x1)
    323 #define   C_00803C_CB_BUSY                                            0x7FFFFFFF
    324 #define R_0300FC_CP_STRMOUT_CNTL                                        0x0300FC
    325 #define   S_0300FC_OFFSET_UPDATE_DONE(x)                              (((unsigned)(x) & 0x1) << 0)
    326 #define   G_0300FC_OFFSET_UPDATE_DONE(x)                              (((x) >> 0) & 0x1)
    327 #define   C_0300FC_OFFSET_UPDATE_DONE                                 0xFFFFFFFE
    328 #define R_0301E4_CP_COHER_BASE_HI                                       0x0301E4
    329 #define   S_0301E4_COHER_BASE_HI_256B(x)                              (((unsigned)(x) & 0xFF) << 0)
    330 #define   G_0301E4_COHER_BASE_HI_256B(x)                              (((x) >> 0) & 0xFF)
    331 #define   C_0301E4_COHER_BASE_HI_256B                                 0xFFFFFF00
    332 #define R_0301EC_CP_COHER_START_DELAY                                   0x0301EC
    333 #define   S_0301EC_START_DELAY_COUNT(x)                               (((unsigned)(x) & 0x3F) << 0)
    334 #define   G_0301EC_START_DELAY_COUNT(x)                               (((x) >> 0) & 0x3F)
    335 #define   C_0301EC_START_DELAY_COUNT                                  0xFFFFFFC0
    336 #define R_0301F0_CP_COHER_CNTL                                          0x0301F0
    337 #define   S_0301F0_TC_NC_ACTION_ENA(x)                                (((unsigned)(x) & 0x1) << 3)
    338 #define   G_0301F0_TC_NC_ACTION_ENA(x)                                (((x) >> 3) & 0x1)
    339 #define   C_0301F0_TC_NC_ACTION_ENA                                   0xFFFFFFF7
    340 #define   S_0301F0_TC_WC_ACTION_ENA(x)                                (((unsigned)(x) & 0x1) << 4)
    341 #define   G_0301F0_TC_WC_ACTION_ENA(x)                                (((x) >> 4) & 0x1)
    342 #define   C_0301F0_TC_WC_ACTION_ENA                                   0xFFFFFFEF
    343 #define   S_0301F0_TC_INV_METADATA_ACTION_ENA(x)                      (((unsigned)(x) & 0x1) << 5)
    344 #define   G_0301F0_TC_INV_METADATA_ACTION_ENA(x)                      (((x) >> 5) & 0x1)
    345 #define   C_0301F0_TC_INV_METADATA_ACTION_ENA                         0xFFFFFFDF
    346 #define   S_0301F0_TCL1_VOL_ACTION_ENA(x)                             (((unsigned)(x) & 0x1) << 15)
    347 #define   G_0301F0_TCL1_VOL_ACTION_ENA(x)                             (((x) >> 15) & 0x1)
    348 #define   C_0301F0_TCL1_VOL_ACTION_ENA                                0xFFFF7FFF
    349 #define   S_0301F0_TC_WB_ACTION_ENA(x)                                (((unsigned)(x) & 0x1) << 18)
    350 #define   G_0301F0_TC_WB_ACTION_ENA(x)                                (((x) >> 18) & 0x1)
    351 #define   C_0301F0_TC_WB_ACTION_ENA                                   0xFFFBFFFF
    352 #define   S_0301F0_TCL1_ACTION_ENA(x)                                 (((unsigned)(x) & 0x1) << 22)
    353 #define   G_0301F0_TCL1_ACTION_ENA(x)                                 (((x) >> 22) & 0x1)
    354 #define   C_0301F0_TCL1_ACTION_ENA                                    0xFFBFFFFF
    355 #define   S_0301F0_TC_ACTION_ENA(x)                                   (((unsigned)(x) & 0x1) << 23)
    356 #define   G_0301F0_TC_ACTION_ENA(x)                                   (((x) >> 23) & 0x1)
    357 #define   C_0301F0_TC_ACTION_ENA                                      0xFF7FFFFF
    358 #define   S_0301F0_CB_ACTION_ENA(x)                                   (((unsigned)(x) & 0x1) << 25)
    359 #define   G_0301F0_CB_ACTION_ENA(x)                                   (((x) >> 25) & 0x1)
    360 #define   C_0301F0_CB_ACTION_ENA                                      0xFDFFFFFF
    361 #define   S_0301F0_DB_ACTION_ENA(x)                                   (((unsigned)(x) & 0x1) << 26)
    362 #define   G_0301F0_DB_ACTION_ENA(x)                                   (((x) >> 26) & 0x1)
    363 #define   C_0301F0_DB_ACTION_ENA                                      0xFBFFFFFF
    364 #define   S_0301F0_SH_KCACHE_ACTION_ENA(x)                            (((unsigned)(x) & 0x1) << 27)
    365 #define   G_0301F0_SH_KCACHE_ACTION_ENA(x)                            (((x) >> 27) & 0x1)
    366 #define   C_0301F0_SH_KCACHE_ACTION_ENA                               0xF7FFFFFF
    367 #define   S_0301F0_SH_KCACHE_VOL_ACTION_ENA(x)                        (((unsigned)(x) & 0x1) << 28)
    368 #define   G_0301F0_SH_KCACHE_VOL_ACTION_ENA(x)                        (((x) >> 28) & 0x1)
    369 #define   C_0301F0_SH_KCACHE_VOL_ACTION_ENA                           0xEFFFFFFF
    370 #define   S_0301F0_SH_ICACHE_ACTION_ENA(x)                            (((unsigned)(x) & 0x1) << 29)
    371 #define   G_0301F0_SH_ICACHE_ACTION_ENA(x)                            (((x) >> 29) & 0x1)
    372 #define   C_0301F0_SH_ICACHE_ACTION_ENA                               0xDFFFFFFF
    373 #define   S_0301F0_SH_KCACHE_WB_ACTION_ENA(x)                         (((unsigned)(x) & 0x1) << 30)
    374 #define   G_0301F0_SH_KCACHE_WB_ACTION_ENA(x)                         (((x) >> 30) & 0x1)
    375 #define   C_0301F0_SH_KCACHE_WB_ACTION_ENA                            0xBFFFFFFF
    376 #define R_0301F4_CP_COHER_SIZE                                          0x0301F4
    377 #define R_0301F8_CP_COHER_BASE                                          0x0301F8
    378 #define R_0301FC_CP_COHER_STATUS                                        0x0301FC
    379 #define   S_0301FC_MEID(x)                                            (((unsigned)(x) & 0x03) << 24)
    380 #define   G_0301FC_MEID(x)                                            (((x) >> 24) & 0x03)
    381 #define   C_0301FC_MEID                                               0xFCFFFFFF
    382 #define   S_0301FC_STATUS(x)                                          (((unsigned)(x) & 0x1) << 31)
    383 #define   G_0301FC_STATUS(x)                                          (((x) >> 31) & 0x1)
    384 #define   C_0301FC_STATUS                                             0x7FFFFFFF
    385 #define R_008210_CP_CPC_STATUS                                          0x008210
    386 #define   S_008210_MEC1_BUSY(x)                                       (((unsigned)(x) & 0x1) << 0)
    387 #define   G_008210_MEC1_BUSY(x)                                       (((x) >> 0) & 0x1)
    388 #define   C_008210_MEC1_BUSY                                          0xFFFFFFFE
    389 #define   S_008210_MEC2_BUSY(x)                                       (((unsigned)(x) & 0x1) << 1)
    390 #define   G_008210_MEC2_BUSY(x)                                       (((x) >> 1) & 0x1)
    391 #define   C_008210_MEC2_BUSY                                          0xFFFFFFFD
    392 #define   S_008210_DC0_BUSY(x)                                        (((unsigned)(x) & 0x1) << 2)
    393 #define   G_008210_DC0_BUSY(x)                                        (((x) >> 2) & 0x1)
    394 #define   C_008210_DC0_BUSY                                           0xFFFFFFFB
    395 #define   S_008210_DC1_BUSY(x)                                        (((unsigned)(x) & 0x1) << 3)
    396 #define   G_008210_DC1_BUSY(x)                                        (((x) >> 3) & 0x1)
    397 #define   C_008210_DC1_BUSY                                           0xFFFFFFF7
    398 #define   S_008210_RCIU1_BUSY(x)                                      (((unsigned)(x) & 0x1) << 4)
    399 #define   G_008210_RCIU1_BUSY(x)                                      (((x) >> 4) & 0x1)
    400 #define   C_008210_RCIU1_BUSY                                         0xFFFFFFEF
    401 #define   S_008210_RCIU2_BUSY(x)                                      (((unsigned)(x) & 0x1) << 5)
    402 #define   G_008210_RCIU2_BUSY(x)                                      (((x) >> 5) & 0x1)
    403 #define   C_008210_RCIU2_BUSY                                         0xFFFFFFDF
    404 #define   S_008210_ROQ1_BUSY(x)                                       (((unsigned)(x) & 0x1) << 6)
    405 #define   G_008210_ROQ1_BUSY(x)                                       (((x) >> 6) & 0x1)
    406 #define   C_008210_ROQ1_BUSY                                          0xFFFFFFBF
    407 #define   S_008210_ROQ2_BUSY(x)                                       (((unsigned)(x) & 0x1) << 7)
    408 #define   G_008210_ROQ2_BUSY(x)                                       (((x) >> 7) & 0x1)
    409 #define   C_008210_ROQ2_BUSY                                          0xFFFFFF7F
    410 #define   S_008210_TCIU_BUSY(x)                                       (((unsigned)(x) & 0x1) << 10)
    411 #define   G_008210_TCIU_BUSY(x)                                       (((x) >> 10) & 0x1)
    412 #define   C_008210_TCIU_BUSY                                          0xFFFFFBFF
    413 #define   S_008210_SCRATCH_RAM_BUSY(x)                                (((unsigned)(x) & 0x1) << 11)
    414 #define   G_008210_SCRATCH_RAM_BUSY(x)                                (((x) >> 11) & 0x1)
    415 #define   C_008210_SCRATCH_RAM_BUSY                                   0xFFFFF7FF
    416 #define   S_008210_QU_BUSY(x)                                         (((unsigned)(x) & 0x1) << 12)
    417 #define   G_008210_QU_BUSY(x)                                         (((x) >> 12) & 0x1)
    418 #define   C_008210_QU_BUSY                                            0xFFFFEFFF
    419 #define   S_008210_UTCL2IU_BUSY(x)                                    (((unsigned)(x) & 0x1) << 13)
    420 #define   G_008210_UTCL2IU_BUSY(x)                                    (((x) >> 13) & 0x1)
    421 #define   C_008210_UTCL2IU_BUSY                                       0xFFFFDFFF
    422 #define   S_008210_SAVE_RESTORE_BUSY(x)                               (((unsigned)(x) & 0x1) << 14)
    423 #define   G_008210_SAVE_RESTORE_BUSY(x)                               (((x) >> 14) & 0x1)
    424 #define   C_008210_SAVE_RESTORE_BUSY                                  0xFFFFBFFF
    425 #define   S_008210_CPG_CPC_BUSY(x)                                    (((unsigned)(x) & 0x1) << 29)
    426 #define   G_008210_CPG_CPC_BUSY(x)                                    (((x) >> 29) & 0x1)
    427 #define   C_008210_CPG_CPC_BUSY                                       0xDFFFFFFF
    428 #define   S_008210_CPF_CPC_BUSY(x)                                    (((unsigned)(x) & 0x1) << 30)
    429 #define   G_008210_CPF_CPC_BUSY(x)                                    (((x) >> 30) & 0x1)
    430 #define   C_008210_CPF_CPC_BUSY                                       0xBFFFFFFF
    431 #define   S_008210_CPC_BUSY(x)                                        (((unsigned)(x) & 0x1) << 31)
    432 #define   G_008210_CPC_BUSY(x)                                        (((x) >> 31) & 0x1)
    433 #define   C_008210_CPC_BUSY                                           0x7FFFFFFF
    434 #define R_008214_CP_CPC_BUSY_STAT                                       0x008214
    435 #define   S_008214_MEC1_LOAD_BUSY(x)                                  (((unsigned)(x) & 0x1) << 0)
    436 #define   G_008214_MEC1_LOAD_BUSY(x)                                  (((x) >> 0) & 0x1)
    437 #define   C_008214_MEC1_LOAD_BUSY                                     0xFFFFFFFE
    438 #define   S_008214_MEC1_SEMAPOHRE_BUSY(x)                             (((unsigned)(x) & 0x1) << 1)
    439 #define   G_008214_MEC1_SEMAPOHRE_BUSY(x)                             (((x) >> 1) & 0x1)
    440 #define   C_008214_MEC1_SEMAPOHRE_BUSY                                0xFFFFFFFD
    441 #define   S_008214_MEC1_MUTEX_BUSY(x)                                 (((unsigned)(x) & 0x1) << 2)
    442 #define   G_008214_MEC1_MUTEX_BUSY(x)                                 (((x) >> 2) & 0x1)
    443 #define   C_008214_MEC1_MUTEX_BUSY                                    0xFFFFFFFB
    444 #define   S_008214_MEC1_MESSAGE_BUSY(x)                               (((unsigned)(x) & 0x1) << 3)
    445 #define   G_008214_MEC1_MESSAGE_BUSY(x)                               (((x) >> 3) & 0x1)
    446 #define   C_008214_MEC1_MESSAGE_BUSY                                  0xFFFFFFF7
    447 #define   S_008214_MEC1_EOP_QUEUE_BUSY(x)                             (((unsigned)(x) & 0x1) << 4)
    448 #define   G_008214_MEC1_EOP_QUEUE_BUSY(x)                             (((x) >> 4) & 0x1)
    449 #define   C_008214_MEC1_EOP_QUEUE_BUSY                                0xFFFFFFEF
    450 #define   S_008214_MEC1_IQ_QUEUE_BUSY(x)                              (((unsigned)(x) & 0x1) << 5)
    451 #define   G_008214_MEC1_IQ_QUEUE_BUSY(x)                              (((x) >> 5) & 0x1)
    452 #define   C_008214_MEC1_IQ_QUEUE_BUSY                                 0xFFFFFFDF
    453 #define   S_008214_MEC1_IB_QUEUE_BUSY(x)                              (((unsigned)(x) & 0x1) << 6)
    454 #define   G_008214_MEC1_IB_QUEUE_BUSY(x)                              (((x) >> 6) & 0x1)
    455 #define   C_008214_MEC1_IB_QUEUE_BUSY                                 0xFFFFFFBF
    456 #define   S_008214_MEC1_TC_BUSY(x)                                    (((unsigned)(x) & 0x1) << 7)
    457 #define   G_008214_MEC1_TC_BUSY(x)                                    (((x) >> 7) & 0x1)
    458 #define   C_008214_MEC1_TC_BUSY                                       0xFFFFFF7F
    459 #define   S_008214_MEC1_DMA_BUSY(x)                                   (((unsigned)(x) & 0x1) << 8)
    460 #define   G_008214_MEC1_DMA_BUSY(x)                                   (((x) >> 8) & 0x1)
    461 #define   C_008214_MEC1_DMA_BUSY                                      0xFFFFFEFF
    462 #define   S_008214_MEC1_PARTIAL_FLUSH_BUSY(x)                         (((unsigned)(x) & 0x1) << 9)
    463 #define   G_008214_MEC1_PARTIAL_FLUSH_BUSY(x)                         (((x) >> 9) & 0x1)
    464 #define   C_008214_MEC1_PARTIAL_FLUSH_BUSY                            0xFFFFFDFF
    465 #define   S_008214_MEC1_PIPE0_BUSY(x)                                 (((unsigned)(x) & 0x1) << 10)
    466 #define   G_008214_MEC1_PIPE0_BUSY(x)                                 (((x) >> 10) & 0x1)
    467 #define   C_008214_MEC1_PIPE0_BUSY                                    0xFFFFFBFF
    468 #define   S_008214_MEC1_PIPE1_BUSY(x)                                 (((unsigned)(x) & 0x1) << 11)
    469 #define   G_008214_MEC1_PIPE1_BUSY(x)                                 (((x) >> 11) & 0x1)
    470 #define   C_008214_MEC1_PIPE1_BUSY                                    0xFFFFF7FF
    471 #define   S_008214_MEC1_PIPE2_BUSY(x)                                 (((unsigned)(x) & 0x1) << 12)
    472 #define   G_008214_MEC1_PIPE2_BUSY(x)                                 (((x) >> 12) & 0x1)
    473 #define   C_008214_MEC1_PIPE2_BUSY                                    0xFFFFEFFF
    474 #define   S_008214_MEC1_PIPE3_BUSY(x)                                 (((unsigned)(x) & 0x1) << 13)
    475 #define   G_008214_MEC1_PIPE3_BUSY(x)                                 (((x) >> 13) & 0x1)
    476 #define   C_008214_MEC1_PIPE3_BUSY                                    0xFFFFDFFF
    477 #define   S_008214_MEC2_LOAD_BUSY(x)                                  (((unsigned)(x) & 0x1) << 16)
    478 #define   G_008214_MEC2_LOAD_BUSY(x)                                  (((x) >> 16) & 0x1)
    479 #define   C_008214_MEC2_LOAD_BUSY                                     0xFFFEFFFF
    480 #define   S_008214_MEC2_SEMAPOHRE_BUSY(x)                             (((unsigned)(x) & 0x1) << 17)
    481 #define   G_008214_MEC2_SEMAPOHRE_BUSY(x)                             (((x) >> 17) & 0x1)
    482 #define   C_008214_MEC2_SEMAPOHRE_BUSY                                0xFFFDFFFF
    483 #define   S_008214_MEC2_MUTEX_BUSY(x)                                 (((unsigned)(x) & 0x1) << 18)
    484 #define   G_008214_MEC2_MUTEX_BUSY(x)                                 (((x) >> 18) & 0x1)
    485 #define   C_008214_MEC2_MUTEX_BUSY                                    0xFFFBFFFF
    486 #define   S_008214_MEC2_MESSAGE_BUSY(x)                               (((unsigned)(x) & 0x1) << 19)
    487 #define   G_008214_MEC2_MESSAGE_BUSY(x)                               (((x) >> 19) & 0x1)
    488 #define   C_008214_MEC2_MESSAGE_BUSY                                  0xFFF7FFFF
    489 #define   S_008214_MEC2_EOP_QUEUE_BUSY(x)                             (((unsigned)(x) & 0x1) << 20)
    490 #define   G_008214_MEC2_EOP_QUEUE_BUSY(x)                             (((x) >> 20) & 0x1)
    491 #define   C_008214_MEC2_EOP_QUEUE_BUSY                                0xFFEFFFFF
    492 #define   S_008214_MEC2_IQ_QUEUE_BUSY(x)                              (((unsigned)(x) & 0x1) << 21)
    493 #define   G_008214_MEC2_IQ_QUEUE_BUSY(x)                              (((x) >> 21) & 0x1)
    494 #define   C_008214_MEC2_IQ_QUEUE_BUSY                                 0xFFDFFFFF
    495 #define   S_008214_MEC2_IB_QUEUE_BUSY(x)                              (((unsigned)(x) & 0x1) << 22)
    496 #define   G_008214_MEC2_IB_QUEUE_BUSY(x)                              (((x) >> 22) & 0x1)
    497 #define   C_008214_MEC2_IB_QUEUE_BUSY                                 0xFFBFFFFF
    498 #define   S_008214_MEC2_TC_BUSY(x)                                    (((unsigned)(x) & 0x1) << 23)
    499 #define   G_008214_MEC2_TC_BUSY(x)                                    (((x) >> 23) & 0x1)
    500 #define   C_008214_MEC2_TC_BUSY                                       0xFF7FFFFF
    501 #define   S_008214_MEC2_DMA_BUSY(x)                                   (((unsigned)(x) & 0x1) << 24)
    502 #define   G_008214_MEC2_DMA_BUSY(x)                                   (((x) >> 24) & 0x1)
    503 #define   C_008214_MEC2_DMA_BUSY                                      0xFEFFFFFF
    504 #define   S_008214_MEC2_PARTIAL_FLUSH_BUSY(x)                         (((unsigned)(x) & 0x1) << 25)
    505 #define   G_008214_MEC2_PARTIAL_FLUSH_BUSY(x)                         (((x) >> 25) & 0x1)
    506 #define   C_008214_MEC2_PARTIAL_FLUSH_BUSY                            0xFDFFFFFF
    507 #define   S_008214_MEC2_PIPE0_BUSY(x)                                 (((unsigned)(x) & 0x1) << 26)
    508 #define   G_008214_MEC2_PIPE0_BUSY(x)                                 (((x) >> 26) & 0x1)
    509 #define   C_008214_MEC2_PIPE0_BUSY                                    0xFBFFFFFF
    510 #define   S_008214_MEC2_PIPE1_BUSY(x)                                 (((unsigned)(x) & 0x1) << 27)
    511 #define   G_008214_MEC2_PIPE1_BUSY(x)                                 (((x) >> 27) & 0x1)
    512 #define   C_008214_MEC2_PIPE1_BUSY                                    0xF7FFFFFF
    513 #define   S_008214_MEC2_PIPE2_BUSY(x)                                 (((unsigned)(x) & 0x1) << 28)
    514 #define   G_008214_MEC2_PIPE2_BUSY(x)                                 (((x) >> 28) & 0x1)
    515 #define   C_008214_MEC2_PIPE2_BUSY                                    0xEFFFFFFF
    516 #define   S_008214_MEC2_PIPE3_BUSY(x)                                 (((unsigned)(x) & 0x1) << 29)
    517 #define   G_008214_MEC2_PIPE3_BUSY(x)                                 (((x) >> 29) & 0x1)
    518 #define   C_008214_MEC2_PIPE3_BUSY                                    0xDFFFFFFF
    519 #define R_008218_CP_CPC_STALLED_STAT1                                   0x008218
    520 #define   S_008218_RCIU_TX_FREE_STALL(x)                              (((unsigned)(x) & 0x1) << 3)
    521 #define   G_008218_RCIU_TX_FREE_STALL(x)                              (((x) >> 3) & 0x1)
    522 #define   C_008218_RCIU_TX_FREE_STALL                                 0xFFFFFFF7
    523 #define   S_008218_RCIU_PRIV_VIOLATION(x)                             (((unsigned)(x) & 0x1) << 4)
    524 #define   G_008218_RCIU_PRIV_VIOLATION(x)                             (((x) >> 4) & 0x1)
    525 #define   C_008218_RCIU_PRIV_VIOLATION                                0xFFFFFFEF
    526 #define   S_008218_TCIU_TX_FREE_STALL(x)                              (((unsigned)(x) & 0x1) << 6)
    527 #define   G_008218_TCIU_TX_FREE_STALL(x)                              (((x) >> 6) & 0x1)
    528 #define   C_008218_TCIU_TX_FREE_STALL                                 0xFFFFFFBF
    529 #define   S_008218_MEC1_DECODING_PACKET(x)                            (((unsigned)(x) & 0x1) << 8)
    530 #define   G_008218_MEC1_DECODING_PACKET(x)                            (((x) >> 8) & 0x1)
    531 #define   C_008218_MEC1_DECODING_PACKET                               0xFFFFFEFF
    532 #define   S_008218_MEC1_WAIT_ON_RCIU(x)                               (((unsigned)(x) & 0x1) << 9)
    533 #define   G_008218_MEC1_WAIT_ON_RCIU(x)                               (((x) >> 9) & 0x1)
    534 #define   C_008218_MEC1_WAIT_ON_RCIU                                  0xFFFFFDFF
    535 #define   S_008218_MEC1_WAIT_ON_RCIU_READ(x)                          (((unsigned)(x) & 0x1) << 10)
    536 #define   G_008218_MEC1_WAIT_ON_RCIU_READ(x)                          (((x) >> 10) & 0x1)
    537 #define   C_008218_MEC1_WAIT_ON_RCIU_READ                             0xFFFFFBFF
    538 #define   S_008218_MEC1_WAIT_ON_ROQ_DATA(x)                           (((unsigned)(x) & 0x1) << 13)
    539 #define   G_008218_MEC1_WAIT_ON_ROQ_DATA(x)                           (((x) >> 13) & 0x1)
    540 #define   C_008218_MEC1_WAIT_ON_ROQ_DATA                              0xFFFFDFFF
    541 #define   S_008218_MEC2_DECODING_PACKET(x)                            (((unsigned)(x) & 0x1) << 16)
    542 #define   G_008218_MEC2_DECODING_PACKET(x)                            (((x) >> 16) & 0x1)
    543 #define   C_008218_MEC2_DECODING_PACKET                               0xFFFEFFFF
    544 #define   S_008218_MEC2_WAIT_ON_RCIU(x)                               (((unsigned)(x) & 0x1) << 17)
    545 #define   G_008218_MEC2_WAIT_ON_RCIU(x)                               (((x) >> 17) & 0x1)
    546 #define   C_008218_MEC2_WAIT_ON_RCIU                                  0xFFFDFFFF
    547 #define   S_008218_MEC2_WAIT_ON_RCIU_READ(x)                          (((unsigned)(x) & 0x1) << 18)
    548 #define   G_008218_MEC2_WAIT_ON_RCIU_READ(x)                          (((x) >> 18) & 0x1)
    549 #define   C_008218_MEC2_WAIT_ON_RCIU_READ                             0xFFFBFFFF
    550 #define   S_008218_MEC2_WAIT_ON_ROQ_DATA(x)                           (((unsigned)(x) & 0x1) << 21)
    551 #define   G_008218_MEC2_WAIT_ON_ROQ_DATA(x)                           (((x) >> 21) & 0x1)
    552 #define   C_008218_MEC2_WAIT_ON_ROQ_DATA                              0xFFDFFFFF
    553 #define   S_008218_UTCL2IU_WAITING_ON_FREE(x)                         (((unsigned)(x) & 0x1) << 22)
    554 #define   G_008218_UTCL2IU_WAITING_ON_FREE(x)                         (((x) >> 22) & 0x1)
    555 #define   C_008218_UTCL2IU_WAITING_ON_FREE                            0xFFBFFFFF
    556 #define   S_008218_UTCL2IU_WAITING_ON_TAGS(x)                         (((unsigned)(x) & 0x1) << 23)
    557 #define   G_008218_UTCL2IU_WAITING_ON_TAGS(x)                         (((x) >> 23) & 0x1)
    558 #define   C_008218_UTCL2IU_WAITING_ON_TAGS                            0xFF7FFFFF
    559 #define   S_008218_UTCL1_WAITING_ON_TRANS(x)                          (((unsigned)(x) & 0x1) << 24)
    560 #define   G_008218_UTCL1_WAITING_ON_TRANS(x)                          (((x) >> 24) & 0x1)
    561 #define   C_008218_UTCL1_WAITING_ON_TRANS                             0xFEFFFFFF
    562 #define R_00821C_CP_CPF_STATUS                                          0x00821C
    563 #define   S_00821C_POST_WPTR_GFX_BUSY(x)                              (((unsigned)(x) & 0x1) << 0)
    564 #define   G_00821C_POST_WPTR_GFX_BUSY(x)                              (((x) >> 0) & 0x1)
    565 #define   C_00821C_POST_WPTR_GFX_BUSY                                 0xFFFFFFFE
    566 #define   S_00821C_CSF_BUSY(x)                                        (((unsigned)(x) & 0x1) << 1)
    567 #define   G_00821C_CSF_BUSY(x)                                        (((x) >> 1) & 0x1)
    568 #define   C_00821C_CSF_BUSY                                           0xFFFFFFFD
    569 #define   S_00821C_ROQ_ALIGN_BUSY(x)                                  (((unsigned)(x) & 0x1) << 4)
    570 #define   G_00821C_ROQ_ALIGN_BUSY(x)                                  (((x) >> 4) & 0x1)
    571 #define   C_00821C_ROQ_ALIGN_BUSY                                     0xFFFFFFEF
    572 #define   S_00821C_ROQ_RING_BUSY(x)                                   (((unsigned)(x) & 0x1) << 5)
    573 #define   G_00821C_ROQ_RING_BUSY(x)                                   (((x) >> 5) & 0x1)
    574 #define   C_00821C_ROQ_RING_BUSY                                      0xFFFFFFDF
    575 #define   S_00821C_ROQ_INDIRECT1_BUSY(x)                              (((unsigned)(x) & 0x1) << 6)
    576 #define   G_00821C_ROQ_INDIRECT1_BUSY(x)                              (((x) >> 6) & 0x1)
    577 #define   C_00821C_ROQ_INDIRECT1_BUSY                                 0xFFFFFFBF
    578 #define   S_00821C_ROQ_INDIRECT2_BUSY(x)                              (((unsigned)(x) & 0x1) << 7)
    579 #define   G_00821C_ROQ_INDIRECT2_BUSY(x)                              (((x) >> 7) & 0x1)
    580 #define   C_00821C_ROQ_INDIRECT2_BUSY                                 0xFFFFFF7F
    581 #define   S_00821C_ROQ_STATE_BUSY(x)                                  (((unsigned)(x) & 0x1) << 8)
    582 #define   G_00821C_ROQ_STATE_BUSY(x)                                  (((x) >> 8) & 0x1)
    583 #define   C_00821C_ROQ_STATE_BUSY                                     0xFFFFFEFF
    584 #define   S_00821C_ROQ_CE_RING_BUSY(x)                                (((unsigned)(x) & 0x1) << 9)
    585 #define   G_00821C_ROQ_CE_RING_BUSY(x)                                (((x) >> 9) & 0x1)
    586 #define   C_00821C_ROQ_CE_RING_BUSY                                   0xFFFFFDFF
    587 #define   S_00821C_ROQ_CE_INDIRECT1_BUSY(x)                           (((unsigned)(x) & 0x1) << 10)
    588 #define   G_00821C_ROQ_CE_INDIRECT1_BUSY(x)                           (((x) >> 10) & 0x1)
    589 #define   C_00821C_ROQ_CE_INDIRECT1_BUSY                              0xFFFFFBFF
    590 #define   S_00821C_ROQ_CE_INDIRECT2_BUSY(x)                           (((unsigned)(x) & 0x1) << 11)
    591 #define   G_00821C_ROQ_CE_INDIRECT2_BUSY(x)                           (((x) >> 11) & 0x1)
    592 #define   C_00821C_ROQ_CE_INDIRECT2_BUSY                              0xFFFFF7FF
    593 #define   S_00821C_SEMAPHORE_BUSY(x)                                  (((unsigned)(x) & 0x1) << 12)
    594 #define   G_00821C_SEMAPHORE_BUSY(x)                                  (((x) >> 12) & 0x1)
    595 #define   C_00821C_SEMAPHORE_BUSY                                     0xFFFFEFFF
    596 #define   S_00821C_INTERRUPT_BUSY(x)                                  (((unsigned)(x) & 0x1) << 13)
    597 #define   G_00821C_INTERRUPT_BUSY(x)                                  (((x) >> 13) & 0x1)
    598 #define   C_00821C_INTERRUPT_BUSY                                     0xFFFFDFFF
    599 #define   S_00821C_TCIU_BUSY(x)                                       (((unsigned)(x) & 0x1) << 14)
    600 #define   G_00821C_TCIU_BUSY(x)                                       (((x) >> 14) & 0x1)
    601 #define   C_00821C_TCIU_BUSY                                          0xFFFFBFFF
    602 #define   S_00821C_HQD_BUSY(x)                                        (((unsigned)(x) & 0x1) << 15)
    603 #define   G_00821C_HQD_BUSY(x)                                        (((x) >> 15) & 0x1)
    604 #define   C_00821C_HQD_BUSY                                           0xFFFF7FFF
    605 #define   S_00821C_PRT_BUSY(x)                                        (((unsigned)(x) & 0x1) << 16)
    606 #define   G_00821C_PRT_BUSY(x)                                        (((x) >> 16) & 0x1)
    607 #define   C_00821C_PRT_BUSY                                           0xFFFEFFFF
    608 #define   S_00821C_UTCL2IU_BUSY(x)                                    (((unsigned)(x) & 0x1) << 17)
    609 #define   G_00821C_UTCL2IU_BUSY(x)                                    (((x) >> 17) & 0x1)
    610 #define   C_00821C_UTCL2IU_BUSY                                       0xFFFDFFFF
    611 #define   S_00821C_CPF_GFX_BUSY(x)                                    (((unsigned)(x) & 0x1) << 26)
    612 #define   G_00821C_CPF_GFX_BUSY(x)                                    (((x) >> 26) & 0x1)
    613 #define   C_00821C_CPF_GFX_BUSY                                       0xFBFFFFFF
    614 #define   S_00821C_CPF_CMP_BUSY(x)                                    (((unsigned)(x) & 0x1) << 27)
    615 #define   G_00821C_CPF_CMP_BUSY(x)                                    (((x) >> 27) & 0x1)
    616 #define   C_00821C_CPF_CMP_BUSY                                       0xF7FFFFFF
    617 #define   S_00821C_GRBM_CPF_STAT_BUSY(x)                              (((unsigned)(x) & 0x03) << 28)
    618 #define   G_00821C_GRBM_CPF_STAT_BUSY(x)                              (((x) >> 28) & 0x03)
    619 #define   C_00821C_GRBM_CPF_STAT_BUSY                                 0xCFFFFFFF
    620 #define   S_00821C_CPC_CPF_BUSY(x)                                    (((unsigned)(x) & 0x1) << 30)
    621 #define   G_00821C_CPC_CPF_BUSY(x)                                    (((x) >> 30) & 0x1)
    622 #define   C_00821C_CPC_CPF_BUSY                                       0xBFFFFFFF
    623 #define   S_00821C_CPF_BUSY(x)                                        (((unsigned)(x) & 0x1) << 31)
    624 #define   G_00821C_CPF_BUSY(x)                                        (((x) >> 31) & 0x1)
    625 #define   C_00821C_CPF_BUSY                                           0x7FFFFFFF
    626 #define R_008220_CP_CPF_BUSY_STAT                                       0x008220
    627 #define   S_008220_REG_BUS_FIFO_BUSY(x)                               (((unsigned)(x) & 0x1) << 0)
    628 #define   G_008220_REG_BUS_FIFO_BUSY(x)                               (((x) >> 0) & 0x1)
    629 #define   C_008220_REG_BUS_FIFO_BUSY                                  0xFFFFFFFE
    630 #define   S_008220_CSF_RING_BUSY(x)                                   (((unsigned)(x) & 0x1) << 1)
    631 #define   G_008220_CSF_RING_BUSY(x)                                   (((x) >> 1) & 0x1)
    632 #define   C_008220_CSF_RING_BUSY                                      0xFFFFFFFD
    633 #define   S_008220_CSF_INDIRECT1_BUSY(x)                              (((unsigned)(x) & 0x1) << 2)
    634 #define   G_008220_CSF_INDIRECT1_BUSY(x)                              (((x) >> 2) & 0x1)
    635 #define   C_008220_CSF_INDIRECT1_BUSY                                 0xFFFFFFFB
    636 #define   S_008220_CSF_INDIRECT2_BUSY(x)                              (((unsigned)(x) & 0x1) << 3)
    637 #define   G_008220_CSF_INDIRECT2_BUSY(x)                              (((x) >> 3) & 0x1)
    638 #define   C_008220_CSF_INDIRECT2_BUSY                                 0xFFFFFFF7
    639 #define   S_008220_CSF_STATE_BUSY(x)                                  (((unsigned)(x) & 0x1) << 4)
    640 #define   G_008220_CSF_STATE_BUSY(x)                                  (((x) >> 4) & 0x1)
    641 #define   C_008220_CSF_STATE_BUSY                                     0xFFFFFFEF
    642 #define   S_008220_CSF_CE_INDR1_BUSY(x)                               (((unsigned)(x) & 0x1) << 5)
    643 #define   G_008220_CSF_CE_INDR1_BUSY(x)                               (((x) >> 5) & 0x1)
    644 #define   C_008220_CSF_CE_INDR1_BUSY                                  0xFFFFFFDF
    645 #define   S_008220_CSF_CE_INDR2_BUSY(x)                               (((unsigned)(x) & 0x1) << 6)
    646 #define   G_008220_CSF_CE_INDR2_BUSY(x)                               (((x) >> 6) & 0x1)
    647 #define   C_008220_CSF_CE_INDR2_BUSY                                  0xFFFFFFBF
    648 #define   S_008220_CSF_ARBITER_BUSY(x)                                (((unsigned)(x) & 0x1) << 7)
    649 #define   G_008220_CSF_ARBITER_BUSY(x)                                (((x) >> 7) & 0x1)
    650 #define   C_008220_CSF_ARBITER_BUSY                                   0xFFFFFF7F
    651 #define   S_008220_CSF_INPUT_BUSY(x)                                  (((unsigned)(x) & 0x1) << 8)
    652 #define   G_008220_CSF_INPUT_BUSY(x)                                  (((x) >> 8) & 0x1)
    653 #define   C_008220_CSF_INPUT_BUSY                                     0xFFFFFEFF
    654 #define   S_008220_OUTSTANDING_READ_TAGS(x)                           (((unsigned)(x) & 0x1) << 9)
    655 #define   G_008220_OUTSTANDING_READ_TAGS(x)                           (((x) >> 9) & 0x1)
    656 #define   C_008220_OUTSTANDING_READ_TAGS                              0xFFFFFDFF
    657 #define   S_008220_HPD_PROCESSING_EOP_BUSY(x)                         (((unsigned)(x) & 0x1) << 11)
    658 #define   G_008220_HPD_PROCESSING_EOP_BUSY(x)                         (((x) >> 11) & 0x1)
    659 #define   C_008220_HPD_PROCESSING_EOP_BUSY                            0xFFFFF7FF
    660 #define   S_008220_HQD_DISPATCH_BUSY(x)                               (((unsigned)(x) & 0x1) << 12)
    661 #define   G_008220_HQD_DISPATCH_BUSY(x)                               (((x) >> 12) & 0x1)
    662 #define   C_008220_HQD_DISPATCH_BUSY                                  0xFFFFEFFF
    663 #define   S_008220_HQD_IQ_TIMER_BUSY(x)                               (((unsigned)(x) & 0x1) << 13)
    664 #define   G_008220_HQD_IQ_TIMER_BUSY(x)                               (((x) >> 13) & 0x1)
    665 #define   C_008220_HQD_IQ_TIMER_BUSY                                  0xFFFFDFFF
    666 #define   S_008220_HQD_DMA_OFFLOAD_BUSY(x)                            (((unsigned)(x) & 0x1) << 14)
    667 #define   G_008220_HQD_DMA_OFFLOAD_BUSY(x)                            (((x) >> 14) & 0x1)
    668 #define   C_008220_HQD_DMA_OFFLOAD_BUSY                               0xFFFFBFFF
    669 #define   S_008220_HQD_WAIT_SEMAPHORE_BUSY(x)                         (((unsigned)(x) & 0x1) << 15)
    670 #define   G_008220_HQD_WAIT_SEMAPHORE_BUSY(x)                         (((x) >> 15) & 0x1)
    671 #define   C_008220_HQD_WAIT_SEMAPHORE_BUSY                            0xFFFF7FFF
    672 #define   S_008220_HQD_SIGNAL_SEMAPHORE_BUSY(x)                       (((unsigned)(x) & 0x1) << 16)
    673 #define   G_008220_HQD_SIGNAL_SEMAPHORE_BUSY(x)                       (((x) >> 16) & 0x1)
    674 #define   C_008220_HQD_SIGNAL_SEMAPHORE_BUSY                          0xFFFEFFFF
    675 #define   S_008220_HQD_MESSAGE_BUSY(x)                                (((unsigned)(x) & 0x1) << 17)
    676 #define   G_008220_HQD_MESSAGE_BUSY(x)                                (((x) >> 17) & 0x1)
    677 #define   C_008220_HQD_MESSAGE_BUSY                                   0xFFFDFFFF
    678 #define   S_008220_HQD_PQ_FETCHER_BUSY(x)                             (((unsigned)(x) & 0x1) << 18)
    679 #define   G_008220_HQD_PQ_FETCHER_BUSY(x)                             (((x) >> 18) & 0x1)
    680 #define   C_008220_HQD_PQ_FETCHER_BUSY                                0xFFFBFFFF
    681 #define   S_008220_HQD_IB_FETCHER_BUSY(x)                             (((unsigned)(x) & 0x1) << 19)
    682 #define   G_008220_HQD_IB_FETCHER_BUSY(x)                             (((x) >> 19) & 0x1)
    683 #define   C_008220_HQD_IB_FETCHER_BUSY                                0xFFF7FFFF
    684 #define   S_008220_HQD_IQ_FETCHER_BUSY(x)                             (((unsigned)(x) & 0x1) << 20)
    685 #define   G_008220_HQD_IQ_FETCHER_BUSY(x)                             (((x) >> 20) & 0x1)
    686 #define   C_008220_HQD_IQ_FETCHER_BUSY                                0xFFEFFFFF
    687 #define   S_008220_HQD_EOP_FETCHER_BUSY(x)                            (((unsigned)(x) & 0x1) << 21)
    688 #define   G_008220_HQD_EOP_FETCHER_BUSY(x)                            (((x) >> 21) & 0x1)
    689 #define   C_008220_HQD_EOP_FETCHER_BUSY                               0xFFDFFFFF
    690 #define   S_008220_HQD_CONSUMED_RPTR_BUSY(x)                          (((unsigned)(x) & 0x1) << 22)
    691 #define   G_008220_HQD_CONSUMED_RPTR_BUSY(x)                          (((x) >> 22) & 0x1)
    692 #define   C_008220_HQD_CONSUMED_RPTR_BUSY                             0xFFBFFFFF
    693 #define   S_008220_HQD_FETCHER_ARB_BUSY(x)                            (((unsigned)(x) & 0x1) << 23)
    694 #define   G_008220_HQD_FETCHER_ARB_BUSY(x)                            (((x) >> 23) & 0x1)
    695 #define   C_008220_HQD_FETCHER_ARB_BUSY                               0xFF7FFFFF
    696 #define   S_008220_HQD_ROQ_ALIGN_BUSY(x)                              (((unsigned)(x) & 0x1) << 24)
    697 #define   G_008220_HQD_ROQ_ALIGN_BUSY(x)                              (((x) >> 24) & 0x1)
    698 #define   C_008220_HQD_ROQ_ALIGN_BUSY                                 0xFEFFFFFF
    699 #define   S_008220_HQD_ROQ_EOP_BUSY(x)                                (((unsigned)(x) & 0x1) << 25)
    700 #define   G_008220_HQD_ROQ_EOP_BUSY(x)                                (((x) >> 25) & 0x1)
    701 #define   C_008220_HQD_ROQ_EOP_BUSY                                   0xFDFFFFFF
    702 #define   S_008220_HQD_ROQ_IQ_BUSY(x)                                 (((unsigned)(x) & 0x1) << 26)
    703 #define   G_008220_HQD_ROQ_IQ_BUSY(x)                                 (((x) >> 26) & 0x1)
    704 #define   C_008220_HQD_ROQ_IQ_BUSY                                    0xFBFFFFFF
    705 #define   S_008220_HQD_ROQ_PQ_BUSY(x)                                 (((unsigned)(x) & 0x1) << 27)
    706 #define   G_008220_HQD_ROQ_PQ_BUSY(x)                                 (((x) >> 27) & 0x1)
    707 #define   C_008220_HQD_ROQ_PQ_BUSY                                    0xF7FFFFFF
    708 #define   S_008220_HQD_ROQ_IB_BUSY(x)                                 (((unsigned)(x) & 0x1) << 28)
    709 #define   G_008220_HQD_ROQ_IB_BUSY(x)                                 (((x) >> 28) & 0x1)
    710 #define   C_008220_HQD_ROQ_IB_BUSY                                    0xEFFFFFFF
    711 #define   S_008220_HQD_WPTR_POLL_BUSY(x)                              (((unsigned)(x) & 0x1) << 29)
    712 #define   G_008220_HQD_WPTR_POLL_BUSY(x)                              (((x) >> 29) & 0x1)
    713 #define   C_008220_HQD_WPTR_POLL_BUSY                                 0xDFFFFFFF
    714 #define   S_008220_HQD_PQ_BUSY(x)                                     (((unsigned)(x) & 0x1) << 30)
    715 #define   G_008220_HQD_PQ_BUSY(x)                                     (((x) >> 30) & 0x1)
    716 #define   C_008220_HQD_PQ_BUSY                                        0xBFFFFFFF
    717 #define   S_008220_HQD_IB_BUSY(x)                                     (((unsigned)(x) & 0x1) << 31)
    718 #define   G_008220_HQD_IB_BUSY(x)                                     (((x) >> 31) & 0x1)
    719 #define   C_008220_HQD_IB_BUSY                                        0x7FFFFFFF
    720 #define R_008224_CP_CPF_STALLED_STAT1                                   0x008224
    721 #define   S_008224_RING_FETCHING_DATA(x)                              (((unsigned)(x) & 0x1) << 0)
    722 #define   G_008224_RING_FETCHING_DATA(x)                              (((x) >> 0) & 0x1)
    723 #define   C_008224_RING_FETCHING_DATA                                 0xFFFFFFFE
    724 #define   S_008224_INDR1_FETCHING_DATA(x)                             (((unsigned)(x) & 0x1) << 1)
    725 #define   G_008224_INDR1_FETCHING_DATA(x)                             (((x) >> 1) & 0x1)
    726 #define   C_008224_INDR1_FETCHING_DATA                                0xFFFFFFFD
    727 #define   S_008224_INDR2_FETCHING_DATA(x)                             (((unsigned)(x) & 0x1) << 2)
    728 #define   G_008224_INDR2_FETCHING_DATA(x)                             (((x) >> 2) & 0x1)
    729 #define   C_008224_INDR2_FETCHING_DATA                                0xFFFFFFFB
    730 #define   S_008224_STATE_FETCHING_DATA(x)                             (((unsigned)(x) & 0x1) << 3)
    731 #define   G_008224_STATE_FETCHING_DATA(x)                             (((x) >> 3) & 0x1)
    732 #define   C_008224_STATE_FETCHING_DATA                                0xFFFFFFF7
    733 #define   S_008224_TCIU_WAITING_ON_FREE(x)                            (((unsigned)(x) & 0x1) << 5)
    734 #define   G_008224_TCIU_WAITING_ON_FREE(x)                            (((x) >> 5) & 0x1)
    735 #define   C_008224_TCIU_WAITING_ON_FREE                               0xFFFFFFDF
    736 #define   S_008224_TCIU_WAITING_ON_TAGS(x)                            (((unsigned)(x) & 0x1) << 6)
    737 #define   G_008224_TCIU_WAITING_ON_TAGS(x)                            (((x) >> 6) & 0x1)
    738 #define   C_008224_TCIU_WAITING_ON_TAGS                               0xFFFFFFBF
    739 #define   S_008224_UTCL2IU_WAITING_ON_FREE(x)                         (((unsigned)(x) & 0x1) << 7)
    740 #define   G_008224_UTCL2IU_WAITING_ON_FREE(x)                         (((x) >> 7) & 0x1)
    741 #define   C_008224_UTCL2IU_WAITING_ON_FREE                            0xFFFFFF7F
    742 #define   S_008224_UTCL2IU_WAITING_ON_TAGS(x)                         (((unsigned)(x) & 0x1) << 8)
    743 #define   G_008224_UTCL2IU_WAITING_ON_TAGS(x)                         (((x) >> 8) & 0x1)
    744 #define   C_008224_UTCL2IU_WAITING_ON_TAGS                            0xFFFFFEFF
    745 #define   S_008224_GFX_UTCL1_WAITING_ON_TRANS(x)                      (((unsigned)(x) & 0x1) << 9)
    746 #define   G_008224_GFX_UTCL1_WAITING_ON_TRANS(x)                      (((x) >> 9) & 0x1)
    747 #define   C_008224_GFX_UTCL1_WAITING_ON_TRANS                         0xFFFFFDFF
    748 #define   S_008224_CMP_UTCL1_WAITING_ON_TRANS(x)                      (((unsigned)(x) & 0x1) << 10)
    749 #define   G_008224_CMP_UTCL1_WAITING_ON_TRANS(x)                      (((x) >> 10) & 0x1)
    750 #define   C_008224_CMP_UTCL1_WAITING_ON_TRANS                         0xFFFFFBFF
    751 #define   S_008224_RCIU_WAITING_ON_FREE(x)                            (((unsigned)(x) & 0x1) << 11)
    752 #define   G_008224_RCIU_WAITING_ON_FREE(x)                            (((x) >> 11) & 0x1)
    753 #define   C_008224_RCIU_WAITING_ON_FREE                               0xFFFFF7FF
    754 #define R_030230_CP_COHER_SIZE_HI                                       0x030230
    755 #define   S_030230_COHER_SIZE_HI_256B(x)                              (((unsigned)(x) & 0xFF) << 0)
    756 #define   G_030230_COHER_SIZE_HI_256B(x)                              (((x) >> 0) & 0xFF)
    757 #define   C_030230_COHER_SIZE_HI_256B                                 0xFFFFFF00
    758 #define R_008670_CP_STALLED_STAT3                                       0x008670
    759 #define   S_008670_CE_TO_CSF_NOT_RDY_TO_RCV(x)                        (((unsigned)(x) & 0x1) << 0)
    760 #define   G_008670_CE_TO_CSF_NOT_RDY_TO_RCV(x)                        (((x) >> 0) & 0x1)
    761 #define   C_008670_CE_TO_CSF_NOT_RDY_TO_RCV                           0xFFFFFFFE
    762 #define   S_008670_CE_TO_RAM_INIT_FETCHER_NOT_RDY_TO_RCV(x)           (((unsigned)(x) & 0x1) << 1)
    763 #define   G_008670_CE_TO_RAM_INIT_FETCHER_NOT_RDY_TO_RCV(x)           (((x) >> 1) & 0x1)
    764 #define   C_008670_CE_TO_RAM_INIT_FETCHER_NOT_RDY_TO_RCV              0xFFFFFFFD
    765 #define   S_008670_CE_WAITING_ON_DATA_FROM_RAM_INIT_FETCHER(x)        (((unsigned)(x) & 0x1) << 2)
    766 #define   G_008670_CE_WAITING_ON_DATA_FROM_RAM_INIT_FETCHER(x)        (((x) >> 2) & 0x1)
    767 #define   C_008670_CE_WAITING_ON_DATA_FROM_RAM_INIT_FETCHER           0xFFFFFFFB
    768 #define   S_008670_CE_TO_RAM_INIT_NOT_RDY(x)                          (((unsigned)(x) & 0x1) << 3)
    769 #define   G_008670_CE_TO_RAM_INIT_NOT_RDY(x)                          (((x) >> 3) & 0x1)
    770 #define   C_008670_CE_TO_RAM_INIT_NOT_RDY                             0xFFFFFFF7
    771 #define   S_008670_CE_TO_RAM_DUMP_NOT_RDY(x)                          (((unsigned)(x) & 0x1) << 4)
    772 #define   G_008670_CE_TO_RAM_DUMP_NOT_RDY(x)                          (((x) >> 4) & 0x1)
    773 #define   C_008670_CE_TO_RAM_DUMP_NOT_RDY                             0xFFFFFFEF
    774 #define   S_008670_CE_TO_RAM_WRITE_NOT_RDY(x)                         (((unsigned)(x) & 0x1) << 5)
    775 #define   G_008670_CE_TO_RAM_WRITE_NOT_RDY(x)                         (((x) >> 5) & 0x1)
    776 #define   C_008670_CE_TO_RAM_WRITE_NOT_RDY                            0xFFFFFFDF
    777 #define   S_008670_CE_TO_INC_FIFO_NOT_RDY_TO_RCV(x)                   (((unsigned)(x) & 0x1) << 6)
    778 #define   G_008670_CE_TO_INC_FIFO_NOT_RDY_TO_RCV(x)                   (((x) >> 6) & 0x1)
    779 #define   C_008670_CE_TO_INC_FIFO_NOT_RDY_TO_RCV                      0xFFFFFFBF
    780 #define   S_008670_CE_TO_WR_FIFO_NOT_RDY_TO_RCV(x)                    (((unsigned)(x) & 0x1) << 7)
    781 #define   G_008670_CE_TO_WR_FIFO_NOT_RDY_TO_RCV(x)                    (((x) >> 7) & 0x1)
    782 #define   C_008670_CE_TO_WR_FIFO_NOT_RDY_TO_RCV                       0xFFFFFF7F
    783 #define   S_008670_CE_WAITING_ON_BUFFER_DATA(x)                       (((unsigned)(x) & 0x1) << 10)
    784 #define   G_008670_CE_WAITING_ON_BUFFER_DATA(x)                       (((x) >> 10) & 0x1)
    785 #define   C_008670_CE_WAITING_ON_BUFFER_DATA                          0xFFFFFBFF
    786 #define   S_008670_CE_WAITING_ON_CE_BUFFER_FLAG(x)                    (((unsigned)(x) & 0x1) << 11)
    787 #define   G_008670_CE_WAITING_ON_CE_BUFFER_FLAG(x)                    (((x) >> 11) & 0x1)
    788 #define   C_008670_CE_WAITING_ON_CE_BUFFER_FLAG                       0xFFFFF7FF
    789 #define   S_008670_CE_WAITING_ON_DE_COUNTER(x)                        (((unsigned)(x) & 0x1) << 12)
    790 #define   G_008670_CE_WAITING_ON_DE_COUNTER(x)                        (((x) >> 12) & 0x1)
    791 #define   C_008670_CE_WAITING_ON_DE_COUNTER                           0xFFFFEFFF
    792 #define   S_008670_CE_WAITING_ON_DE_COUNTER_UNDERFLOW(x)              (((unsigned)(x) & 0x1) << 13)
    793 #define   G_008670_CE_WAITING_ON_DE_COUNTER_UNDERFLOW(x)              (((x) >> 13) & 0x1)
    794 #define   C_008670_CE_WAITING_ON_DE_COUNTER_UNDERFLOW                 0xFFFFDFFF
    795 #define   S_008670_TCIU_WAITING_ON_FREE(x)                            (((unsigned)(x) & 0x1) << 14)
    796 #define   G_008670_TCIU_WAITING_ON_FREE(x)                            (((x) >> 14) & 0x1)
    797 #define   C_008670_TCIU_WAITING_ON_FREE                               0xFFFFBFFF
    798 #define   S_008670_TCIU_WAITING_ON_TAGS(x)                            (((unsigned)(x) & 0x1) << 15)
    799 #define   G_008670_TCIU_WAITING_ON_TAGS(x)                            (((x) >> 15) & 0x1)
    800 #define   C_008670_TCIU_WAITING_ON_TAGS                               0xFFFF7FFF
    801 #define   S_008670_CE_STALLED_ON_TC_WR_CONFIRM(x)                     (((unsigned)(x) & 0x1) << 16)
    802 #define   G_008670_CE_STALLED_ON_TC_WR_CONFIRM(x)                     (((x) >> 16) & 0x1)
    803 #define   C_008670_CE_STALLED_ON_TC_WR_CONFIRM                        0xFFFEFFFF
    804 #define   S_008670_CE_STALLED_ON_ATOMIC_RTN_DATA(x)                   (((unsigned)(x) & 0x1) << 17)
    805 #define   G_008670_CE_STALLED_ON_ATOMIC_RTN_DATA(x)                   (((x) >> 17) & 0x1)
    806 #define   C_008670_CE_STALLED_ON_ATOMIC_RTN_DATA                      0xFFFDFFFF
    807 #define   S_008670_UTCL2IU_WAITING_ON_FREE(x)                         (((unsigned)(x) & 0x1) << 18)
    808 #define   G_008670_UTCL2IU_WAITING_ON_FREE(x)                         (((x) >> 18) & 0x1)
    809 #define   C_008670_UTCL2IU_WAITING_ON_FREE                            0xFFFBFFFF
    810 #define   S_008670_UTCL2IU_WAITING_ON_TAGS(x)                         (((unsigned)(x) & 0x1) << 19)
    811 #define   G_008670_UTCL2IU_WAITING_ON_TAGS(x)                         (((x) >> 19) & 0x1)
    812 #define   C_008670_UTCL2IU_WAITING_ON_TAGS                            0xFFF7FFFF
    813 #define   S_008670_UTCL1_WAITING_ON_TRANS(x)                          (((unsigned)(x) & 0x1) << 20)
    814 #define   G_008670_UTCL1_WAITING_ON_TRANS(x)                          (((x) >> 20) & 0x1)
    815 #define   C_008670_UTCL1_WAITING_ON_TRANS                             0xFFEFFFFF
    816 #define R_008674_CP_STALLED_STAT1                                       0x008674
    817 #define   S_008674_RBIU_TO_DMA_NOT_RDY_TO_RCV(x)                      (((unsigned)(x) & 0x1) << 0)
    818 #define   G_008674_RBIU_TO_DMA_NOT_RDY_TO_RCV(x)                      (((x) >> 0) & 0x1)
    819 #define   C_008674_RBIU_TO_DMA_NOT_RDY_TO_RCV                         0xFFFFFFFE
    820 #define   S_008674_RBIU_TO_SEM_NOT_RDY_TO_RCV(x)                      (((unsigned)(x) & 0x1) << 2)
    821 #define   G_008674_RBIU_TO_SEM_NOT_RDY_TO_RCV(x)                      (((x) >> 2) & 0x1)
    822 #define   C_008674_RBIU_TO_SEM_NOT_RDY_TO_RCV                         0xFFFFFFFB
    823 #define   S_008674_RBIU_TO_MEMWR_NOT_RDY_TO_RCV(x)                    (((unsigned)(x) & 0x1) << 4)
    824 #define   G_008674_RBIU_TO_MEMWR_NOT_RDY_TO_RCV(x)                    (((x) >> 4) & 0x1)
    825 #define   C_008674_RBIU_TO_MEMWR_NOT_RDY_TO_RCV                       0xFFFFFFEF
    826 #define   S_008674_ME_HAS_ACTIVE_CE_BUFFER_FLAG(x)                    (((unsigned)(x) & 0x1) << 10)
    827 #define   G_008674_ME_HAS_ACTIVE_CE_BUFFER_FLAG(x)                    (((x) >> 10) & 0x1)
    828 #define   C_008674_ME_HAS_ACTIVE_CE_BUFFER_FLAG                       0xFFFFFBFF
    829 #define   S_008674_ME_HAS_ACTIVE_DE_BUFFER_FLAG(x)                    (((unsigned)(x) & 0x1) << 11)
    830 #define   G_008674_ME_HAS_ACTIVE_DE_BUFFER_FLAG(x)                    (((x) >> 11) & 0x1)
    831 #define   C_008674_ME_HAS_ACTIVE_DE_BUFFER_FLAG                       0xFFFFF7FF
    832 #define   S_008674_ME_STALLED_ON_TC_WR_CONFIRM(x)                     (((unsigned)(x) & 0x1) << 12)
    833 #define   G_008674_ME_STALLED_ON_TC_WR_CONFIRM(x)                     (((x) >> 12) & 0x1)
    834 #define   C_008674_ME_STALLED_ON_TC_WR_CONFIRM                        0xFFFFEFFF
    835 #define   S_008674_ME_STALLED_ON_ATOMIC_RTN_DATA(x)                   (((unsigned)(x) & 0x1) << 13)
    836 #define   G_008674_ME_STALLED_ON_ATOMIC_RTN_DATA(x)                   (((x) >> 13) & 0x1)
    837 #define   C_008674_ME_STALLED_ON_ATOMIC_RTN_DATA                      0xFFFFDFFF
    838 #define   S_008674_ME_WAITING_ON_TC_READ_DATA(x)                      (((unsigned)(x) & 0x1) << 14)
    839 #define   G_008674_ME_WAITING_ON_TC_READ_DATA(x)                      (((x) >> 14) & 0x1)
    840 #define   C_008674_ME_WAITING_ON_TC_READ_DATA                         0xFFFFBFFF
    841 #define   S_008674_ME_WAITING_ON_REG_READ_DATA(x)                     (((unsigned)(x) & 0x1) << 15)
    842 #define   G_008674_ME_WAITING_ON_REG_READ_DATA(x)                     (((x) >> 15) & 0x1)
    843 #define   C_008674_ME_WAITING_ON_REG_READ_DATA                        0xFFFF7FFF
    844 #define   S_008674_RCIU_WAITING_ON_GDS_FREE(x)                        (((unsigned)(x) & 0x1) << 23)
    845 #define   G_008674_RCIU_WAITING_ON_GDS_FREE(x)                        (((x) >> 23) & 0x1)
    846 #define   C_008674_RCIU_WAITING_ON_GDS_FREE                           0xFF7FFFFF
    847 #define   S_008674_RCIU_WAITING_ON_GRBM_FREE(x)                       (((unsigned)(x) & 0x1) << 24)
    848 #define   G_008674_RCIU_WAITING_ON_GRBM_FREE(x)                       (((x) >> 24) & 0x1)
    849 #define   C_008674_RCIU_WAITING_ON_GRBM_FREE                          0xFEFFFFFF
    850 #define   S_008674_RCIU_WAITING_ON_VGT_FREE(x)                        (((unsigned)(x) & 0x1) << 25)
    851 #define   G_008674_RCIU_WAITING_ON_VGT_FREE(x)                        (((x) >> 25) & 0x1)
    852 #define   C_008674_RCIU_WAITING_ON_VGT_FREE                           0xFDFFFFFF
    853 #define   S_008674_RCIU_STALLED_ON_ME_READ(x)                         (((unsigned)(x) & 0x1) << 26)
    854 #define   G_008674_RCIU_STALLED_ON_ME_READ(x)                         (((x) >> 26) & 0x1)
    855 #define   C_008674_RCIU_STALLED_ON_ME_READ                            0xFBFFFFFF
    856 #define   S_008674_RCIU_STALLED_ON_DMA_READ(x)                        (((unsigned)(x) & 0x1) << 27)
    857 #define   G_008674_RCIU_STALLED_ON_DMA_READ(x)                        (((x) >> 27) & 0x1)
    858 #define   C_008674_RCIU_STALLED_ON_DMA_READ                           0xF7FFFFFF
    859 #define   S_008674_RCIU_STALLED_ON_APPEND_READ(x)                     (((unsigned)(x) & 0x1) << 28)
    860 #define   G_008674_RCIU_STALLED_ON_APPEND_READ(x)                     (((x) >> 28) & 0x1)
    861 #define   C_008674_RCIU_STALLED_ON_APPEND_READ                        0xEFFFFFFF
    862 #define   S_008674_RCIU_HALTED_BY_REG_VIOLATION(x)                    (((unsigned)(x) & 0x1) << 29)
    863 #define   G_008674_RCIU_HALTED_BY_REG_VIOLATION(x)                    (((x) >> 29) & 0x1)
    864 #define   C_008674_RCIU_HALTED_BY_REG_VIOLATION                       0xDFFFFFFF
    865 #define R_008678_CP_STALLED_STAT2                                       0x008678
    866 #define   S_008678_PFP_TO_CSF_NOT_RDY_TO_RCV(x)                       (((unsigned)(x) & 0x1) << 0)
    867 #define   G_008678_PFP_TO_CSF_NOT_RDY_TO_RCV(x)                       (((x) >> 0) & 0x1)
    868 #define   C_008678_PFP_TO_CSF_NOT_RDY_TO_RCV                          0xFFFFFFFE
    869 #define   S_008678_PFP_TO_MEQ_NOT_RDY_TO_RCV(x)                       (((unsigned)(x) & 0x1) << 1)
    870 #define   G_008678_PFP_TO_MEQ_NOT_RDY_TO_RCV(x)                       (((x) >> 1) & 0x1)
    871 #define   C_008678_PFP_TO_MEQ_NOT_RDY_TO_RCV                          0xFFFFFFFD
    872 #define   S_008678_PFP_TO_RCIU_NOT_RDY_TO_RCV(x)                      (((unsigned)(x) & 0x1) << 2)
    873 #define   G_008678_PFP_TO_RCIU_NOT_RDY_TO_RCV(x)                      (((x) >> 2) & 0x1)
    874 #define   C_008678_PFP_TO_RCIU_NOT_RDY_TO_RCV                         0xFFFFFFFB
    875 #define   S_008678_PFP_TO_VGT_WRITES_PENDING(x)                       (((unsigned)(x) & 0x1) << 4)
    876 #define   G_008678_PFP_TO_VGT_WRITES_PENDING(x)                       (((x) >> 4) & 0x1)
    877 #define   C_008678_PFP_TO_VGT_WRITES_PENDING                          0xFFFFFFEF
    878 #define   S_008678_PFP_RCIU_READ_PENDING(x)                           (((unsigned)(x) & 0x1) << 5)
    879 #define   G_008678_PFP_RCIU_READ_PENDING(x)                           (((x) >> 5) & 0x1)
    880 #define   C_008678_PFP_RCIU_READ_PENDING                              0xFFFFFFDF
    881 #define   S_008678_PFP_WAITING_ON_BUFFER_DATA(x)                      (((unsigned)(x) & 0x1) << 8)
    882 #define   G_008678_PFP_WAITING_ON_BUFFER_DATA(x)                      (((x) >> 8) & 0x1)
    883 #define   C_008678_PFP_WAITING_ON_BUFFER_DATA                         0xFFFFFEFF
    884 #define   S_008678_ME_WAIT_ON_CE_COUNTER(x)                           (((unsigned)(x) & 0x1) << 9)
    885 #define   G_008678_ME_WAIT_ON_CE_COUNTER(x)                           (((x) >> 9) & 0x1)
    886 #define   C_008678_ME_WAIT_ON_CE_COUNTER                              0xFFFFFDFF
    887 #define   S_008678_ME_WAIT_ON_AVAIL_BUFFER(x)                         (((unsigned)(x) & 0x1) << 10)
    888 #define   G_008678_ME_WAIT_ON_AVAIL_BUFFER(x)                         (((x) >> 10) & 0x1)
    889 #define   C_008678_ME_WAIT_ON_AVAIL_BUFFER                            0xFFFFFBFF
    890 #define   S_008678_GFX_CNTX_NOT_AVAIL_TO_ME(x)                        (((unsigned)(x) & 0x1) << 11)
    891 #define   G_008678_GFX_CNTX_NOT_AVAIL_TO_ME(x)                        (((x) >> 11) & 0x1)
    892 #define   C_008678_GFX_CNTX_NOT_AVAIL_TO_ME                           0xFFFFF7FF
    893 #define   S_008678_ME_RCIU_NOT_RDY_TO_RCV(x)                          (((unsigned)(x) & 0x1) << 12)
    894 #define   G_008678_ME_RCIU_NOT_RDY_TO_RCV(x)                          (((x) >> 12) & 0x1)
    895 #define   C_008678_ME_RCIU_NOT_RDY_TO_RCV                             0xFFFFEFFF
    896 #define   S_008678_ME_TO_CONST_NOT_RDY_TO_RCV(x)                      (((unsigned)(x) & 0x1) << 13)
    897 #define   G_008678_ME_TO_CONST_NOT_RDY_TO_RCV(x)                      (((x) >> 13) & 0x1)
    898 #define   C_008678_ME_TO_CONST_NOT_RDY_TO_RCV                         0xFFFFDFFF
    899 #define   S_008678_ME_WAITING_DATA_FROM_PFP(x)                        (((unsigned)(x) & 0x1) << 14)
    900 #define   G_008678_ME_WAITING_DATA_FROM_PFP(x)                        (((x) >> 14) & 0x1)
    901 #define   C_008678_ME_WAITING_DATA_FROM_PFP                           0xFFFFBFFF
    902 #define   S_008678_ME_WAITING_ON_PARTIAL_FLUSH(x)                     (((unsigned)(x) & 0x1) << 15)
    903 #define   G_008678_ME_WAITING_ON_PARTIAL_FLUSH(x)                     (((x) >> 15) & 0x1)
    904 #define   C_008678_ME_WAITING_ON_PARTIAL_FLUSH                        0xFFFF7FFF
    905 #define   S_008678_MEQ_TO_ME_NOT_RDY_TO_RCV(x)                        (((unsigned)(x) & 0x1) << 16)
    906 #define   G_008678_MEQ_TO_ME_NOT_RDY_TO_RCV(x)                        (((x) >> 16) & 0x1)
    907 #define   C_008678_MEQ_TO_ME_NOT_RDY_TO_RCV                           0xFFFEFFFF
    908 #define   S_008678_STQ_TO_ME_NOT_RDY_TO_RCV(x)                        (((unsigned)(x) & 0x1) << 17)
    909 #define   G_008678_STQ_TO_ME_NOT_RDY_TO_RCV(x)                        (((x) >> 17) & 0x1)
    910 #define   C_008678_STQ_TO_ME_NOT_RDY_TO_RCV                           0xFFFDFFFF
    911 #define   S_008678_ME_WAITING_DATA_FROM_STQ(x)                        (((unsigned)(x) & 0x1) << 18)
    912 #define   G_008678_ME_WAITING_DATA_FROM_STQ(x)                        (((x) >> 18) & 0x1)
    913 #define   C_008678_ME_WAITING_DATA_FROM_STQ                           0xFFFBFFFF
    914 #define   S_008678_PFP_STALLED_ON_TC_WR_CONFIRM(x)                    (((unsigned)(x) & 0x1) << 19)
    915 #define   G_008678_PFP_STALLED_ON_TC_WR_CONFIRM(x)                    (((x) >> 19) & 0x1)
    916 #define   C_008678_PFP_STALLED_ON_TC_WR_CONFIRM                       0xFFF7FFFF
    917 #define   S_008678_PFP_STALLED_ON_ATOMIC_RTN_DATA(x)                  (((unsigned)(x) & 0x1) << 20)
    918 #define   G_008678_PFP_STALLED_ON_ATOMIC_RTN_DATA(x)                  (((x) >> 20) & 0x1)
    919 #define   C_008678_PFP_STALLED_ON_ATOMIC_RTN_DATA                     0xFFEFFFFF
    920 #define   S_008678_EOPD_FIFO_NEEDS_SC_EOP_DONE(x)                     (((unsigned)(x) & 0x1) << 21)
    921 #define   G_008678_EOPD_FIFO_NEEDS_SC_EOP_DONE(x)                     (((x) >> 21) & 0x1)
    922 #define   C_008678_EOPD_FIFO_NEEDS_SC_EOP_DONE                        0xFFDFFFFF
    923 #define   S_008678_EOPD_FIFO_NEEDS_WR_CONFIRM(x)                      (((unsigned)(x) & 0x1) << 22)
    924 #define   G_008678_EOPD_FIFO_NEEDS_WR_CONFIRM(x)                      (((x) >> 22) & 0x1)
    925 #define   C_008678_EOPD_FIFO_NEEDS_WR_CONFIRM                         0xFFBFFFFF
    926 #define   S_008678_STRMO_WR_OF_PRIM_DATA_PENDING(x)                   (((unsigned)(x) & 0x1) << 23)
    927 #define   G_008678_STRMO_WR_OF_PRIM_DATA_PENDING(x)                   (((x) >> 23) & 0x1)
    928 #define   C_008678_STRMO_WR_OF_PRIM_DATA_PENDING                      0xFF7FFFFF
    929 #define   S_008678_PIPE_STATS_WR_DATA_PENDING(x)                      (((unsigned)(x) & 0x1) << 24)
    930 #define   G_008678_PIPE_STATS_WR_DATA_PENDING(x)                      (((x) >> 24) & 0x1)
    931 #define   C_008678_PIPE_STATS_WR_DATA_PENDING                         0xFEFFFFFF
    932 #define   S_008678_APPEND_RDY_WAIT_ON_CS_DONE(x)                      (((unsigned)(x) & 0x1) << 25)
    933 #define   G_008678_APPEND_RDY_WAIT_ON_CS_DONE(x)                      (((x) >> 25) & 0x1)
    934 #define   C_008678_APPEND_RDY_WAIT_ON_CS_DONE                         0xFDFFFFFF
    935 #define   S_008678_APPEND_RDY_WAIT_ON_PS_DONE(x)                      (((unsigned)(x) & 0x1) << 26)
    936 #define   G_008678_APPEND_RDY_WAIT_ON_PS_DONE(x)                      (((x) >> 26) & 0x1)
    937 #define   C_008678_APPEND_RDY_WAIT_ON_PS_DONE                         0xFBFFFFFF
    938 #define   S_008678_APPEND_WAIT_ON_WR_CONFIRM(x)                       (((unsigned)(x) & 0x1) << 27)
    939 #define   G_008678_APPEND_WAIT_ON_WR_CONFIRM(x)                       (((x) >> 27) & 0x1)
    940 #define   C_008678_APPEND_WAIT_ON_WR_CONFIRM                          0xF7FFFFFF
    941 #define   S_008678_APPEND_ACTIVE_PARTITION(x)                         (((unsigned)(x) & 0x1) << 28)
    942 #define   G_008678_APPEND_ACTIVE_PARTITION(x)                         (((x) >> 28) & 0x1)
    943 #define   C_008678_APPEND_ACTIVE_PARTITION                            0xEFFFFFFF
    944 #define   S_008678_APPEND_WAITING_TO_SEND_MEMWRITE(x)                 (((unsigned)(x) & 0x1) << 29)
    945 #define   G_008678_APPEND_WAITING_TO_SEND_MEMWRITE(x)                 (((x) >> 29) & 0x1)
    946 #define   C_008678_APPEND_WAITING_TO_SEND_MEMWRITE                    0xDFFFFFFF
    947 #define   S_008678_SURF_SYNC_NEEDS_IDLE_CNTXS(x)                      (((unsigned)(x) & 0x1) << 30)
    948 #define   G_008678_SURF_SYNC_NEEDS_IDLE_CNTXS(x)                      (((x) >> 30) & 0x1)
    949 #define   C_008678_SURF_SYNC_NEEDS_IDLE_CNTXS                         0xBFFFFFFF
    950 #define   S_008678_SURF_SYNC_NEEDS_ALL_CLEAN(x)                       (((unsigned)(x) & 0x1) << 31)
    951 #define   G_008678_SURF_SYNC_NEEDS_ALL_CLEAN(x)                       (((x) >> 31) & 0x1)
    952 #define   C_008678_SURF_SYNC_NEEDS_ALL_CLEAN                          0x7FFFFFFF
    953 #define R_008680_CP_STAT                                                0x008680
    954 #define   S_008680_ROQ_RING_BUSY(x)                                   (((unsigned)(x) & 0x1) << 9)
    955 #define   G_008680_ROQ_RING_BUSY(x)                                   (((x) >> 9) & 0x1)
    956 #define   C_008680_ROQ_RING_BUSY                                      0xFFFFFDFF
    957 #define   S_008680_ROQ_INDIRECT1_BUSY(x)                              (((unsigned)(x) & 0x1) << 10)
    958 #define   G_008680_ROQ_INDIRECT1_BUSY(x)                              (((x) >> 10) & 0x1)
    959 #define   C_008680_ROQ_INDIRECT1_BUSY                                 0xFFFFFBFF
    960 #define   S_008680_ROQ_INDIRECT2_BUSY(x)                              (((unsigned)(x) & 0x1) << 11)
    961 #define   G_008680_ROQ_INDIRECT2_BUSY(x)                              (((x) >> 11) & 0x1)
    962 #define   C_008680_ROQ_INDIRECT2_BUSY                                 0xFFFFF7FF
    963 #define   S_008680_ROQ_STATE_BUSY(x)                                  (((unsigned)(x) & 0x1) << 12)
    964 #define   G_008680_ROQ_STATE_BUSY(x)                                  (((x) >> 12) & 0x1)
    965 #define   C_008680_ROQ_STATE_BUSY                                     0xFFFFEFFF
    966 #define   S_008680_DC_BUSY(x)                                         (((unsigned)(x) & 0x1) << 13)
    967 #define   G_008680_DC_BUSY(x)                                         (((x) >> 13) & 0x1)
    968 #define   C_008680_DC_BUSY                                            0xFFFFDFFF
    969 #define   S_008680_UTCL2IU_BUSY(x)                                    (((unsigned)(x) & 0x1) << 14)
    970 #define   G_008680_UTCL2IU_BUSY(x)                                    (((x) >> 14) & 0x1)
    971 #define   C_008680_UTCL2IU_BUSY                                       0xFFFFBFFF
    972 #define   S_008680_PFP_BUSY(x)                                        (((unsigned)(x) & 0x1) << 15)
    973 #define   G_008680_PFP_BUSY(x)                                        (((x) >> 15) & 0x1)
    974 #define   C_008680_PFP_BUSY                                           0xFFFF7FFF
    975 #define   S_008680_MEQ_BUSY(x)                                        (((unsigned)(x) & 0x1) << 16)
    976 #define   G_008680_MEQ_BUSY(x)                                        (((x) >> 16) & 0x1)
    977 #define   C_008680_MEQ_BUSY                                           0xFFFEFFFF
    978 #define   S_008680_ME_BUSY(x)                                         (((unsigned)(x) & 0x1) << 17)
    979 #define   G_008680_ME_BUSY(x)                                         (((x) >> 17) & 0x1)
    980 #define   C_008680_ME_BUSY                                            0xFFFDFFFF
    981 #define   S_008680_QUERY_BUSY(x)                                      (((unsigned)(x) & 0x1) << 18)
    982 #define   G_008680_QUERY_BUSY(x)                                      (((x) >> 18) & 0x1)
    983 #define   C_008680_QUERY_BUSY                                         0xFFFBFFFF
    984 #define   S_008680_SEMAPHORE_BUSY(x)                                  (((unsigned)(x) & 0x1) << 19)
    985 #define   G_008680_SEMAPHORE_BUSY(x)                                  (((x) >> 19) & 0x1)
    986 #define   C_008680_SEMAPHORE_BUSY                                     0xFFF7FFFF
    987 #define   S_008680_INTERRUPT_BUSY(x)                                  (((unsigned)(x) & 0x1) << 20)
    988 #define   G_008680_INTERRUPT_BUSY(x)                                  (((x) >> 20) & 0x1)
    989 #define   C_008680_INTERRUPT_BUSY                                     0xFFEFFFFF
    990 #define   S_008680_SURFACE_SYNC_BUSY(x)                               (((unsigned)(x) & 0x1) << 21)
    991 #define   G_008680_SURFACE_SYNC_BUSY(x)                               (((x) >> 21) & 0x1)
    992 #define   C_008680_SURFACE_SYNC_BUSY                                  0xFFDFFFFF
    993 #define   S_008680_DMA_BUSY(x)                                        (((unsigned)(x) & 0x1) << 22)
    994 #define   G_008680_DMA_BUSY(x)                                        (((x) >> 22) & 0x1)
    995 #define   C_008680_DMA_BUSY                                           0xFFBFFFFF
    996 #define   S_008680_RCIU_BUSY(x)                                       (((unsigned)(x) & 0x1) << 23)
    997 #define   G_008680_RCIU_BUSY(x)                                       (((x) >> 23) & 0x1)
    998 #define   C_008680_RCIU_BUSY                                          0xFF7FFFFF
    999 #define   S_008680_SCRATCH_RAM_BUSY(x)                                (((unsigned)(x) & 0x1) << 24)
   1000 #define   G_008680_SCRATCH_RAM_BUSY(x)                                (((x) >> 24) & 0x1)
   1001 #define   C_008680_SCRATCH_RAM_BUSY                                   0xFEFFFFFF
   1002 #define   S_008680_CE_BUSY(x)                                         (((unsigned)(x) & 0x1) << 26)
   1003 #define   G_008680_CE_BUSY(x)                                         (((x) >> 26) & 0x1)
   1004 #define   C_008680_CE_BUSY                                            0xFBFFFFFF
   1005 #define   S_008680_TCIU_BUSY(x)                                       (((unsigned)(x) & 0x1) << 27)
   1006 #define   G_008680_TCIU_BUSY(x)                                       (((x) >> 27) & 0x1)
   1007 #define   C_008680_TCIU_BUSY                                          0xF7FFFFFF
   1008 #define   S_008680_ROQ_CE_RING_BUSY(x)                                (((unsigned)(x) & 0x1) << 28)
   1009 #define   G_008680_ROQ_CE_RING_BUSY(x)                                (((x) >> 28) & 0x1)
   1010 #define   C_008680_ROQ_CE_RING_BUSY                                   0xEFFFFFFF
   1011 #define   S_008680_ROQ_CE_INDIRECT1_BUSY(x)                           (((unsigned)(x) & 0x1) << 29)
   1012 #define   G_008680_ROQ_CE_INDIRECT1_BUSY(x)                           (((x) >> 29) & 0x1)
   1013 #define   C_008680_ROQ_CE_INDIRECT1_BUSY                              0xDFFFFFFF
   1014 #define   S_008680_ROQ_CE_INDIRECT2_BUSY(x)                           (((unsigned)(x) & 0x1) << 30)
   1015 #define   G_008680_ROQ_CE_INDIRECT2_BUSY(x)                           (((x) >> 30) & 0x1)
   1016 #define   C_008680_ROQ_CE_INDIRECT2_BUSY                              0xBFFFFFFF
   1017 #define   S_008680_CP_BUSY(x)                                         (((unsigned)(x) & 0x1) << 31)
   1018 #define   G_008680_CP_BUSY(x)                                         (((x) >> 31) & 0x1)
   1019 #define   C_008680_CP_BUSY                                            0x7FFFFFFF
   1020 #define R_030800_GRBM_GFX_INDEX                                         0x030800
   1021 #define   S_030800_INSTANCE_INDEX(x)                                  (((unsigned)(x) & 0xFF) << 0)
   1022 #define   G_030800_INSTANCE_INDEX(x)                                  (((x) >> 0) & 0xFF)
   1023 #define   C_030800_INSTANCE_INDEX                                     0xFFFFFF00
   1024 #define   S_030800_SH_INDEX(x)                                        (((unsigned)(x) & 0xFF) << 8)
   1025 #define   G_030800_SH_INDEX(x)                                        (((x) >> 8) & 0xFF)
   1026 #define   C_030800_SH_INDEX                                           0xFFFF00FF
   1027 #define   S_030800_SE_INDEX(x)                                        (((unsigned)(x) & 0xFF) << 16)
   1028 #define   G_030800_SE_INDEX(x)                                        (((x) >> 16) & 0xFF)
   1029 #define   C_030800_SE_INDEX                                           0xFF00FFFF
   1030 #define   S_030800_SH_BROADCAST_WRITES(x)                             (((unsigned)(x) & 0x1) << 29)
   1031 #define   G_030800_SH_BROADCAST_WRITES(x)                             (((x) >> 29) & 0x1)
   1032 #define   C_030800_SH_BROADCAST_WRITES                                0xDFFFFFFF
   1033 #define   S_030800_INSTANCE_BROADCAST_WRITES(x)                       (((unsigned)(x) & 0x1) << 30)
   1034 #define   G_030800_INSTANCE_BROADCAST_WRITES(x)                       (((x) >> 30) & 0x1)
   1035 #define   C_030800_INSTANCE_BROADCAST_WRITES                          0xBFFFFFFF
   1036 #define   S_030800_SE_BROADCAST_WRITES(x)                             (((unsigned)(x) & 0x1) << 31)
   1037 #define   G_030800_SE_BROADCAST_WRITES(x)                             (((x) >> 31) & 0x1)
   1038 #define   C_030800_SE_BROADCAST_WRITES                                0x7FFFFFFF
   1039 #define R_030904_VGT_GSVS_RING_SIZE                                     0x030904
   1040 #define R_030908_VGT_PRIMITIVE_TYPE                                     0x030908
   1041 #define   S_030908_PRIM_TYPE(x)                                       (((unsigned)(x) & 0x3F) << 0)
   1042 #define   G_030908_PRIM_TYPE(x)                                       (((x) >> 0) & 0x3F)
   1043 #define   C_030908_PRIM_TYPE                                          0xFFFFFFC0
   1044 #define R_03090C_VGT_INDEX_TYPE                                         0x03090C
   1045 #define   S_03090C_INDEX_TYPE(x)                                      (((unsigned)(x) & 0x03) << 0)
   1046 #define   G_03090C_INDEX_TYPE(x)                                      (((x) >> 0) & 0x03)
   1047 #define   C_03090C_INDEX_TYPE                                         0xFFFFFFFC
   1048 #define   S_03090C_PRIMGEN_EN(x)                                      (((unsigned)(x) & 0x1) << 8)
   1049 #define   G_03090C_PRIMGEN_EN(x)                                      (((x) >> 8) & 0x1)
   1050 #define   C_03090C_PRIMGEN_EN                                         0xFFFFFEFF
   1051 #define R_030910_VGT_STRMOUT_BUFFER_FILLED_SIZE_0                       0x030910
   1052 #define R_030914_VGT_STRMOUT_BUFFER_FILLED_SIZE_1                       0x030914
   1053 #define R_030918_VGT_STRMOUT_BUFFER_FILLED_SIZE_2                       0x030918
   1054 #define R_03091C_VGT_STRMOUT_BUFFER_FILLED_SIZE_3                       0x03091C
   1055 #define R_030920_VGT_MAX_VTX_INDX                                       0x030920
   1056 #define R_030924_VGT_MIN_VTX_INDX                                       0x030924
   1057 #define R_030928_VGT_INDX_OFFSET                                        0x030928
   1058 #define R_03092C_VGT_MULTI_PRIM_IB_RESET_EN                             0x03092C
   1059 #define   S_03092C_RESET_EN(x)                                        (((unsigned)(x) & 0x1) << 0)
   1060 #define   G_03092C_RESET_EN(x)                                        (((x) >> 0) & 0x1)
   1061 #define   C_03092C_RESET_EN                                           0xFFFFFFFE
   1062 #define   S_03092C_MATCH_ALL_BITS(x)                                  (((unsigned)(x) & 0x1) << 1)
   1063 #define   G_03092C_MATCH_ALL_BITS(x)                                  (((x) >> 1) & 0x1)
   1064 #define   C_03092C_MATCH_ALL_BITS                                     0xFFFFFFFD
   1065 #define R_030930_VGT_NUM_INDICES                                        0x030930
   1066 #define R_030934_VGT_NUM_INSTANCES                                      0x030934
   1067 #define R_030938_VGT_TF_RING_SIZE                                       0x030938
   1068 #define   S_030938_SIZE(x)                                            (((unsigned)(x) & 0xFFFF) << 0)
   1069 #define   G_030938_SIZE(x)                                            (((x) >> 0) & 0xFFFF)
   1070 #define   C_030938_SIZE                                               0xFFFF0000
   1071 #define R_03093C_VGT_HS_OFFCHIP_PARAM                                   0x03093C
   1072 #define   S_03093C_OFFCHIP_BUFFERING(x)                               (((unsigned)(x) & 0x1FF) << 0)
   1073 #define   G_03093C_OFFCHIP_BUFFERING(x)                               (((x) >> 0) & 0x1FF)
   1074 #define   C_03093C_OFFCHIP_BUFFERING                                  0xFFFFFE00
   1075 #define   S_03093C_OFFCHIP_GRANULARITY(x)                             (((unsigned)(x) & 0x03) << 9)
   1076 #define   G_03093C_OFFCHIP_GRANULARITY(x)                             (((x) >> 9) & 0x03)
   1077 #define   C_03093C_OFFCHIP_GRANULARITY                                0xFFFFF9FF
   1078 #define R_030940_VGT_TF_MEMORY_BASE                                     0x030940
   1079 #define R_030944_VGT_TF_MEMORY_BASE_HI                                  0x030944
   1080 #define   S_030944_BASE_HI(x)                                         (((unsigned)(x) & 0xFF) << 0)
   1081 #define   G_030944_BASE_HI(x)                                         (((x) >> 0) & 0xFF)
   1082 #define   C_030944_BASE_HI                                            0xFFFFFF00
   1083 #define R_030948_WD_POS_BUF_BASE                                        0x030948
   1084 #define R_03094C_WD_POS_BUF_BASE_HI                                     0x03094C
   1085 #define   S_03094C_BASE_HI(x)                                         (((unsigned)(x) & 0xFF) << 0)
   1086 #define   G_03094C_BASE_HI(x)                                         (((x) >> 0) & 0xFF)
   1087 #define   C_03094C_BASE_HI                                            0xFFFFFF00
   1088 #define R_030950_WD_CNTL_SB_BUF_BASE                                    0x030950
   1089 #define R_030954_WD_CNTL_SB_BUF_BASE_HI                                 0x030954
   1090 #define   S_030954_BASE_HI(x)                                         (((unsigned)(x) & 0xFF) << 0)
   1091 #define   G_030954_BASE_HI(x)                                         (((x) >> 0) & 0xFF)
   1092 #define   C_030954_BASE_HI                                            0xFFFFFF00
   1093 #define R_030958_WD_INDEX_BUF_BASE                                      0x030958
   1094 #define R_03095C_WD_INDEX_BUF_BASE_HI                                   0x03095C
   1095 #define   S_03095C_BASE_HI(x)                                         (((unsigned)(x) & 0xFF) << 0)
   1096 #define   G_03095C_BASE_HI(x)                                         (((x) >> 0) & 0xFF)
   1097 #define   C_03095C_BASE_HI                                            0xFFFFFF00
   1098 #define R_030960_IA_MULTI_VGT_PARAM                                     0x030960
   1099 #define   S_030960_PRIMGROUP_SIZE(x)                                  (((unsigned)(x) & 0xFFFF) << 0)
   1100 #define   G_030960_PRIMGROUP_SIZE(x)                                  (((x) >> 0) & 0xFFFF)
   1101 #define   C_030960_PRIMGROUP_SIZE                                     0xFFFF0000
   1102 #define   S_030960_PARTIAL_VS_WAVE_ON(x)                              (((unsigned)(x) & 0x1) << 16)
   1103 #define   G_030960_PARTIAL_VS_WAVE_ON(x)                              (((x) >> 16) & 0x1)
   1104 #define   C_030960_PARTIAL_VS_WAVE_ON                                 0xFFFEFFFF
   1105 #define   S_030960_SWITCH_ON_EOP(x)                                   (((unsigned)(x) & 0x1) << 17)
   1106 #define   G_030960_SWITCH_ON_EOP(x)                                   (((x) >> 17) & 0x1)
   1107 #define   C_030960_SWITCH_ON_EOP                                      0xFFFDFFFF
   1108 #define   S_030960_PARTIAL_ES_WAVE_ON(x)                              (((unsigned)(x) & 0x1) << 18)
   1109 #define   G_030960_PARTIAL_ES_WAVE_ON(x)                              (((x) >> 18) & 0x1)
   1110 #define   C_030960_PARTIAL_ES_WAVE_ON                                 0xFFFBFFFF
   1111 #define   S_030960_SWITCH_ON_EOI(x)                                   (((unsigned)(x) & 0x1) << 19)
   1112 #define   G_030960_SWITCH_ON_EOI(x)                                   (((x) >> 19) & 0x1)
   1113 #define   C_030960_SWITCH_ON_EOI                                      0xFFF7FFFF
   1114 #define   S_030960_WD_SWITCH_ON_EOP(x)                                (((unsigned)(x) & 0x1) << 20)
   1115 #define   G_030960_WD_SWITCH_ON_EOP(x)                                (((x) >> 20) & 0x1)
   1116 #define   C_030960_WD_SWITCH_ON_EOP                                   0xFFEFFFFF
   1117 #define   S_030960_EN_INST_OPT_BASIC(x)                               (((unsigned)(x) & 0x1) << 21)
   1118 #define   G_030960_EN_INST_OPT_BASIC(x)                               (((x) >> 21) & 0x1)
   1119 #define   C_030960_EN_INST_OPT_BASIC                                  0xFFDFFFFF
   1120 #define   S_030960_EN_INST_OPT_ADV(x)                                 (((unsigned)(x) & 0x1) << 22)
   1121 #define   G_030960_EN_INST_OPT_ADV(x)                                 (((x) >> 22) & 0x1)
   1122 #define   C_030960_EN_INST_OPT_ADV                                    0xFFBFFFFF
   1123 #define   S_030960_HW_USE_ONLY(x)                                     (((unsigned)(x) & 0x1) << 23)
   1124 #define   G_030960_HW_USE_ONLY(x)                                     (((x) >> 23) & 0x1)
   1125 #define   C_030960_HW_USE_ONLY                                        0xFF7FFFFF
   1126 #define R_030964_VGT_OBJECT_ID                                          0x030964
   1127 #define R_030968_VGT_INSTANCE_BASE_ID                                   0x030968
   1128 #define R_030A00_PA_SU_LINE_STIPPLE_VALUE                               0x030A00
   1129 #define   S_030A00_LINE_STIPPLE_VALUE(x)                              (((unsigned)(x) & 0xFFFFFF) << 0)
   1130 #define   G_030A00_LINE_STIPPLE_VALUE(x)                              (((x) >> 0) & 0xFFFFFF)
   1131 #define   C_030A00_LINE_STIPPLE_VALUE                                 0xFF000000
   1132 #define R_030A04_PA_SC_LINE_STIPPLE_STATE                               0x030A04
   1133 #define   S_030A04_CURRENT_PTR(x)                                     (((unsigned)(x) & 0x0F) << 0)
   1134 #define   G_030A04_CURRENT_PTR(x)                                     (((x) >> 0) & 0x0F)
   1135 #define   C_030A04_CURRENT_PTR                                        0xFFFFFFF0
   1136 #define   S_030A04_CURRENT_COUNT(x)                                   (((unsigned)(x) & 0xFF) << 8)
   1137 #define   G_030A04_CURRENT_COUNT(x)                                   (((x) >> 8) & 0xFF)
   1138 #define   C_030A04_CURRENT_COUNT                                      0xFFFF00FF
   1139 #define R_030A10_PA_SC_SCREEN_EXTENT_MIN_0                              0x030A10
   1140 #define   S_030A10_X(x)                                               (((unsigned)(x) & 0xFFFF) << 0)
   1141 #define   G_030A10_X(x)                                               (((x) >> 0) & 0xFFFF)
   1142 #define   C_030A10_X                                                  0xFFFF0000
   1143 #define   S_030A10_Y(x)                                               (((unsigned)(x) & 0xFFFF) << 16)
   1144 #define   G_030A10_Y(x)                                               (((x) >> 16) & 0xFFFF)
   1145 #define   C_030A10_Y                                                  0x0000FFFF
   1146 #define R_030A14_PA_SC_SCREEN_EXTENT_MAX_0                              0x030A14
   1147 #define   S_030A14_X(x)                                               (((unsigned)(x) & 0xFFFF) << 0)
   1148 #define   G_030A14_X(x)                                               (((x) >> 0) & 0xFFFF)
   1149 #define   C_030A14_X                                                  0xFFFF0000
   1150 #define   S_030A14_Y(x)                                               (((unsigned)(x) & 0xFFFF) << 16)
   1151 #define   G_030A14_Y(x)                                               (((x) >> 16) & 0xFFFF)
   1152 #define   C_030A14_Y                                                  0x0000FFFF
   1153 #define R_030A18_PA_SC_SCREEN_EXTENT_MIN_1                              0x030A18
   1154 #define   S_030A18_X(x)                                               (((unsigned)(x) & 0xFFFF) << 0)
   1155 #define   G_030A18_X(x)                                               (((x) >> 0) & 0xFFFF)
   1156 #define   C_030A18_X                                                  0xFFFF0000
   1157 #define   S_030A18_Y(x)                                               (((unsigned)(x) & 0xFFFF) << 16)
   1158 #define   G_030A18_Y(x)                                               (((x) >> 16) & 0xFFFF)
   1159 #define   C_030A18_Y                                                  0x0000FFFF
   1160 #define R_030A2C_PA_SC_SCREEN_EXTENT_MAX_1                              0x030A2C
   1161 #define   S_030A2C_X(x)                                               (((unsigned)(x) & 0xFFFF) << 0)
   1162 #define   G_030A2C_X(x)                                               (((x) >> 0) & 0xFFFF)
   1163 #define   C_030A2C_X                                                  0xFFFF0000
   1164 #define   S_030A2C_Y(x)                                               (((unsigned)(x) & 0xFFFF) << 16)
   1165 #define   G_030A2C_Y(x)                                               (((x) >> 16) & 0xFFFF)
   1166 #define   C_030A2C_Y                                                  0x0000FFFF
   1167 #define R_030D20_SQC_CACHES                                             0x030D20
   1168 #define   S_030D20_TARGET_INST(x)                                     (((unsigned)(x) & 0x1) << 0)
   1169 #define   G_030D20_TARGET_INST(x)                                     (((x) >> 0) & 0x1)
   1170 #define   C_030D20_TARGET_INST                                        0xFFFFFFFE
   1171 #define   S_030D20_TARGET_DATA(x)                                     (((unsigned)(x) & 0x1) << 1)
   1172 #define   G_030D20_TARGET_DATA(x)                                     (((x) >> 1) & 0x1)
   1173 #define   C_030D20_TARGET_DATA                                        0xFFFFFFFD
   1174 #define   S_030D20_INVALIDATE(x)                                      (((unsigned)(x) & 0x1) << 2)
   1175 #define   G_030D20_INVALIDATE(x)                                      (((x) >> 2) & 0x1)
   1176 #define   C_030D20_INVALIDATE                                         0xFFFFFFFB
   1177 #define   S_030D20_WRITEBACK(x)                                       (((unsigned)(x) & 0x1) << 3)
   1178 #define   G_030D20_WRITEBACK(x)                                       (((x) >> 3) & 0x1)
   1179 #define   C_030D20_WRITEBACK                                          0xFFFFFFF7
   1180 #define   S_030D20_VOL(x)                                             (((unsigned)(x) & 0x1) << 4)
   1181 #define   G_030D20_VOL(x)                                             (((x) >> 4) & 0x1)
   1182 #define   C_030D20_VOL                                                0xFFFFFFEF
   1183 #define   S_030D20_COMPLETE(x)                                        (((unsigned)(x) & 0x1) << 16)
   1184 #define   G_030D20_COMPLETE(x)                                        (((x) >> 16) & 0x1)
   1185 #define   C_030D20_COMPLETE                                           0xFFFEFFFF
   1186 #define R_030D24_SQC_WRITEBACK                                          0x030D24
   1187 #define   S_030D24_DWB(x)                                             (((unsigned)(x) & 0x1) << 0)
   1188 #define   G_030D24_DWB(x)                                             (((x) >> 0) & 0x1)
   1189 #define   C_030D24_DWB                                                0xFFFFFFFE
   1190 #define   S_030D24_DIRTY(x)                                           (((unsigned)(x) & 0x1) << 1)
   1191 #define   G_030D24_DIRTY(x)                                           (((x) >> 1) & 0x1)
   1192 #define   C_030D24_DIRTY                                              0xFFFFFFFD
   1193 #define R_030E00_TA_CS_BC_BASE_ADDR                                     0x030E00
   1194 #define R_030E04_TA_CS_BC_BASE_ADDR_HI                                  0x030E04
   1195 #define   S_030E04_ADDRESS(x)                                         (((unsigned)(x) & 0xFF) << 0)
   1196 #define   G_030E04_ADDRESS(x)                                         (((x) >> 0) & 0xFF)
   1197 #define   C_030E04_ADDRESS                                            0xFFFFFF00
   1198 #define R_030E08_TA_GRAD_ADJ_UCONFIG                                    0x030E08
   1199 #define   S_030E08_GRAD_ADJ_0(x)                                      (((unsigned)(x) & 0xFF) << 0)
   1200 #define   G_030E08_GRAD_ADJ_0(x)                                      (((x) >> 0) & 0xFF)
   1201 #define   C_030E08_GRAD_ADJ_0                                         0xFFFFFF00
   1202 #define   S_030E08_GRAD_ADJ_1(x)                                      (((unsigned)(x) & 0xFF) << 8)
   1203 #define   G_030E08_GRAD_ADJ_1(x)                                      (((x) >> 8) & 0xFF)
   1204 #define   C_030E08_GRAD_ADJ_1                                         0xFFFF00FF
   1205 #define   S_030E08_GRAD_ADJ_2(x)                                      (((unsigned)(x) & 0xFF) << 16)
   1206 #define   G_030E08_GRAD_ADJ_2(x)                                      (((x) >> 16) & 0xFF)
   1207 #define   C_030E08_GRAD_ADJ_2                                         0xFF00FFFF
   1208 #define   S_030E08_GRAD_ADJ_3(x)                                      (((unsigned)(x) & 0xFF) << 24)
   1209 #define   G_030E08_GRAD_ADJ_3(x)                                      (((x) >> 24) & 0xFF)
   1210 #define   C_030E08_GRAD_ADJ_3                                         0x00FFFFFF
   1211 #define R_030F00_DB_OCCLUSION_COUNT0_LOW                                0x030F00
   1212 #define R_008F00_SQ_BUF_RSRC_WORD0                                      0x008F00
   1213 #define R_030F04_DB_OCCLUSION_COUNT0_HI                                 0x030F04
   1214 #define   S_030F04_COUNT_HI(x)                                        (((unsigned)(x) & 0x7FFFFFFF) << 0)
   1215 #define   G_030F04_COUNT_HI(x)                                        (((x) >> 0) & 0x7FFFFFFF)
   1216 #define   C_030F04_COUNT_HI                                           0x80000000
   1217 #define R_008F04_SQ_BUF_RSRC_WORD1                                      0x008F04
   1218 #define   S_008F04_BASE_ADDRESS_HI(x)                                 (((unsigned)(x) & 0xFFFF) << 0)
   1219 #define   G_008F04_BASE_ADDRESS_HI(x)                                 (((x) >> 0) & 0xFFFF)
   1220 #define   C_008F04_BASE_ADDRESS_HI                                    0xFFFF0000
   1221 #define   S_008F04_STRIDE(x)                                          (((unsigned)(x) & 0x3FFF) << 16)
   1222 #define   G_008F04_STRIDE(x)                                          (((x) >> 16) & 0x3FFF)
   1223 #define   C_008F04_STRIDE                                             0xC000FFFF
   1224 #define   S_008F04_CACHE_SWIZZLE(x)                                   (((unsigned)(x) & 0x1) << 30)
   1225 #define   G_008F04_CACHE_SWIZZLE(x)                                   (((x) >> 30) & 0x1)
   1226 #define   C_008F04_CACHE_SWIZZLE                                      0xBFFFFFFF
   1227 #define   S_008F04_SWIZZLE_ENABLE(x)                                  (((unsigned)(x) & 0x1) << 31)
   1228 #define   G_008F04_SWIZZLE_ENABLE(x)                                  (((x) >> 31) & 0x1)
   1229 #define   C_008F04_SWIZZLE_ENABLE                                     0x7FFFFFFF
   1230 #define R_030F08_DB_OCCLUSION_COUNT1_LOW                                0x030F08
   1231 #define R_008F08_SQ_BUF_RSRC_WORD2                                      0x008F08
   1232 #define R_030F0C_DB_OCCLUSION_COUNT1_HI                                 0x030F0C
   1233 #define   S_030F0C_COUNT_HI(x)                                        (((unsigned)(x) & 0x7FFFFFFF) << 0)
   1234 #define   G_030F0C_COUNT_HI(x)                                        (((x) >> 0) & 0x7FFFFFFF)
   1235 #define   C_030F0C_COUNT_HI                                           0x80000000
   1236 #define R_008F0C_SQ_BUF_RSRC_WORD3                                      0x008F0C
   1237 #define   S_008F0C_DST_SEL_X(x)                                       (((unsigned)(x) & 0x07) << 0)
   1238 #define   G_008F0C_DST_SEL_X(x)                                       (((x) >> 0) & 0x07)
   1239 #define   C_008F0C_DST_SEL_X                                          0xFFFFFFF8
   1240 #define   S_008F0C_DST_SEL_Y(x)                                       (((unsigned)(x) & 0x07) << 3)
   1241 #define   G_008F0C_DST_SEL_Y(x)                                       (((x) >> 3) & 0x07)
   1242 #define   C_008F0C_DST_SEL_Y                                          0xFFFFFFC7
   1243 #define   S_008F0C_DST_SEL_Z(x)                                       (((unsigned)(x) & 0x07) << 6)
   1244 #define   G_008F0C_DST_SEL_Z(x)                                       (((x) >> 6) & 0x07)
   1245 #define   C_008F0C_DST_SEL_Z                                          0xFFFFFE3F
   1246 #define   S_008F0C_DST_SEL_W(x)                                       (((unsigned)(x) & 0x07) << 9)
   1247 #define   G_008F0C_DST_SEL_W(x)                                       (((x) >> 9) & 0x07)
   1248 #define   C_008F0C_DST_SEL_W                                          0xFFFFF1FF
   1249 #define   S_008F0C_NUM_FORMAT(x)                                      (((unsigned)(x) & 0x07) << 12)
   1250 #define   G_008F0C_NUM_FORMAT(x)                                      (((x) >> 12) & 0x07)
   1251 #define   C_008F0C_NUM_FORMAT                                         0xFFFF8FFF
   1252 #define   S_008F0C_DATA_FORMAT(x)                                     (((unsigned)(x) & 0x0F) << 15)
   1253 #define   G_008F0C_DATA_FORMAT(x)                                     (((x) >> 15) & 0x0F)
   1254 #define   C_008F0C_DATA_FORMAT                                        0xFFF87FFF
   1255 #define   S_008F0C_USER_VM_ENABLE(x)                                  (((unsigned)(x) & 0x1) << 19)
   1256 #define   G_008F0C_USER_VM_ENABLE(x)                                  (((x) >> 19) & 0x1)
   1257 #define   C_008F0C_USER_VM_ENABLE                                     0xFFF7FFFF
   1258 #define   S_008F0C_USER_VM_MODE(x)                                    (((unsigned)(x) & 0x1) << 20)
   1259 #define   G_008F0C_USER_VM_MODE(x)                                    (((x) >> 20) & 0x1)
   1260 #define   C_008F0C_USER_VM_MODE                                       0xFFEFFFFF
   1261 #define   S_008F0C_INDEX_STRIDE(x)                                    (((unsigned)(x) & 0x03) << 21)
   1262 #define   G_008F0C_INDEX_STRIDE(x)                                    (((x) >> 21) & 0x03)
   1263 #define   C_008F0C_INDEX_STRIDE                                       0xFF9FFFFF
   1264 #define   S_008F0C_ADD_TID_ENABLE(x)                                  (((unsigned)(x) & 0x1) << 23)
   1265 #define   G_008F0C_ADD_TID_ENABLE(x)                                  (((x) >> 23) & 0x1)
   1266 #define   C_008F0C_ADD_TID_ENABLE                                     0xFF7FFFFF
   1267 #define   S_008F0C_NV(x)                                              (((unsigned)(x) & 0x1) << 27)
   1268 #define   G_008F0C_NV(x)                                              (((x) >> 27) & 0x1)
   1269 #define   C_008F0C_NV                                                 0xF7FFFFFF
   1270 #define   S_008F0C_TYPE(x)                                            (((unsigned)(x) & 0x03) << 30)
   1271 #define   G_008F0C_TYPE(x)                                            (((x) >> 30) & 0x03)
   1272 #define   C_008F0C_TYPE                                               0x3FFFFFFF
   1273 #define R_030F10_DB_OCCLUSION_COUNT2_LOW                                0x030F10
   1274 #define R_008F10_SQ_IMG_RSRC_WORD0                                      0x008F10
   1275 #define R_030F14_DB_OCCLUSION_COUNT2_HI                                 0x030F14
   1276 #define   S_030F14_COUNT_HI(x)                                        (((unsigned)(x) & 0x7FFFFFFF) << 0)
   1277 #define   G_030F14_COUNT_HI(x)                                        (((x) >> 0) & 0x7FFFFFFF)
   1278 #define   C_030F14_COUNT_HI                                           0x80000000
   1279 #define R_008F14_SQ_IMG_RSRC_WORD1                                      0x008F14
   1280 #define   S_008F14_BASE_ADDRESS_HI(x)                                 (((unsigned)(x) & 0xFF) << 0)
   1281 #define   G_008F14_BASE_ADDRESS_HI(x)                                 (((x) >> 0) & 0xFF)
   1282 #define   C_008F14_BASE_ADDRESS_HI                                    0xFFFFFF00
   1283 #define   S_008F14_MIN_LOD(x)                                         (((unsigned)(x) & 0xFFF) << 8)
   1284 #define   G_008F14_MIN_LOD(x)                                         (((x) >> 8) & 0xFFF)
   1285 #define   C_008F14_MIN_LOD                                            0xFFF000FF
   1286 #define   S_008F14_DATA_FORMAT_GFX9(x)                                (((unsigned)(x) & 0x3F) << 20)
   1287 #define   G_008F14_DATA_FORMAT_GFX9(x)                                (((x) >> 20) & 0x3F)
   1288 #define   C_008F14_DATA_FORMAT_GFX9                                   0xFC0FFFFF
   1289 #define     V_008F14_IMG_DATA_FORMAT_INVALID                        0x00
   1290 #define     V_008F14_IMG_DATA_FORMAT_8                              0x01
   1291 #define     V_008F14_IMG_DATA_FORMAT_16                             0x02
   1292 #define     V_008F14_IMG_DATA_FORMAT_8_8                            0x03
   1293 #define     V_008F14_IMG_DATA_FORMAT_32                             0x04
   1294 #define     V_008F14_IMG_DATA_FORMAT_16_16                          0x05
   1295 #define     V_008F14_IMG_DATA_FORMAT_10_11_11                       0x06
   1296 #define     V_008F14_IMG_DATA_FORMAT_11_11_10                       0x07
   1297 #define     V_008F14_IMG_DATA_FORMAT_10_10_10_2                     0x08
   1298 #define     V_008F14_IMG_DATA_FORMAT_2_10_10_10                     0x09
   1299 #define     V_008F14_IMG_DATA_FORMAT_8_8_8_8                        0x0A
   1300 #define     V_008F14_IMG_DATA_FORMAT_32_32                          0x0B
   1301 #define     V_008F14_IMG_DATA_FORMAT_16_16_16_16                    0x0C
   1302 #define     V_008F14_IMG_DATA_FORMAT_32_32_32                       0x0D
   1303 #define     V_008F14_IMG_DATA_FORMAT_32_32_32_32                    0x0E
   1304 #define     V_008F14_IMG_DATA_FORMAT_RESERVED_15                    0x0F
   1305 #define     V_008F14_IMG_DATA_FORMAT_5_6_5                          0x10
   1306 #define     V_008F14_IMG_DATA_FORMAT_1_5_5_5                        0x11
   1307 #define     V_008F14_IMG_DATA_FORMAT_5_5_5_1                        0x12
   1308 #define     V_008F14_IMG_DATA_FORMAT_4_4_4_4                        0x13
   1309 #define     V_008F14_IMG_DATA_FORMAT_8_24                           0x14
   1310 #define     V_008F14_IMG_DATA_FORMAT_24_8                           0x15
   1311 #define     V_008F14_IMG_DATA_FORMAT_X24_8_32                       0x16
   1312 #define     V_008F14_IMG_DATA_FORMAT_8_AS_8_8_8_8                   0x17
   1313 #define     V_008F14_IMG_DATA_FORMAT_ETC2_RGB                       0x18
   1314 #define     V_008F14_IMG_DATA_FORMAT_ETC2_RGBA                      0x19
   1315 #define     V_008F14_IMG_DATA_FORMAT_ETC2_R                         0x1A
   1316 #define     V_008F14_IMG_DATA_FORMAT_ETC2_RG                        0x1B
   1317 #define     V_008F14_IMG_DATA_FORMAT_ETC2_RGBA1                     0x1C
   1318 #define     V_008F14_IMG_DATA_FORMAT_RESERVED_29                    0x1D
   1319 #define     V_008F14_IMG_DATA_FORMAT_RESERVED_30                    0x1E
   1320 #define     V_008F14_IMG_DATA_FORMAT_6E4                            0x1F
   1321 #define     V_008F14_IMG_DATA_FORMAT_GB_GR                          0x20
   1322 #define     V_008F14_IMG_DATA_FORMAT_BG_RG                          0x21
   1323 #define     V_008F14_IMG_DATA_FORMAT_5_9_9_9                        0x22
   1324 #define     V_008F14_IMG_DATA_FORMAT_BC1                            0x23
   1325 #define     V_008F14_IMG_DATA_FORMAT_BC2                            0x24
   1326 #define     V_008F14_IMG_DATA_FORMAT_BC3                            0x25
   1327 #define     V_008F14_IMG_DATA_FORMAT_BC4                            0x26
   1328 #define     V_008F14_IMG_DATA_FORMAT_BC5                            0x27
   1329 #define     V_008F14_IMG_DATA_FORMAT_BC6                            0x28
   1330 #define     V_008F14_IMG_DATA_FORMAT_BC7                            0x29
   1331 #define     V_008F14_IMG_DATA_FORMAT_16_AS_32_32                    0x2A
   1332 #define     V_008F14_IMG_DATA_FORMAT_16_AS_16_16_16_16_GFX9         0x2B
   1333 #define     V_008F14_IMG_DATA_FORMAT_16_AS_32_32_32_32_GFX9         0x2C
   1334 #define     V_008F14_IMG_DATA_FORMAT_FMASK                          0x2D /* NUM_FORMAT selects the format */
   1335 #define     V_008F14_IMG_DATA_FORMAT_ASTC_2D_LDR                    0x2E /* NUM_FORMAT selects the block size */
   1336 #define     V_008F14_IMG_DATA_FORMAT_ASTC_2D_HDR                    0x2F /* ditto */
   1337 #define     V_008F14_IMG_DATA_FORMAT_ASTC_2D_LDR_SRGB               0x30 /* ditto */
   1338 #define     V_008F14_IMG_DATA_FORMAT_ASTC_3D_LDR                    0x31 /* ditto */
   1339 #define     V_008F14_IMG_DATA_FORMAT_ASTC_3D_HDR                    0x32 /* ditto */
   1340 #define     V_008F14_IMG_DATA_FORMAT_ASTC_3D_LDR_SRGB               0x33 /* ditto */
   1341 #define     V_008F14_IMG_DATA_FORMAT_N_IN_16                        0x34
   1342 #define     V_008F14_IMG_DATA_FORMAT_N_IN_16_16                     0x35
   1343 #define     V_008F14_IMG_DATA_FORMAT_N_IN_16_16_16_16               0x36
   1344 #define     V_008F14_IMG_DATA_FORMAT_N_IN_16_AS_16_16_16_16         0x37
   1345 #define     V_008F14_IMG_DATA_FORMAT_RESERVED_56                    0x38
   1346 #define     V_008F14_IMG_DATA_FORMAT_4_4                            0x39
   1347 #define     V_008F14_IMG_DATA_FORMAT_6_5_5                          0x3A
   1348 #define     V_008F14_IMG_DATA_FORMAT_S8_16                          0x3B
   1349 #define     V_008F14_IMG_DATA_FORMAT_S8_32                          0x3C
   1350 #define     V_008F14_IMG_DATA_FORMAT_8_AS_32                        0x3D
   1351 #define     V_008F14_IMG_DATA_FORMAT_8_AS_32_32                     0x3E
   1352 #define     V_008F14_IMG_DATA_FORMAT_32_AS_32_32_32_32              0x3F
   1353 #define   S_008F14_NUM_FORMAT_GFX9(x)                                 (((unsigned)(x) & 0x0F) << 26)
   1354 #define   G_008F14_NUM_FORMAT_GFX9(x)                                 (((x) >> 26) & 0x0F)
   1355 #define   C_008F14_NUM_FORMAT_GFX9                                    0xC3FFFFFF
   1356 #define     V_008F14_IMG_NUM_FORMAT_UNORM                           0x00
   1357 #define     V_008F14_IMG_NUM_FORMAT_SNORM                           0x01
   1358 #define     V_008F14_IMG_NUM_FORMAT_USCALED                         0x02
   1359 #define     V_008F14_IMG_NUM_FORMAT_SSCALED                         0x03
   1360 #define     V_008F14_IMG_NUM_FORMAT_UINT                            0x04
   1361 #define     V_008F14_IMG_NUM_FORMAT_SINT                            0x05
   1362 #define     V_008F14_IMG_NUM_FORMAT_RESERVED_6                      0x06
   1363 #define     V_008F14_IMG_NUM_FORMAT_FLOAT                           0x07
   1364 #define     V_008F14_IMG_NUM_FORMAT_METADATA                        0x08
   1365 #define     V_008F14_IMG_NUM_FORMAT_SRGB                            0x09
   1366 #define     V_008F14_IMG_NUM_FORMAT_UNORM_UINT                      0x0A
   1367 #define   S_008F14_NUM_FORMAT_FMASK(x)                                (((unsigned)(x) & 0x0F) << 26)
   1368 #define   G_008F14_NUM_FORMAT_FMASK(x)                                (((x) >> 26) & 0x0F)
   1369 #define   C_008F14_NUM_FORMAT_FMASK                                   0xC3FFFFFF
   1370 #define     V_008F14_IMG_FMASK_8_2_1                                0x00
   1371 #define     V_008F14_IMG_FMASK_8_4_1                                0x01
   1372 #define     V_008F14_IMG_FMASK_8_8_1                                0x02
   1373 #define     V_008F14_IMG_FMASK_8_2_2                                0x03
   1374 #define     V_008F14_IMG_FMASK_8_4_2                                0x04
   1375 #define     V_008F14_IMG_FMASK_8_4_4                                0x05
   1376 #define     V_008F14_IMG_FMASK_16_16_1                              0x06
   1377 #define     V_008F14_IMG_FMASK_16_8_2                               0x07
   1378 #define     V_008F14_IMG_FMASK_32_16_2                              0x08
   1379 #define     V_008F14_IMG_FMASK_32_8_4                               0x09
   1380 #define     V_008F14_IMG_FMASK_32_8_8                               0x0A
   1381 #define     V_008F14_IMG_FMASK_64_16_4                              0x0B
   1382 #define     V_008F14_IMG_FMASK_64_16_8                              0x0C
   1383 #define   S_008F14_NUM_FORMAT_ASTC_2D(x)                              (((unsigned)(x) & 0x0F) << 26)
   1384 #define   G_008F14_NUM_FORMAT_ASTC_2D(x)                              (((x) >> 26) & 0x0F)
   1385 #define   C_008F14_NUM_FORMAT_ASTC_2D                               0xC3FFFFFF
   1386 #define     V_008F14_IMG_ASTC_2D_4x4                                0x00
   1387 #define     V_008F14_IMG_ASTC_2D_5x4                                0x01
   1388 #define     V_008F14_IMG_ASTC_2D_5x5                                0x02
   1389 #define     V_008F14_IMG_ASTC_2D_6x5                                0x03
   1390 #define     V_008F14_IMG_ASTC_2D_6x6                                0x04
   1391 #define     V_008F14_IMG_ASTC_2D_8x5                                0x05
   1392 #define     V_008F14_IMG_ASTC_2D_8x6                                0x06
   1393 #define     V_008F14_IMG_ASTC_2D_8x8                                0x07
   1394 #define     V_008F14_IMG_ASTC_2D_10x5                               0x08
   1395 #define     V_008F14_IMG_ASTC_2D_10x6                               0x09
   1396 #define     V_008F14_IMG_ASTC_2D_10x8                               0x0A
   1397 #define     V_008F14_IMG_ASTC_2D_10x10                              0x0B
   1398 #define     V_008F14_IMG_ASTC_2D_12x10                              0x0C
   1399 #define     V_008F14_IMG_ASTC_2D_12x12                              0x0D
   1400 #define   S_008F14_NUM_FORMAT_ASTC_3D(x)                              (((unsigned)(x) & 0x0F) << 26)
   1401 #define   G_008F14_NUM_FORMAT_ASTC_3D(x)                              (((x) >> 26) & 0x0F)
   1402 #define   C_008F14_NUM_FORMAT_ASTC_3D                               0xC3FFFFFF
   1403 #define     V_008F14_IMG_ASTC_3D_3x3x3                              0x00
   1404 #define     V_008F14_IMG_ASTC_3D_4x3x3                              0x01
   1405 #define     V_008F14_IMG_ASTC_3D_4x4x3                              0x02
   1406 #define     V_008F14_IMG_ASTC_3D_4x4x4                              0x03
   1407 #define     V_008F14_IMG_ASTC_3D_5x4x4                              0x04
   1408 #define     V_008F14_IMG_ASTC_3D_5x5x4                              0x05
   1409 #define     V_008F14_IMG_ASTC_3D_5x5x5                              0x06
   1410 #define     V_008F14_IMG_ASTC_3D_6x5x5                              0x07
   1411 #define     V_008F14_IMG_ASTC_3D_6x6x5                              0x08
   1412 #define     V_008F14_IMG_ASTC_3D_6x6x6                              0x09
   1413 #define   S_008F14_NV(x)                                              (((unsigned)(x) & 0x1) << 30)
   1414 #define   G_008F14_NV(x)                                              (((x) >> 30) & 0x1)
   1415 #define   C_008F14_NV                                                 0xBFFFFFFF
   1416 #define   S_008F14_META_DIRECT(x)                                     (((unsigned)(x) & 0x1) << 31)
   1417 #define   G_008F14_META_DIRECT(x)                                     (((x) >> 31) & 0x1)
   1418 #define   C_008F14_META_DIRECT                                        0x7FFFFFFF
   1419 #define R_030F18_DB_OCCLUSION_COUNT3_LOW                                0x030F18
   1420 #define R_008F18_SQ_IMG_RSRC_WORD2                                      0x008F18
   1421 #define   S_008F18_WIDTH(x)                                           (((unsigned)(x) & 0x3FFF) << 0)
   1422 #define   G_008F18_WIDTH(x)                                           (((x) >> 0) & 0x3FFF)
   1423 #define   C_008F18_WIDTH                                              0xFFFFC000
   1424 #define   S_008F18_HEIGHT(x)                                          (((unsigned)(x) & 0x3FFF) << 14)
   1425 #define   G_008F18_HEIGHT(x)                                          (((x) >> 14) & 0x3FFF)
   1426 #define   C_008F18_HEIGHT                                             0xF0003FFF
   1427 #define   S_008F18_PERF_MOD(x)                                        (((unsigned)(x) & 0x07) << 28)
   1428 #define   G_008F18_PERF_MOD(x)                                        (((x) >> 28) & 0x07)
   1429 #define   C_008F18_PERF_MOD                                           0x8FFFFFFF
   1430 #define R_030F1C_DB_OCCLUSION_COUNT3_HI                                 0x030F1C
   1431 #define   S_030F1C_COUNT_HI(x)                                        (((unsigned)(x) & 0x7FFFFFFF) << 0)
   1432 #define   G_030F1C_COUNT_HI(x)                                        (((x) >> 0) & 0x7FFFFFFF)
   1433 #define   C_030F1C_COUNT_HI                                           0x80000000
   1434 #define R_008F1C_SQ_IMG_RSRC_WORD3                                      0x008F1C
   1435 #define   S_008F1C_DST_SEL_X(x)                                       (((unsigned)(x) & 0x07) << 0)
   1436 #define   G_008F1C_DST_SEL_X(x)                                       (((x) >> 0) & 0x07)
   1437 #define   C_008F1C_DST_SEL_X                                          0xFFFFFFF8
   1438 #define   S_008F1C_DST_SEL_Y(x)                                       (((unsigned)(x) & 0x07) << 3)
   1439 #define   G_008F1C_DST_SEL_Y(x)                                       (((x) >> 3) & 0x07)
   1440 #define   C_008F1C_DST_SEL_Y                                          0xFFFFFFC7
   1441 #define   S_008F1C_DST_SEL_Z(x)                                       (((unsigned)(x) & 0x07) << 6)
   1442 #define   G_008F1C_DST_SEL_Z(x)                                       (((x) >> 6) & 0x07)
   1443 #define   C_008F1C_DST_SEL_Z                                          0xFFFFFE3F
   1444 #define   S_008F1C_DST_SEL_W(x)                                       (((unsigned)(x) & 0x07) << 9)
   1445 #define   G_008F1C_DST_SEL_W(x)                                       (((x) >> 9) & 0x07)
   1446 #define   C_008F1C_DST_SEL_W                                          0xFFFFF1FF
   1447 #define   S_008F1C_BASE_LEVEL(x)                                      (((unsigned)(x) & 0x0F) << 12)
   1448 #define   G_008F1C_BASE_LEVEL(x)                                      (((x) >> 12) & 0x0F)
   1449 #define   C_008F1C_BASE_LEVEL                                         0xFFFF0FFF
   1450 #define   S_008F1C_LAST_LEVEL(x)                                      (((unsigned)(x) & 0x0F) << 16)
   1451 #define   G_008F1C_LAST_LEVEL(x)                                      (((x) >> 16) & 0x0F)
   1452 #define   C_008F1C_LAST_LEVEL                                         0xFFF0FFFF
   1453 #define   S_008F1C_SW_MODE(x)                                         (((unsigned)(x) & 0x1F) << 20)
   1454 #define   G_008F1C_SW_MODE(x)                                         (((x) >> 20) & 0x1F)
   1455 #define   C_008F1C_SW_MODE                                            0xFE0FFFFF
   1456 #define   S_008F1C_TYPE(x)                                            (((unsigned)(x) & 0x0F) << 28)
   1457 #define   G_008F1C_TYPE(x)                                            (((x) >> 28) & 0x0F)
   1458 #define   C_008F1C_TYPE                                               0x0FFFFFFF
   1459 #define R_008F20_SQ_IMG_RSRC_WORD4                                      0x008F20
   1460 #define   S_008F20_DEPTH(x)                                           (((unsigned)(x) & 0x1FFF) << 0)
   1461 #define   G_008F20_DEPTH(x)                                           (((x) >> 0) & 0x1FFF)
   1462 #define   C_008F20_DEPTH                                              0xFFFFE000
   1463 #define   S_008F20_PITCH_GFX9(x)                                      (((unsigned)(x) & 0xFFFF) << 13)
   1464 #define   G_008F20_PITCH_GFX9(x)                                      (((x) >> 13) & 0xFFFF)
   1465 #define   C_008F20_PITCH_GFX9                                         0xE0001FFF
   1466 #define   S_008F20_BC_SWIZZLE(x)                                      (((unsigned)(x) & 0x07) << 29)
   1467 #define   G_008F20_BC_SWIZZLE(x)                                      (((x) >> 29) & 0x07)
   1468 #define   C_008F20_BC_SWIZZLE                                         0x1FFFFFFF
   1469 #define     V_008F20_BC_SWIZZLE_XYZW					0
   1470 #define     V_008F20_BC_SWIZZLE_XWYZ					1
   1471 #define     V_008F20_BC_SWIZZLE_WZYX					2
   1472 #define     V_008F20_BC_SWIZZLE_WXYZ					3
   1473 #define     V_008F20_BC_SWIZZLE_ZYXW					4
   1474 #define     V_008F20_BC_SWIZZLE_YXWZ					5
   1475 #define R_008F24_SQ_IMG_RSRC_WORD5                                      0x008F24
   1476 #define   S_008F24_BASE_ARRAY(x)                                      (((unsigned)(x) & 0x1FFF) << 0)
   1477 #define   G_008F24_BASE_ARRAY(x)                                      (((x) >> 0) & 0x1FFF)
   1478 #define   C_008F24_BASE_ARRAY                                         0xFFFFE000
   1479 #define   S_008F24_ARRAY_PITCH(x)                                     (((unsigned)(x) & 0x0F) << 13)
   1480 #define   G_008F24_ARRAY_PITCH(x)                                     (((x) >> 13) & 0x0F)
   1481 #define   C_008F24_ARRAY_PITCH                                        0xFFFE1FFF
   1482 #define   S_008F24_META_DATA_ADDRESS(x)                               (((unsigned)(x) & 0xFF) << 17)
   1483 #define   G_008F24_META_DATA_ADDRESS(x)                               (((x) >> 17) & 0xFF)
   1484 #define   C_008F24_META_DATA_ADDRESS                                  0xFE01FFFF
   1485 #define   S_008F24_META_LINEAR(x)                                     (((unsigned)(x) & 0x1) << 25)
   1486 #define   G_008F24_META_LINEAR(x)                                     (((x) >> 25) & 0x1)
   1487 #define   C_008F24_META_LINEAR                                        0xFDFFFFFF
   1488 #define   S_008F24_META_PIPE_ALIGNED(x)                               (((unsigned)(x) & 0x1) << 26)
   1489 #define   G_008F24_META_PIPE_ALIGNED(x)                               (((x) >> 26) & 0x1)
   1490 #define   C_008F24_META_PIPE_ALIGNED                                  0xFBFFFFFF
   1491 #define   S_008F24_META_RB_ALIGNED(x)                                 (((unsigned)(x) & 0x1) << 27)
   1492 #define   G_008F24_META_RB_ALIGNED(x)                                 (((x) >> 27) & 0x1)
   1493 #define   C_008F24_META_RB_ALIGNED                                    0xF7FFFFFF
   1494 #define   S_008F24_MAX_MIP(x)                                         (((unsigned)(x) & 0x0F) << 28)
   1495 #define   G_008F24_MAX_MIP(x)                                         (((x) >> 28) & 0x0F)
   1496 #define   C_008F24_MAX_MIP                                            0x0FFFFFFF
   1497 #define R_008F28_SQ_IMG_RSRC_WORD6                                      0x008F28
   1498 #define   S_008F28_MIN_LOD_WARN(x)                                    (((unsigned)(x) & 0xFFF) << 0)
   1499 #define   G_008F28_MIN_LOD_WARN(x)                                    (((x) >> 0) & 0xFFF)
   1500 #define   C_008F28_MIN_LOD_WARN                                       0xFFFFF000
   1501 #define   S_008F28_COUNTER_BANK_ID(x)                                 (((unsigned)(x) & 0xFF) << 12)
   1502 #define   G_008F28_COUNTER_BANK_ID(x)                                 (((x) >> 12) & 0xFF)
   1503 #define   C_008F28_COUNTER_BANK_ID                                    0xFFF00FFF
   1504 #define   S_008F28_LOD_HDW_CNT_EN(x)                                  (((unsigned)(x) & 0x1) << 20)
   1505 #define   G_008F28_LOD_HDW_CNT_EN(x)                                  (((x) >> 20) & 0x1)
   1506 #define   C_008F28_LOD_HDW_CNT_EN                                     0xFFEFFFFF
   1507 #define   S_008F28_COMPRESSION_EN(x)                                  (((unsigned)(x) & 0x1) << 21)
   1508 #define   G_008F28_COMPRESSION_EN(x)                                  (((x) >> 21) & 0x1)
   1509 #define   C_008F28_COMPRESSION_EN                                     0xFFDFFFFF
   1510 #define   S_008F28_ALPHA_IS_ON_MSB(x)                                 (((unsigned)(x) & 0x1) << 22)
   1511 #define   G_008F28_ALPHA_IS_ON_MSB(x)                                 (((x) >> 22) & 0x1)
   1512 #define   C_008F28_ALPHA_IS_ON_MSB                                    0xFFBFFFFF
   1513 #define   S_008F28_COLOR_TRANSFORM(x)                                 (((unsigned)(x) & 0x1) << 23)
   1514 #define   G_008F28_COLOR_TRANSFORM(x)                                 (((x) >> 23) & 0x1)
   1515 #define   C_008F28_COLOR_TRANSFORM                                    0xFF7FFFFF
   1516 #define   S_008F28_LOST_ALPHA_BITS(x)                                 (((unsigned)(x) & 0x0F) << 24)
   1517 #define   G_008F28_LOST_ALPHA_BITS(x)                                 (((x) >> 24) & 0x0F)
   1518 #define   C_008F28_LOST_ALPHA_BITS                                    0xF0FFFFFF
   1519 #define   S_008F28_LOST_COLOR_BITS(x)                                 (((unsigned)(x) & 0x0F) << 28)
   1520 #define   G_008F28_LOST_COLOR_BITS(x)                                 (((x) >> 28) & 0x0F)
   1521 #define   C_008F28_LOST_COLOR_BITS                                    0x0FFFFFFF
   1522 #define R_008F2C_SQ_IMG_RSRC_WORD7                                      0x008F2C
   1523 #define R_008F30_SQ_IMG_SAMP_WORD0                                      0x008F30
   1524 #define   S_008F30_CLAMP_X(x)                                         (((unsigned)(x) & 0x07) << 0)
   1525 #define   G_008F30_CLAMP_X(x)                                         (((x) >> 0) & 0x07)
   1526 #define   C_008F30_CLAMP_X                                            0xFFFFFFF8
   1527 #define   S_008F30_CLAMP_Y(x)                                         (((unsigned)(x) & 0x07) << 3)
   1528 #define   G_008F30_CLAMP_Y(x)                                         (((x) >> 3) & 0x07)
   1529 #define   C_008F30_CLAMP_Y                                            0xFFFFFFC7
   1530 #define   S_008F30_CLAMP_Z(x)                                         (((unsigned)(x) & 0x07) << 6)
   1531 #define   G_008F30_CLAMP_Z(x)                                         (((x) >> 6) & 0x07)
   1532 #define   C_008F30_CLAMP_Z                                            0xFFFFFE3F
   1533 #define   S_008F30_MAX_ANISO_RATIO(x)                                 (((unsigned)(x) & 0x07) << 9)
   1534 #define   G_008F30_MAX_ANISO_RATIO(x)                                 (((x) >> 9) & 0x07)
   1535 #define   C_008F30_MAX_ANISO_RATIO                                    0xFFFFF1FF
   1536 #define   S_008F30_DEPTH_COMPARE_FUNC(x)                              (((unsigned)(x) & 0x07) << 12)
   1537 #define   G_008F30_DEPTH_COMPARE_FUNC(x)                              (((x) >> 12) & 0x07)
   1538 #define   C_008F30_DEPTH_COMPARE_FUNC                                 0xFFFF8FFF
   1539 #define   S_008F30_FORCE_UNNORMALIZED(x)                              (((unsigned)(x) & 0x1) << 15)
   1540 #define   G_008F30_FORCE_UNNORMALIZED(x)                              (((x) >> 15) & 0x1)
   1541 #define   C_008F30_FORCE_UNNORMALIZED                                 0xFFFF7FFF
   1542 #define   S_008F30_ANISO_THRESHOLD(x)                                 (((unsigned)(x) & 0x07) << 16)
   1543 #define   G_008F30_ANISO_THRESHOLD(x)                                 (((x) >> 16) & 0x07)
   1544 #define   C_008F30_ANISO_THRESHOLD                                    0xFFF8FFFF
   1545 #define   S_008F30_MC_COORD_TRUNC(x)                                  (((unsigned)(x) & 0x1) << 19)
   1546 #define   G_008F30_MC_COORD_TRUNC(x)                                  (((x) >> 19) & 0x1)
   1547 #define   C_008F30_MC_COORD_TRUNC                                     0xFFF7FFFF
   1548 #define   S_008F30_FORCE_DEGAMMA(x)                                   (((unsigned)(x) & 0x1) << 20)
   1549 #define   G_008F30_FORCE_DEGAMMA(x)                                   (((x) >> 20) & 0x1)
   1550 #define   C_008F30_FORCE_DEGAMMA                                      0xFFEFFFFF
   1551 #define   S_008F30_ANISO_BIAS(x)                                      (((unsigned)(x) & 0x3F) << 21)
   1552 #define   G_008F30_ANISO_BIAS(x)                                      (((x) >> 21) & 0x3F)
   1553 #define   C_008F30_ANISO_BIAS                                         0xF81FFFFF
   1554 #define   S_008F30_TRUNC_COORD(x)                                     (((unsigned)(x) & 0x1) << 27)
   1555 #define   G_008F30_TRUNC_COORD(x)                                     (((x) >> 27) & 0x1)
   1556 #define   C_008F30_TRUNC_COORD                                        0xF7FFFFFF
   1557 #define   S_008F30_DISABLE_CUBE_WRAP(x)                               (((unsigned)(x) & 0x1) << 28)
   1558 #define   G_008F30_DISABLE_CUBE_WRAP(x)                               (((x) >> 28) & 0x1)
   1559 #define   C_008F30_DISABLE_CUBE_WRAP                                  0xEFFFFFFF
   1560 #define   S_008F30_FILTER_MODE(x)                                     (((unsigned)(x) & 0x03) << 29)
   1561 #define   G_008F30_FILTER_MODE(x)                                     (((x) >> 29) & 0x03)
   1562 #define   C_008F30_FILTER_MODE                                        0x9FFFFFFF
   1563 #define   S_008F30_COMPAT_MODE(x)                                     (((unsigned)(x) & 0x1) << 31)
   1564 #define   G_008F30_COMPAT_MODE(x)                                     (((x) >> 31) & 0x1)
   1565 #define   C_008F30_COMPAT_MODE                                        0x7FFFFFFF
   1566 #define R_008F34_SQ_IMG_SAMP_WORD1                                      0x008F34
   1567 #define   S_008F34_MIN_LOD(x)                                         (((unsigned)(x) & 0xFFF) << 0)
   1568 #define   G_008F34_MIN_LOD(x)                                         (((x) >> 0) & 0xFFF)
   1569 #define   C_008F34_MIN_LOD                                            0xFFFFF000
   1570 #define   S_008F34_MAX_LOD(x)                                         (((unsigned)(x) & 0xFFF) << 12)
   1571 #define   G_008F34_MAX_LOD(x)                                         (((x) >> 12) & 0xFFF)
   1572 #define   C_008F34_MAX_LOD                                            0xFF000FFF
   1573 #define   S_008F34_PERF_MIP(x)                                        (((unsigned)(x) & 0x0F) << 24)
   1574 #define   G_008F34_PERF_MIP(x)                                        (((x) >> 24) & 0x0F)
   1575 #define   C_008F34_PERF_MIP                                           0xF0FFFFFF
   1576 #define   S_008F34_PERF_Z(x)                                          (((unsigned)(x) & 0x0F) << 28)
   1577 #define   G_008F34_PERF_Z(x)                                          (((x) >> 28) & 0x0F)
   1578 #define   C_008F34_PERF_Z                                             0x0FFFFFFF
   1579 #define R_008F38_SQ_IMG_SAMP_WORD2                                      0x008F38
   1580 #define   S_008F38_LOD_BIAS(x)                                        (((unsigned)(x) & 0x3FFF) << 0)
   1581 #define   G_008F38_LOD_BIAS(x)                                        (((x) >> 0) & 0x3FFF)
   1582 #define   C_008F38_LOD_BIAS                                           0xFFFFC000
   1583 #define   S_008F38_LOD_BIAS_SEC(x)                                    (((unsigned)(x) & 0x3F) << 14)
   1584 #define   G_008F38_LOD_BIAS_SEC(x)                                    (((x) >> 14) & 0x3F)
   1585 #define   C_008F38_LOD_BIAS_SEC                                       0xFFF03FFF
   1586 #define   S_008F38_XY_MAG_FILTER(x)                                   (((unsigned)(x) & 0x03) << 20)
   1587 #define   G_008F38_XY_MAG_FILTER(x)                                   (((x) >> 20) & 0x03)
   1588 #define   C_008F38_XY_MAG_FILTER                                      0xFFCFFFFF
   1589 #define   S_008F38_XY_MIN_FILTER(x)                                   (((unsigned)(x) & 0x03) << 22)
   1590 #define   G_008F38_XY_MIN_FILTER(x)                                   (((x) >> 22) & 0x03)
   1591 #define   C_008F38_XY_MIN_FILTER                                      0xFF3FFFFF
   1592 #define   S_008F38_Z_FILTER(x)                                        (((unsigned)(x) & 0x03) << 24)
   1593 #define   G_008F38_Z_FILTER(x)                                        (((x) >> 24) & 0x03)
   1594 #define   C_008F38_Z_FILTER                                           0xFCFFFFFF
   1595 #define   S_008F38_MIP_FILTER(x)                                      (((unsigned)(x) & 0x03) << 26)
   1596 #define   G_008F38_MIP_FILTER(x)                                      (((x) >> 26) & 0x03)
   1597 #define   C_008F38_MIP_FILTER                                         0xF3FFFFFF
   1598 #define   S_008F38_MIP_POINT_PRECLAMP(x)                              (((unsigned)(x) & 0x1) << 28)
   1599 #define   G_008F38_MIP_POINT_PRECLAMP(x)                              (((x) >> 28) & 0x1)
   1600 #define   C_008F38_MIP_POINT_PRECLAMP                                 0xEFFFFFFF
   1601 #define   S_008F38_BLEND_ZERO_PRT(x)                                  (((unsigned)(x) & 0x1) << 29)
   1602 #define   G_008F38_BLEND_ZERO_PRT(x)                                  (((x) >> 29) & 0x1)
   1603 #define   C_008F38_BLEND_ZERO_PRT                                     0xDFFFFFFF
   1604 #define   S_008F38_FILTER_PREC_FIX(x)                                 (((unsigned)(x) & 0x1) << 30)
   1605 #define   G_008F38_FILTER_PREC_FIX(x)                                 (((x) >> 30) & 0x1)
   1606 #define   C_008F38_FILTER_PREC_FIX                                    0xBFFFFFFF
   1607 #define   S_008F38_ANISO_OVERRIDE(x)                                  (((unsigned)(x) & 0x1) << 31)
   1608 #define   G_008F38_ANISO_OVERRIDE(x)                                  (((x) >> 31) & 0x1)
   1609 #define   C_008F38_ANISO_OVERRIDE                                     0x7FFFFFFF
   1610 #define R_008F3C_SQ_IMG_SAMP_WORD3                                      0x008F3C
   1611 #define   S_008F3C_BORDER_COLOR_PTR(x)                                (((unsigned)(x) & 0xFFF) << 0)
   1612 #define   G_008F3C_BORDER_COLOR_PTR(x)                                (((x) >> 0) & 0xFFF)
   1613 #define   C_008F3C_BORDER_COLOR_PTR                                   0xFFFFF000
   1614 #define   S_008F3C_SKIP_DEGAMMA(x)                                    (((unsigned)(x) & 0x1) << 12)
   1615 #define   G_008F3C_SKIP_DEGAMMA(x)                                    (((x) >> 12) & 0x1)
   1616 #define   C_008F3C_SKIP_DEGAMMA                                       0xFFFFEFFF
   1617 #define   S_008F3C_BORDER_COLOR_TYPE(x)                               (((unsigned)(x) & 0x03) << 30)
   1618 #define   G_008F3C_BORDER_COLOR_TYPE(x)                               (((x) >> 30) & 0x03)
   1619 #define   C_008F3C_BORDER_COLOR_TYPE                                  0x3FFFFFFF
   1620 #define R_030FF8_DB_ZPASS_COUNT_LOW                                     0x030FF8
   1621 #define R_030FFC_DB_ZPASS_COUNT_HI                                      0x030FFC
   1622 #define   S_030FFC_COUNT_HI(x)                                        (((unsigned)(x) & 0x7FFFFFFF) << 0)
   1623 #define   G_030FFC_COUNT_HI(x)                                        (((x) >> 0) & 0x7FFFFFFF)
   1624 #define   C_030FFC_COUNT_HI                                           0x80000000
   1625 #define R_031100_SPI_CONFIG_CNTL                                        0x031100
   1626 #define   S_031100_GPR_WRITE_PRIORITY(x)                              (((unsigned)(x) & 0x1FFFFF) << 0)
   1627 #define   G_031100_GPR_WRITE_PRIORITY(x)                              (((x) >> 0) & 0x1FFFFF)
   1628 #define   C_031100_GPR_WRITE_PRIORITY                                 0xFFE00000
   1629 #define   S_031100_EXP_PRIORITY_ORDER(x)                              (((unsigned)(x) & 0x07) << 21)
   1630 #define   G_031100_EXP_PRIORITY_ORDER(x)                              (((x) >> 21) & 0x07)
   1631 #define   C_031100_EXP_PRIORITY_ORDER                                 0xFF1FFFFF
   1632 #define   S_031100_ENABLE_SQG_TOP_EVENTS(x)                           (((unsigned)(x) & 0x1) << 24)
   1633 #define   G_031100_ENABLE_SQG_TOP_EVENTS(x)                           (((x) >> 24) & 0x1)
   1634 #define   C_031100_ENABLE_SQG_TOP_EVENTS                              0xFEFFFFFF
   1635 #define   S_031100_ENABLE_SQG_BOP_EVENTS(x)                           (((unsigned)(x) & 0x1) << 25)
   1636 #define   G_031100_ENABLE_SQG_BOP_EVENTS(x)                           (((x) >> 25) & 0x1)
   1637 #define   C_031100_ENABLE_SQG_BOP_EVENTS                              0xFDFFFFFF
   1638 #define   S_031100_RSRC_MGMT_RESET(x)                                 (((unsigned)(x) & 0x1) << 26)
   1639 #define   G_031100_RSRC_MGMT_RESET(x)                                 (((x) >> 26) & 0x1)
   1640 #define   C_031100_RSRC_MGMT_RESET                                    0xFBFFFFFF
   1641 #define   S_031100_TTRACE_STALL_ALL(x)                                (((unsigned)(x) & 0x1) << 27)
   1642 #define   G_031100_TTRACE_STALL_ALL(x)                                (((x) >> 27) & 0x1)
   1643 #define   C_031100_TTRACE_STALL_ALL                                   0xF7FFFFFF
   1644 #define   S_031100_ALLOC_ARB_LRU_ENA(x)                               (((unsigned)(x) & 0x1) << 28)
   1645 #define   G_031100_ALLOC_ARB_LRU_ENA(x)                               (((x) >> 28) & 0x1)
   1646 #define   C_031100_ALLOC_ARB_LRU_ENA                                  0xEFFFFFFF
   1647 #define   S_031100_EXP_ARB_LRU_ENA(x)                                 (((unsigned)(x) & 0x1) << 29)
   1648 #define   G_031100_EXP_ARB_LRU_ENA(x)                                 (((x) >> 29) & 0x1)
   1649 #define   C_031100_EXP_ARB_LRU_ENA                                    0xDFFFFFFF
   1650 #define   S_031100_PS_PKR_PRIORITY_CNTL(x)                            (((unsigned)(x) & 0x03) << 30)
   1651 #define   G_031100_PS_PKR_PRIORITY_CNTL(x)                            (((x) >> 30) & 0x03)
   1652 #define   C_031100_PS_PKR_PRIORITY_CNTL                               0x3FFFFFFF
   1653 #define R_031104_SPI_CONFIG_CNTL_1                                      0x031104
   1654 #define   S_031104_VTX_DONE_DELAY(x)                                  (((unsigned)(x) & 0x0F) << 0)
   1655 #define   G_031104_VTX_DONE_DELAY(x)                                  (((x) >> 0) & 0x0F)
   1656 #define   C_031104_VTX_DONE_DELAY                                     0xFFFFFFF0
   1657 #define   S_031104_INTERP_ONE_PRIM_PER_ROW(x)                         (((unsigned)(x) & 0x1) << 4)
   1658 #define   G_031104_INTERP_ONE_PRIM_PER_ROW(x)                         (((x) >> 4) & 0x1)
   1659 #define   C_031104_INTERP_ONE_PRIM_PER_ROW                            0xFFFFFFEF
   1660 #define   S_031104_BATON_RESET_DISABLE(x)                             (((unsigned)(x) & 0x1) << 5)
   1661 #define   G_031104_BATON_RESET_DISABLE(x)                             (((x) >> 5) & 0x1)
   1662 #define   C_031104_BATON_RESET_DISABLE                                0xFFFFFFDF
   1663 #define   S_031104_PC_LIMIT_ENABLE(x)                                 (((unsigned)(x) & 0x1) << 6)
   1664 #define   G_031104_PC_LIMIT_ENABLE(x)                                 (((x) >> 6) & 0x1)
   1665 #define   C_031104_PC_LIMIT_ENABLE                                    0xFFFFFFBF
   1666 #define   S_031104_PC_LIMIT_STRICT(x)                                 (((unsigned)(x) & 0x1) << 7)
   1667 #define   G_031104_PC_LIMIT_STRICT(x)                                 (((x) >> 7) & 0x1)
   1668 #define   C_031104_PC_LIMIT_STRICT                                    0xFFFFFF7F
   1669 #define   S_031104_CRC_SIMD_ID_WADDR_DISABLE(x)                       (((unsigned)(x) & 0x1) << 8)
   1670 #define   G_031104_CRC_SIMD_ID_WADDR_DISABLE(x)                       (((x) >> 8) & 0x1)
   1671 #define   C_031104_CRC_SIMD_ID_WADDR_DISABLE                          0xFFFFFEFF
   1672 #define   S_031104_LBPW_CU_CHK_MODE(x)                                (((unsigned)(x) & 0x1) << 9)
   1673 #define   G_031104_LBPW_CU_CHK_MODE(x)                                (((x) >> 9) & 0x1)
   1674 #define   C_031104_LBPW_CU_CHK_MODE                                   0xFFFFFDFF
   1675 #define   S_031104_LBPW_CU_CHK_CNT(x)                                 (((unsigned)(x) & 0x0F) << 10)
   1676 #define   G_031104_LBPW_CU_CHK_CNT(x)                                 (((x) >> 10) & 0x0F)
   1677 #define   C_031104_LBPW_CU_CHK_CNT                                    0xFFFFC3FF
   1678 #define   S_031104_CSC_PWR_SAVE_DISABLE(x)                            (((unsigned)(x) & 0x1) << 14)
   1679 #define   G_031104_CSC_PWR_SAVE_DISABLE(x)                            (((x) >> 14) & 0x1)
   1680 #define   C_031104_CSC_PWR_SAVE_DISABLE                               0xFFFFBFFF
   1681 #define   S_031104_CSG_PWR_SAVE_DISABLE(x)                            (((unsigned)(x) & 0x1) << 15)
   1682 #define   G_031104_CSG_PWR_SAVE_DISABLE(x)                            (((x) >> 15) & 0x1)
   1683 #define   C_031104_CSG_PWR_SAVE_DISABLE                               0xFFFF7FFF
   1684 #define   S_031104_PC_LIMIT_SIZE(x)                                   (((unsigned)(x) & 0xFFFF) << 16)
   1685 #define   G_031104_PC_LIMIT_SIZE(x)                                   (((x) >> 16) & 0xFFFF)
   1686 #define   C_031104_PC_LIMIT_SIZE                                      0x0000FFFF
   1687 #define R_031108_SPI_CONFIG_CNTL_2                                      0x031108
   1688 #define   S_031108_CONTEXT_SAVE_WAIT_GDS_REQUEST_CYCLE_OVHD(x)        (((unsigned)(x) & 0x0F) << 0)
   1689 #define   G_031108_CONTEXT_SAVE_WAIT_GDS_REQUEST_CYCLE_OVHD(x)        (((x) >> 0) & 0x0F)
   1690 #define   C_031108_CONTEXT_SAVE_WAIT_GDS_REQUEST_CYCLE_OVHD           0xFFFFFFF0
   1691 #define   S_031108_CONTEXT_SAVE_WAIT_GDS_GRANT_CYCLE_OVHD(x)          (((unsigned)(x) & 0x0F) << 4)
   1692 #define   G_031108_CONTEXT_SAVE_WAIT_GDS_GRANT_CYCLE_OVHD(x)          (((x) >> 4) & 0x0F)
   1693 #define   C_031108_CONTEXT_SAVE_WAIT_GDS_GRANT_CYCLE_OVHD             0xFFFFFF0F
   1694 #define R_0098F8_GB_ADDR_CONFIG                                         0x0098F8
   1695 #define   S_0098F8_NUM_PIPES(x)                                       (((unsigned)(x) & 0x07) << 0)
   1696 #define   G_0098F8_NUM_PIPES(x)                                       (((x) >> 0) & 0x07)
   1697 #define   C_0098F8_NUM_PIPES                                          0xFFFFFFF8
   1698 #define   S_0098F8_PIPE_INTERLEAVE_SIZE_GFX9(x)                       (((unsigned)(x) & 0x07) << 3)
   1699 #define   G_0098F8_PIPE_INTERLEAVE_SIZE_GFX9(x)                       (((x) >> 3) & 0x07)
   1700 #define   C_0098F8_PIPE_INTERLEAVE_SIZE_GFX9                          0xFFFFFFC7
   1701 #define   S_0098F8_MAX_COMPRESSED_FRAGS(x)                            (((unsigned)(x) & 0x03) << 6)
   1702 #define   G_0098F8_MAX_COMPRESSED_FRAGS(x)                            (((x) >> 6) & 0x03)
   1703 #define   C_0098F8_MAX_COMPRESSED_FRAGS                               0xFFFFFF3F
   1704 #define   S_0098F8_BANK_INTERLEAVE_SIZE(x)                            (((unsigned)(x) & 0x07) << 8)
   1705 #define   G_0098F8_BANK_INTERLEAVE_SIZE(x)                            (((x) >> 8) & 0x07)
   1706 #define   C_0098F8_BANK_INTERLEAVE_SIZE                               0xFFFFF8FF
   1707 #define   S_0098F8_NUM_BANKS(x)                                       (((unsigned)(x) & 0x07) << 12)
   1708 #define   G_0098F8_NUM_BANKS(x)                                       (((x) >> 12) & 0x07)
   1709 #define   C_0098F8_NUM_BANKS                                          0xFFFF8FFF
   1710 #define   S_0098F8_SHADER_ENGINE_TILE_SIZE(x)                         (((unsigned)(x) & 0x07) << 16)
   1711 #define   G_0098F8_SHADER_ENGINE_TILE_SIZE(x)                         (((x) >> 16) & 0x07)
   1712 #define   C_0098F8_SHADER_ENGINE_TILE_SIZE                            0xFFF8FFFF
   1713 #define   S_0098F8_NUM_SHADER_ENGINES_GFX9(x)                         (((unsigned)(x) & 0x03) << 19)
   1714 #define   G_0098F8_NUM_SHADER_ENGINES_GFX9(x)                         (((x) >> 19) & 0x03)
   1715 #define   C_0098F8_NUM_SHADER_ENGINES_GFX9                            0xFFE7FFFF
   1716 #define   S_0098F8_NUM_GPUS_GFX9(x)                                   (((unsigned)(x) & 0x07) << 21)
   1717 #define   G_0098F8_NUM_GPUS_GFX9(x)                                   (((x) >> 21) & 0x07)
   1718 #define   C_0098F8_NUM_GPUS_GFX9                                      0xFF1FFFFF
   1719 #define   S_0098F8_MULTI_GPU_TILE_SIZE(x)                             (((unsigned)(x) & 0x03) << 24)
   1720 #define   G_0098F8_MULTI_GPU_TILE_SIZE(x)                             (((x) >> 24) & 0x03)
   1721 #define   C_0098F8_MULTI_GPU_TILE_SIZE                                0xFCFFFFFF
   1722 #define   S_0098F8_NUM_RB_PER_SE(x)                                   (((unsigned)(x) & 0x03) << 26)
   1723 #define   G_0098F8_NUM_RB_PER_SE(x)                                   (((x) >> 26) & 0x03)
   1724 #define   C_0098F8_NUM_RB_PER_SE                                      0xF3FFFFFF
   1725 #define   S_0098F8_ROW_SIZE(x)                                        (((unsigned)(x) & 0x03) << 28)
   1726 #define   G_0098F8_ROW_SIZE(x)                                        (((x) >> 28) & 0x03)
   1727 #define   C_0098F8_ROW_SIZE                                           0xCFFFFFFF
   1728 #define   S_0098F8_NUM_LOWER_PIPES(x)                                 (((unsigned)(x) & 0x1) << 30)
   1729 #define   G_0098F8_NUM_LOWER_PIPES(x)                                 (((x) >> 30) & 0x1)
   1730 #define   C_0098F8_NUM_LOWER_PIPES                                    0xBFFFFFFF
   1731 #define   S_0098F8_SE_ENABLE(x)                                       (((unsigned)(x) & 0x1) << 31)
   1732 #define   G_0098F8_SE_ENABLE(x)                                       (((x) >> 31) & 0x1)
   1733 #define   C_0098F8_SE_ENABLE                                          0x7FFFFFFF
   1734 #define R_009910_GB_TILE_MODE0                                          0x009910
   1735 #define   S_009910_ARRAY_MODE(x)                                      (((unsigned)(x) & 0x0F) << 2)
   1736 #define   G_009910_ARRAY_MODE(x)                                      (((x) >> 2) & 0x0F)
   1737 #define   C_009910_ARRAY_MODE                                         0xFFFFFFC3
   1738 #define   S_009910_PIPE_CONFIG(x)                                     (((unsigned)(x) & 0x1F) << 6)
   1739 #define   G_009910_PIPE_CONFIG(x)                                     (((x) >> 6) & 0x1F)
   1740 #define   C_009910_PIPE_CONFIG                                        0xFFFFF83F
   1741 #define   S_009910_TILE_SPLIT(x)                                      (((unsigned)(x) & 0x07) << 11)
   1742 #define   G_009910_TILE_SPLIT(x)                                      (((x) >> 11) & 0x07)
   1743 #define   C_009910_TILE_SPLIT                                         0xFFFFC7FF
   1744 #define   S_009910_MICRO_TILE_MODE_NEW(x)                             (((unsigned)(x) & 0x07) << 22)
   1745 #define   G_009910_MICRO_TILE_MODE_NEW(x)                             (((x) >> 22) & 0x07)
   1746 #define   C_009910_MICRO_TILE_MODE_NEW                                0xFE3FFFFF
   1747 #define   S_009910_SAMPLE_SPLIT(x)                                    (((unsigned)(x) & 0x03) << 25)
   1748 #define   G_009910_SAMPLE_SPLIT(x)                                    (((x) >> 25) & 0x03)
   1749 #define   C_009910_SAMPLE_SPLIT                                       0xF9FFFFFF
   1750 #define R_009914_GB_TILE_MODE1                                          0x009914
   1751 #define R_009918_GB_TILE_MODE2                                          0x009918
   1752 #define R_00991C_GB_TILE_MODE3                                          0x00991C
   1753 #define R_009920_GB_TILE_MODE4                                          0x009920
   1754 #define R_009924_GB_TILE_MODE5                                          0x009924
   1755 #define R_009928_GB_TILE_MODE6                                          0x009928
   1756 #define R_00992C_GB_TILE_MODE7                                          0x00992C
   1757 #define R_009930_GB_TILE_MODE8                                          0x009930
   1758 #define R_009934_GB_TILE_MODE9                                          0x009934
   1759 #define R_009938_GB_TILE_MODE10                                         0x009938
   1760 #define R_00993C_GB_TILE_MODE11                                         0x00993C
   1761 #define R_009940_GB_TILE_MODE12                                         0x009940
   1762 #define R_009944_GB_TILE_MODE13                                         0x009944
   1763 #define R_009948_GB_TILE_MODE14                                         0x009948
   1764 #define R_00994C_GB_TILE_MODE15                                         0x00994C
   1765 #define R_009950_GB_TILE_MODE16                                         0x009950
   1766 #define R_009954_GB_TILE_MODE17                                         0x009954
   1767 #define R_009958_GB_TILE_MODE18                                         0x009958
   1768 #define R_00995C_GB_TILE_MODE19                                         0x00995C
   1769 #define R_009960_GB_TILE_MODE20                                         0x009960
   1770 #define R_009964_GB_TILE_MODE21                                         0x009964
   1771 #define R_009968_GB_TILE_MODE22                                         0x009968
   1772 #define R_00996C_GB_TILE_MODE23                                         0x00996C
   1773 #define R_009970_GB_TILE_MODE24                                         0x009970
   1774 #define R_009974_GB_TILE_MODE25                                         0x009974
   1775 #define R_009978_GB_TILE_MODE26                                         0x009978
   1776 #define R_00997C_GB_TILE_MODE27                                         0x00997C
   1777 #define R_009980_GB_TILE_MODE28                                         0x009980
   1778 #define R_009984_GB_TILE_MODE29                                         0x009984
   1779 #define R_009988_GB_TILE_MODE30                                         0x009988
   1780 #define R_00998C_GB_TILE_MODE31                                         0x00998C
   1781 #define R_009990_GB_MACROTILE_MODE0                                     0x009990
   1782 #define   S_009990_BANK_WIDTH(x)                                      (((unsigned)(x) & 0x03) << 0)
   1783 #define   G_009990_BANK_WIDTH(x)                                      (((x) >> 0) & 0x03)
   1784 #define   C_009990_BANK_WIDTH                                         0xFFFFFFFC
   1785 #define   S_009990_BANK_HEIGHT(x)                                     (((unsigned)(x) & 0x03) << 2)
   1786 #define   G_009990_BANK_HEIGHT(x)                                     (((x) >> 2) & 0x03)
   1787 #define   C_009990_BANK_HEIGHT                                        0xFFFFFFF3
   1788 #define   S_009990_MACRO_TILE_ASPECT(x)                               (((unsigned)(x) & 0x03) << 4)
   1789 #define   G_009990_MACRO_TILE_ASPECT(x)                               (((x) >> 4) & 0x03)
   1790 #define   C_009990_MACRO_TILE_ASPECT                                  0xFFFFFFCF
   1791 #define   S_009990_NUM_BANKS(x)                                       (((unsigned)(x) & 0x03) << 6)
   1792 #define   G_009990_NUM_BANKS(x)                                       (((x) >> 6) & 0x03)
   1793 #define   C_009990_NUM_BANKS                                          0xFFFFFF3F
   1794 #define R_009994_GB_MACROTILE_MODE1                                     0x009994
   1795 #define R_009998_GB_MACROTILE_MODE2                                     0x009998
   1796 #define R_00999C_GB_MACROTILE_MODE3                                     0x00999C
   1797 #define R_0099A0_GB_MACROTILE_MODE4                                     0x0099A0
   1798 #define R_0099A4_GB_MACROTILE_MODE5                                     0x0099A4
   1799 #define R_0099A8_GB_MACROTILE_MODE6                                     0x0099A8
   1800 #define R_0099AC_GB_MACROTILE_MODE7                                     0x0099AC
   1801 #define R_0099B0_GB_MACROTILE_MODE8                                     0x0099B0
   1802 #define R_0099B4_GB_MACROTILE_MODE9                                     0x0099B4
   1803 #define R_0099B8_GB_MACROTILE_MODE10                                    0x0099B8
   1804 #define R_0099BC_GB_MACROTILE_MODE11                                    0x0099BC
   1805 #define R_0099C0_GB_MACROTILE_MODE12                                    0x0099C0
   1806 #define R_0099C4_GB_MACROTILE_MODE13                                    0x0099C4
   1807 #define R_0099C8_GB_MACROTILE_MODE14                                    0x0099C8
   1808 #define R_0099CC_GB_MACROTILE_MODE15                                    0x0099CC
   1809 #define R_00B01C_SPI_SHADER_PGM_RSRC3_PS                                0x00B01C
   1810 #define   S_00B01C_CU_EN(x)                                           (((unsigned)(x) & 0xFFFF) << 0)
   1811 #define   G_00B01C_CU_EN(x)                                           (((x) >> 0) & 0xFFFF)
   1812 #define   C_00B01C_CU_EN                                              0xFFFF0000
   1813 #define   S_00B01C_WAVE_LIMIT(x)                                      (((unsigned)(x) & 0x3F) << 16)
   1814 #define   G_00B01C_WAVE_LIMIT(x)                                      (((x) >> 16) & 0x3F)
   1815 #define   C_00B01C_WAVE_LIMIT                                         0xFFC0FFFF
   1816 #define   S_00B01C_LOCK_LOW_THRESHOLD(x)                              (((unsigned)(x) & 0x0F) << 22)
   1817 #define   G_00B01C_LOCK_LOW_THRESHOLD(x)                              (((x) >> 22) & 0x0F)
   1818 #define   C_00B01C_LOCK_LOW_THRESHOLD                                 0xFC3FFFFF
   1819 #define   S_00B01C_SIMD_DISABLE(x)                                    (((unsigned)(x) & 0x0F) << 26)
   1820 #define   G_00B01C_SIMD_DISABLE(x)                                    (((x) >> 26) & 0x0F)
   1821 #define   C_00B01C_SIMD_DISABLE                                       0xC3FFFFFF
   1822 #define R_00B020_SPI_SHADER_PGM_LO_PS                                   0x00B020
   1823 #define R_00B024_SPI_SHADER_PGM_HI_PS                                   0x00B024
   1824 #define   S_00B024_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   1825 #define   G_00B024_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   1826 #define   C_00B024_MEM_BASE                                           0xFFFFFF00
   1827 #define R_00B028_SPI_SHADER_PGM_RSRC1_PS                                0x00B028
   1828 #define   S_00B028_VGPRS(x)                                           (((unsigned)(x) & 0x3F) << 0)
   1829 #define   G_00B028_VGPRS(x)                                           (((x) >> 0) & 0x3F)
   1830 #define   C_00B028_VGPRS                                              0xFFFFFFC0
   1831 #define   S_00B028_SGPRS(x)                                           (((unsigned)(x) & 0x0F) << 6)
   1832 #define   G_00B028_SGPRS(x)                                           (((x) >> 6) & 0x0F)
   1833 #define   C_00B028_SGPRS                                              0xFFFFFC3F
   1834 #define   S_00B028_PRIORITY(x)                                        (((unsigned)(x) & 0x03) << 10)
   1835 #define   G_00B028_PRIORITY(x)                                        (((x) >> 10) & 0x03)
   1836 #define   C_00B028_PRIORITY                                           0xFFFFF3FF
   1837 #define   S_00B028_FLOAT_MODE(x)                                      (((unsigned)(x) & 0xFF) << 12)
   1838 #define   G_00B028_FLOAT_MODE(x)                                      (((x) >> 12) & 0xFF)
   1839 #define   C_00B028_FLOAT_MODE                                         0xFFF00FFF
   1840 #define   S_00B028_PRIV(x)                                            (((unsigned)(x) & 0x1) << 20)
   1841 #define   G_00B028_PRIV(x)                                            (((x) >> 20) & 0x1)
   1842 #define   C_00B028_PRIV                                               0xFFEFFFFF
   1843 #define   S_00B028_DX10_CLAMP(x)                                      (((unsigned)(x) & 0x1) << 21)
   1844 #define   G_00B028_DX10_CLAMP(x)                                      (((x) >> 21) & 0x1)
   1845 #define   C_00B028_DX10_CLAMP                                         0xFFDFFFFF
   1846 #define   S_00B028_DEBUG_MODE(x)                                      (((unsigned)(x) & 0x1) << 22)
   1847 #define   G_00B028_DEBUG_MODE(x)                                      (((x) >> 22) & 0x1)
   1848 #define   C_00B028_DEBUG_MODE                                         0xFFBFFFFF
   1849 #define   S_00B028_IEEE_MODE(x)                                       (((unsigned)(x) & 0x1) << 23)
   1850 #define   G_00B028_IEEE_MODE(x)                                       (((x) >> 23) & 0x1)
   1851 #define   C_00B028_IEEE_MODE                                          0xFF7FFFFF
   1852 #define   S_00B028_CU_GROUP_DISABLE(x)                                (((unsigned)(x) & 0x1) << 24)
   1853 #define   G_00B028_CU_GROUP_DISABLE(x)                                (((x) >> 24) & 0x1)
   1854 #define   C_00B028_CU_GROUP_DISABLE                                   0xFEFFFFFF
   1855 #define   S_00B028_CDBG_USER(x)                                       (((unsigned)(x) & 0x1) << 28)
   1856 #define   G_00B028_CDBG_USER(x)                                       (((x) >> 28) & 0x1)
   1857 #define   C_00B028_CDBG_USER                                          0xEFFFFFFF
   1858 #define   S_00B028_FP16_OVFL(x)                                       (((unsigned)(x) & 0x1) << 29)
   1859 #define   G_00B028_FP16_OVFL(x)                                       (((x) >> 29) & 0x1)
   1860 #define   C_00B028_FP16_OVFL                                          0xDFFFFFFF
   1861 #define R_00B02C_SPI_SHADER_PGM_RSRC2_PS                                0x00B02C
   1862 #define   S_00B02C_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   1863 #define   G_00B02C_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   1864 #define   C_00B02C_SCRATCH_EN                                         0xFFFFFFFE
   1865 #define   S_00B02C_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   1866 #define   G_00B02C_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   1867 #define   C_00B02C_USER_SGPR                                          0xFFFFFFC1
   1868 #define   S_00B02C_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   1869 #define   G_00B02C_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   1870 #define   C_00B02C_TRAP_PRESENT                                       0xFFFFFFBF
   1871 #define   S_00B02C_WAVE_CNT_EN(x)                                     (((unsigned)(x) & 0x1) << 7)
   1872 #define   G_00B02C_WAVE_CNT_EN(x)                                     (((x) >> 7) & 0x1)
   1873 #define   C_00B02C_WAVE_CNT_EN                                        0xFFFFFF7F
   1874 #define   S_00B02C_EXTRA_LDS_SIZE(x)                                  (((unsigned)(x) & 0xFF) << 8)
   1875 #define   G_00B02C_EXTRA_LDS_SIZE(x)                                  (((x) >> 8) & 0xFF)
   1876 #define   C_00B02C_EXTRA_LDS_SIZE                                     0xFFFF00FF
   1877 #define   S_00B02C_EXCP_EN(x)                                         (((unsigned)(x) & 0x1FF) << 16)
   1878 #define   G_00B02C_EXCP_EN(x)                                         (((x) >> 16) & 0x1FF)
   1879 #define   C_00B02C_EXCP_EN                                            0xFE00FFFF
   1880 #define   S_00B02C_LOAD_COLLISION_WAVEID(x)                           (((unsigned)(x) & 0x1) << 25)
   1881 #define   G_00B02C_LOAD_COLLISION_WAVEID(x)                           (((x) >> 25) & 0x1)
   1882 #define   C_00B02C_LOAD_COLLISION_WAVEID                              0xFDFFFFFF
   1883 #define   S_00B02C_LOAD_INTRAWAVE_COLLISION(x)                        (((unsigned)(x) & 0x1) << 26)
   1884 #define   G_00B02C_LOAD_INTRAWAVE_COLLISION(x)                        (((x) >> 26) & 0x1)
   1885 #define   C_00B02C_LOAD_INTRAWAVE_COLLISION                           0xFBFFFFFF
   1886 #define   S_00B02C_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 27)
   1887 #define   G_00B02C_SKIP_USGPR0(x)                                     (((x) >> 27) & 0x1)
   1888 #define   C_00B02C_SKIP_USGPR0                                        0xF7FFFFFF
   1889 #define   S_00B02C_USER_SGPR_MSB(x)                                   (((unsigned)(x) & 0x1) << 28)
   1890 #define   G_00B02C_USER_SGPR_MSB(x)                                   (((x) >> 28) & 0x1)
   1891 #define   C_00B02C_USER_SGPR_MSB                                      0xEFFFFFFF
   1892 #define R_00B030_SPI_SHADER_USER_DATA_PS_0                              0x00B030
   1893 #define R_00B034_SPI_SHADER_USER_DATA_PS_1                              0x00B034
   1894 #define R_00B038_SPI_SHADER_USER_DATA_PS_2                              0x00B038
   1895 #define R_00B03C_SPI_SHADER_USER_DATA_PS_3                              0x00B03C
   1896 #define R_00B040_SPI_SHADER_USER_DATA_PS_4                              0x00B040
   1897 #define R_00B044_SPI_SHADER_USER_DATA_PS_5                              0x00B044
   1898 #define R_00B048_SPI_SHADER_USER_DATA_PS_6                              0x00B048
   1899 #define R_00B04C_SPI_SHADER_USER_DATA_PS_7                              0x00B04C
   1900 #define R_00B050_SPI_SHADER_USER_DATA_PS_8                              0x00B050
   1901 #define R_00B054_SPI_SHADER_USER_DATA_PS_9                              0x00B054
   1902 #define R_00B058_SPI_SHADER_USER_DATA_PS_10                             0x00B058
   1903 #define R_00B05C_SPI_SHADER_USER_DATA_PS_11                             0x00B05C
   1904 #define R_00B060_SPI_SHADER_USER_DATA_PS_12                             0x00B060
   1905 #define R_00B064_SPI_SHADER_USER_DATA_PS_13                             0x00B064
   1906 #define R_00B068_SPI_SHADER_USER_DATA_PS_14                             0x00B068
   1907 #define R_00B06C_SPI_SHADER_USER_DATA_PS_15                             0x00B06C
   1908 #define R_00B070_SPI_SHADER_USER_DATA_PS_16                             0x00B070
   1909 #define R_00B074_SPI_SHADER_USER_DATA_PS_17                             0x00B074
   1910 #define R_00B078_SPI_SHADER_USER_DATA_PS_18                             0x00B078
   1911 #define R_00B07C_SPI_SHADER_USER_DATA_PS_19                             0x00B07C
   1912 #define R_00B080_SPI_SHADER_USER_DATA_PS_20                             0x00B080
   1913 #define R_00B084_SPI_SHADER_USER_DATA_PS_21                             0x00B084
   1914 #define R_00B088_SPI_SHADER_USER_DATA_PS_22                             0x00B088
   1915 #define R_00B08C_SPI_SHADER_USER_DATA_PS_23                             0x00B08C
   1916 #define R_00B090_SPI_SHADER_USER_DATA_PS_24                             0x00B090
   1917 #define R_00B094_SPI_SHADER_USER_DATA_PS_25                             0x00B094
   1918 #define R_00B098_SPI_SHADER_USER_DATA_PS_26                             0x00B098
   1919 #define R_00B09C_SPI_SHADER_USER_DATA_PS_27                             0x00B09C
   1920 #define R_00B0A0_SPI_SHADER_USER_DATA_PS_28                             0x00B0A0
   1921 #define R_00B0A4_SPI_SHADER_USER_DATA_PS_29                             0x00B0A4
   1922 #define R_00B0A8_SPI_SHADER_USER_DATA_PS_30                             0x00B0A8
   1923 #define R_00B0AC_SPI_SHADER_USER_DATA_PS_31                             0x00B0AC
   1924 #define R_00B118_SPI_SHADER_PGM_RSRC3_VS                                0x00B118
   1925 #define   S_00B118_CU_EN(x)                                           (((unsigned)(x) & 0xFFFF) << 0)
   1926 #define   G_00B118_CU_EN(x)                                           (((x) >> 0) & 0xFFFF)
   1927 #define   C_00B118_CU_EN                                              0xFFFF0000
   1928 #define   S_00B118_WAVE_LIMIT(x)                                      (((unsigned)(x) & 0x3F) << 16)
   1929 #define   G_00B118_WAVE_LIMIT(x)                                      (((x) >> 16) & 0x3F)
   1930 #define   C_00B118_WAVE_LIMIT                                         0xFFC0FFFF
   1931 #define   S_00B118_LOCK_LOW_THRESHOLD(x)                              (((unsigned)(x) & 0x0F) << 22)
   1932 #define   G_00B118_LOCK_LOW_THRESHOLD(x)                              (((x) >> 22) & 0x0F)
   1933 #define   C_00B118_LOCK_LOW_THRESHOLD                                 0xFC3FFFFF
   1934 #define   S_00B118_SIMD_DISABLE(x)                                    (((unsigned)(x) & 0x0F) << 26)
   1935 #define   G_00B118_SIMD_DISABLE(x)                                    (((x) >> 26) & 0x0F)
   1936 #define   C_00B118_SIMD_DISABLE                                       0xC3FFFFFF
   1937 #define R_00B11C_SPI_SHADER_LATE_ALLOC_VS                               0x00B11C
   1938 #define   S_00B11C_LIMIT(x)                                           (((unsigned)(x) & 0x3F) << 0)
   1939 #define   G_00B11C_LIMIT(x)                                           (((x) >> 0) & 0x3F)
   1940 #define   C_00B11C_LIMIT                                              0xFFFFFFC0
   1941 #define R_00B120_SPI_SHADER_PGM_LO_VS                                   0x00B120
   1942 #define R_00B124_SPI_SHADER_PGM_HI_VS                                   0x00B124
   1943 #define   S_00B124_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   1944 #define   G_00B124_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   1945 #define   C_00B124_MEM_BASE                                           0xFFFFFF00
   1946 #define R_00B128_SPI_SHADER_PGM_RSRC1_VS                                0x00B128
   1947 #define   S_00B128_VGPRS(x)                                           (((unsigned)(x) & 0x3F) << 0)
   1948 #define   G_00B128_VGPRS(x)                                           (((x) >> 0) & 0x3F)
   1949 #define   C_00B128_VGPRS                                              0xFFFFFFC0
   1950 #define   S_00B128_SGPRS(x)                                           (((unsigned)(x) & 0x0F) << 6)
   1951 #define   G_00B128_SGPRS(x)                                           (((x) >> 6) & 0x0F)
   1952 #define   C_00B128_SGPRS                                              0xFFFFFC3F
   1953 #define   S_00B128_PRIORITY(x)                                        (((unsigned)(x) & 0x03) << 10)
   1954 #define   G_00B128_PRIORITY(x)                                        (((x) >> 10) & 0x03)
   1955 #define   C_00B128_PRIORITY                                           0xFFFFF3FF
   1956 #define   S_00B128_FLOAT_MODE(x)                                      (((unsigned)(x) & 0xFF) << 12)
   1957 #define   G_00B128_FLOAT_MODE(x)                                      (((x) >> 12) & 0xFF)
   1958 #define   C_00B128_FLOAT_MODE                                         0xFFF00FFF
   1959 #define   S_00B128_PRIV(x)                                            (((unsigned)(x) & 0x1) << 20)
   1960 #define   G_00B128_PRIV(x)                                            (((x) >> 20) & 0x1)
   1961 #define   C_00B128_PRIV                                               0xFFEFFFFF
   1962 #define   S_00B128_DX10_CLAMP(x)                                      (((unsigned)(x) & 0x1) << 21)
   1963 #define   G_00B128_DX10_CLAMP(x)                                      (((x) >> 21) & 0x1)
   1964 #define   C_00B128_DX10_CLAMP                                         0xFFDFFFFF
   1965 #define   S_00B128_DEBUG_MODE(x)                                      (((unsigned)(x) & 0x1) << 22)
   1966 #define   G_00B128_DEBUG_MODE(x)                                      (((x) >> 22) & 0x1)
   1967 #define   C_00B128_DEBUG_MODE                                         0xFFBFFFFF
   1968 #define   S_00B128_IEEE_MODE(x)                                       (((unsigned)(x) & 0x1) << 23)
   1969 #define   G_00B128_IEEE_MODE(x)                                       (((x) >> 23) & 0x1)
   1970 #define   C_00B128_IEEE_MODE                                          0xFF7FFFFF
   1971 #define   S_00B128_VGPR_COMP_CNT(x)                                   (((unsigned)(x) & 0x03) << 24)
   1972 #define   G_00B128_VGPR_COMP_CNT(x)                                   (((x) >> 24) & 0x03)
   1973 #define   C_00B128_VGPR_COMP_CNT                                      0xFCFFFFFF
   1974 #define   S_00B128_CU_GROUP_ENABLE(x)                                 (((unsigned)(x) & 0x1) << 26)
   1975 #define   G_00B128_CU_GROUP_ENABLE(x)                                 (((x) >> 26) & 0x1)
   1976 #define   C_00B128_CU_GROUP_ENABLE                                    0xFBFFFFFF
   1977 #define   S_00B128_CDBG_USER(x)                                       (((unsigned)(x) & 0x1) << 30)
   1978 #define   G_00B128_CDBG_USER(x)                                       (((x) >> 30) & 0x1)
   1979 #define   C_00B128_CDBG_USER                                          0xBFFFFFFF
   1980 #define   S_00B128_FP16_OVFL(x)                                       (((unsigned)(x) & 0x1) << 31)
   1981 #define   G_00B128_FP16_OVFL(x)                                       (((x) >> 31) & 0x1)
   1982 #define   C_00B128_FP16_OVFL                                          0x7FFFFFFF
   1983 #define R_00B12C_SPI_SHADER_PGM_RSRC2_VS                                0x00B12C
   1984 #define   S_00B12C_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   1985 #define   G_00B12C_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   1986 #define   C_00B12C_SCRATCH_EN                                         0xFFFFFFFE
   1987 #define   S_00B12C_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   1988 #define   G_00B12C_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   1989 #define   C_00B12C_USER_SGPR                                          0xFFFFFFC1
   1990 #define   S_00B12C_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   1991 #define   G_00B12C_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   1992 #define   C_00B12C_TRAP_PRESENT                                       0xFFFFFFBF
   1993 #define   S_00B12C_OC_LDS_EN(x)                                       (((unsigned)(x) & 0x1) << 7)
   1994 #define   G_00B12C_OC_LDS_EN(x)                                       (((x) >> 7) & 0x1)
   1995 #define   C_00B12C_OC_LDS_EN                                          0xFFFFFF7F
   1996 #define   S_00B12C_SO_BASE0_EN(x)                                     (((unsigned)(x) & 0x1) << 8)
   1997 #define   G_00B12C_SO_BASE0_EN(x)                                     (((x) >> 8) & 0x1)
   1998 #define   C_00B12C_SO_BASE0_EN                                        0xFFFFFEFF
   1999 #define   S_00B12C_SO_BASE1_EN(x)                                     (((unsigned)(x) & 0x1) << 9)
   2000 #define   G_00B12C_SO_BASE1_EN(x)                                     (((x) >> 9) & 0x1)
   2001 #define   C_00B12C_SO_BASE1_EN                                        0xFFFFFDFF
   2002 #define   S_00B12C_SO_BASE2_EN(x)                                     (((unsigned)(x) & 0x1) << 10)
   2003 #define   G_00B12C_SO_BASE2_EN(x)                                     (((x) >> 10) & 0x1)
   2004 #define   C_00B12C_SO_BASE2_EN                                        0xFFFFFBFF
   2005 #define   S_00B12C_SO_BASE3_EN(x)                                     (((unsigned)(x) & 0x1) << 11)
   2006 #define   G_00B12C_SO_BASE3_EN(x)                                     (((x) >> 11) & 0x1)
   2007 #define   C_00B12C_SO_BASE3_EN                                        0xFFFFF7FF
   2008 #define   S_00B12C_SO_EN(x)                                           (((unsigned)(x) & 0x1) << 12)
   2009 #define   G_00B12C_SO_EN(x)                                           (((x) >> 12) & 0x1)
   2010 #define   C_00B12C_SO_EN                                              0xFFFFEFFF
   2011 #define   S_00B12C_EXCP_EN(x)                                         (((unsigned)(x) & 0x1FF) << 13)
   2012 #define   G_00B12C_EXCP_EN(x)                                         (((x) >> 13) & 0x1FF)
   2013 #define   C_00B12C_EXCP_EN                                            0xFFC01FFF
   2014 #define   S_00B12C_PC_BASE_EN(x)                                      (((unsigned)(x) & 0x1) << 22)
   2015 #define   G_00B12C_PC_BASE_EN(x)                                      (((x) >> 22) & 0x1)
   2016 #define   C_00B12C_PC_BASE_EN                                         0xFFBFFFFF
   2017 #define   S_00B12C_DISPATCH_DRAW_EN(x)                                (((unsigned)(x) & 0x1) << 24)
   2018 #define   G_00B12C_DISPATCH_DRAW_EN(x)                                (((x) >> 24) & 0x1)
   2019 #define   C_00B12C_DISPATCH_DRAW_EN                                   0xFEFFFFFF
   2020 #define   S_00B12C_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 27)
   2021 #define   G_00B12C_SKIP_USGPR0(x)                                     (((x) >> 27) & 0x1)
   2022 #define   C_00B12C_SKIP_USGPR0                                        0xF7FFFFFF
   2023 #define   S_00B12C_USER_SGPR_MSB(x)                                   (((unsigned)(x) & 0x1) << 28)
   2024 #define   G_00B12C_USER_SGPR_MSB(x)                                   (((x) >> 28) & 0x1)
   2025 #define   C_00B12C_USER_SGPR_MSB                                      0xEFFFFFFF
   2026 #define R_00B130_SPI_SHADER_USER_DATA_VS_0                              0x00B130
   2027 #define R_00B134_SPI_SHADER_USER_DATA_VS_1                              0x00B134
   2028 #define R_00B138_SPI_SHADER_USER_DATA_VS_2                              0x00B138
   2029 #define R_00B13C_SPI_SHADER_USER_DATA_VS_3                              0x00B13C
   2030 #define R_00B140_SPI_SHADER_USER_DATA_VS_4                              0x00B140
   2031 #define R_00B144_SPI_SHADER_USER_DATA_VS_5                              0x00B144
   2032 #define R_00B148_SPI_SHADER_USER_DATA_VS_6                              0x00B148
   2033 #define R_00B14C_SPI_SHADER_USER_DATA_VS_7                              0x00B14C
   2034 #define R_00B150_SPI_SHADER_USER_DATA_VS_8                              0x00B150
   2035 #define R_00B154_SPI_SHADER_USER_DATA_VS_9                              0x00B154
   2036 #define R_00B158_SPI_SHADER_USER_DATA_VS_10                             0x00B158
   2037 #define R_00B15C_SPI_SHADER_USER_DATA_VS_11                             0x00B15C
   2038 #define R_00B160_SPI_SHADER_USER_DATA_VS_12                             0x00B160
   2039 #define R_00B164_SPI_SHADER_USER_DATA_VS_13                             0x00B164
   2040 #define R_00B168_SPI_SHADER_USER_DATA_VS_14                             0x00B168
   2041 #define R_00B16C_SPI_SHADER_USER_DATA_VS_15                             0x00B16C
   2042 #define R_00B170_SPI_SHADER_USER_DATA_VS_16                             0x00B170
   2043 #define R_00B174_SPI_SHADER_USER_DATA_VS_17                             0x00B174
   2044 #define R_00B178_SPI_SHADER_USER_DATA_VS_18                             0x00B178
   2045 #define R_00B17C_SPI_SHADER_USER_DATA_VS_19                             0x00B17C
   2046 #define R_00B180_SPI_SHADER_USER_DATA_VS_20                             0x00B180
   2047 #define R_00B184_SPI_SHADER_USER_DATA_VS_21                             0x00B184
   2048 #define R_00B188_SPI_SHADER_USER_DATA_VS_22                             0x00B188
   2049 #define R_00B18C_SPI_SHADER_USER_DATA_VS_23                             0x00B18C
   2050 #define R_00B190_SPI_SHADER_USER_DATA_VS_24                             0x00B190
   2051 #define R_00B194_SPI_SHADER_USER_DATA_VS_25                             0x00B194
   2052 #define R_00B198_SPI_SHADER_USER_DATA_VS_26                             0x00B198
   2053 #define R_00B19C_SPI_SHADER_USER_DATA_VS_27                             0x00B19C
   2054 #define R_00B1A0_SPI_SHADER_USER_DATA_VS_28                             0x00B1A0
   2055 #define R_00B1A4_SPI_SHADER_USER_DATA_VS_29                             0x00B1A4
   2056 #define R_00B1A8_SPI_SHADER_USER_DATA_VS_30                             0x00B1A8
   2057 #define R_00B1AC_SPI_SHADER_USER_DATA_VS_31                             0x00B1AC
   2058 #define R_00B1F0_SPI_SHADER_PGM_RSRC2_GS_VS                             0x00B1F0
   2059 #define   S_00B1F0_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   2060 #define   G_00B1F0_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   2061 #define   C_00B1F0_SCRATCH_EN                                         0xFFFFFFFE
   2062 #define   S_00B1F0_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   2063 #define   G_00B1F0_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   2064 #define   C_00B1F0_USER_SGPR                                          0xFFFFFFC1
   2065 #define   S_00B1F0_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   2066 #define   G_00B1F0_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   2067 #define   C_00B1F0_TRAP_PRESENT                                       0xFFFFFFBF
   2068 #define   S_00B1F0_EXCP_EN(x)                                         (((unsigned)(x) & 0x1FF) << 7)
   2069 #define   G_00B1F0_EXCP_EN(x)                                         (((x) >> 7) & 0x1FF)
   2070 #define   C_00B1F0_EXCP_EN                                            0xFFFF007F
   2071 #define   S_00B1F0_VGPR_COMP_CNT(x)                                   (((unsigned)(x) & 0x03) << 16)
   2072 #define   G_00B1F0_VGPR_COMP_CNT(x)                                   (((x) >> 16) & 0x03)
   2073 #define   C_00B1F0_VGPR_COMP_CNT                                      0xFFFCFFFF
   2074 #define   S_00B1F0_OC_LDS_EN(x)                                       (((unsigned)(x) & 0x1) << 18)
   2075 #define   G_00B1F0_OC_LDS_EN(x)                                       (((x) >> 18) & 0x1)
   2076 #define   C_00B1F0_OC_LDS_EN                                          0xFFFBFFFF
   2077 #define   S_00B1F0_LDS_SIZE(x)                                        (((unsigned)(x) & 0xFF) << 19)
   2078 #define   G_00B1F0_LDS_SIZE(x)                                        (((x) >> 19) & 0xFF)
   2079 #define   C_00B1F0_LDS_SIZE                                           0xF807FFFF
   2080 #define   S_00B1F0_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 27)
   2081 #define   G_00B1F0_SKIP_USGPR0(x)                                     (((x) >> 27) & 0x1)
   2082 #define   C_00B1F0_SKIP_USGPR0                                        0xF7FFFFFF
   2083 #define   S_00B1F0_USER_SGPR_MSB(x)                                   (((unsigned)(x) & 0x1) << 28)
   2084 #define   G_00B1F0_USER_SGPR_MSB(x)                                   (((x) >> 28) & 0x1)
   2085 #define   C_00B1F0_USER_SGPR_MSB                                      0xEFFFFFFF
   2086 #define R_00B204_SPI_SHADER_PGM_RSRC4_GS                                0x00B204
   2087 #define   S_00B204_GROUP_FIFO_DEPTH(x)                                (((unsigned)(x) & 0x7F) << 0)
   2088 #define   G_00B204_GROUP_FIFO_DEPTH(x)                                (((x) >> 0) & 0x7F)
   2089 #define   C_00B204_GROUP_FIFO_DEPTH                                   0xFFFFFF80
   2090 #define   S_00B204_SPI_SHADER_LATE_ALLOC_GS(x)                        (((unsigned)(x) & 0x7F) << 7)
   2091 #define   G_00B204_SPI_SHADER_LATE_ALLOC_GS(x)                        (((x) >> 7) & 0x7F)
   2092 #define   C_00B204_SPI_SHADER_LATE_ALLOC_GS                           0xFFFFC07F
   2093 #define R_00B208_SPI_SHADER_USER_DATA_ADDR_LO_GS                        0x00B208
   2094 #define R_00B20C_SPI_SHADER_USER_DATA_ADDR_HI_GS                        0x00B20C
   2095 #define R_00B210_SPI_SHADER_PGM_LO_ES                                   0x00B210
   2096 #define R_00B214_SPI_SHADER_PGM_HI_ES                                   0x00B214
   2097 #define   S_00B214_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   2098 #define   G_00B214_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   2099 #define   C_00B214_MEM_BASE                                           0xFFFFFF00
   2100 #define R_00B21C_SPI_SHADER_PGM_RSRC3_GS                                0x00B21C
   2101 #define   S_00B21C_CU_EN(x)                                           (((unsigned)(x) & 0xFFFF) << 0)
   2102 #define   G_00B21C_CU_EN(x)                                           (((x) >> 0) & 0xFFFF)
   2103 #define   C_00B21C_CU_EN                                              0xFFFF0000
   2104 #define   S_00B21C_WAVE_LIMIT(x)                                      (((unsigned)(x) & 0x3F) << 16)
   2105 #define   G_00B21C_WAVE_LIMIT(x)                                      (((x) >> 16) & 0x3F)
   2106 #define   C_00B21C_WAVE_LIMIT                                         0xFFC0FFFF
   2107 #define   S_00B21C_LOCK_LOW_THRESHOLD(x)                              (((unsigned)(x) & 0x0F) << 22)
   2108 #define   G_00B21C_LOCK_LOW_THRESHOLD(x)                              (((x) >> 22) & 0x0F)
   2109 #define   C_00B21C_LOCK_LOW_THRESHOLD                                 0xFC3FFFFF
   2110 #define   S_00B21C_SIMD_DISABLE(x)                                    (((unsigned)(x) & 0x0F) << 26)
   2111 #define   G_00B21C_SIMD_DISABLE(x)                                    (((x) >> 26) & 0x0F)
   2112 #define   C_00B21C_SIMD_DISABLE                                       0xC3FFFFFF
   2113 #define R_00B220_SPI_SHADER_PGM_LO_GS                                   0x00B220
   2114 #define R_00B224_SPI_SHADER_PGM_HI_GS                                   0x00B224
   2115 #define   S_00B224_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   2116 #define   G_00B224_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   2117 #define   C_00B224_MEM_BASE                                           0xFFFFFF00
   2118 #define R_00B228_SPI_SHADER_PGM_RSRC1_GS                                0x00B228
   2119 #define   S_00B228_VGPRS(x)                                           (((unsigned)(x) & 0x3F) << 0)
   2120 #define   G_00B228_VGPRS(x)                                           (((x) >> 0) & 0x3F)
   2121 #define   C_00B228_VGPRS                                              0xFFFFFFC0
   2122 #define   S_00B228_SGPRS(x)                                           (((unsigned)(x) & 0x0F) << 6)
   2123 #define   G_00B228_SGPRS(x)                                           (((x) >> 6) & 0x0F)
   2124 #define   C_00B228_SGPRS                                              0xFFFFFC3F
   2125 #define   S_00B228_PRIORITY(x)                                        (((unsigned)(x) & 0x03) << 10)
   2126 #define   G_00B228_PRIORITY(x)                                        (((x) >> 10) & 0x03)
   2127 #define   C_00B228_PRIORITY                                           0xFFFFF3FF
   2128 #define   S_00B228_FLOAT_MODE(x)                                      (((unsigned)(x) & 0xFF) << 12)
   2129 #define   G_00B228_FLOAT_MODE(x)                                      (((x) >> 12) & 0xFF)
   2130 #define   C_00B228_FLOAT_MODE                                         0xFFF00FFF
   2131 #define   S_00B228_PRIV(x)                                            (((unsigned)(x) & 0x1) << 20)
   2132 #define   G_00B228_PRIV(x)                                            (((x) >> 20) & 0x1)
   2133 #define   C_00B228_PRIV                                               0xFFEFFFFF
   2134 #define   S_00B228_DX10_CLAMP(x)                                      (((unsigned)(x) & 0x1) << 21)
   2135 #define   G_00B228_DX10_CLAMP(x)                                      (((x) >> 21) & 0x1)
   2136 #define   C_00B228_DX10_CLAMP                                         0xFFDFFFFF
   2137 #define   S_00B228_DEBUG_MODE(x)                                      (((unsigned)(x) & 0x1) << 22)
   2138 #define   G_00B228_DEBUG_MODE(x)                                      (((x) >> 22) & 0x1)
   2139 #define   C_00B228_DEBUG_MODE                                         0xFFBFFFFF
   2140 #define   S_00B228_IEEE_MODE(x)                                       (((unsigned)(x) & 0x1) << 23)
   2141 #define   G_00B228_IEEE_MODE(x)                                       (((x) >> 23) & 0x1)
   2142 #define   C_00B228_IEEE_MODE                                          0xFF7FFFFF
   2143 #define   S_00B228_CU_GROUP_ENABLE(x)                                 (((unsigned)(x) & 0x1) << 24)
   2144 #define   G_00B228_CU_GROUP_ENABLE(x)                                 (((x) >> 24) & 0x1)
   2145 #define   C_00B228_CU_GROUP_ENABLE                                    0xFEFFFFFF
   2146 #define   S_00B228_CDBG_USER(x)                                       (((unsigned)(x) & 0x1) << 28)
   2147 #define   G_00B228_CDBG_USER(x)                                       (((x) >> 28) & 0x1)
   2148 #define   C_00B228_CDBG_USER                                          0xEFFFFFFF
   2149 #define   S_00B228_GS_VGPR_COMP_CNT(x)                                (((unsigned)(x) & 0x03) << 29)
   2150 #define   G_00B228_GS_VGPR_COMP_CNT(x)                                (((x) >> 29) & 0x03)
   2151 #define   C_00B228_GS_VGPR_COMP_CNT                                   0x9FFFFFFF
   2152 #define   S_00B228_FP16_OVFL(x)                                       (((unsigned)(x) & 0x1) << 31)
   2153 #define   G_00B228_FP16_OVFL(x)                                       (((x) >> 31) & 0x1)
   2154 #define   C_00B228_FP16_OVFL                                          0x7FFFFFFF
   2155 #define R_00B22C_SPI_SHADER_PGM_RSRC2_GS                                0x00B22C
   2156 #define   S_00B22C_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   2157 #define   G_00B22C_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   2158 #define   C_00B22C_SCRATCH_EN                                         0xFFFFFFFE
   2159 #define   S_00B22C_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   2160 #define   G_00B22C_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   2161 #define   C_00B22C_USER_SGPR                                          0xFFFFFFC1
   2162 #define   S_00B22C_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   2163 #define   G_00B22C_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   2164 #define   C_00B22C_TRAP_PRESENT                                       0xFFFFFFBF
   2165 #define   S_00B22C_EXCP_EN(x)                                         (((unsigned)(x) & 0x1FF) << 7)
   2166 #define   G_00B22C_EXCP_EN(x)                                         (((x) >> 7) & 0x1FF)
   2167 #define   C_00B22C_EXCP_EN                                            0xFFFF007F
   2168 #define   S_00B22C_ES_VGPR_COMP_CNT(x)                                (((unsigned)(x) & 0x03) << 16)
   2169 #define   G_00B22C_ES_VGPR_COMP_CNT(x)                                (((x) >> 16) & 0x03)
   2170 #define   C_00B22C_ES_VGPR_COMP_CNT                                   0xFFFCFFFF
   2171 #define   S_00B22C_OC_LDS_EN(x)                                       (((unsigned)(x) & 0x1) << 18)
   2172 #define   G_00B22C_OC_LDS_EN(x)                                       (((x) >> 18) & 0x1)
   2173 #define   C_00B22C_OC_LDS_EN                                          0xFFFBFFFF
   2174 #define   S_00B22C_LDS_SIZE(x)                                        (((unsigned)(x) & 0xFF) << 19)
   2175 #define   G_00B22C_LDS_SIZE(x)                                        (((x) >> 19) & 0xFF)
   2176 #define   C_00B22C_LDS_SIZE                                           0xF807FFFF
   2177 #define   S_00B22C_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 27)
   2178 #define   G_00B22C_SKIP_USGPR0(x)                                     (((x) >> 27) & 0x1)
   2179 #define   C_00B22C_SKIP_USGPR0                                        0xF7FFFFFF
   2180 #define   S_00B22C_USER_SGPR_MSB(x)                                   (((unsigned)(x) & 0x1) << 28)
   2181 #define   G_00B22C_USER_SGPR_MSB(x)                                   (((x) >> 28) & 0x1)
   2182 #define   C_00B22C_USER_SGPR_MSB                                      0xEFFFFFFF
   2183 #define R_00B330_SPI_SHADER_USER_DATA_ES_0                              0x00B330
   2184 #define R_00B334_SPI_SHADER_USER_DATA_ES_1                              0x00B334
   2185 #define R_00B338_SPI_SHADER_USER_DATA_ES_2                              0x00B338
   2186 #define R_00B33C_SPI_SHADER_USER_DATA_ES_3                              0x00B33C
   2187 #define R_00B340_SPI_SHADER_USER_DATA_ES_4                              0x00B340
   2188 #define R_00B344_SPI_SHADER_USER_DATA_ES_5                              0x00B344
   2189 #define R_00B348_SPI_SHADER_USER_DATA_ES_6                              0x00B348
   2190 #define R_00B34C_SPI_SHADER_USER_DATA_ES_7                              0x00B34C
   2191 #define R_00B350_SPI_SHADER_USER_DATA_ES_8                              0x00B350
   2192 #define R_00B354_SPI_SHADER_USER_DATA_ES_9                              0x00B354
   2193 #define R_00B358_SPI_SHADER_USER_DATA_ES_10                             0x00B358
   2194 #define R_00B35C_SPI_SHADER_USER_DATA_ES_11                             0x00B35C
   2195 #define R_00B360_SPI_SHADER_USER_DATA_ES_12                             0x00B360
   2196 #define R_00B364_SPI_SHADER_USER_DATA_ES_13                             0x00B364
   2197 #define R_00B368_SPI_SHADER_USER_DATA_ES_14                             0x00B368
   2198 #define R_00B36C_SPI_SHADER_USER_DATA_ES_15                             0x00B36C
   2199 #define R_00B370_SPI_SHADER_USER_DATA_ES_16                             0x00B370
   2200 #define R_00B374_SPI_SHADER_USER_DATA_ES_17                             0x00B374
   2201 #define R_00B378_SPI_SHADER_USER_DATA_ES_18                             0x00B378
   2202 #define R_00B37C_SPI_SHADER_USER_DATA_ES_19                             0x00B37C
   2203 #define R_00B380_SPI_SHADER_USER_DATA_ES_20                             0x00B380
   2204 #define R_00B384_SPI_SHADER_USER_DATA_ES_21                             0x00B384
   2205 #define R_00B388_SPI_SHADER_USER_DATA_ES_22                             0x00B388
   2206 #define R_00B38C_SPI_SHADER_USER_DATA_ES_23                             0x00B38C
   2207 #define R_00B390_SPI_SHADER_USER_DATA_ES_24                             0x00B390
   2208 #define R_00B394_SPI_SHADER_USER_DATA_ES_25                             0x00B394
   2209 #define R_00B398_SPI_SHADER_USER_DATA_ES_26                             0x00B398
   2210 #define R_00B39C_SPI_SHADER_USER_DATA_ES_27                             0x00B39C
   2211 #define R_00B3A0_SPI_SHADER_USER_DATA_ES_28                             0x00B3A0
   2212 #define R_00B3A4_SPI_SHADER_USER_DATA_ES_29                             0x00B3A4
   2213 #define R_00B3A8_SPI_SHADER_USER_DATA_ES_30                             0x00B3A8
   2214 #define R_00B3AC_SPI_SHADER_USER_DATA_ES_31                             0x00B3AC
   2215 #define R_00B404_SPI_SHADER_PGM_RSRC4_HS                                0x00B404
   2216 #define   S_00B404_GROUP_FIFO_DEPTH(x)                                (((unsigned)(x) & 0x7F) << 0)
   2217 #define   G_00B404_GROUP_FIFO_DEPTH(x)                                (((x) >> 0) & 0x7F)
   2218 #define   C_00B404_GROUP_FIFO_DEPTH                                   0xFFFFFF80
   2219 #define R_00B408_SPI_SHADER_USER_DATA_ADDR_LO_HS                        0x00B408
   2220 #define R_00B40C_SPI_SHADER_USER_DATA_ADDR_HI_HS                        0x00B40C
   2221 #define R_00B410_SPI_SHADER_PGM_LO_LS                                   0x00B410
   2222 #define R_00B414_SPI_SHADER_PGM_HI_LS                                   0x00B414
   2223 #define   S_00B414_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   2224 #define   G_00B414_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   2225 #define   C_00B414_MEM_BASE                                           0xFFFFFF00
   2226 #define R_00B41C_SPI_SHADER_PGM_RSRC3_HS                                0x00B41C
   2227 #define   S_00B41C_WAVE_LIMIT(x)                                      (((unsigned)(x) & 0x3F) << 0)
   2228 #define   G_00B41C_WAVE_LIMIT(x)                                      (((x) >> 0) & 0x3F)
   2229 #define   C_00B41C_WAVE_LIMIT                                         0xFFFFFFC0
   2230 #define   S_00B41C_LOCK_LOW_THRESHOLD(x)                              (((unsigned)(x) & 0x0F) << 6)
   2231 #define   G_00B41C_LOCK_LOW_THRESHOLD(x)                              (((x) >> 6) & 0x0F)
   2232 #define   C_00B41C_LOCK_LOW_THRESHOLD                                 0xFFFFFC3F
   2233 #define   S_00B41C_SIMD_DISABLE(x)                                    (((unsigned)(x) & 0x0F) << 10)
   2234 #define   G_00B41C_SIMD_DISABLE(x)                                    (((x) >> 10) & 0x0F)
   2235 #define   C_00B41C_SIMD_DISABLE                                       0xFFFFC3FF
   2236 #define   S_00B41C_CU_EN(x)                                           (((unsigned)(x) & 0xFFFF) << 16)
   2237 #define   G_00B41C_CU_EN(x)                                           (((x) >> 16) & 0xFFFF)
   2238 #define   C_00B41C_CU_EN                                              0x0000FFFF
   2239 #define R_00B420_SPI_SHADER_PGM_LO_HS                                   0x00B420
   2240 #define R_00B424_SPI_SHADER_PGM_HI_HS                                   0x00B424
   2241 #define   S_00B424_MEM_BASE(x)                                        (((unsigned)(x) & 0xFF) << 0)
   2242 #define   G_00B424_MEM_BASE(x)                                        (((x) >> 0) & 0xFF)
   2243 #define   C_00B424_MEM_BASE                                           0xFFFFFF00
   2244 #define R_00B428_SPI_SHADER_PGM_RSRC1_HS                                0x00B428
   2245 #define   S_00B428_VGPRS(x)                                           (((unsigned)(x) & 0x3F) << 0)
   2246 #define   G_00B428_VGPRS(x)                                           (((x) >> 0) & 0x3F)
   2247 #define   C_00B428_VGPRS                                              0xFFFFFFC0
   2248 #define   S_00B428_SGPRS(x)                                           (((unsigned)(x) & 0x0F) << 6)
   2249 #define   G_00B428_SGPRS(x)                                           (((x) >> 6) & 0x0F)
   2250 #define   C_00B428_SGPRS                                              0xFFFFFC3F
   2251 #define   S_00B428_PRIORITY(x)                                        (((unsigned)(x) & 0x03) << 10)
   2252 #define   G_00B428_PRIORITY(x)                                        (((x) >> 10) & 0x03)
   2253 #define   C_00B428_PRIORITY                                           0xFFFFF3FF
   2254 #define   S_00B428_FLOAT_MODE(x)                                      (((unsigned)(x) & 0xFF) << 12)
   2255 #define   G_00B428_FLOAT_MODE(x)                                      (((x) >> 12) & 0xFF)
   2256 #define   C_00B428_FLOAT_MODE                                         0xFFF00FFF
   2257 #define   S_00B428_PRIV(x)                                            (((unsigned)(x) & 0x1) << 20)
   2258 #define   G_00B428_PRIV(x)                                            (((x) >> 20) & 0x1)
   2259 #define   C_00B428_PRIV                                               0xFFEFFFFF
   2260 #define   S_00B428_DX10_CLAMP(x)                                      (((unsigned)(x) & 0x1) << 21)
   2261 #define   G_00B428_DX10_CLAMP(x)                                      (((x) >> 21) & 0x1)
   2262 #define   C_00B428_DX10_CLAMP                                         0xFFDFFFFF
   2263 #define   S_00B428_DEBUG_MODE(x)                                      (((unsigned)(x) & 0x1) << 22)
   2264 #define   G_00B428_DEBUG_MODE(x)                                      (((x) >> 22) & 0x1)
   2265 #define   C_00B428_DEBUG_MODE                                         0xFFBFFFFF
   2266 #define   S_00B428_IEEE_MODE(x)                                       (((unsigned)(x) & 0x1) << 23)
   2267 #define   G_00B428_IEEE_MODE(x)                                       (((x) >> 23) & 0x1)
   2268 #define   C_00B428_IEEE_MODE                                          0xFF7FFFFF
   2269 #define   S_00B428_CDBG_USER(x)                                       (((unsigned)(x) & 0x1) << 27)
   2270 #define   G_00B428_CDBG_USER(x)                                       (((x) >> 27) & 0x1)
   2271 #define   C_00B428_CDBG_USER                                          0xF7FFFFFF
   2272 #define   S_00B428_LS_VGPR_COMP_CNT(x)                                (((unsigned)(x) & 0x03) << 28)
   2273 #define   G_00B428_LS_VGPR_COMP_CNT(x)                                (((x) >> 28) & 0x03)
   2274 #define   C_00B428_LS_VGPR_COMP_CNT                                   0xCFFFFFFF
   2275 #define   S_00B428_FP16_OVFL(x)                                       (((unsigned)(x) & 0x1) << 30)
   2276 #define   G_00B428_FP16_OVFL(x)                                       (((x) >> 30) & 0x1)
   2277 #define   C_00B428_FP16_OVFL                                          0xBFFFFFFF
   2278 #define R_00B42C_SPI_SHADER_PGM_RSRC2_HS                                0x00B42C
   2279 #define   S_00B42C_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   2280 #define   G_00B42C_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   2281 #define   C_00B42C_SCRATCH_EN                                         0xFFFFFFFE
   2282 #define   S_00B42C_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   2283 #define   G_00B42C_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   2284 #define   C_00B42C_USER_SGPR                                          0xFFFFFFC1
   2285 #define   S_00B42C_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   2286 #define   G_00B42C_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   2287 #define   C_00B42C_TRAP_PRESENT                                       0xFFFFFFBF
   2288 #define   S_00B42C_EXCP_EN(x)                                         (((unsigned)(x) & 0x1FF) << 7)
   2289 #define   G_00B42C_EXCP_EN(x)                                         (((x) >> 7) & 0x1FF)
   2290 #define   C_00B42C_EXCP_EN                                            0xFFFF007F
   2291 #define   S_00B42C_LDS_SIZE(x)                                        (((unsigned)(x) & 0x1FF) << 16)
   2292 #define   G_00B42C_LDS_SIZE(x)                                        (((x) >> 16) & 0x1FF)
   2293 #define   C_00B42C_LDS_SIZE                                           0xFE00FFFF
   2294 #define   S_00B42C_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 27)
   2295 #define   G_00B42C_SKIP_USGPR0(x)                                     (((x) >> 27) & 0x1)
   2296 #define   C_00B42C_SKIP_USGPR0                                        0xF7FFFFFF
   2297 #define   S_00B42C_USER_SGPR_MSB(x)                                   (((unsigned)(x) & 0x1) << 28)
   2298 #define   G_00B42C_USER_SGPR_MSB(x)                                   (((x) >> 28) & 0x1)
   2299 #define   C_00B42C_USER_SGPR_MSB                                      0xEFFFFFFF
   2300 #define R_00B430_SPI_SHADER_USER_DATA_LS_0                              0x00B430
   2301 #define R_00B434_SPI_SHADER_USER_DATA_LS_1                              0x00B434
   2302 #define R_00B438_SPI_SHADER_USER_DATA_LS_2                              0x00B438
   2303 #define R_00B43C_SPI_SHADER_USER_DATA_LS_3                              0x00B43C
   2304 #define R_00B440_SPI_SHADER_USER_DATA_LS_4                              0x00B440
   2305 #define R_00B444_SPI_SHADER_USER_DATA_LS_5                              0x00B444
   2306 #define R_00B448_SPI_SHADER_USER_DATA_LS_6                              0x00B448
   2307 #define R_00B44C_SPI_SHADER_USER_DATA_LS_7                              0x00B44C
   2308 #define R_00B450_SPI_SHADER_USER_DATA_LS_8                              0x00B450
   2309 #define R_00B454_SPI_SHADER_USER_DATA_LS_9                              0x00B454
   2310 #define R_00B458_SPI_SHADER_USER_DATA_LS_10                             0x00B458
   2311 #define R_00B45C_SPI_SHADER_USER_DATA_LS_11                             0x00B45C
   2312 #define R_00B460_SPI_SHADER_USER_DATA_LS_12                             0x00B460
   2313 #define R_00B464_SPI_SHADER_USER_DATA_LS_13                             0x00B464
   2314 #define R_00B468_SPI_SHADER_USER_DATA_LS_14                             0x00B468
   2315 #define R_00B46C_SPI_SHADER_USER_DATA_LS_15                             0x00B46C
   2316 #define R_00B470_SPI_SHADER_USER_DATA_LS_16                             0x00B470
   2317 #define R_00B474_SPI_SHADER_USER_DATA_LS_17                             0x00B474
   2318 #define R_00B478_SPI_SHADER_USER_DATA_LS_18                             0x00B478
   2319 #define R_00B47C_SPI_SHADER_USER_DATA_LS_19                             0x00B47C
   2320 #define R_00B480_SPI_SHADER_USER_DATA_LS_20                             0x00B480
   2321 #define R_00B484_SPI_SHADER_USER_DATA_LS_21                             0x00B484
   2322 #define R_00B488_SPI_SHADER_USER_DATA_LS_22                             0x00B488
   2323 #define R_00B48C_SPI_SHADER_USER_DATA_LS_23                             0x00B48C
   2324 #define R_00B490_SPI_SHADER_USER_DATA_LS_24                             0x00B490
   2325 #define R_00B494_SPI_SHADER_USER_DATA_LS_25                             0x00B494
   2326 #define R_00B498_SPI_SHADER_USER_DATA_LS_26                             0x00B498
   2327 #define R_00B49C_SPI_SHADER_USER_DATA_LS_27                             0x00B49C
   2328 #define R_00B4A0_SPI_SHADER_USER_DATA_LS_28                             0x00B4A0
   2329 #define R_00B4A4_SPI_SHADER_USER_DATA_LS_29                             0x00B4A4
   2330 #define R_00B4A8_SPI_SHADER_USER_DATA_LS_30                             0x00B4A8
   2331 #define R_00B4AC_SPI_SHADER_USER_DATA_LS_31                             0x00B4AC
   2332 #define R_00B530_SPI_SHADER_USER_DATA_COMMON_0                          0x00B530
   2333 #define R_00B534_SPI_SHADER_USER_DATA_COMMON_1                          0x00B534
   2334 #define R_00B538_SPI_SHADER_USER_DATA_COMMON_2                          0x00B538
   2335 #define R_00B53C_SPI_SHADER_USER_DATA_COMMON_3                          0x00B53C
   2336 #define R_00B540_SPI_SHADER_USER_DATA_COMMON_4                          0x00B540
   2337 #define R_00B544_SPI_SHADER_USER_DATA_COMMON_5                          0x00B544
   2338 #define R_00B548_SPI_SHADER_USER_DATA_COMMON_6                          0x00B548
   2339 #define R_00B54C_SPI_SHADER_USER_DATA_COMMON_7                          0x00B54C
   2340 #define R_00B550_SPI_SHADER_USER_DATA_COMMON_8                          0x00B550
   2341 #define R_00B554_SPI_SHADER_USER_DATA_COMMON_9                          0x00B554
   2342 #define R_00B558_SPI_SHADER_USER_DATA_COMMON_10                         0x00B558
   2343 #define R_00B55C_SPI_SHADER_USER_DATA_COMMON_11                         0x00B55C
   2344 #define R_00B560_SPI_SHADER_USER_DATA_COMMON_12                         0x00B560
   2345 #define R_00B564_SPI_SHADER_USER_DATA_COMMON_13                         0x00B564
   2346 #define R_00B568_SPI_SHADER_USER_DATA_COMMON_14                         0x00B568
   2347 #define R_00B56C_SPI_SHADER_USER_DATA_COMMON_15                         0x00B56C
   2348 #define R_00B570_SPI_SHADER_USER_DATA_COMMON_16                         0x00B570
   2349 #define R_00B574_SPI_SHADER_USER_DATA_COMMON_17                         0x00B574
   2350 #define R_00B578_SPI_SHADER_USER_DATA_COMMON_18                         0x00B578
   2351 #define R_00B57C_SPI_SHADER_USER_DATA_COMMON_19                         0x00B57C
   2352 #define R_00B580_SPI_SHADER_USER_DATA_COMMON_20                         0x00B580
   2353 #define R_00B584_SPI_SHADER_USER_DATA_COMMON_21                         0x00B584
   2354 #define R_00B588_SPI_SHADER_USER_DATA_COMMON_22                         0x00B588
   2355 #define R_00B58C_SPI_SHADER_USER_DATA_COMMON_23                         0x00B58C
   2356 #define R_00B590_SPI_SHADER_USER_DATA_COMMON_24                         0x00B590
   2357 #define R_00B594_SPI_SHADER_USER_DATA_COMMON_25                         0x00B594
   2358 #define R_00B598_SPI_SHADER_USER_DATA_COMMON_26                         0x00B598
   2359 #define R_00B59C_SPI_SHADER_USER_DATA_COMMON_27                         0x00B59C
   2360 #define R_00B5A0_SPI_SHADER_USER_DATA_COMMON_28                         0x00B5A0
   2361 #define R_00B5A4_SPI_SHADER_USER_DATA_COMMON_29                         0x00B5A4
   2362 #define R_00B5A8_SPI_SHADER_USER_DATA_COMMON_30                         0x00B5A8
   2363 #define R_00B5AC_SPI_SHADER_USER_DATA_COMMON_31                         0x00B5AC
   2364 #define R_00B800_COMPUTE_DISPATCH_INITIATOR                             0x00B800
   2365 #define   S_00B800_COMPUTE_SHADER_EN(x)                               (((unsigned)(x) & 0x1) << 0)
   2366 #define   G_00B800_COMPUTE_SHADER_EN(x)                               (((x) >> 0) & 0x1)
   2367 #define   C_00B800_COMPUTE_SHADER_EN                                  0xFFFFFFFE
   2368 #define   S_00B800_PARTIAL_TG_EN(x)                                   (((unsigned)(x) & 0x1) << 1)
   2369 #define   G_00B800_PARTIAL_TG_EN(x)                                   (((x) >> 1) & 0x1)
   2370 #define   C_00B800_PARTIAL_TG_EN                                      0xFFFFFFFD
   2371 #define   S_00B800_FORCE_START_AT_000(x)                              (((unsigned)(x) & 0x1) << 2)
   2372 #define   G_00B800_FORCE_START_AT_000(x)                              (((x) >> 2) & 0x1)
   2373 #define   C_00B800_FORCE_START_AT_000                                 0xFFFFFFFB
   2374 #define   S_00B800_ORDERED_APPEND_ENBL(x)                             (((unsigned)(x) & 0x1) << 3)
   2375 #define   G_00B800_ORDERED_APPEND_ENBL(x)                             (((x) >> 3) & 0x1)
   2376 #define   C_00B800_ORDERED_APPEND_ENBL                                0xFFFFFFF7
   2377 #define   S_00B800_ORDERED_APPEND_MODE(x)                             (((unsigned)(x) & 0x1) << 4)
   2378 #define   G_00B800_ORDERED_APPEND_MODE(x)                             (((x) >> 4) & 0x1)
   2379 #define   C_00B800_ORDERED_APPEND_MODE                                0xFFFFFFEF
   2380 #define   S_00B800_USE_THREAD_DIMENSIONS(x)                           (((unsigned)(x) & 0x1) << 5)
   2381 #define   G_00B800_USE_THREAD_DIMENSIONS(x)                           (((x) >> 5) & 0x1)
   2382 #define   C_00B800_USE_THREAD_DIMENSIONS                              0xFFFFFFDF
   2383 #define   S_00B800_ORDER_MODE(x)                                      (((unsigned)(x) & 0x1) << 6)
   2384 #define   G_00B800_ORDER_MODE(x)                                      (((x) >> 6) & 0x1)
   2385 #define   C_00B800_ORDER_MODE                                         0xFFFFFFBF
   2386 #define   S_00B800_SCALAR_L1_INV_VOL(x)                               (((unsigned)(x) & 0x1) << 10)
   2387 #define   G_00B800_SCALAR_L1_INV_VOL(x)                               (((x) >> 10) & 0x1)
   2388 #define   C_00B800_SCALAR_L1_INV_VOL                                  0xFFFFFBFF
   2389 #define   S_00B800_VECTOR_L1_INV_VOL(x)                               (((unsigned)(x) & 0x1) << 11)
   2390 #define   G_00B800_VECTOR_L1_INV_VOL(x)                               (((x) >> 11) & 0x1)
   2391 #define   C_00B800_VECTOR_L1_INV_VOL                                  0xFFFFF7FF
   2392 #define   S_00B800_RESERVED(x)                                        (((unsigned)(x) & 0x1) << 12)
   2393 #define   G_00B800_RESERVED(x)                                        (((x) >> 12) & 0x1)
   2394 #define   C_00B800_RESERVED                                           0xFFFFEFFF
   2395 #define   S_00B800_RESTORE(x)                                         (((unsigned)(x) & 0x1) << 14)
   2396 #define   G_00B800_RESTORE(x)                                         (((x) >> 14) & 0x1)
   2397 #define   C_00B800_RESTORE                                            0xFFFFBFFF
   2398 #define R_00B804_COMPUTE_DIM_X                                          0x00B804
   2399 #define R_00B808_COMPUTE_DIM_Y                                          0x00B808
   2400 #define R_00B80C_COMPUTE_DIM_Z                                          0x00B80C
   2401 #define R_00B810_COMPUTE_START_X                                        0x00B810
   2402 #define R_00B814_COMPUTE_START_Y                                        0x00B814
   2403 #define R_00B818_COMPUTE_START_Z                                        0x00B818
   2404 #define R_00B81C_COMPUTE_NUM_THREAD_X                                   0x00B81C
   2405 #define   S_00B81C_NUM_THREAD_FULL(x)                                 (((unsigned)(x) & 0xFFFF) << 0)
   2406 #define   G_00B81C_NUM_THREAD_FULL(x)                                 (((x) >> 0) & 0xFFFF)
   2407 #define   C_00B81C_NUM_THREAD_FULL                                    0xFFFF0000
   2408 #define   S_00B81C_NUM_THREAD_PARTIAL(x)                              (((unsigned)(x) & 0xFFFF) << 16)
   2409 #define   G_00B81C_NUM_THREAD_PARTIAL(x)                              (((x) >> 16) & 0xFFFF)
   2410 #define   C_00B81C_NUM_THREAD_PARTIAL                                 0x0000FFFF
   2411 #define R_00B820_COMPUTE_NUM_THREAD_Y                                   0x00B820
   2412 #define   S_00B820_NUM_THREAD_FULL(x)                                 (((unsigned)(x) & 0xFFFF) << 0)
   2413 #define   G_00B820_NUM_THREAD_FULL(x)                                 (((x) >> 0) & 0xFFFF)
   2414 #define   C_00B820_NUM_THREAD_FULL                                    0xFFFF0000
   2415 #define   S_00B820_NUM_THREAD_PARTIAL(x)                              (((unsigned)(x) & 0xFFFF) << 16)
   2416 #define   G_00B820_NUM_THREAD_PARTIAL(x)                              (((x) >> 16) & 0xFFFF)
   2417 #define   C_00B820_NUM_THREAD_PARTIAL                                 0x0000FFFF
   2418 #define R_00B824_COMPUTE_NUM_THREAD_Z                                   0x00B824
   2419 #define   S_00B824_NUM_THREAD_FULL(x)                                 (((unsigned)(x) & 0xFFFF) << 0)
   2420 #define   G_00B824_NUM_THREAD_FULL(x)                                 (((x) >> 0) & 0xFFFF)
   2421 #define   C_00B824_NUM_THREAD_FULL                                    0xFFFF0000
   2422 #define   S_00B824_NUM_THREAD_PARTIAL(x)                              (((unsigned)(x) & 0xFFFF) << 16)
   2423 #define   G_00B824_NUM_THREAD_PARTIAL(x)                              (((x) >> 16) & 0xFFFF)
   2424 #define   C_00B824_NUM_THREAD_PARTIAL                                 0x0000FFFF
   2425 #define R_00B828_COMPUTE_PIPELINESTAT_ENABLE                            0x00B828
   2426 #define   S_00B828_PIPELINESTAT_ENABLE(x)                             (((unsigned)(x) & 0x1) << 0)
   2427 #define   G_00B828_PIPELINESTAT_ENABLE(x)                             (((x) >> 0) & 0x1)
   2428 #define   C_00B828_PIPELINESTAT_ENABLE                                0xFFFFFFFE
   2429 #define R_00B82C_COMPUTE_PERFCOUNT_ENABLE                               0x00B82C
   2430 #define   S_00B82C_PERFCOUNT_ENABLE(x)                                (((unsigned)(x) & 0x1) << 0)
   2431 #define   G_00B82C_PERFCOUNT_ENABLE(x)                                (((x) >> 0) & 0x1)
   2432 #define   C_00B82C_PERFCOUNT_ENABLE                                   0xFFFFFFFE
   2433 #define R_00B830_COMPUTE_PGM_LO                                         0x00B830
   2434 #define R_00B834_COMPUTE_PGM_HI                                         0x00B834
   2435 #define   S_00B834_DATA(x)                                            (((unsigned)(x) & 0xFF) << 0)
   2436 #define   G_00B834_DATA(x)                                            (((x) >> 0) & 0xFF)
   2437 #define   C_00B834_DATA                                               0xFFFFFF00
   2438 #define R_00B838_COMPUTE_DISPATCH_PKT_ADDR_LO                           0x00B838
   2439 #define R_00B83C_COMPUTE_DISPATCH_PKT_ADDR_HI                           0x00B83C
   2440 #define   S_00B83C_DATA(x)                                            (((unsigned)(x) & 0xFF) << 0)
   2441 #define   G_00B83C_DATA(x)                                            (((x) >> 0) & 0xFF)
   2442 #define   C_00B83C_DATA                                               0xFFFFFF00
   2443 #define R_00B840_COMPUTE_DISPATCH_SCRATCH_BASE_LO                       0x00B840
   2444 #define R_00B844_COMPUTE_DISPATCH_SCRATCH_BASE_HI                       0x00B844
   2445 #define   S_00B844_DATA(x)                                            (((unsigned)(x) & 0xFF) << 0)
   2446 #define   G_00B844_DATA(x)                                            (((x) >> 0) & 0xFF)
   2447 #define   C_00B844_DATA                                               0xFFFFFF00
   2448 #define R_00B848_COMPUTE_PGM_RSRC1                                      0x00B848
   2449 #define   S_00B848_VGPRS(x)                                           (((unsigned)(x) & 0x3F) << 0)
   2450 #define   G_00B848_VGPRS(x)                                           (((x) >> 0) & 0x3F)
   2451 #define   C_00B848_VGPRS                                              0xFFFFFFC0
   2452 #define   S_00B848_SGPRS(x)                                           (((unsigned)(x) & 0x0F) << 6)
   2453 #define   G_00B848_SGPRS(x)                                           (((x) >> 6) & 0x0F)
   2454 #define   C_00B848_SGPRS                                              0xFFFFFC3F
   2455 #define   S_00B848_PRIORITY(x)                                        (((unsigned)(x) & 0x03) << 10)
   2456 #define   G_00B848_PRIORITY(x)                                        (((x) >> 10) & 0x03)
   2457 #define   C_00B848_PRIORITY                                           0xFFFFF3FF
   2458 #define   S_00B848_FLOAT_MODE(x)                                      (((unsigned)(x) & 0xFF) << 12)
   2459 #define   G_00B848_FLOAT_MODE(x)                                      (((x) >> 12) & 0xFF)
   2460 #define   C_00B848_FLOAT_MODE                                         0xFFF00FFF
   2461 #define   S_00B848_PRIV(x)                                            (((unsigned)(x) & 0x1) << 20)
   2462 #define   G_00B848_PRIV(x)                                            (((x) >> 20) & 0x1)
   2463 #define   C_00B848_PRIV                                               0xFFEFFFFF
   2464 #define   S_00B848_DX10_CLAMP(x)                                      (((unsigned)(x) & 0x1) << 21)
   2465 #define   G_00B848_DX10_CLAMP(x)                                      (((x) >> 21) & 0x1)
   2466 #define   C_00B848_DX10_CLAMP                                         0xFFDFFFFF
   2467 #define   S_00B848_DEBUG_MODE(x)                                      (((unsigned)(x) & 0x1) << 22)
   2468 #define   G_00B848_DEBUG_MODE(x)                                      (((x) >> 22) & 0x1)
   2469 #define   C_00B848_DEBUG_MODE                                         0xFFBFFFFF
   2470 #define   S_00B848_IEEE_MODE(x)                                       (((unsigned)(x) & 0x1) << 23)
   2471 #define   G_00B848_IEEE_MODE(x)                                       (((x) >> 23) & 0x1)
   2472 #define   C_00B848_IEEE_MODE                                          0xFF7FFFFF
   2473 #define   S_00B848_BULKY(x)                                           (((unsigned)(x) & 0x1) << 24)
   2474 #define   G_00B848_BULKY(x)                                           (((x) >> 24) & 0x1)
   2475 #define   C_00B848_BULKY                                              0xFEFFFFFF
   2476 #define   S_00B848_CDBG_USER(x)                                       (((unsigned)(x) & 0x1) << 25)
   2477 #define   G_00B848_CDBG_USER(x)                                       (((x) >> 25) & 0x1)
   2478 #define   C_00B848_CDBG_USER                                          0xFDFFFFFF
   2479 #define   S_00B848_FP16_OVFL(x)                                       (((unsigned)(x) & 0x1) << 26)
   2480 #define   G_00B848_FP16_OVFL(x)                                       (((x) >> 26) & 0x1)
   2481 #define   C_00B848_FP16_OVFL                                          0xFBFFFFFF
   2482 #define R_00B84C_COMPUTE_PGM_RSRC2                                      0x00B84C
   2483 #define   S_00B84C_SCRATCH_EN(x)                                      (((unsigned)(x) & 0x1) << 0)
   2484 #define   G_00B84C_SCRATCH_EN(x)                                      (((x) >> 0) & 0x1)
   2485 #define   C_00B84C_SCRATCH_EN                                         0xFFFFFFFE
   2486 #define   S_00B84C_USER_SGPR(x)                                       (((unsigned)(x) & 0x1F) << 1)
   2487 #define   G_00B84C_USER_SGPR(x)                                       (((x) >> 1) & 0x1F)
   2488 #define   C_00B84C_USER_SGPR                                          0xFFFFFFC1
   2489 #define   S_00B84C_TRAP_PRESENT(x)                                    (((unsigned)(x) & 0x1) << 6)
   2490 #define   G_00B84C_TRAP_PRESENT(x)                                    (((x) >> 6) & 0x1)
   2491 #define   C_00B84C_TRAP_PRESENT                                       0xFFFFFFBF
   2492 #define   S_00B84C_TGID_X_EN(x)                                       (((unsigned)(x) & 0x1) << 7)
   2493 #define   G_00B84C_TGID_X_EN(x)                                       (((x) >> 7) & 0x1)
   2494 #define   C_00B84C_TGID_X_EN                                          0xFFFFFF7F
   2495 #define   S_00B84C_TGID_Y_EN(x)                                       (((unsigned)(x) & 0x1) << 8)
   2496 #define   G_00B84C_TGID_Y_EN(x)                                       (((x) >> 8) & 0x1)
   2497 #define   C_00B84C_TGID_Y_EN                                          0xFFFFFEFF
   2498 #define   S_00B84C_TGID_Z_EN(x)                                       (((unsigned)(x) & 0x1) << 9)
   2499 #define   G_00B84C_TGID_Z_EN(x)                                       (((x) >> 9) & 0x1)
   2500 #define   C_00B84C_TGID_Z_EN                                          0xFFFFFDFF
   2501 #define   S_00B84C_TG_SIZE_EN(x)                                      (((unsigned)(x) & 0x1) << 10)
   2502 #define   G_00B84C_TG_SIZE_EN(x)                                      (((x) >> 10) & 0x1)
   2503 #define   C_00B84C_TG_SIZE_EN                                         0xFFFFFBFF
   2504 #define   S_00B84C_TIDIG_COMP_CNT(x)                                  (((unsigned)(x) & 0x03) << 11)
   2505 #define   G_00B84C_TIDIG_COMP_CNT(x)                                  (((x) >> 11) & 0x03)
   2506 #define   C_00B84C_TIDIG_COMP_CNT                                     0xFFFFE7FF
   2507 #define   S_00B84C_EXCP_EN_MSB(x)                                     (((unsigned)(x) & 0x03) << 13)
   2508 #define   G_00B84C_EXCP_EN_MSB(x)                                     (((x) >> 13) & 0x03)
   2509 #define   C_00B84C_EXCP_EN_MSB                                        0xFFFF9FFF
   2510 #define   S_00B84C_LDS_SIZE(x)                                        (((unsigned)(x) & 0x1FF) << 15)
   2511 #define   G_00B84C_LDS_SIZE(x)                                        (((x) >> 15) & 0x1FF)
   2512 #define   C_00B84C_LDS_SIZE                                           0xFF007FFF
   2513 #define   S_00B84C_EXCP_EN(x)                                         (((unsigned)(x) & 0x7F) << 24)
   2514 #define   G_00B84C_EXCP_EN(x)                                         (((x) >> 24) & 0x7F)
   2515 #define   C_00B84C_EXCP_EN                                            0x80FFFFFF
   2516 #define   S_00B84C_SKIP_USGPR0(x)                                     (((unsigned)(x) & 0x1) << 31)
   2517 #define   G_00B84C_SKIP_USGPR0(x)                                     (((x) >> 31) & 0x1)
   2518 #define   C_00B84C_SKIP_USGPR0                                        0x7FFFFFFF
   2519 #define R_00B850_COMPUTE_VMID                                           0x00B850
   2520 #define   S_00B850_DATA(x)                                            (((unsigned)(x) & 0x0F) << 0)
   2521 #define   G_00B850_DATA(x)                                            (((x) >> 0) & 0x0F)
   2522 #define   C_00B850_DATA                                               0xFFFFFFF0
   2523 #define R_00B854_COMPUTE_RESOURCE_LIMITS                                0x00B854
   2524 #define   S_00B854_WAVES_PER_SH(x)                                    (((unsigned)(x) & 0x3FF) << 0)
   2525 #define   G_00B854_WAVES_PER_SH(x)                                    (((x) >> 0) & 0x3FF)
   2526 #define   C_00B854_WAVES_PER_SH                                       0xFFFFFC00
   2527 #define   S_00B854_TG_PER_CU(x)                                       (((unsigned)(x) & 0x0F) << 12)
   2528 #define   G_00B854_TG_PER_CU(x)                                       (((x) >> 12) & 0x0F)
   2529 #define   C_00B854_TG_PER_CU                                          0xFFFF0FFF
   2530 #define   S_00B854_LOCK_THRESHOLD(x)                                  (((unsigned)(x) & 0x3F) << 16)
   2531 #define   G_00B854_LOCK_THRESHOLD(x)                                  (((x) >> 16) & 0x3F)
   2532 #define   C_00B854_LOCK_THRESHOLD                                     0xFFC0FFFF
   2533 #define   S_00B854_SIMD_DEST_CNTL(x)                                  (((unsigned)(x) & 0x1) << 22)
   2534 #define   G_00B854_SIMD_DEST_CNTL(x)                                  (((x) >> 22) & 0x1)
   2535 #define   C_00B854_SIMD_DEST_CNTL                                     0xFFBFFFFF
   2536 #define   S_00B854_FORCE_SIMD_DIST(x)                                 (((unsigned)(x) & 0x1) << 23)
   2537 #define   G_00B854_FORCE_SIMD_DIST(x)                                 (((x) >> 23) & 0x1)
   2538 #define   C_00B854_FORCE_SIMD_DIST                                    0xFF7FFFFF
   2539 #define   S_00B854_CU_GROUP_COUNT(x)                                  (((unsigned)(x) & 0x07) << 24)
   2540 #define   G_00B854_CU_GROUP_COUNT(x)                                  (((x) >> 24) & 0x07)
   2541 #define   C_00B854_CU_GROUP_COUNT                                     0xF8FFFFFF
   2542 #define   S_00B854_SIMD_DISABLE(x)                                    (((unsigned)(x) & 0x0F) << 27)
   2543 #define   G_00B854_SIMD_DISABLE(x)                                    (((x) >> 27) & 0x0F)
   2544 #define   C_00B854_SIMD_DISABLE                                       0x87FFFFFF
   2545 #define R_00B858_COMPUTE_STATIC_THREAD_MGMT_SE0                         0x00B858
   2546 #define   S_00B858_SH0_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 0)
   2547 #define   G_00B858_SH0_CU_EN(x)                                       (((x) >> 0) & 0xFFFF)
   2548 #define   C_00B858_SH0_CU_EN                                          0xFFFF0000
   2549 #define   S_00B858_SH1_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 16)
   2550 #define   G_00B858_SH1_CU_EN(x)                                       (((x) >> 16) & 0xFFFF)
   2551 #define   C_00B858_SH1_CU_EN                                          0x0000FFFF
   2552 #define R_00B85C_COMPUTE_STATIC_THREAD_MGMT_SE1                         0x00B85C
   2553 #define   S_00B85C_SH0_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 0)
   2554 #define   G_00B85C_SH0_CU_EN(x)                                       (((x) >> 0) & 0xFFFF)
   2555 #define   C_00B85C_SH0_CU_EN                                          0xFFFF0000
   2556 #define   S_00B85C_SH1_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 16)
   2557 #define   G_00B85C_SH1_CU_EN(x)                                       (((x) >> 16) & 0xFFFF)
   2558 #define   C_00B85C_SH1_CU_EN                                          0x0000FFFF
   2559 #define R_00B860_COMPUTE_TMPRING_SIZE                                   0x00B860
   2560 #define   S_00B860_WAVES(x)                                           (((unsigned)(x) & 0xFFF) << 0)
   2561 #define   G_00B860_WAVES(x)                                           (((x) >> 0) & 0xFFF)
   2562 #define   C_00B860_WAVES                                              0xFFFFF000
   2563 #define   S_00B860_WAVESIZE(x)                                        (((unsigned)(x) & 0x1FFF) << 12)
   2564 #define   G_00B860_WAVESIZE(x)                                        (((x) >> 12) & 0x1FFF)
   2565 #define   C_00B860_WAVESIZE                                           0xFE000FFF
   2566 #define R_00B864_COMPUTE_STATIC_THREAD_MGMT_SE2                         0x00B864
   2567 #define   S_00B864_SH0_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 0)
   2568 #define   G_00B864_SH0_CU_EN(x)                                       (((x) >> 0) & 0xFFFF)
   2569 #define   C_00B864_SH0_CU_EN                                          0xFFFF0000
   2570 #define   S_00B864_SH1_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 16)
   2571 #define   G_00B864_SH1_CU_EN(x)                                       (((x) >> 16) & 0xFFFF)
   2572 #define   C_00B864_SH1_CU_EN                                          0x0000FFFF
   2573 #define R_00B868_COMPUTE_STATIC_THREAD_MGMT_SE3                         0x00B868
   2574 #define   S_00B868_SH0_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 0)
   2575 #define   G_00B868_SH0_CU_EN(x)                                       (((x) >> 0) & 0xFFFF)
   2576 #define   C_00B868_SH0_CU_EN                                          0xFFFF0000
   2577 #define   S_00B868_SH1_CU_EN(x)                                       (((unsigned)(x) & 0xFFFF) << 16)
   2578 #define   G_00B868_SH1_CU_EN(x)                                       (((x) >> 16) & 0xFFFF)
   2579 #define   C_00B868_SH1_CU_EN                                          0x0000FFFF
   2580 #define R_00B86C_COMPUTE_RESTART_X                                      0x00B86C
   2581 #define R_00B870_COMPUTE_RESTART_Y                                      0x00B870
   2582 #define R_00B874_COMPUTE_RESTART_Z                                      0x00B874
   2583 #define R_00B87C_COMPUTE_MISC_RESERVED                                  0x00B87C
   2584 #define   S_00B87C_SEND_SEID(x)                                       (((unsigned)(x) & 0x03) << 0)
   2585 #define   G_00B87C_SEND_SEID(x)                                       (((x) >> 0) & 0x03)
   2586 #define   C_00B87C_SEND_SEID                                          0xFFFFFFFC
   2587 #define   S_00B87C_RESERVED2(x)                                       (((unsigned)(x) & 0x1) << 2)
   2588 #define   G_00B87C_RESERVED2(x)                                       (((x) >> 2) & 0x1)
   2589 #define   C_00B87C_RESERVED2                                          0xFFFFFFFB
   2590 #define   S_00B87C_RESERVED3(x)                                       (((unsigned)(x) & 0x1) << 3)
   2591 #define   G_00B87C_RESERVED3(x)                                       (((x) >> 3) & 0x1)
   2592 #define   C_00B87C_RESERVED3                                          0xFFFFFFF7
   2593 #define   S_00B87C_RESERVED4(x)                                       (((unsigned)(x) & 0x1) << 4)
   2594 #define   G_00B87C_RESERVED4(x)                                       (((x) >> 4) & 0x1)
   2595 #define   C_00B87C_RESERVED4                                          0xFFFFFFEF
   2596 #define   S_00B87C_WAVE_ID_BASE(x)                                    (((unsigned)(x) & 0xFFF) << 5)
   2597 #define   G_00B87C_WAVE_ID_BASE(x)                                    (((x) >> 5) & 0xFFF)
   2598 #define   C_00B87C_WAVE_ID_BASE                                       0xFFFE001F
   2599 #define R_00B880_COMPUTE_DISPATCH_ID                                    0x00B880
   2600 #define R_00B884_COMPUTE_THREADGROUP_ID                                 0x00B884
   2601 #define R_00B888_COMPUTE_RELAUNCH                                       0x00B888
   2602 #define   S_00B888_PAYLOAD(x)                                         (((unsigned)(x) & 0x3FFFFFFF) << 0)
   2603 #define   G_00B888_PAYLOAD(x)                                         (((x) >> 0) & 0x3FFFFFFF)
   2604 #define   C_00B888_PAYLOAD                                            0xC0000000
   2605 #define   S_00B888_IS_EVENT(x)                                        (((unsigned)(x) & 0x1) << 30)
   2606 #define   G_00B888_IS_EVENT(x)                                        (((x) >> 30) & 0x1)
   2607 #define   C_00B888_IS_EVENT                                           0xBFFFFFFF
   2608 #define   S_00B888_IS_STATE(x)                                        (((unsigned)(x) & 0x1) << 31)
   2609 #define   G_00B888_IS_STATE(x)                                        (((x) >> 31) & 0x1)
   2610 #define   C_00B888_IS_STATE                                           0x7FFFFFFF
   2611 #define R_00B88C_COMPUTE_WAVE_RESTORE_ADDR_LO                           0x00B88C
   2612 #define R_00B890_COMPUTE_WAVE_RESTORE_ADDR_HI                           0x00B890
   2613 #define   S_00B890_ADDR(x)                                            (((unsigned)(x) & 0xFFFF) << 0)
   2614 #define   G_00B890_ADDR(x)                                            (((x) >> 0) & 0xFFFF)
   2615 #define   C_00B890_ADDR                                               0xFFFF0000
   2616 #define R_00B900_COMPUTE_USER_DATA_0                                    0x00B900
   2617 #define R_00B904_COMPUTE_USER_DATA_1                                    0x00B904
   2618 #define R_00B908_COMPUTE_USER_DATA_2                                    0x00B908
   2619 #define R_00B90C_COMPUTE_USER_DATA_3                                    0x00B90C
   2620 #define R_00B910_COMPUTE_USER_DATA_4                                    0x00B910
   2621 #define R_00B914_COMPUTE_USER_DATA_5                                    0x00B914
   2622 #define R_00B918_COMPUTE_USER_DATA_6                                    0x00B918
   2623 #define R_00B91C_COMPUTE_USER_DATA_7                                    0x00B91C
   2624 #define R_00B920_COMPUTE_USER_DATA_8                                    0x00B920
   2625 #define R_00B924_COMPUTE_USER_DATA_9                                    0x00B924
   2626 #define R_00B928_COMPUTE_USER_DATA_10                                   0x00B928
   2627 #define R_00B92C_COMPUTE_USER_DATA_11                                   0x00B92C
   2628 #define R_00B930_COMPUTE_USER_DATA_12                                   0x00B930
   2629 #define R_00B934_COMPUTE_USER_DATA_13                                   0x00B934
   2630 #define R_00B938_COMPUTE_USER_DATA_14                                   0x00B938
   2631 #define R_00B93C_COMPUTE_USER_DATA_15                                   0x00B93C
   2632 #define R_00B9FC_COMPUTE_NOWHERE                                        0x00B9FC
   2633 #define R_034000_CPG_PERFCOUNTER1_LO                                    0x034000
   2634 #define R_034004_CPG_PERFCOUNTER1_HI                                    0x034004
   2635 #define R_034008_CPG_PERFCOUNTER0_LO                                    0x034008
   2636 #define R_03400C_CPG_PERFCOUNTER0_HI                                    0x03400C
   2637 #define R_034010_CPC_PERFCOUNTER1_LO                                    0x034010
   2638 #define R_034014_CPC_PERFCOUNTER1_HI                                    0x034014
   2639 #define R_034018_CPC_PERFCOUNTER0_LO                                    0x034018
   2640 #define R_03401C_CPC_PERFCOUNTER0_HI                                    0x03401C
   2641 #define R_034020_CPF_PERFCOUNTER1_LO                                    0x034020
   2642 #define R_034024_CPF_PERFCOUNTER1_HI                                    0x034024
   2643 #define R_034028_CPF_PERFCOUNTER0_LO                                    0x034028
   2644 #define R_03402C_CPF_PERFCOUNTER0_HI                                    0x03402C
   2645 #define R_034030_CPF_LATENCY_STATS_DATA                                 0x034030
   2646 #define R_034034_CPG_LATENCY_STATS_DATA                                 0x034034
   2647 #define R_034038_CPC_LATENCY_STATS_DATA                                 0x034038
   2648 #define R_034100_GRBM_PERFCOUNTER0_LO                                   0x034100
   2649 #define R_034104_GRBM_PERFCOUNTER0_HI                                   0x034104
   2650 #define R_03410C_GRBM_PERFCOUNTER1_LO                                   0x03410C
   2651 #define R_034110_GRBM_PERFCOUNTER1_HI                                   0x034110
   2652 #define R_034114_GRBM_SE0_PERFCOUNTER_LO                                0x034114
   2653 #define R_034118_GRBM_SE0_PERFCOUNTER_HI                                0x034118
   2654 #define R_03411C_GRBM_SE1_PERFCOUNTER_LO                                0x03411C
   2655 #define R_034120_GRBM_SE1_PERFCOUNTER_HI                                0x034120
   2656 #define R_034124_GRBM_SE2_PERFCOUNTER_LO                                0x034124
   2657 #define R_034128_GRBM_SE2_PERFCOUNTER_HI                                0x034128
   2658 #define R_03412C_GRBM_SE3_PERFCOUNTER_LO                                0x03412C
   2659 #define R_034130_GRBM_SE3_PERFCOUNTER_HI                                0x034130
   2660 #define R_034200_WD_PERFCOUNTER0_LO                                     0x034200
   2661 #define R_034204_WD_PERFCOUNTER0_HI                                     0x034204
   2662 #define R_034208_WD_PERFCOUNTER1_LO                                     0x034208
   2663 #define R_03420C_WD_PERFCOUNTER1_HI                                     0x03420C
   2664 #define R_034210_WD_PERFCOUNTER2_LO                                     0x034210
   2665 #define R_034214_WD_PERFCOUNTER2_HI                                     0x034214
   2666 #define R_034218_WD_PERFCOUNTER3_LO                                     0x034218
   2667 #define R_03421C_WD_PERFCOUNTER3_HI                                     0x03421C
   2668 #define R_034220_IA_PERFCOUNTER0_LO                                     0x034220
   2669 #define R_034224_IA_PERFCOUNTER0_HI                                     0x034224
   2670 #define R_034228_IA_PERFCOUNTER1_LO                                     0x034228
   2671 #define R_03422C_IA_PERFCOUNTER1_HI                                     0x03422C
   2672 #define R_034230_IA_PERFCOUNTER2_LO                                     0x034230
   2673 #define R_034234_IA_PERFCOUNTER2_HI                                     0x034234
   2674 #define R_034238_IA_PERFCOUNTER3_LO                                     0x034238
   2675 #define R_03423C_IA_PERFCOUNTER3_HI                                     0x03423C
   2676 #define R_034240_VGT_PERFCOUNTER0_LO                                    0x034240
   2677 #define R_034244_VGT_PERFCOUNTER0_HI                                    0x034244
   2678 #define R_034248_VGT_PERFCOUNTER1_LO                                    0x034248
   2679 #define R_03424C_VGT_PERFCOUNTER1_HI                                    0x03424C
   2680 #define R_034250_VGT_PERFCOUNTER2_LO                                    0x034250
   2681 #define R_034254_VGT_PERFCOUNTER2_HI                                    0x034254
   2682 #define R_034258_VGT_PERFCOUNTER3_LO                                    0x034258
   2683 #define R_03425C_VGT_PERFCOUNTER3_HI                                    0x03425C
   2684 #define R_034400_PA_SU_PERFCOUNTER0_LO                                  0x034400
   2685 #define R_034404_PA_SU_PERFCOUNTER0_HI                                  0x034404
   2686 #define   S_034404_PERFCOUNTER_HI(x)                                  (((unsigned)(x) & 0xFFFF) << 0)
   2687 #define   G_034404_PERFCOUNTER_HI(x)                                  (((x) >> 0) & 0xFFFF)
   2688 #define   C_034404_PERFCOUNTER_HI                                     0xFFFF0000
   2689 #define R_034408_PA_SU_PERFCOUNTER1_LO                                  0x034408
   2690 #define R_03440C_PA_SU_PERFCOUNTER1_HI                                  0x03440C
   2691 #define R_034410_PA_SU_PERFCOUNTER2_LO                                  0x034410
   2692 #define R_034414_PA_SU_PERFCOUNTER2_HI                                  0x034414
   2693 #define R_034418_PA_SU_PERFCOUNTER3_LO                                  0x034418
   2694 #define R_03441C_PA_SU_PERFCOUNTER3_HI                                  0x03441C
   2695 #define R_034500_PA_SC_PERFCOUNTER0_LO                                  0x034500
   2696 #define R_034504_PA_SC_PERFCOUNTER0_HI                                  0x034504
   2697 #define R_034508_PA_SC_PERFCOUNTER1_LO                                  0x034508
   2698 #define R_03450C_PA_SC_PERFCOUNTER1_HI                                  0x03450C
   2699 #define R_034510_PA_SC_PERFCOUNTER2_LO                                  0x034510
   2700 #define R_034514_PA_SC_PERFCOUNTER2_HI                                  0x034514
   2701 #define R_034518_PA_SC_PERFCOUNTER3_LO                                  0x034518
   2702 #define R_03451C_PA_SC_PERFCOUNTER3_HI                                  0x03451C
   2703 #define R_034520_PA_SC_PERFCOUNTER4_LO                                  0x034520
   2704 #define R_034524_PA_SC_PERFCOUNTER4_HI                                  0x034524
   2705 #define R_034528_PA_SC_PERFCOUNTER5_LO                                  0x034528
   2706 #define R_03452C_PA_SC_PERFCOUNTER5_HI                                  0x03452C
   2707 #define R_034530_PA_SC_PERFCOUNTER6_LO                                  0x034530
   2708 #define R_034534_PA_SC_PERFCOUNTER6_HI                                  0x034534
   2709 #define R_034538_PA_SC_PERFCOUNTER7_LO                                  0x034538
   2710 #define R_03453C_PA_SC_PERFCOUNTER7_HI                                  0x03453C
   2711 #define R_034600_SPI_PERFCOUNTER0_HI                                    0x034600
   2712 #define R_034604_SPI_PERFCOUNTER0_LO                                    0x034604
   2713 #define R_034608_SPI_PERFCOUNTER1_HI                                    0x034608
   2714 #define R_03460C_SPI_PERFCOUNTER1_LO                                    0x03460C
   2715 #define R_034610_SPI_PERFCOUNTER2_HI                                    0x034610
   2716 #define R_034614_SPI_PERFCOUNTER2_LO                                    0x034614
   2717 #define R_034618_SPI_PERFCOUNTER3_HI                                    0x034618
   2718 #define R_03461C_SPI_PERFCOUNTER3_LO                                    0x03461C
   2719 #define R_034620_SPI_PERFCOUNTER4_HI                                    0x034620
   2720 #define R_034624_SPI_PERFCOUNTER4_LO                                    0x034624
   2721 #define R_034628_SPI_PERFCOUNTER5_HI                                    0x034628
   2722 #define R_03462C_SPI_PERFCOUNTER5_LO                                    0x03462C
   2723 #define R_034700_SQ_PERFCOUNTER0_LO                                     0x034700
   2724 #define R_034704_SQ_PERFCOUNTER0_HI                                     0x034704
   2725 #define R_034708_SQ_PERFCOUNTER1_LO                                     0x034708
   2726 #define R_03470C_SQ_PERFCOUNTER1_HI                                     0x03470C
   2727 #define R_034710_SQ_PERFCOUNTER2_LO                                     0x034710
   2728 #define R_034714_SQ_PERFCOUNTER2_HI                                     0x034714
   2729 #define R_034718_SQ_PERFCOUNTER3_LO                                     0x034718
   2730 #define R_03471C_SQ_PERFCOUNTER3_HI                                     0x03471C
   2731 #define R_034720_SQ_PERFCOUNTER4_LO                                     0x034720
   2732 #define R_034724_SQ_PERFCOUNTER4_HI                                     0x034724
   2733 #define R_034728_SQ_PERFCOUNTER5_LO                                     0x034728
   2734 #define R_03472C_SQ_PERFCOUNTER5_HI                                     0x03472C
   2735 #define R_034730_SQ_PERFCOUNTER6_LO                                     0x034730
   2736 #define R_034734_SQ_PERFCOUNTER6_HI                                     0x034734
   2737 #define R_034738_SQ_PERFCOUNTER7_LO                                     0x034738
   2738 #define R_03473C_SQ_PERFCOUNTER7_HI                                     0x03473C
   2739 #define R_034740_SQ_PERFCOUNTER8_LO                                     0x034740
   2740 #define R_034744_SQ_PERFCOUNTER8_HI                                     0x034744
   2741 #define R_034748_SQ_PERFCOUNTER9_LO                                     0x034748
   2742 #define R_03474C_SQ_PERFCOUNTER9_HI                                     0x03474C
   2743 #define R_034750_SQ_PERFCOUNTER10_LO                                    0x034750
   2744 #define R_034754_SQ_PERFCOUNTER10_HI                                    0x034754
   2745 #define R_034758_SQ_PERFCOUNTER11_LO                                    0x034758
   2746 #define R_03475C_SQ_PERFCOUNTER11_HI                                    0x03475C
   2747 #define R_034760_SQ_PERFCOUNTER12_LO                                    0x034760
   2748 #define R_034764_SQ_PERFCOUNTER12_HI                                    0x034764
   2749 #define R_034768_SQ_PERFCOUNTER13_LO                                    0x034768
   2750 #define R_03476C_SQ_PERFCOUNTER13_HI                                    0x03476C
   2751 #define R_034770_SQ_PERFCOUNTER14_LO                                    0x034770
   2752 #define R_034774_SQ_PERFCOUNTER14_HI                                    0x034774
   2753 #define R_034778_SQ_PERFCOUNTER15_LO                                    0x034778
   2754 #define R_03477C_SQ_PERFCOUNTER15_HI                                    0x03477C
   2755 #define R_034900_SX_PERFCOUNTER0_LO                                     0x034900
   2756 #define R_034904_SX_PERFCOUNTER0_HI                                     0x034904
   2757 #define R_034908_SX_PERFCOUNTER1_LO                                     0x034908
   2758 #define R_03490C_SX_PERFCOUNTER1_HI                                     0x03490C
   2759 #define R_034910_SX_PERFCOUNTER2_LO                                     0x034910
   2760 #define R_034914_SX_PERFCOUNTER2_HI                                     0x034914
   2761 #define R_034918_SX_PERFCOUNTER3_LO                                     0x034918
   2762 #define R_03491C_SX_PERFCOUNTER3_HI                                     0x03491C
   2763 #define R_034A00_GDS_PERFCOUNTER0_LO                                    0x034A00
   2764 #define R_034A04_GDS_PERFCOUNTER0_HI                                    0x034A04
   2765 #define R_034A08_GDS_PERFCOUNTER1_LO                                    0x034A08
   2766 #define R_034A0C_GDS_PERFCOUNTER1_HI                                    0x034A0C
   2767 #define R_034A10_GDS_PERFCOUNTER2_LO                                    0x034A10
   2768 #define R_034A14_GDS_PERFCOUNTER2_HI                                    0x034A14
   2769 #define R_034A18_GDS_PERFCOUNTER3_LO                                    0x034A18
   2770 #define R_034A1C_GDS_PERFCOUNTER3_HI                                    0x034A1C
   2771 #define R_034B00_TA_PERFCOUNTER0_LO                                     0x034B00
   2772 #define R_034B04_TA_PERFCOUNTER0_HI                                     0x034B04
   2773 #define R_034B08_TA_PERFCOUNTER1_LO                                     0x034B08
   2774 #define R_034B0C_TA_PERFCOUNTER1_HI                                     0x034B0C
   2775 #define R_034C00_TD_PERFCOUNTER0_LO                                     0x034C00
   2776 #define R_034C04_TD_PERFCOUNTER0_HI                                     0x034C04
   2777 #define R_034C08_TD_PERFCOUNTER1_LO                                     0x034C08
   2778 #define R_034C0C_TD_PERFCOUNTER1_HI                                     0x034C0C
   2779 #define R_034D00_TCP_PERFCOUNTER0_LO                                    0x034D00
   2780 #define R_034D04_TCP_PERFCOUNTER0_HI                                    0x034D04
   2781 #define R_034D08_TCP_PERFCOUNTER1_LO                                    0x034D08
   2782 #define R_034D0C_TCP_PERFCOUNTER1_HI                                    0x034D0C
   2783 #define R_034D10_TCP_PERFCOUNTER2_LO                                    0x034D10
   2784 #define R_034D14_TCP_PERFCOUNTER2_HI                                    0x034D14
   2785 #define R_034D18_TCP_PERFCOUNTER3_LO                                    0x034D18
   2786 #define R_034D1C_TCP_PERFCOUNTER3_HI                                    0x034D1C
   2787 #define R_034E00_TCC_PERFCOUNTER0_LO                                    0x034E00
   2788 #define R_034E04_TCC_PERFCOUNTER0_HI                                    0x034E04
   2789 #define R_034E08_TCC_PERFCOUNTER1_LO                                    0x034E08
   2790 #define R_034E0C_TCC_PERFCOUNTER1_HI                                    0x034E0C
   2791 #define R_034E10_TCC_PERFCOUNTER2_LO                                    0x034E10
   2792 #define R_034E14_TCC_PERFCOUNTER2_HI                                    0x034E14
   2793 #define R_034E18_TCC_PERFCOUNTER3_LO                                    0x034E18
   2794 #define R_034E1C_TCC_PERFCOUNTER3_HI                                    0x034E1C
   2795 #define R_034E40_TCA_PERFCOUNTER0_LO                                    0x034E40
   2796 #define R_034E44_TCA_PERFCOUNTER0_HI                                    0x034E44
   2797 #define R_034E48_TCA_PERFCOUNTER1_LO                                    0x034E48
   2798 #define R_034E4C_TCA_PERFCOUNTER1_HI                                    0x034E4C
   2799 #define R_034E50_TCA_PERFCOUNTER2_LO                                    0x034E50
   2800 #define R_034E54_TCA_PERFCOUNTER2_HI                                    0x034E54
   2801 #define R_034E58_TCA_PERFCOUNTER3_LO                                    0x034E58
   2802 #define R_034E5C_TCA_PERFCOUNTER3_HI                                    0x034E5C
   2803 #define R_035018_CB_PERFCOUNTER0_LO                                     0x035018
   2804 #define R_03501C_CB_PERFCOUNTER0_HI                                     0x03501C
   2805 #define R_035020_CB_PERFCOUNTER1_LO                                     0x035020
   2806 #define R_035024_CB_PERFCOUNTER1_HI                                     0x035024
   2807 #define R_035028_CB_PERFCOUNTER2_LO                                     0x035028
   2808 #define R_03502C_CB_PERFCOUNTER2_HI                                     0x03502C
   2809 #define R_035030_CB_PERFCOUNTER3_LO                                     0x035030
   2810 #define R_035034_CB_PERFCOUNTER3_HI                                     0x035034
   2811 #define R_035100_DB_PERFCOUNTER0_LO                                     0x035100
   2812 #define R_035104_DB_PERFCOUNTER0_HI                                     0x035104
   2813 #define R_035108_DB_PERFCOUNTER1_LO                                     0x035108
   2814 #define R_03510C_DB_PERFCOUNTER1_HI                                     0x03510C
   2815 #define R_035110_DB_PERFCOUNTER2_LO                                     0x035110
   2816 #define R_035114_DB_PERFCOUNTER2_HI                                     0x035114
   2817 #define R_035118_DB_PERFCOUNTER3_LO                                     0x035118
   2818 #define R_03511C_DB_PERFCOUNTER3_HI                                     0x03511C
   2819 #define R_036000_CPG_PERFCOUNTER1_SELECT                                0x036000
   2820 #define R_036004_CPG_PERFCOUNTER0_SELECT1                               0x036004
   2821 #define   S_036004_CNTR_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2822 #define   G_036004_CNTR_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   2823 #define   C_036004_CNTR_SEL2                                          0xFFFFFC00
   2824 #define   S_036004_CNTR_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2825 #define   G_036004_CNTR_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   2826 #define   C_036004_CNTR_SEL3                                          0xFFF003FF
   2827 #define   S_036004_CNTR_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2828 #define   G_036004_CNTR_MODE3(x)                                      (((x) >> 24) & 0x0F)
   2829 #define   C_036004_CNTR_MODE3                                         0xF0FFFFFF
   2830 #define   S_036004_CNTR_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2831 #define   G_036004_CNTR_MODE2(x)                                      (((x) >> 28) & 0x0F)
   2832 #define   C_036004_CNTR_MODE2                                         0x0FFFFFFF
   2833 #define R_036008_CPG_PERFCOUNTER0_SELECT                                0x036008
   2834 #define   S_036008_CNTR_SEL0(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2835 #define   G_036008_CNTR_SEL0(x)                                       (((x) >> 0) & 0x3FF)
   2836 #define   C_036008_CNTR_SEL0                                          0xFFFFFC00
   2837 #define   S_036008_CNTR_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2838 #define   G_036008_CNTR_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   2839 #define   C_036008_CNTR_SEL1                                          0xFFF003FF
   2840 #define   S_036008_SPM_MODE(x)                                        (((unsigned)(x) & 0x0F) << 20)
   2841 #define   G_036008_SPM_MODE(x)                                        (((x) >> 20) & 0x0F)
   2842 #define   C_036008_SPM_MODE                                           0xFF0FFFFF
   2843 #define   S_036008_CNTR_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2844 #define   G_036008_CNTR_MODE1(x)                                      (((x) >> 24) & 0x0F)
   2845 #define   C_036008_CNTR_MODE1                                         0xF0FFFFFF
   2846 #define   S_036008_CNTR_MODE0(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2847 #define   G_036008_CNTR_MODE0(x)                                      (((x) >> 28) & 0x0F)
   2848 #define   C_036008_CNTR_MODE0                                         0x0FFFFFFF
   2849 #define R_03600C_CPC_PERFCOUNTER1_SELECT                                0x03600C
   2850 #define R_036010_CPC_PERFCOUNTER0_SELECT1                               0x036010
   2851 #define   S_036010_CNTR_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2852 #define   G_036010_CNTR_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   2853 #define   C_036010_CNTR_SEL2                                          0xFFFFFC00
   2854 #define   S_036010_CNTR_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2855 #define   G_036010_CNTR_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   2856 #define   C_036010_CNTR_SEL3                                          0xFFF003FF
   2857 #define   S_036010_CNTR_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2858 #define   G_036010_CNTR_MODE3(x)                                      (((x) >> 24) & 0x0F)
   2859 #define   C_036010_CNTR_MODE3                                         0xF0FFFFFF
   2860 #define   S_036010_CNTR_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2861 #define   G_036010_CNTR_MODE2(x)                                      (((x) >> 28) & 0x0F)
   2862 #define   C_036010_CNTR_MODE2                                         0x0FFFFFFF
   2863 #define R_036014_CPF_PERFCOUNTER1_SELECT                                0x036014
   2864 #define R_036018_CPF_PERFCOUNTER0_SELECT1                               0x036018
   2865 #define   S_036018_CNTR_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2866 #define   G_036018_CNTR_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   2867 #define   C_036018_CNTR_SEL2                                          0xFFFFFC00
   2868 #define   S_036018_CNTR_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2869 #define   G_036018_CNTR_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   2870 #define   C_036018_CNTR_SEL3                                          0xFFF003FF
   2871 #define   S_036018_CNTR_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2872 #define   G_036018_CNTR_MODE3(x)                                      (((x) >> 24) & 0x0F)
   2873 #define   C_036018_CNTR_MODE3                                         0xF0FFFFFF
   2874 #define   S_036018_CNTR_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2875 #define   G_036018_CNTR_MODE2(x)                                      (((x) >> 28) & 0x0F)
   2876 #define   C_036018_CNTR_MODE2                                         0x0FFFFFFF
   2877 #define R_03601C_CPF_PERFCOUNTER0_SELECT                                0x03601C
   2878 #define   S_03601C_CNTR_SEL0(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2879 #define   G_03601C_CNTR_SEL0(x)                                       (((x) >> 0) & 0x3FF)
   2880 #define   C_03601C_CNTR_SEL0                                          0xFFFFFC00
   2881 #define   S_03601C_CNTR_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2882 #define   G_03601C_CNTR_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   2883 #define   C_03601C_CNTR_SEL1                                          0xFFF003FF
   2884 #define   S_03601C_SPM_MODE(x)                                        (((unsigned)(x) & 0x0F) << 20)
   2885 #define   G_03601C_SPM_MODE(x)                                        (((x) >> 20) & 0x0F)
   2886 #define   C_03601C_SPM_MODE                                           0xFF0FFFFF
   2887 #define   S_03601C_CNTR_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2888 #define   G_03601C_CNTR_MODE1(x)                                      (((x) >> 24) & 0x0F)
   2889 #define   C_03601C_CNTR_MODE1                                         0xF0FFFFFF
   2890 #define   S_03601C_CNTR_MODE0(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2891 #define   G_03601C_CNTR_MODE0(x)                                      (((x) >> 28) & 0x0F)
   2892 #define   C_03601C_CNTR_MODE0                                         0x0FFFFFFF
   2893 #define R_036020_CP_PERFMON_CNTL                                        0x036020
   2894 #define   S_036020_PERFMON_STATE(x)                                   (((unsigned)(x) & 0x0F) << 0)
   2895 #define   G_036020_PERFMON_STATE(x)                                   (((x) >> 0) & 0x0F)
   2896 #define   C_036020_PERFMON_STATE                                      0xFFFFFFF0
   2897 #define   S_036020_SPM_PERFMON_STATE(x)                               (((unsigned)(x) & 0x0F) << 4)
   2898 #define   G_036020_SPM_PERFMON_STATE(x)                               (((x) >> 4) & 0x0F)
   2899 #define   C_036020_SPM_PERFMON_STATE                                  0xFFFFFF0F
   2900 #define   S_036020_PERFMON_ENABLE_MODE(x)                             (((unsigned)(x) & 0x03) << 8)
   2901 #define   G_036020_PERFMON_ENABLE_MODE(x)                             (((x) >> 8) & 0x03)
   2902 #define   C_036020_PERFMON_ENABLE_MODE                                0xFFFFFCFF
   2903 #define   S_036020_PERFMON_SAMPLE_ENABLE(x)                           (((unsigned)(x) & 0x1) << 10)
   2904 #define   G_036020_PERFMON_SAMPLE_ENABLE(x)                           (((x) >> 10) & 0x1)
   2905 #define   C_036020_PERFMON_SAMPLE_ENABLE                              0xFFFFFBFF
   2906 #define R_036024_CPC_PERFCOUNTER0_SELECT                                0x036024
   2907 #define   S_036024_CNTR_SEL0(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   2908 #define   G_036024_CNTR_SEL0(x)                                       (((x) >> 0) & 0x3FF)
   2909 #define   C_036024_CNTR_SEL0                                          0xFFFFFC00
   2910 #define   S_036024_CNTR_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   2911 #define   G_036024_CNTR_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   2912 #define   C_036024_CNTR_SEL1                                          0xFFF003FF
   2913 #define   S_036024_SPM_MODE(x)                                        (((unsigned)(x) & 0x0F) << 20)
   2914 #define   G_036024_SPM_MODE(x)                                        (((x) >> 20) & 0x0F)
   2915 #define   C_036024_SPM_MODE                                           0xFF0FFFFF
   2916 #define   S_036024_CNTR_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   2917 #define   G_036024_CNTR_MODE1(x)                                      (((x) >> 24) & 0x0F)
   2918 #define   C_036024_CNTR_MODE1                                         0xF0FFFFFF
   2919 #define   S_036024_CNTR_MODE0(x)                                      (((unsigned)(x) & 0x0F) << 28)
   2920 #define   G_036024_CNTR_MODE0(x)                                      (((x) >> 28) & 0x0F)
   2921 #define   C_036024_CNTR_MODE0                                         0x0FFFFFFF
   2922 #define R_036028_CPF_TC_PERF_COUNTER_WINDOW_SELECT                      0x036028
   2923 #define   S_036028_INDEX(x)                                           (((unsigned)(x) & 0x07) << 0)
   2924 #define   G_036028_INDEX(x)                                           (((x) >> 0) & 0x07)
   2925 #define   C_036028_INDEX                                              0xFFFFFFF8
   2926 #define   S_036028_ALWAYS(x)                                          (((unsigned)(x) & 0x1) << 30)
   2927 #define   G_036028_ALWAYS(x)                                          (((x) >> 30) & 0x1)
   2928 #define   C_036028_ALWAYS                                             0xBFFFFFFF
   2929 #define   S_036028_ENABLE(x)                                          (((unsigned)(x) & 0x1) << 31)
   2930 #define   G_036028_ENABLE(x)                                          (((x) >> 31) & 0x1)
   2931 #define   C_036028_ENABLE                                             0x7FFFFFFF
   2932 #define R_03602C_CPG_TC_PERF_COUNTER_WINDOW_SELECT                      0x03602C
   2933 #define   S_03602C_INDEX(x)                                           (((unsigned)(x) & 0x1F) << 0)
   2934 #define   G_03602C_INDEX(x)                                           (((x) >> 0) & 0x1F)
   2935 #define   C_03602C_INDEX                                              0xFFFFFFE0
   2936 #define   S_03602C_ALWAYS(x)                                          (((unsigned)(x) & 0x1) << 30)
   2937 #define   G_03602C_ALWAYS(x)                                          (((x) >> 30) & 0x1)
   2938 #define   C_03602C_ALWAYS                                             0xBFFFFFFF
   2939 #define   S_03602C_ENABLE(x)                                          (((unsigned)(x) & 0x1) << 31)
   2940 #define   G_03602C_ENABLE(x)                                          (((x) >> 31) & 0x1)
   2941 #define   C_03602C_ENABLE                                             0x7FFFFFFF
   2942 #define R_036030_CPF_LATENCY_STATS_SELECT                               0x036030
   2943 #define   S_036030_INDEX(x)                                           (((unsigned)(x) & 0x0F) << 0)
   2944 #define   G_036030_INDEX(x)                                           (((x) >> 0) & 0x0F)
   2945 #define   C_036030_INDEX                                              0xFFFFFFF0
   2946 #define   S_036030_CLEAR(x)                                           (((unsigned)(x) & 0x1) << 30)
   2947 #define   G_036030_CLEAR(x)                                           (((x) >> 30) & 0x1)
   2948 #define   C_036030_CLEAR                                              0xBFFFFFFF
   2949 #define   S_036030_ENABLE(x)                                          (((unsigned)(x) & 0x1) << 31)
   2950 #define   G_036030_ENABLE(x)                                          (((x) >> 31) & 0x1)
   2951 #define   C_036030_ENABLE                                             0x7FFFFFFF
   2952 #define R_036034_CPG_LATENCY_STATS_SELECT                               0x036034
   2953 #define   S_036034_INDEX(x)                                           (((unsigned)(x) & 0x1F) << 0)
   2954 #define   G_036034_INDEX(x)                                           (((x) >> 0) & 0x1F)
   2955 #define   C_036034_INDEX                                              0xFFFFFFE0
   2956 #define   S_036034_CLEAR(x)                                           (((unsigned)(x) & 0x1) << 30)
   2957 #define   G_036034_CLEAR(x)                                           (((x) >> 30) & 0x1)
   2958 #define   C_036034_CLEAR                                              0xBFFFFFFF
   2959 #define   S_036034_ENABLE(x)                                          (((unsigned)(x) & 0x1) << 31)
   2960 #define   G_036034_ENABLE(x)                                          (((x) >> 31) & 0x1)
   2961 #define   C_036034_ENABLE                                             0x7FFFFFFF
   2962 #define R_036038_CPC_LATENCY_STATS_SELECT                               0x036038
   2963 #define   S_036038_INDEX(x)                                           (((unsigned)(x) & 0x07) << 0)
   2964 #define   G_036038_INDEX(x)                                           (((x) >> 0) & 0x07)
   2965 #define   C_036038_INDEX                                              0xFFFFFFF8
   2966 #define   S_036038_CLEAR(x)                                           (((unsigned)(x) & 0x1) << 30)
   2967 #define   G_036038_CLEAR(x)                                           (((x) >> 30) & 0x1)
   2968 #define   C_036038_CLEAR                                              0xBFFFFFFF
   2969 #define   S_036038_ENABLE(x)                                          (((unsigned)(x) & 0x1) << 31)
   2970 #define   G_036038_ENABLE(x)                                          (((x) >> 31) & 0x1)
   2971 #define   C_036038_ENABLE                                             0x7FFFFFFF
   2972 #define R_036100_GRBM_PERFCOUNTER0_SELECT                               0x036100
   2973 #define   S_036100_PERF_SEL(x)                                        (((unsigned)(x) & 0x3F) << 0)
   2974 #define   G_036100_PERF_SEL(x)                                        (((x) >> 0) & 0x3F)
   2975 #define   C_036100_PERF_SEL                                           0xFFFFFFC0
   2976 #define   S_036100_DB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 10)
   2977 #define   G_036100_DB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 10) & 0x1)
   2978 #define   C_036100_DB_CLEAN_USER_DEFINED_MASK                         0xFFFFFBFF
   2979 #define   S_036100_CB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 11)
   2980 #define   G_036100_CB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 11) & 0x1)
   2981 #define   C_036100_CB_CLEAN_USER_DEFINED_MASK                         0xFFFFF7FF
   2982 #define   S_036100_VGT_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 12)
   2983 #define   G_036100_VGT_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 12) & 0x1)
   2984 #define   C_036100_VGT_BUSY_USER_DEFINED_MASK                         0xFFFFEFFF
   2985 #define   S_036100_TA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 13)
   2986 #define   G_036100_TA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 13) & 0x1)
   2987 #define   C_036100_TA_BUSY_USER_DEFINED_MASK                          0xFFFFDFFF
   2988 #define   S_036100_SX_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 14)
   2989 #define   G_036100_SX_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 14) & 0x1)
   2990 #define   C_036100_SX_BUSY_USER_DEFINED_MASK                          0xFFFFBFFF
   2991 #define   S_036100_SPI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 16)
   2992 #define   G_036100_SPI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 16) & 0x1)
   2993 #define   C_036100_SPI_BUSY_USER_DEFINED_MASK                         0xFFFEFFFF
   2994 #define   S_036100_SC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 17)
   2995 #define   G_036100_SC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 17) & 0x1)
   2996 #define   C_036100_SC_BUSY_USER_DEFINED_MASK                          0xFFFDFFFF
   2997 #define   S_036100_PA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 18)
   2998 #define   G_036100_PA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 18) & 0x1)
   2999 #define   C_036100_PA_BUSY_USER_DEFINED_MASK                          0xFFFBFFFF
   3000 #define   S_036100_GRBM_BUSY_USER_DEFINED_MASK(x)                     (((unsigned)(x) & 0x1) << 19)
   3001 #define   G_036100_GRBM_BUSY_USER_DEFINED_MASK(x)                     (((x) >> 19) & 0x1)
   3002 #define   C_036100_GRBM_BUSY_USER_DEFINED_MASK                        0xFFF7FFFF
   3003 #define   S_036100_DB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 20)
   3004 #define   G_036100_DB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 20) & 0x1)
   3005 #define   C_036100_DB_BUSY_USER_DEFINED_MASK                          0xFFEFFFFF
   3006 #define   S_036100_CB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 21)
   3007 #define   G_036100_CB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 21) & 0x1)
   3008 #define   C_036100_CB_BUSY_USER_DEFINED_MASK                          0xFFDFFFFF
   3009 #define   S_036100_CP_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 22)
   3010 #define   G_036100_CP_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 22) & 0x1)
   3011 #define   C_036100_CP_BUSY_USER_DEFINED_MASK                          0xFFBFFFFF
   3012 #define   S_036100_IA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 23)
   3013 #define   G_036100_IA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 23) & 0x1)
   3014 #define   C_036100_IA_BUSY_USER_DEFINED_MASK                          0xFF7FFFFF
   3015 #define   S_036100_GDS_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 24)
   3016 #define   G_036100_GDS_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 24) & 0x1)
   3017 #define   C_036100_GDS_BUSY_USER_DEFINED_MASK                         0xFEFFFFFF
   3018 #define   S_036100_BCI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 25)
   3019 #define   G_036100_BCI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 25) & 0x1)
   3020 #define   C_036100_BCI_BUSY_USER_DEFINED_MASK                         0xFDFFFFFF
   3021 #define   S_036100_RLC_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 26)
   3022 #define   G_036100_RLC_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 26) & 0x1)
   3023 #define   C_036100_RLC_BUSY_USER_DEFINED_MASK                         0xFBFFFFFF
   3024 #define   S_036100_TC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 27)
   3025 #define   G_036100_TC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 27) & 0x1)
   3026 #define   C_036100_TC_BUSY_USER_DEFINED_MASK                          0xF7FFFFFF
   3027 #define   S_036100_WD_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 28)
   3028 #define   G_036100_WD_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 28) & 0x1)
   3029 #define   C_036100_WD_BUSY_USER_DEFINED_MASK                          0xEFFFFFFF
   3030 #define   S_036100_UTCL2_BUSY_USER_DEFINED_MASK(x)                    (((unsigned)(x) & 0x1) << 29)
   3031 #define   G_036100_UTCL2_BUSY_USER_DEFINED_MASK(x)                    (((x) >> 29) & 0x1)
   3032 #define   C_036100_UTCL2_BUSY_USER_DEFINED_MASK                       0xDFFFFFFF
   3033 #define   S_036100_EA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 30)
   3034 #define   G_036100_EA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 30) & 0x1)
   3035 #define   C_036100_EA_BUSY_USER_DEFINED_MASK                          0xBFFFFFFF
   3036 #define   S_036100_RMI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 31)
   3037 #define   G_036100_RMI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 31) & 0x1)
   3038 #define   C_036100_RMI_BUSY_USER_DEFINED_MASK                         0x7FFFFFFF
   3039 #define R_036104_GRBM_PERFCOUNTER1_SELECT                               0x036104
   3040 #define R_036108_GRBM_SE0_PERFCOUNTER_SELECT                            0x036108
   3041 #define   S_036108_PERF_SEL(x)                                        (((unsigned)(x) & 0x3F) << 0)
   3042 #define   G_036108_PERF_SEL(x)                                        (((x) >> 0) & 0x3F)
   3043 #define   C_036108_PERF_SEL                                           0xFFFFFFC0
   3044 #define   S_036108_DB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 10)
   3045 #define   G_036108_DB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 10) & 0x1)
   3046 #define   C_036108_DB_CLEAN_USER_DEFINED_MASK                         0xFFFFFBFF
   3047 #define   S_036108_CB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 11)
   3048 #define   G_036108_CB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 11) & 0x1)
   3049 #define   C_036108_CB_CLEAN_USER_DEFINED_MASK                         0xFFFFF7FF
   3050 #define   S_036108_TA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 12)
   3051 #define   G_036108_TA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 12) & 0x1)
   3052 #define   C_036108_TA_BUSY_USER_DEFINED_MASK                          0xFFFFEFFF
   3053 #define   S_036108_SX_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 13)
   3054 #define   G_036108_SX_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 13) & 0x1)
   3055 #define   C_036108_SX_BUSY_USER_DEFINED_MASK                          0xFFFFDFFF
   3056 #define   S_036108_SPI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 15)
   3057 #define   G_036108_SPI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 15) & 0x1)
   3058 #define   C_036108_SPI_BUSY_USER_DEFINED_MASK                         0xFFFF7FFF
   3059 #define   S_036108_SC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 16)
   3060 #define   G_036108_SC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 16) & 0x1)
   3061 #define   C_036108_SC_BUSY_USER_DEFINED_MASK                          0xFFFEFFFF
   3062 #define   S_036108_DB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 17)
   3063 #define   G_036108_DB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 17) & 0x1)
   3064 #define   C_036108_DB_BUSY_USER_DEFINED_MASK                          0xFFFDFFFF
   3065 #define   S_036108_CB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 18)
   3066 #define   G_036108_CB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 18) & 0x1)
   3067 #define   C_036108_CB_BUSY_USER_DEFINED_MASK                          0xFFFBFFFF
   3068 #define   S_036108_VGT_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 19)
   3069 #define   G_036108_VGT_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 19) & 0x1)
   3070 #define   C_036108_VGT_BUSY_USER_DEFINED_MASK                         0xFFF7FFFF
   3071 #define   S_036108_PA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 20)
   3072 #define   G_036108_PA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 20) & 0x1)
   3073 #define   C_036108_PA_BUSY_USER_DEFINED_MASK                          0xFFEFFFFF
   3074 #define   S_036108_BCI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 21)
   3075 #define   G_036108_BCI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 21) & 0x1)
   3076 #define   C_036108_BCI_BUSY_USER_DEFINED_MASK                         0xFFDFFFFF
   3077 #define   S_036108_RMI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 22)
   3078 #define   G_036108_RMI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 22) & 0x1)
   3079 #define   C_036108_RMI_BUSY_USER_DEFINED_MASK                         0xFFBFFFFF
   3080 #define R_03610C_GRBM_SE1_PERFCOUNTER_SELECT                            0x03610C
   3081 #define   S_03610C_PERF_SEL(x)                                        (((unsigned)(x) & 0x3F) << 0)
   3082 #define   G_03610C_PERF_SEL(x)                                        (((x) >> 0) & 0x3F)
   3083 #define   C_03610C_PERF_SEL                                           0xFFFFFFC0
   3084 #define   S_03610C_DB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 10)
   3085 #define   G_03610C_DB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 10) & 0x1)
   3086 #define   C_03610C_DB_CLEAN_USER_DEFINED_MASK                         0xFFFFFBFF
   3087 #define   S_03610C_CB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 11)
   3088 #define   G_03610C_CB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 11) & 0x1)
   3089 #define   C_03610C_CB_CLEAN_USER_DEFINED_MASK                         0xFFFFF7FF
   3090 #define   S_03610C_TA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 12)
   3091 #define   G_03610C_TA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 12) & 0x1)
   3092 #define   C_03610C_TA_BUSY_USER_DEFINED_MASK                          0xFFFFEFFF
   3093 #define   S_03610C_SX_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 13)
   3094 #define   G_03610C_SX_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 13) & 0x1)
   3095 #define   C_03610C_SX_BUSY_USER_DEFINED_MASK                          0xFFFFDFFF
   3096 #define   S_03610C_SPI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 15)
   3097 #define   G_03610C_SPI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 15) & 0x1)
   3098 #define   C_03610C_SPI_BUSY_USER_DEFINED_MASK                         0xFFFF7FFF
   3099 #define   S_03610C_SC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 16)
   3100 #define   G_03610C_SC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 16) & 0x1)
   3101 #define   C_03610C_SC_BUSY_USER_DEFINED_MASK                          0xFFFEFFFF
   3102 #define   S_03610C_DB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 17)
   3103 #define   G_03610C_DB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 17) & 0x1)
   3104 #define   C_03610C_DB_BUSY_USER_DEFINED_MASK                          0xFFFDFFFF
   3105 #define   S_03610C_CB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 18)
   3106 #define   G_03610C_CB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 18) & 0x1)
   3107 #define   C_03610C_CB_BUSY_USER_DEFINED_MASK                          0xFFFBFFFF
   3108 #define   S_03610C_VGT_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 19)
   3109 #define   G_03610C_VGT_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 19) & 0x1)
   3110 #define   C_03610C_VGT_BUSY_USER_DEFINED_MASK                         0xFFF7FFFF
   3111 #define   S_03610C_PA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 20)
   3112 #define   G_03610C_PA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 20) & 0x1)
   3113 #define   C_03610C_PA_BUSY_USER_DEFINED_MASK                          0xFFEFFFFF
   3114 #define   S_03610C_BCI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 21)
   3115 #define   G_03610C_BCI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 21) & 0x1)
   3116 #define   C_03610C_BCI_BUSY_USER_DEFINED_MASK                         0xFFDFFFFF
   3117 #define   S_03610C_RMI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 22)
   3118 #define   G_03610C_RMI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 22) & 0x1)
   3119 #define   C_03610C_RMI_BUSY_USER_DEFINED_MASK                         0xFFBFFFFF
   3120 #define R_036110_GRBM_SE2_PERFCOUNTER_SELECT                            0x036110
   3121 #define   S_036110_PERF_SEL(x)                                        (((unsigned)(x) & 0x3F) << 0)
   3122 #define   G_036110_PERF_SEL(x)                                        (((x) >> 0) & 0x3F)
   3123 #define   C_036110_PERF_SEL                                           0xFFFFFFC0
   3124 #define   S_036110_DB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 10)
   3125 #define   G_036110_DB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 10) & 0x1)
   3126 #define   C_036110_DB_CLEAN_USER_DEFINED_MASK                         0xFFFFFBFF
   3127 #define   S_036110_CB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 11)
   3128 #define   G_036110_CB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 11) & 0x1)
   3129 #define   C_036110_CB_CLEAN_USER_DEFINED_MASK                         0xFFFFF7FF
   3130 #define   S_036110_TA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 12)
   3131 #define   G_036110_TA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 12) & 0x1)
   3132 #define   C_036110_TA_BUSY_USER_DEFINED_MASK                          0xFFFFEFFF
   3133 #define   S_036110_SX_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 13)
   3134 #define   G_036110_SX_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 13) & 0x1)
   3135 #define   C_036110_SX_BUSY_USER_DEFINED_MASK                          0xFFFFDFFF
   3136 #define   S_036110_SPI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 15)
   3137 #define   G_036110_SPI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 15) & 0x1)
   3138 #define   C_036110_SPI_BUSY_USER_DEFINED_MASK                         0xFFFF7FFF
   3139 #define   S_036110_SC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 16)
   3140 #define   G_036110_SC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 16) & 0x1)
   3141 #define   C_036110_SC_BUSY_USER_DEFINED_MASK                          0xFFFEFFFF
   3142 #define   S_036110_DB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 17)
   3143 #define   G_036110_DB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 17) & 0x1)
   3144 #define   C_036110_DB_BUSY_USER_DEFINED_MASK                          0xFFFDFFFF
   3145 #define   S_036110_CB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 18)
   3146 #define   G_036110_CB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 18) & 0x1)
   3147 #define   C_036110_CB_BUSY_USER_DEFINED_MASK                          0xFFFBFFFF
   3148 #define   S_036110_VGT_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 19)
   3149 #define   G_036110_VGT_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 19) & 0x1)
   3150 #define   C_036110_VGT_BUSY_USER_DEFINED_MASK                         0xFFF7FFFF
   3151 #define   S_036110_PA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 20)
   3152 #define   G_036110_PA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 20) & 0x1)
   3153 #define   C_036110_PA_BUSY_USER_DEFINED_MASK                          0xFFEFFFFF
   3154 #define   S_036110_BCI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 21)
   3155 #define   G_036110_BCI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 21) & 0x1)
   3156 #define   C_036110_BCI_BUSY_USER_DEFINED_MASK                         0xFFDFFFFF
   3157 #define   S_036110_RMI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 22)
   3158 #define   G_036110_RMI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 22) & 0x1)
   3159 #define   C_036110_RMI_BUSY_USER_DEFINED_MASK                         0xFFBFFFFF
   3160 #define R_036114_GRBM_SE3_PERFCOUNTER_SELECT                            0x036114
   3161 #define   S_036114_PERF_SEL(x)                                        (((unsigned)(x) & 0x3F) << 0)
   3162 #define   G_036114_PERF_SEL(x)                                        (((x) >> 0) & 0x3F)
   3163 #define   C_036114_PERF_SEL                                           0xFFFFFFC0
   3164 #define   S_036114_DB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 10)
   3165 #define   G_036114_DB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 10) & 0x1)
   3166 #define   C_036114_DB_CLEAN_USER_DEFINED_MASK                         0xFFFFFBFF
   3167 #define   S_036114_CB_CLEAN_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 11)
   3168 #define   G_036114_CB_CLEAN_USER_DEFINED_MASK(x)                      (((x) >> 11) & 0x1)
   3169 #define   C_036114_CB_CLEAN_USER_DEFINED_MASK                         0xFFFFF7FF
   3170 #define   S_036114_TA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 12)
   3171 #define   G_036114_TA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 12) & 0x1)
   3172 #define   C_036114_TA_BUSY_USER_DEFINED_MASK                          0xFFFFEFFF
   3173 #define   S_036114_SX_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 13)
   3174 #define   G_036114_SX_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 13) & 0x1)
   3175 #define   C_036114_SX_BUSY_USER_DEFINED_MASK                          0xFFFFDFFF
   3176 #define   S_036114_SPI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 15)
   3177 #define   G_036114_SPI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 15) & 0x1)
   3178 #define   C_036114_SPI_BUSY_USER_DEFINED_MASK                         0xFFFF7FFF
   3179 #define   S_036114_SC_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 16)
   3180 #define   G_036114_SC_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 16) & 0x1)
   3181 #define   C_036114_SC_BUSY_USER_DEFINED_MASK                          0xFFFEFFFF
   3182 #define   S_036114_DB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 17)
   3183 #define   G_036114_DB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 17) & 0x1)
   3184 #define   C_036114_DB_BUSY_USER_DEFINED_MASK                          0xFFFDFFFF
   3185 #define   S_036114_CB_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 18)
   3186 #define   G_036114_CB_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 18) & 0x1)
   3187 #define   C_036114_CB_BUSY_USER_DEFINED_MASK                          0xFFFBFFFF
   3188 #define   S_036114_VGT_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 19)
   3189 #define   G_036114_VGT_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 19) & 0x1)
   3190 #define   C_036114_VGT_BUSY_USER_DEFINED_MASK                         0xFFF7FFFF
   3191 #define   S_036114_PA_BUSY_USER_DEFINED_MASK(x)                       (((unsigned)(x) & 0x1) << 20)
   3192 #define   G_036114_PA_BUSY_USER_DEFINED_MASK(x)                       (((x) >> 20) & 0x1)
   3193 #define   C_036114_PA_BUSY_USER_DEFINED_MASK                          0xFFEFFFFF
   3194 #define   S_036114_BCI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 21)
   3195 #define   G_036114_BCI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 21) & 0x1)
   3196 #define   C_036114_BCI_BUSY_USER_DEFINED_MASK                         0xFFDFFFFF
   3197 #define   S_036114_RMI_BUSY_USER_DEFINED_MASK(x)                      (((unsigned)(x) & 0x1) << 22)
   3198 #define   G_036114_RMI_BUSY_USER_DEFINED_MASK(x)                      (((x) >> 22) & 0x1)
   3199 #define   C_036114_RMI_BUSY_USER_DEFINED_MASK                         0xFFBFFFFF
   3200 #define R_036200_WD_PERFCOUNTER0_SELECT                                 0x036200
   3201 #define   S_036200_PERF_SEL(x)                                        (((unsigned)(x) & 0xFF) << 0)
   3202 #define   G_036200_PERF_SEL(x)                                        (((x) >> 0) & 0xFF)
   3203 #define   C_036200_PERF_SEL                                           0xFFFFFF00
   3204 #define   S_036200_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3205 #define   G_036200_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3206 #define   C_036200_PERF_MODE                                          0x0FFFFFFF
   3207 #define R_036204_WD_PERFCOUNTER1_SELECT                                 0x036204
   3208 #define R_036208_WD_PERFCOUNTER2_SELECT                                 0x036208
   3209 #define R_03620C_WD_PERFCOUNTER3_SELECT                                 0x03620C
   3210 #define R_036210_IA_PERFCOUNTER0_SELECT                                 0x036210
   3211 #define   S_036210_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3212 #define   G_036210_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3213 #define   C_036210_PERF_SEL                                           0xFFFFFC00
   3214 #define   S_036210_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3215 #define   G_036210_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3216 #define   C_036210_PERF_SEL1                                          0xFFF003FF
   3217 #define   S_036210_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3218 #define   G_036210_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3219 #define   C_036210_CNTR_MODE                                          0xFF0FFFFF
   3220 #define   S_036210_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3221 #define   G_036210_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3222 #define   C_036210_PERF_MODE1                                         0xF0FFFFFF
   3223 #define   S_036210_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3224 #define   G_036210_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3225 #define   C_036210_PERF_MODE                                          0x0FFFFFFF
   3226 #define R_036214_IA_PERFCOUNTER1_SELECT                                 0x036214
   3227 #define R_036218_IA_PERFCOUNTER2_SELECT                                 0x036218
   3228 #define R_03621C_IA_PERFCOUNTER3_SELECT                                 0x03621C
   3229 #define R_036220_IA_PERFCOUNTER0_SELECT1                                0x036220
   3230 #define   S_036220_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3231 #define   G_036220_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3232 #define   C_036220_PERF_SEL2                                          0xFFFFFC00
   3233 #define   S_036220_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3234 #define   G_036220_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3235 #define   C_036220_PERF_SEL3                                          0xFFF003FF
   3236 #define   S_036220_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3237 #define   G_036220_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3238 #define   C_036220_PERF_MODE3                                         0xF0FFFFFF
   3239 #define   S_036220_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3240 #define   G_036220_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3241 #define   C_036220_PERF_MODE2                                         0x0FFFFFFF
   3242 #define R_036230_VGT_PERFCOUNTER0_SELECT                                0x036230
   3243 #define   S_036230_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3244 #define   G_036230_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3245 #define   C_036230_PERF_SEL                                           0xFFFFFC00
   3246 #define   S_036230_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3247 #define   G_036230_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3248 #define   C_036230_PERF_SEL1                                          0xFFF003FF
   3249 #define   S_036230_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3250 #define   G_036230_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3251 #define   C_036230_CNTR_MODE                                          0xFF0FFFFF
   3252 #define   S_036230_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3253 #define   G_036230_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3254 #define   C_036230_PERF_MODE1                                         0xF0FFFFFF
   3255 #define   S_036230_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3256 #define   G_036230_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3257 #define   C_036230_PERF_MODE                                          0x0FFFFFFF
   3258 #define R_036234_VGT_PERFCOUNTER1_SELECT                                0x036234
   3259 #define R_036238_VGT_PERFCOUNTER2_SELECT                                0x036238
   3260 #define R_03623C_VGT_PERFCOUNTER3_SELECT                                0x03623C
   3261 #define R_036240_VGT_PERFCOUNTER0_SELECT1                               0x036240
   3262 #define   S_036240_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3263 #define   G_036240_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3264 #define   C_036240_PERF_SEL2                                          0xFFFFFC00
   3265 #define   S_036240_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3266 #define   G_036240_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3267 #define   C_036240_PERF_SEL3                                          0xFFF003FF
   3268 #define   S_036240_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3269 #define   G_036240_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3270 #define   C_036240_PERF_MODE3                                         0xF0FFFFFF
   3271 #define   S_036240_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3272 #define   G_036240_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3273 #define   C_036240_PERF_MODE2                                         0x0FFFFFFF
   3274 #define R_036244_VGT_PERFCOUNTER1_SELECT1                               0x036244
   3275 #define R_036250_VGT_PERFCOUNTER_SEID_MASK                              0x036250
   3276 #define   S_036250_PERF_SEID_IGNORE_MASK(x)                           (((unsigned)(x) & 0xFF) << 0)
   3277 #define   G_036250_PERF_SEID_IGNORE_MASK(x)                           (((x) >> 0) & 0xFF)
   3278 #define   C_036250_PERF_SEID_IGNORE_MASK                              0xFFFFFF00
   3279 #define R_036400_PA_SU_PERFCOUNTER0_SELECT                              0x036400
   3280 #define   S_036400_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3281 #define   G_036400_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3282 #define   C_036400_PERF_SEL                                           0xFFFFFC00
   3283 #define   S_036400_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3284 #define   G_036400_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3285 #define   C_036400_PERF_SEL1                                          0xFFF003FF
   3286 #define   S_036400_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3287 #define   G_036400_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3288 #define   C_036400_CNTR_MODE                                          0xFF0FFFFF
   3289 #define R_036404_PA_SU_PERFCOUNTER0_SELECT1                             0x036404
   3290 #define   S_036404_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3291 #define   G_036404_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3292 #define   C_036404_PERF_SEL2                                          0xFFFFFC00
   3293 #define   S_036404_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3294 #define   G_036404_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3295 #define   C_036404_PERF_SEL3                                          0xFFF003FF
   3296 #define R_036408_PA_SU_PERFCOUNTER1_SELECT                              0x036408
   3297 #define R_03640C_PA_SU_PERFCOUNTER1_SELECT1                             0x03640C
   3298 #define R_036410_PA_SU_PERFCOUNTER2_SELECT                              0x036410
   3299 #define R_036414_PA_SU_PERFCOUNTER3_SELECT                              0x036414
   3300 #define R_036500_PA_SC_PERFCOUNTER0_SELECT                              0x036500
   3301 #define   S_036500_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3302 #define   G_036500_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3303 #define   C_036500_PERF_SEL                                           0xFFFFFC00
   3304 #define   S_036500_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3305 #define   G_036500_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3306 #define   C_036500_PERF_SEL1                                          0xFFF003FF
   3307 #define   S_036500_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3308 #define   G_036500_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3309 #define   C_036500_CNTR_MODE                                          0xFF0FFFFF
   3310 #define R_036504_PA_SC_PERFCOUNTER0_SELECT1                             0x036504
   3311 #define   S_036504_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3312 #define   G_036504_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3313 #define   C_036504_PERF_SEL2                                          0xFFFFFC00
   3314 #define   S_036504_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3315 #define   G_036504_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3316 #define   C_036504_PERF_SEL3                                          0xFFF003FF
   3317 #define R_036508_PA_SC_PERFCOUNTER1_SELECT                              0x036508
   3318 #define R_03650C_PA_SC_PERFCOUNTER2_SELECT                              0x03650C
   3319 #define R_036510_PA_SC_PERFCOUNTER3_SELECT                              0x036510
   3320 #define R_036514_PA_SC_PERFCOUNTER4_SELECT                              0x036514
   3321 #define R_036518_PA_SC_PERFCOUNTER5_SELECT                              0x036518
   3322 #define R_03651C_PA_SC_PERFCOUNTER6_SELECT                              0x03651C
   3323 #define R_036520_PA_SC_PERFCOUNTER7_SELECT                              0x036520
   3324 #define R_036600_SPI_PERFCOUNTER0_SELECT                                0x036600
   3325 #define   S_036600_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3326 #define   G_036600_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3327 #define   C_036600_PERF_SEL                                           0xFFFFFC00
   3328 #define   S_036600_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3329 #define   G_036600_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3330 #define   C_036600_PERF_SEL1                                          0xFFF003FF
   3331 #define   S_036600_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3332 #define   G_036600_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3333 #define   C_036600_CNTR_MODE                                          0xFF0FFFFF
   3334 #define   S_036600_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3335 #define   G_036600_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3336 #define   C_036600_PERF_MODE1                                         0xF0FFFFFF
   3337 #define   S_036600_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3338 #define   G_036600_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3339 #define   C_036600_PERF_MODE                                          0x0FFFFFFF
   3340 #define R_036604_SPI_PERFCOUNTER1_SELECT                                0x036604
   3341 #define R_036608_SPI_PERFCOUNTER2_SELECT                                0x036608
   3342 #define R_03660C_SPI_PERFCOUNTER3_SELECT                                0x03660C
   3343 #define R_036610_SPI_PERFCOUNTER0_SELECT1                               0x036610
   3344 #define   S_036610_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3345 #define   G_036610_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3346 #define   C_036610_PERF_SEL2                                          0xFFFFFC00
   3347 #define   S_036610_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3348 #define   G_036610_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3349 #define   C_036610_PERF_SEL3                                          0xFFF003FF
   3350 #define   S_036610_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3351 #define   G_036610_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3352 #define   C_036610_PERF_MODE3                                         0xF0FFFFFF
   3353 #define   S_036610_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3354 #define   G_036610_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3355 #define   C_036610_PERF_MODE2                                         0x0FFFFFFF
   3356 #define R_036614_SPI_PERFCOUNTER1_SELECT1                               0x036614
   3357 #define R_036618_SPI_PERFCOUNTER2_SELECT1                               0x036618
   3358 #define R_03661C_SPI_PERFCOUNTER3_SELECT1                               0x03661C
   3359 #define R_036620_SPI_PERFCOUNTER4_SELECT                                0x036620
   3360 #define R_036624_SPI_PERFCOUNTER5_SELECT                                0x036624
   3361 #define R_036628_SPI_PERFCOUNTER_BINS                                   0x036628
   3362 #define   S_036628_BIN0_MIN(x)                                        (((unsigned)(x) & 0x0F) << 0)
   3363 #define   G_036628_BIN0_MIN(x)                                        (((x) >> 0) & 0x0F)
   3364 #define   C_036628_BIN0_MIN                                           0xFFFFFFF0
   3365 #define   S_036628_BIN0_MAX(x)                                        (((unsigned)(x) & 0x0F) << 4)
   3366 #define   G_036628_BIN0_MAX(x)                                        (((x) >> 4) & 0x0F)
   3367 #define   C_036628_BIN0_MAX                                           0xFFFFFF0F
   3368 #define   S_036628_BIN1_MIN(x)                                        (((unsigned)(x) & 0x0F) << 8)
   3369 #define   G_036628_BIN1_MIN(x)                                        (((x) >> 8) & 0x0F)
   3370 #define   C_036628_BIN1_MIN                                           0xFFFFF0FF
   3371 #define   S_036628_BIN1_MAX(x)                                        (((unsigned)(x) & 0x0F) << 12)
   3372 #define   G_036628_BIN1_MAX(x)                                        (((x) >> 12) & 0x0F)
   3373 #define   C_036628_BIN1_MAX                                           0xFFFF0FFF
   3374 #define   S_036628_BIN2_MIN(x)                                        (((unsigned)(x) & 0x0F) << 16)
   3375 #define   G_036628_BIN2_MIN(x)                                        (((x) >> 16) & 0x0F)
   3376 #define   C_036628_BIN2_MIN                                           0xFFF0FFFF
   3377 #define   S_036628_BIN2_MAX(x)                                        (((unsigned)(x) & 0x0F) << 20)
   3378 #define   G_036628_BIN2_MAX(x)                                        (((x) >> 20) & 0x0F)
   3379 #define   C_036628_BIN2_MAX                                           0xFF0FFFFF
   3380 #define   S_036628_BIN3_MIN(x)                                        (((unsigned)(x) & 0x0F) << 24)
   3381 #define   G_036628_BIN3_MIN(x)                                        (((x) >> 24) & 0x0F)
   3382 #define   C_036628_BIN3_MIN                                           0xF0FFFFFF
   3383 #define   S_036628_BIN3_MAX(x)                                        (((unsigned)(x) & 0x0F) << 28)
   3384 #define   G_036628_BIN3_MAX(x)                                        (((x) >> 28) & 0x0F)
   3385 #define   C_036628_BIN3_MAX                                           0x0FFFFFFF
   3386 #define R_036700_SQ_PERFCOUNTER0_SELECT                                 0x036700
   3387 #define   S_036700_PERF_SEL(x)                                        (((unsigned)(x) & 0x1FF) << 0)
   3388 #define   G_036700_PERF_SEL(x)                                        (((x) >> 0) & 0x1FF)
   3389 #define   C_036700_PERF_SEL                                           0xFFFFFE00
   3390 #define   S_036700_SQC_BANK_MASK(x)                                   (((unsigned)(x) & 0x0F) << 12)
   3391 #define   G_036700_SQC_BANK_MASK(x)                                   (((x) >> 12) & 0x0F)
   3392 #define   C_036700_SQC_BANK_MASK                                      0xFFFF0FFF
   3393 #define   S_036700_SQC_CLIENT_MASK(x)                                 (((unsigned)(x) & 0x0F) << 16)
   3394 #define   G_036700_SQC_CLIENT_MASK(x)                                 (((x) >> 16) & 0x0F)
   3395 #define   C_036700_SQC_CLIENT_MASK                                    0xFFF0FFFF
   3396 #define   S_036700_SPM_MODE(x)                                        (((unsigned)(x) & 0x0F) << 20)
   3397 #define   G_036700_SPM_MODE(x)                                        (((x) >> 20) & 0x0F)
   3398 #define   C_036700_SPM_MODE                                           0xFF0FFFFF
   3399 #define   S_036700_SIMD_MASK(x)                                       (((unsigned)(x) & 0x0F) << 24)
   3400 #define   G_036700_SIMD_MASK(x)                                       (((x) >> 24) & 0x0F)
   3401 #define   C_036700_SIMD_MASK                                          0xF0FFFFFF
   3402 #define   S_036700_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3403 #define   G_036700_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3404 #define   C_036700_PERF_MODE                                          0x0FFFFFFF
   3405 #define R_036704_SQ_PERFCOUNTER1_SELECT                                 0x036704
   3406 #define R_036708_SQ_PERFCOUNTER2_SELECT                                 0x036708
   3407 #define R_03670C_SQ_PERFCOUNTER3_SELECT                                 0x03670C
   3408 #define R_036710_SQ_PERFCOUNTER4_SELECT                                 0x036710
   3409 #define R_036714_SQ_PERFCOUNTER5_SELECT                                 0x036714
   3410 #define R_036718_SQ_PERFCOUNTER6_SELECT                                 0x036718
   3411 #define R_03671C_SQ_PERFCOUNTER7_SELECT                                 0x03671C
   3412 #define R_036720_SQ_PERFCOUNTER8_SELECT                                 0x036720
   3413 #define R_036724_SQ_PERFCOUNTER9_SELECT                                 0x036724
   3414 #define R_036728_SQ_PERFCOUNTER10_SELECT                                0x036728
   3415 #define R_03672C_SQ_PERFCOUNTER11_SELECT                                0x03672C
   3416 #define R_036730_SQ_PERFCOUNTER12_SELECT                                0x036730
   3417 #define R_036734_SQ_PERFCOUNTER13_SELECT                                0x036734
   3418 #define R_036738_SQ_PERFCOUNTER14_SELECT                                0x036738
   3419 #define R_03673C_SQ_PERFCOUNTER15_SELECT                                0x03673C
   3420 #define R_036780_SQ_PERFCOUNTER_CTRL                                    0x036780
   3421 #define   S_036780_PS_EN(x)                                           (((unsigned)(x) & 0x1) << 0)
   3422 #define   G_036780_PS_EN(x)                                           (((x) >> 0) & 0x1)
   3423 #define   C_036780_PS_EN                                              0xFFFFFFFE
   3424 #define   S_036780_VS_EN(x)                                           (((unsigned)(x) & 0x1) << 1)
   3425 #define   G_036780_VS_EN(x)                                           (((x) >> 1) & 0x1)
   3426 #define   C_036780_VS_EN                                              0xFFFFFFFD
   3427 #define   S_036780_GS_EN(x)                                           (((unsigned)(x) & 0x1) << 2)
   3428 #define   G_036780_GS_EN(x)                                           (((x) >> 2) & 0x1)
   3429 #define   C_036780_GS_EN                                              0xFFFFFFFB
   3430 #define   S_036780_ES_EN(x)                                           (((unsigned)(x) & 0x1) << 3)
   3431 #define   G_036780_ES_EN(x)                                           (((x) >> 3) & 0x1)
   3432 #define   C_036780_ES_EN                                              0xFFFFFFF7
   3433 #define   S_036780_HS_EN(x)                                           (((unsigned)(x) & 0x1) << 4)
   3434 #define   G_036780_HS_EN(x)                                           (((x) >> 4) & 0x1)
   3435 #define   C_036780_HS_EN                                              0xFFFFFFEF
   3436 #define   S_036780_LS_EN(x)                                           (((unsigned)(x) & 0x1) << 5)
   3437 #define   G_036780_LS_EN(x)                                           (((x) >> 5) & 0x1)
   3438 #define   C_036780_LS_EN                                              0xFFFFFFDF
   3439 #define   S_036780_CS_EN(x)                                           (((unsigned)(x) & 0x1) << 6)
   3440 #define   G_036780_CS_EN(x)                                           (((x) >> 6) & 0x1)
   3441 #define   C_036780_CS_EN                                              0xFFFFFFBF
   3442 #define   S_036780_CNTR_RATE(x)                                       (((unsigned)(x) & 0x1F) << 8)
   3443 #define   G_036780_CNTR_RATE(x)                                       (((x) >> 8) & 0x1F)
   3444 #define   C_036780_CNTR_RATE                                          0xFFFFE0FF
   3445 #define   S_036780_DISABLE_FLUSH(x)                                   (((unsigned)(x) & 0x1) << 13)
   3446 #define   G_036780_DISABLE_FLUSH(x)                                   (((x) >> 13) & 0x1)
   3447 #define   C_036780_DISABLE_FLUSH                                      0xFFFFDFFF
   3448 #define R_036784_SQ_PERFCOUNTER_MASK                                    0x036784
   3449 #define   S_036784_SH0_MASK(x)                                        (((unsigned)(x) & 0xFFFF) << 0)
   3450 #define   G_036784_SH0_MASK(x)                                        (((x) >> 0) & 0xFFFF)
   3451 #define   C_036784_SH0_MASK                                           0xFFFF0000
   3452 #define   S_036784_SH1_MASK(x)                                        (((unsigned)(x) & 0xFFFF) << 16)
   3453 #define   G_036784_SH1_MASK(x)                                        (((x) >> 16) & 0xFFFF)
   3454 #define   C_036784_SH1_MASK                                           0x0000FFFF
   3455 #define R_036788_SQ_PERFCOUNTER_CTRL2                                   0x036788
   3456 #define   S_036788_FORCE_EN(x)                                        (((unsigned)(x) & 0x1) << 0)
   3457 #define   G_036788_FORCE_EN(x)                                        (((x) >> 0) & 0x1)
   3458 #define   C_036788_FORCE_EN                                           0xFFFFFFFE
   3459 #define R_036900_SX_PERFCOUNTER0_SELECT                                 0x036900
   3460 #define   S_036900_PERFCOUNTER_SELECT(x)                              (((unsigned)(x) & 0x3FF) << 0)
   3461 #define   G_036900_PERFCOUNTER_SELECT(x)                              (((x) >> 0) & 0x3FF)
   3462 #define   C_036900_PERFCOUNTER_SELECT                                 0xFFFFFC00
   3463 #define   S_036900_PERFCOUNTER_SELECT1(x)                             (((unsigned)(x) & 0x3FF) << 10)
   3464 #define   G_036900_PERFCOUNTER_SELECT1(x)                             (((x) >> 10) & 0x3FF)
   3465 #define   C_036900_PERFCOUNTER_SELECT1                                0xFFF003FF
   3466 #define   S_036900_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3467 #define   G_036900_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3468 #define   C_036900_CNTR_MODE                                          0xFF0FFFFF
   3469 #define R_036904_SX_PERFCOUNTER1_SELECT                                 0x036904
   3470 #define R_036908_SX_PERFCOUNTER2_SELECT                                 0x036908
   3471 #define R_03690C_SX_PERFCOUNTER3_SELECT                                 0x03690C
   3472 #define R_036910_SX_PERFCOUNTER0_SELECT1                                0x036910
   3473 #define   S_036910_PERFCOUNTER_SELECT2(x)                             (((unsigned)(x) & 0x3FF) << 0)
   3474 #define   G_036910_PERFCOUNTER_SELECT2(x)                             (((x) >> 0) & 0x3FF)
   3475 #define   C_036910_PERFCOUNTER_SELECT2                                0xFFFFFC00
   3476 #define   S_036910_PERFCOUNTER_SELECT3(x)                             (((unsigned)(x) & 0x3FF) << 10)
   3477 #define   G_036910_PERFCOUNTER_SELECT3(x)                             (((x) >> 10) & 0x3FF)
   3478 #define   C_036910_PERFCOUNTER_SELECT3                                0xFFF003FF
   3479 #define R_036914_SX_PERFCOUNTER1_SELECT1                                0x036914
   3480 #define R_036A00_GDS_PERFCOUNTER0_SELECT                                0x036A00
   3481 #define   S_036A00_PERFCOUNTER_SELECT(x)                              (((unsigned)(x) & 0x3FF) << 0)
   3482 #define   G_036A00_PERFCOUNTER_SELECT(x)                              (((x) >> 0) & 0x3FF)
   3483 #define   C_036A00_PERFCOUNTER_SELECT                                 0xFFFFFC00
   3484 #define   S_036A00_PERFCOUNTER_SELECT1(x)                             (((unsigned)(x) & 0x3FF) << 10)
   3485 #define   G_036A00_PERFCOUNTER_SELECT1(x)                             (((x) >> 10) & 0x3FF)
   3486 #define   C_036A00_PERFCOUNTER_SELECT1                                0xFFF003FF
   3487 #define   S_036A00_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3488 #define   G_036A00_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3489 #define   C_036A00_CNTR_MODE                                          0xFF0FFFFF
   3490 #define R_036A04_GDS_PERFCOUNTER1_SELECT                                0x036A04
   3491 #define R_036A08_GDS_PERFCOUNTER2_SELECT                                0x036A08
   3492 #define R_036A0C_GDS_PERFCOUNTER3_SELECT                                0x036A0C
   3493 #define R_036A10_GDS_PERFCOUNTER0_SELECT1                               0x036A10
   3494 #define   S_036A10_PERFCOUNTER_SELECT2(x)                             (((unsigned)(x) & 0x3FF) << 0)
   3495 #define   G_036A10_PERFCOUNTER_SELECT2(x)                             (((x) >> 0) & 0x3FF)
   3496 #define   C_036A10_PERFCOUNTER_SELECT2                                0xFFFFFC00
   3497 #define   S_036A10_PERFCOUNTER_SELECT3(x)                             (((unsigned)(x) & 0x3FF) << 10)
   3498 #define   G_036A10_PERFCOUNTER_SELECT3(x)                             (((x) >> 10) & 0x3FF)
   3499 #define   C_036A10_PERFCOUNTER_SELECT3                                0xFFF003FF
   3500 #define R_036B00_TA_PERFCOUNTER0_SELECT                                 0x036B00
   3501 #define   S_036B00_PERF_SEL(x)                                        (((unsigned)(x) & 0xFF) << 0)
   3502 #define   G_036B00_PERF_SEL(x)                                        (((x) >> 0) & 0xFF)
   3503 #define   C_036B00_PERF_SEL                                           0xFFFFFF00
   3504 #define   S_036B00_PERF_SEL1(x)                                       (((unsigned)(x) & 0xFF) << 10)
   3505 #define   G_036B00_PERF_SEL1(x)                                       (((x) >> 10) & 0xFF)
   3506 #define   C_036B00_PERF_SEL1                                          0xFFFC03FF
   3507 #define   S_036B00_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3508 #define   G_036B00_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3509 #define   C_036B00_CNTR_MODE                                          0xFF0FFFFF
   3510 #define   S_036B00_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3511 #define   G_036B00_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3512 #define   C_036B00_PERF_MODE1                                         0xF0FFFFFF
   3513 #define   S_036B00_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3514 #define   G_036B00_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3515 #define   C_036B00_PERF_MODE                                          0x0FFFFFFF
   3516 #define R_036B04_TA_PERFCOUNTER0_SELECT1                                0x036B04
   3517 #define   S_036B04_PERF_SEL2(x)                                       (((unsigned)(x) & 0xFF) << 0)
   3518 #define   G_036B04_PERF_SEL2(x)                                       (((x) >> 0) & 0xFF)
   3519 #define   C_036B04_PERF_SEL2                                          0xFFFFFF00
   3520 #define   S_036B04_PERF_SEL3(x)                                       (((unsigned)(x) & 0xFF) << 10)
   3521 #define   G_036B04_PERF_SEL3(x)                                       (((x) >> 10) & 0xFF)
   3522 #define   C_036B04_PERF_SEL3                                          0xFFFC03FF
   3523 #define   S_036B04_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3524 #define   G_036B04_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3525 #define   C_036B04_PERF_MODE3                                         0xF0FFFFFF
   3526 #define   S_036B04_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3527 #define   G_036B04_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3528 #define   C_036B04_PERF_MODE2                                         0x0FFFFFFF
   3529 #define R_036B08_TA_PERFCOUNTER1_SELECT                                 0x036B08
   3530 #define R_036C00_TD_PERFCOUNTER0_SELECT                                 0x036C00
   3531 #define   S_036C00_PERF_SEL(x)                                        (((unsigned)(x) & 0xFF) << 0)
   3532 #define   G_036C00_PERF_SEL(x)                                        (((x) >> 0) & 0xFF)
   3533 #define   C_036C00_PERF_SEL                                           0xFFFFFF00
   3534 #define   S_036C00_PERF_SEL1(x)                                       (((unsigned)(x) & 0xFF) << 10)
   3535 #define   G_036C00_PERF_SEL1(x)                                       (((x) >> 10) & 0xFF)
   3536 #define   C_036C00_PERF_SEL1                                          0xFFFC03FF
   3537 #define   S_036C00_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3538 #define   G_036C00_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3539 #define   C_036C00_CNTR_MODE                                          0xFF0FFFFF
   3540 #define   S_036C00_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3541 #define   G_036C00_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3542 #define   C_036C00_PERF_MODE1                                         0xF0FFFFFF
   3543 #define   S_036C00_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3544 #define   G_036C00_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3545 #define   C_036C00_PERF_MODE                                          0x0FFFFFFF
   3546 #define R_036C04_TD_PERFCOUNTER0_SELECT1                                0x036C04
   3547 #define   S_036C04_PERF_SEL2(x)                                       (((unsigned)(x) & 0xFF) << 0)
   3548 #define   G_036C04_PERF_SEL2(x)                                       (((x) >> 0) & 0xFF)
   3549 #define   C_036C04_PERF_SEL2                                          0xFFFFFF00
   3550 #define   S_036C04_PERF_SEL3(x)                                       (((unsigned)(x) & 0xFF) << 10)
   3551 #define   G_036C04_PERF_SEL3(x)                                       (((x) >> 10) & 0xFF)
   3552 #define   C_036C04_PERF_SEL3                                          0xFFFC03FF
   3553 #define   S_036C04_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3554 #define   G_036C04_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3555 #define   C_036C04_PERF_MODE3                                         0xF0FFFFFF
   3556 #define   S_036C04_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3557 #define   G_036C04_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3558 #define   C_036C04_PERF_MODE2                                         0x0FFFFFFF
   3559 #define R_036C08_TD_PERFCOUNTER1_SELECT                                 0x036C08
   3560 #define R_036D00_TCP_PERFCOUNTER0_SELECT                                0x036D00
   3561 #define   S_036D00_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3562 #define   G_036D00_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3563 #define   C_036D00_PERF_SEL                                           0xFFFFFC00
   3564 #define   S_036D00_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3565 #define   G_036D00_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3566 #define   C_036D00_PERF_SEL1                                          0xFFF003FF
   3567 #define   S_036D00_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3568 #define   G_036D00_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3569 #define   C_036D00_CNTR_MODE                                          0xFF0FFFFF
   3570 #define   S_036D00_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3571 #define   G_036D00_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3572 #define   C_036D00_PERF_MODE1                                         0xF0FFFFFF
   3573 #define   S_036D00_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3574 #define   G_036D00_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3575 #define   C_036D00_PERF_MODE                                          0x0FFFFFFF
   3576 #define R_036D04_TCP_PERFCOUNTER0_SELECT1                               0x036D04
   3577 #define   S_036D04_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3578 #define   G_036D04_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3579 #define   C_036D04_PERF_SEL2                                          0xFFFFFC00
   3580 #define   S_036D04_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3581 #define   G_036D04_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3582 #define   C_036D04_PERF_SEL3                                          0xFFF003FF
   3583 #define   S_036D04_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3584 #define   G_036D04_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   3585 #define   C_036D04_PERF_MODE3                                         0xF0FFFFFF
   3586 #define   S_036D04_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3587 #define   G_036D04_PERF_MODE2(x)                                      (((x) >> 28) & 0x0F)
   3588 #define   C_036D04_PERF_MODE2                                         0x0FFFFFFF
   3589 #define R_036D08_TCP_PERFCOUNTER1_SELECT                                0x036D08
   3590 #define R_036D0C_TCP_PERFCOUNTER1_SELECT1                               0x036D0C
   3591 #define R_036D10_TCP_PERFCOUNTER2_SELECT                                0x036D10
   3592 #define R_036D14_TCP_PERFCOUNTER3_SELECT                                0x036D14
   3593 #define R_036E00_TCC_PERFCOUNTER0_SELECT                                0x036E00
   3594 #define   S_036E00_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3595 #define   G_036E00_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3596 #define   C_036E00_PERF_SEL                                           0xFFFFFC00
   3597 #define   S_036E00_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3598 #define   G_036E00_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3599 #define   C_036E00_PERF_SEL1                                          0xFFF003FF
   3600 #define   S_036E00_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3601 #define   G_036E00_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3602 #define   C_036E00_CNTR_MODE                                          0xFF0FFFFF
   3603 #define   S_036E00_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3604 #define   G_036E00_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3605 #define   C_036E00_PERF_MODE1                                         0xF0FFFFFF
   3606 #define   S_036E00_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3607 #define   G_036E00_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3608 #define   C_036E00_PERF_MODE                                          0x0FFFFFFF
   3609 #define R_036E04_TCC_PERFCOUNTER0_SELECT1                               0x036E04
   3610 #define   S_036E04_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3611 #define   G_036E04_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3612 #define   C_036E04_PERF_SEL2                                          0xFFFFFC00
   3613 #define   S_036E04_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3614 #define   G_036E04_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3615 #define   C_036E04_PERF_SEL3                                          0xFFF003FF
   3616 #define   S_036E04_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3617 #define   G_036E04_PERF_MODE2(x)                                      (((x) >> 24) & 0x0F)
   3618 #define   C_036E04_PERF_MODE2                                         0xF0FFFFFF
   3619 #define   S_036E04_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3620 #define   G_036E04_PERF_MODE3(x)                                      (((x) >> 28) & 0x0F)
   3621 #define   C_036E04_PERF_MODE3                                         0x0FFFFFFF
   3622 #define R_036E08_TCC_PERFCOUNTER1_SELECT                                0x036E08
   3623 #define R_036E0C_TCC_PERFCOUNTER1_SELECT1                               0x036E0C
   3624 #define R_036E10_TCC_PERFCOUNTER2_SELECT                                0x036E10
   3625 #define R_036E14_TCC_PERFCOUNTER3_SELECT                                0x036E14
   3626 #define R_036E40_TCA_PERFCOUNTER0_SELECT                                0x036E40
   3627 #define   S_036E40_PERF_SEL(x)                                        (((unsigned)(x) & 0x3FF) << 0)
   3628 #define   G_036E40_PERF_SEL(x)                                        (((x) >> 0) & 0x3FF)
   3629 #define   C_036E40_PERF_SEL                                           0xFFFFFC00
   3630 #define   S_036E40_PERF_SEL1(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3631 #define   G_036E40_PERF_SEL1(x)                                       (((x) >> 10) & 0x3FF)
   3632 #define   C_036E40_PERF_SEL1                                          0xFFF003FF
   3633 #define   S_036E40_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3634 #define   G_036E40_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3635 #define   C_036E40_CNTR_MODE                                          0xFF0FFFFF
   3636 #define   S_036E40_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3637 #define   G_036E40_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3638 #define   C_036E40_PERF_MODE1                                         0xF0FFFFFF
   3639 #define   S_036E40_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3640 #define   G_036E40_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3641 #define   C_036E40_PERF_MODE                                          0x0FFFFFFF
   3642 #define R_036E44_TCA_PERFCOUNTER0_SELECT1                               0x036E44
   3643 #define   S_036E44_PERF_SEL2(x)                                       (((unsigned)(x) & 0x3FF) << 0)
   3644 #define   G_036E44_PERF_SEL2(x)                                       (((x) >> 0) & 0x3FF)
   3645 #define   C_036E44_PERF_SEL2                                          0xFFFFFC00
   3646 #define   S_036E44_PERF_SEL3(x)                                       (((unsigned)(x) & 0x3FF) << 10)
   3647 #define   G_036E44_PERF_SEL3(x)                                       (((x) >> 10) & 0x3FF)
   3648 #define   C_036E44_PERF_SEL3                                          0xFFF003FF
   3649 #define   S_036E44_PERF_MODE2(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3650 #define   G_036E44_PERF_MODE2(x)                                      (((x) >> 24) & 0x0F)
   3651 #define   C_036E44_PERF_MODE2                                         0xF0FFFFFF
   3652 #define   S_036E44_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 28)
   3653 #define   G_036E44_PERF_MODE3(x)                                      (((x) >> 28) & 0x0F)
   3654 #define   C_036E44_PERF_MODE3                                         0x0FFFFFFF
   3655 #define R_036E48_TCA_PERFCOUNTER1_SELECT                                0x036E48
   3656 #define R_036E4C_TCA_PERFCOUNTER1_SELECT1                               0x036E4C
   3657 #define R_036E50_TCA_PERFCOUNTER2_SELECT                                0x036E50
   3658 #define R_036E54_TCA_PERFCOUNTER3_SELECT                                0x036E54
   3659 #define R_037000_CB_PERFCOUNTER_FILTER                                  0x037000
   3660 #define   S_037000_OP_FILTER_ENABLE(x)                                (((unsigned)(x) & 0x1) << 0)
   3661 #define   G_037000_OP_FILTER_ENABLE(x)                                (((x) >> 0) & 0x1)
   3662 #define   C_037000_OP_FILTER_ENABLE                                   0xFFFFFFFE
   3663 #define   S_037000_OP_FILTER_SEL(x)                                   (((unsigned)(x) & 0x07) << 1)
   3664 #define   G_037000_OP_FILTER_SEL(x)                                   (((x) >> 1) & 0x07)
   3665 #define   C_037000_OP_FILTER_SEL                                      0xFFFFFFF1
   3666 #define   S_037000_FORMAT_FILTER_ENABLE(x)                            (((unsigned)(x) & 0x1) << 4)
   3667 #define   G_037000_FORMAT_FILTER_ENABLE(x)                            (((x) >> 4) & 0x1)
   3668 #define   C_037000_FORMAT_FILTER_ENABLE                               0xFFFFFFEF
   3669 #define   S_037000_FORMAT_FILTER_SEL(x)                               (((unsigned)(x) & 0x1F) << 5)
   3670 #define   G_037000_FORMAT_FILTER_SEL(x)                               (((x) >> 5) & 0x1F)
   3671 #define   C_037000_FORMAT_FILTER_SEL                                  0xFFFFFC1F
   3672 #define   S_037000_CLEAR_FILTER_ENABLE(x)                             (((unsigned)(x) & 0x1) << 10)
   3673 #define   G_037000_CLEAR_FILTER_ENABLE(x)                             (((x) >> 10) & 0x1)
   3674 #define   C_037000_CLEAR_FILTER_ENABLE                                0xFFFFFBFF
   3675 #define   S_037000_CLEAR_FILTER_SEL(x)                                (((unsigned)(x) & 0x1) << 11)
   3676 #define   G_037000_CLEAR_FILTER_SEL(x)                                (((x) >> 11) & 0x1)
   3677 #define   C_037000_CLEAR_FILTER_SEL                                   0xFFFFF7FF
   3678 #define   S_037000_MRT_FILTER_ENABLE(x)                               (((unsigned)(x) & 0x1) << 12)
   3679 #define   G_037000_MRT_FILTER_ENABLE(x)                               (((x) >> 12) & 0x1)
   3680 #define   C_037000_MRT_FILTER_ENABLE                                  0xFFFFEFFF
   3681 #define   S_037000_MRT_FILTER_SEL(x)                                  (((unsigned)(x) & 0x07) << 13)
   3682 #define   G_037000_MRT_FILTER_SEL(x)                                  (((x) >> 13) & 0x07)
   3683 #define   C_037000_MRT_FILTER_SEL                                     0xFFFF1FFF
   3684 #define   S_037000_NUM_SAMPLES_FILTER_ENABLE(x)                       (((unsigned)(x) & 0x1) << 17)
   3685 #define   G_037000_NUM_SAMPLES_FILTER_ENABLE(x)                       (((x) >> 17) & 0x1)
   3686 #define   C_037000_NUM_SAMPLES_FILTER_ENABLE                          0xFFFDFFFF
   3687 #define   S_037000_NUM_SAMPLES_FILTER_SEL(x)                          (((unsigned)(x) & 0x07) << 18)
   3688 #define   G_037000_NUM_SAMPLES_FILTER_SEL(x)                          (((x) >> 18) & 0x07)
   3689 #define   C_037000_NUM_SAMPLES_FILTER_SEL                             0xFFE3FFFF
   3690 #define   S_037000_NUM_FRAGMENTS_FILTER_ENABLE(x)                     (((unsigned)(x) & 0x1) << 21)
   3691 #define   G_037000_NUM_FRAGMENTS_FILTER_ENABLE(x)                     (((x) >> 21) & 0x1)
   3692 #define   C_037000_NUM_FRAGMENTS_FILTER_ENABLE                        0xFFDFFFFF
   3693 #define   S_037000_NUM_FRAGMENTS_FILTER_SEL(x)                        (((unsigned)(x) & 0x03) << 22)
   3694 #define   G_037000_NUM_FRAGMENTS_FILTER_SEL(x)                        (((x) >> 22) & 0x03)
   3695 #define   C_037000_NUM_FRAGMENTS_FILTER_SEL                           0xFF3FFFFF
   3696 #define R_037004_CB_PERFCOUNTER0_SELECT                                 0x037004
   3697 #define   S_037004_PERF_SEL(x)                                        (((unsigned)(x) & 0x1FF) << 0)
   3698 #define   G_037004_PERF_SEL(x)                                        (((x) >> 0) & 0x1FF)
   3699 #define   C_037004_PERF_SEL                                           0xFFFFFE00
   3700 #define   S_037004_PERF_SEL1(x)                                       (((unsigned)(x) & 0x1FF) << 10)
   3701 #define   G_037004_PERF_SEL1(x)                                       (((x) >> 10) & 0x1FF)
   3702 #define   C_037004_PERF_SEL1                                          0xFFF803FF
   3703 #define   S_037004_CNTR_MODE(x)                                       (((unsigned)(x) & 0x0F) << 20)
   3704 #define   G_037004_CNTR_MODE(x)                                       (((x) >> 20) & 0x0F)
   3705 #define   C_037004_CNTR_MODE                                          0xFF0FFFFF
   3706 #define   S_037004_PERF_MODE1(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3707 #define   G_037004_PERF_MODE1(x)                                      (((x) >> 24) & 0x0F)
   3708 #define   C_037004_PERF_MODE1                                         0xF0FFFFFF
   3709 #define   S_037004_PERF_MODE(x)                                       (((unsigned)(x) & 0x0F) << 28)
   3710 #define   G_037004_PERF_MODE(x)                                       (((x) >> 28) & 0x0F)
   3711 #define   C_037004_PERF_MODE                                          0x0FFFFFFF
   3712 #define R_037008_CB_PERFCOUNTER0_SELECT1                                0x037008
   3713 #define   S_037008_PERF_SEL2(x)                                       (((unsigned)(x) & 0x1FF) << 0)
   3714 #define   G_037008_PERF_SEL2(x)                                       (((x) >> 0) & 0x1FF)
   3715 #define   C_037008_PERF_SEL2                                          0xFFFFFE00
   3716 #define   S_037008_PERF_SEL3(x)                                       (((unsigned)(x) & 0x1FF) << 10)
   3717 #define   G_037008_PERF_SEL3(x)                                       (((x) >> 10) & 0x1FF)
   3718 #define   C_037008_PERF_SEL3                                          0xFFF803FF
   3719 #define   S_037008_PERF_MODE3(x)                                      (((unsigned)(x) & 0x0F) << 24)
   3720 #define   G_037008_PERF_MODE3(x)                                      (((x) >> 24) & 0x0F)
   372