1 /*
2  * Copyright 2019 Advanced Micro Devices, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20  * OTHER DEALINGS IN THE SOFTWARE.
21  *
22  */
23 
24 #include <linux/delay.h>
25 #include <linux/kernel.h>
26 #include <linux/firmware.h>
27 #include <linux/module.h>
28 #include <linux/pci.h>
29 #include "amdgpu.h"
30 #include "amdgpu_gfx.h"
31 #include "amdgpu_psp.h"
32 #include "nv.h"
33 #include "nvd.h"
34 
35 #include "gc/gc_10_1_0_offset.h"
36 #include "gc/gc_10_1_0_sh_mask.h"
37 #include "smuio/smuio_11_0_0_offset.h"
38 #include "smuio/smuio_11_0_0_sh_mask.h"
39 #include "navi10_enum.h"
40 #include "ivsrcid/gfx/irqsrcs_gfx_10_1.h"
41 
42 #include "soc15.h"
43 #include "soc15d.h"
44 #include "soc15_common.h"
45 #include "clearstate_gfx10.h"
46 #include "v10_structs.h"
47 #include "gfx_v10_0.h"
48 #include "nbio_v2_3.h"
49 
50 /*
51  * Navi10 has two graphic rings to share each graphic pipe.
52  * 1. Primary ring
53  * 2. Async ring
54  */
55 #define GFX10_NUM_GFX_RINGS_NV1X	1
56 #define GFX10_NUM_GFX_RINGS_Sienna_Cichlid	1
57 #define GFX10_MEC_HPD_SIZE	2048
58 
59 #define F32_CE_PROGRAM_RAM_SIZE		65536
60 #define RLCG_UCODE_LOADING_START_ADDRESS	0x00002000L
61 
62 #define mmCGTT_GS_NGG_CLK_CTRL	0x5087
63 #define mmCGTT_GS_NGG_CLK_CTRL_BASE_IDX	1
64 #define mmCGTT_SPI_RA0_CLK_CTRL 0x507a
65 #define mmCGTT_SPI_RA0_CLK_CTRL_BASE_IDX 1
66 #define mmCGTT_SPI_RA1_CLK_CTRL 0x507b
67 #define mmCGTT_SPI_RA1_CLK_CTRL_BASE_IDX 1
68 
69 #define GB_ADDR_CONFIG__NUM_PKRS__SHIFT                                                                       0x8
70 #define GB_ADDR_CONFIG__NUM_PKRS_MASK                                                                         0x00000700L
71 
72 #define mmCGTS_TCC_DISABLE_gc_10_3                 0x5006
73 #define mmCGTS_TCC_DISABLE_gc_10_3_BASE_IDX        1
74 #define mmCGTS_USER_TCC_DISABLE_gc_10_3            0x5007
75 #define mmCGTS_USER_TCC_DISABLE_gc_10_3_BASE_IDX   1
76 
77 #define mmCP_MEC_CNTL_Sienna_Cichlid                      0x0f55
78 #define mmCP_MEC_CNTL_Sienna_Cichlid_BASE_IDX             0
79 #define mmRLC_SAFE_MODE_Sienna_Cichlid			0x4ca0
80 #define mmRLC_SAFE_MODE_Sienna_Cichlid_BASE_IDX		1
81 #define mmRLC_CP_SCHEDULERS_Sienna_Cichlid		0x4ca1
82 #define mmRLC_CP_SCHEDULERS_Sienna_Cichlid_BASE_IDX	1
83 #define mmSPI_CONFIG_CNTL_Sienna_Cichlid			0x11ec
84 #define mmSPI_CONFIG_CNTL_Sienna_Cichlid_BASE_IDX		0
85 #define mmVGT_ESGS_RING_SIZE_Sienna_Cichlid		0x0fc1
86 #define mmVGT_ESGS_RING_SIZE_Sienna_Cichlid_BASE_IDX	0
87 #define mmVGT_GSVS_RING_SIZE_Sienna_Cichlid		0x0fc2
88 #define mmVGT_GSVS_RING_SIZE_Sienna_Cichlid_BASE_IDX	0
89 #define mmVGT_TF_RING_SIZE_Sienna_Cichlid			0x0fc3
90 #define mmVGT_TF_RING_SIZE_Sienna_Cichlid_BASE_IDX	0
91 #define mmVGT_HS_OFFCHIP_PARAM_Sienna_Cichlid		0x0fc4
92 #define mmVGT_HS_OFFCHIP_PARAM_Sienna_Cichlid_BASE_IDX	0
93 #define mmVGT_TF_MEMORY_BASE_Sienna_Cichlid		0x0fc5
94 #define mmVGT_TF_MEMORY_BASE_Sienna_Cichlid_BASE_IDX	0
95 #define mmVGT_TF_MEMORY_BASE_HI_Sienna_Cichlid		0x0fc6
96 #define mmVGT_TF_MEMORY_BASE_HI_Sienna_Cichlid_BASE_IDX	0
97 #define GRBM_STATUS2__RLC_BUSY_Sienna_Cichlid__SHIFT	0x1a
98 #define GRBM_STATUS2__RLC_BUSY_Sienna_Cichlid_MASK	0x04000000L
99 #define CP_RB_DOORBELL_RANGE_LOWER__DOORBELL_RANGE_LOWER_Sienna_Cichlid_MASK	0x00000FFCL
100 #define CP_RB_DOORBELL_RANGE_LOWER__DOORBELL_RANGE_LOWER_Sienna_Cichlid__SHIFT	0x2
101 #define CP_RB_DOORBELL_RANGE_UPPER__DOORBELL_RANGE_UPPER_Sienna_Cichlid_MASK	0x00000FFCL
102 #define mmGCR_GENERAL_CNTL_Sienna_Cichlid			0x1580
103 #define mmGCR_GENERAL_CNTL_Sienna_Cichlid_BASE_IDX	0
104 
105 #define mmGOLDEN_TSC_COUNT_UPPER_Vangogh                0x0025
106 #define mmGOLDEN_TSC_COUNT_UPPER_Vangogh_BASE_IDX       1
107 #define mmGOLDEN_TSC_COUNT_LOWER_Vangogh                0x0026
108 #define mmGOLDEN_TSC_COUNT_LOWER_Vangogh_BASE_IDX       1
109 #define mmSPI_CONFIG_CNTL_1_Vangogh		 0x2441
110 #define mmSPI_CONFIG_CNTL_1_Vangogh_BASE_IDX	 1
111 #define mmVGT_TF_MEMORY_BASE_HI_Vangogh          0x2261
112 #define mmVGT_TF_MEMORY_BASE_HI_Vangogh_BASE_IDX 1
113 #define mmVGT_HS_OFFCHIP_PARAM_Vangogh           0x224f
114 #define mmVGT_HS_OFFCHIP_PARAM_Vangogh_BASE_IDX  1
115 #define mmVGT_TF_RING_SIZE_Vangogh               0x224e
116 #define mmVGT_TF_RING_SIZE_Vangogh_BASE_IDX      1
117 #define mmVGT_GSVS_RING_SIZE_Vangogh             0x2241
118 #define mmVGT_GSVS_RING_SIZE_Vangogh_BASE_IDX    1
119 #define mmVGT_TF_MEMORY_BASE_Vangogh             0x2250
120 #define mmVGT_TF_MEMORY_BASE_Vangogh_BASE_IDX    1
121 #define mmVGT_ESGS_RING_SIZE_Vangogh             0x2240
122 #define mmVGT_ESGS_RING_SIZE_Vangogh_BASE_IDX    1
123 #define mmSPI_CONFIG_CNTL_Vangogh                0x2440
124 #define mmSPI_CONFIG_CNTL_Vangogh_BASE_IDX       1
125 #define mmGCR_GENERAL_CNTL_Vangogh               0x1580
126 #define mmGCR_GENERAL_CNTL_Vangogh_BASE_IDX      0
127 #define RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK_Vangogh   0x0000FFFFL
128 
129 #define mmCP_HYP_PFP_UCODE_ADDR			0x5814
130 #define mmCP_HYP_PFP_UCODE_ADDR_BASE_IDX	1
131 #define mmCP_HYP_PFP_UCODE_DATA			0x5815
132 #define mmCP_HYP_PFP_UCODE_DATA_BASE_IDX	1
133 #define mmCP_HYP_CE_UCODE_ADDR			0x5818
134 #define mmCP_HYP_CE_UCODE_ADDR_BASE_IDX		1
135 #define mmCP_HYP_CE_UCODE_DATA			0x5819
136 #define mmCP_HYP_CE_UCODE_DATA_BASE_IDX		1
137 #define mmCP_HYP_ME_UCODE_ADDR			0x5816
138 #define mmCP_HYP_ME_UCODE_ADDR_BASE_IDX		1
139 #define mmCP_HYP_ME_UCODE_DATA			0x5817
140 #define mmCP_HYP_ME_UCODE_DATA_BASE_IDX		1
141 
142 #define mmCPG_PSP_DEBUG				0x5c10
143 #define mmCPG_PSP_DEBUG_BASE_IDX		1
144 #define mmCPC_PSP_DEBUG				0x5c11
145 #define mmCPC_PSP_DEBUG_BASE_IDX		1
146 #define CPC_PSP_DEBUG__GPA_OVERRIDE_MASK	0x00000008L
147 #define CPG_PSP_DEBUG__GPA_OVERRIDE_MASK	0x00000008L
148 
149 //CC_GC_SA_UNIT_DISABLE
150 #define mmCC_GC_SA_UNIT_DISABLE                 0x0fe9
151 #define mmCC_GC_SA_UNIT_DISABLE_BASE_IDX        0
152 #define CC_GC_SA_UNIT_DISABLE__SA_DISABLE__SHIFT	0x8
153 #define CC_GC_SA_UNIT_DISABLE__SA_DISABLE_MASK		0x0000FF00L
154 //GC_USER_SA_UNIT_DISABLE
155 #define mmGC_USER_SA_UNIT_DISABLE               0x0fea
156 #define mmGC_USER_SA_UNIT_DISABLE_BASE_IDX      0
157 #define GC_USER_SA_UNIT_DISABLE__SA_DISABLE__SHIFT	0x8
158 #define GC_USER_SA_UNIT_DISABLE__SA_DISABLE_MASK	0x0000FF00L
159 //PA_SC_ENHANCE_3
160 #define mmPA_SC_ENHANCE_3                       0x1085
161 #define mmPA_SC_ENHANCE_3_BASE_IDX              0
162 #define PA_SC_ENHANCE_3__FORCE_PBB_WORKLOAD_MODE_TO_ZERO__SHIFT 0x3
163 #define PA_SC_ENHANCE_3__FORCE_PBB_WORKLOAD_MODE_TO_ZERO_MASK   0x00000008L
164 
165 #define mmCGTT_SPI_CS_CLK_CTRL			0x507c
166 #define mmCGTT_SPI_CS_CLK_CTRL_BASE_IDX         1
167 
168 #define mmGCUTCL2_CGTT_CLK_CTRL_Sienna_Cichlid		0x16f3
169 #define mmGCUTCL2_CGTT_CLK_CTRL_Sienna_Cichlid_BASE_IDX	0
170 #define mmGCVM_L2_CGTT_CLK_CTRL_Sienna_Cichlid          0x15db
171 #define mmGCVM_L2_CGTT_CLK_CTRL_Sienna_Cichlid_BASE_IDX	0
172 
173 #define mmGC_THROTTLE_CTRL_Sienna_Cichlid              0x2030
174 #define mmGC_THROTTLE_CTRL_Sienna_Cichlid_BASE_IDX     0
175 
176 #define mmRLC_SPARE_INT_0_Sienna_Cichlid               0x4ca5
177 #define mmRLC_SPARE_INT_0_Sienna_Cichlid_BASE_IDX      1
178 
179 #define GFX_RLCG_GC_WRITE_OLD	(0x8 << 28)
180 #define GFX_RLCG_GC_WRITE	(0x0 << 28)
181 #define GFX_RLCG_GC_READ	(0x1 << 28)
182 #define GFX_RLCG_MMHUB_WRITE	(0x2 << 28)
183 
184 MODULE_FIRMWARE("amdgpu/navi10_ce.bin");
185 MODULE_FIRMWARE("amdgpu/navi10_pfp.bin");
186 MODULE_FIRMWARE("amdgpu/navi10_me.bin");
187 MODULE_FIRMWARE("amdgpu/navi10_mec.bin");
188 MODULE_FIRMWARE("amdgpu/navi10_mec2.bin");
189 MODULE_FIRMWARE("amdgpu/navi10_rlc.bin");
190 
191 MODULE_FIRMWARE("amdgpu/navi14_ce_wks.bin");
192 MODULE_FIRMWARE("amdgpu/navi14_pfp_wks.bin");
193 MODULE_FIRMWARE("amdgpu/navi14_me_wks.bin");
194 MODULE_FIRMWARE("amdgpu/navi14_mec_wks.bin");
195 MODULE_FIRMWARE("amdgpu/navi14_mec2_wks.bin");
196 MODULE_FIRMWARE("amdgpu/navi14_ce.bin");
197 MODULE_FIRMWARE("amdgpu/navi14_pfp.bin");
198 MODULE_FIRMWARE("amdgpu/navi14_me.bin");
199 MODULE_FIRMWARE("amdgpu/navi14_mec.bin");
200 MODULE_FIRMWARE("amdgpu/navi14_mec2.bin");
201 MODULE_FIRMWARE("amdgpu/navi14_rlc.bin");
202 
203 MODULE_FIRMWARE("amdgpu/navi12_ce.bin");
204 MODULE_FIRMWARE("amdgpu/navi12_pfp.bin");
205 MODULE_FIRMWARE("amdgpu/navi12_me.bin");
206 MODULE_FIRMWARE("amdgpu/navi12_mec.bin");
207 MODULE_FIRMWARE("amdgpu/navi12_mec2.bin");
208 MODULE_FIRMWARE("amdgpu/navi12_rlc.bin");
209 
210 MODULE_FIRMWARE("amdgpu/sienna_cichlid_ce.bin");
211 MODULE_FIRMWARE("amdgpu/sienna_cichlid_pfp.bin");
212 MODULE_FIRMWARE("amdgpu/sienna_cichlid_me.bin");
213 MODULE_FIRMWARE("amdgpu/sienna_cichlid_mec.bin");
214 MODULE_FIRMWARE("amdgpu/sienna_cichlid_mec2.bin");
215 MODULE_FIRMWARE("amdgpu/sienna_cichlid_rlc.bin");
216 
217 MODULE_FIRMWARE("amdgpu/navy_flounder_ce.bin");
218 MODULE_FIRMWARE("amdgpu/navy_flounder_pfp.bin");
219 MODULE_FIRMWARE("amdgpu/navy_flounder_me.bin");
220 MODULE_FIRMWARE("amdgpu/navy_flounder_mec.bin");
221 MODULE_FIRMWARE("amdgpu/navy_flounder_mec2.bin");
222 MODULE_FIRMWARE("amdgpu/navy_flounder_rlc.bin");
223 
224 MODULE_FIRMWARE("amdgpu/vangogh_ce.bin");
225 MODULE_FIRMWARE("amdgpu/vangogh_pfp.bin");
226 MODULE_FIRMWARE("amdgpu/vangogh_me.bin");
227 MODULE_FIRMWARE("amdgpu/vangogh_mec.bin");
228 MODULE_FIRMWARE("amdgpu/vangogh_mec2.bin");
229 MODULE_FIRMWARE("amdgpu/vangogh_rlc.bin");
230 
231 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_ce.bin");
232 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_pfp.bin");
233 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_me.bin");
234 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_mec.bin");
235 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_mec2.bin");
236 MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_rlc.bin");
237 
238 MODULE_FIRMWARE("amdgpu/beige_goby_ce.bin");
239 MODULE_FIRMWARE("amdgpu/beige_goby_pfp.bin");
240 MODULE_FIRMWARE("amdgpu/beige_goby_me.bin");
241 MODULE_FIRMWARE("amdgpu/beige_goby_mec.bin");
242 MODULE_FIRMWARE("amdgpu/beige_goby_mec2.bin");
243 MODULE_FIRMWARE("amdgpu/beige_goby_rlc.bin");
244 
245 MODULE_FIRMWARE("amdgpu/yellow_carp_ce.bin");
246 MODULE_FIRMWARE("amdgpu/yellow_carp_pfp.bin");
247 MODULE_FIRMWARE("amdgpu/yellow_carp_me.bin");
248 MODULE_FIRMWARE("amdgpu/yellow_carp_mec.bin");
249 MODULE_FIRMWARE("amdgpu/yellow_carp_mec2.bin");
250 MODULE_FIRMWARE("amdgpu/yellow_carp_rlc.bin");
251 
252 static const struct soc15_reg_golden golden_settings_gc_10_1[] =
253 {
254 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_4, 0xffffffff, 0x00400014),
255 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_CPF_CLK_CTRL, 0xfcff8fff, 0xf8000100),
256 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CLK_CTRL, 0xcd000000, 0x0d000100),
257 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQ_CLK_CTRL, 0x60000ff0, 0x60000100),
258 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQG_CLK_CTRL, 0x40000000, 0x40000100),
259 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_VGT_CLK_CTRL, 0xffff8fff, 0xffff8100),
260 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_WD_CLK_CTRL, 0xfeff8fff, 0xfeff8100),
261 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
262 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_VC5_ENABLE, 0x00000002, 0x00000000),
263 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCP_SD_CNTL, 0x000007ff, 0x000005ff),
264 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG, 0x20000000, 0x20000000),
265 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG2, 0xffffffff, 0x00000420),
266 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0x00000200, 0x00000200),
267 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0x07900000, 0x04900000),
268 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DFSM_TILES_IN_FLIGHT, 0x0000ffff, 0x0000003f),
269 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_LAST_OF_BURST_CONFIG, 0xffffffff, 0x03860204),
270 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL, 0x1ff0ffff, 0x00000500),
271 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PRIV_CONTROL, 0x000007ff, 0x000001fe),
272 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL1_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
273 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_0, 0x77777777, 0x10321032),
274 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_1, 0x77777777, 0x02310231),
275 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
276 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
277 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CGTT_SCLK_CTRL, 0x10000000, 0x10000100),
278 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL2, 0xffffffff, 0x1402002f),
279 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xffff9fff, 0x00001188),
280 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
281 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x08000009),
282 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0x00400000, 0x04440000),
283 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000800, 0x00000820),
284 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
285 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRMI_SPARE, 0xffffffff, 0xffff3101),
286 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0x001f0000, 0x00070104),
287 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ALU_CLK_CTRL, 0xffffffff, 0xffffffff),
288 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ARB_CONFIG, 0x00000100, 0x00000130),
289 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_LDS_CLK_CTRL, 0xffffffff, 0xffffffff),
290 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
291 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CNTL, 0x60000010, 0x479c0010),
292 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CGTT_CLK_CTRL, 0xfeff0fff, 0x40000100),
293 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0x00c00000, 0x00c00000)
294 };
295 
296 static const struct soc15_reg_golden golden_settings_gc_10_0_nv10[] =
297 {
298 	/* Pending on emulation bring up */
299 };
300 
301 static const struct soc15_reg_golden golden_settings_gc_rlc_spm_10_0_nv10[] =
302 {
303 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xe0000000, 0x0),
304 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
305 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
306 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
307 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
308 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
309 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
310 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
311 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
312 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
313 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
314 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
315 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
316 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
317 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
318 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
319 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
320 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
321 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
322 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
323 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
324 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
325 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
326 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
327 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
328 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
329 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
330 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
331 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
332 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
333 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
334 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
335 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
336 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
337 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
338 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
339 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
340 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
341 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
342 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
343 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
344 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
345 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
346 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
347 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
348 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
349 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
350 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
351 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
352 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
353 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
354 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
355 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
356 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
357 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
358 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
359 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
360 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
361 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
362 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
363 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
364 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
365 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
366 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
367 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
368 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
369 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
370 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
371 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
372 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
373 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
374 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
375 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
376 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
377 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
378 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
379 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
380 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
381 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
382 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
383 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
384 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
385 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
386 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
387 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
388 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
389 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
390 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
391 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
392 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
393 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
394 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
395 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
396 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
397 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
398 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
399 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
400 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
401 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
402 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
403 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
404 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
405 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
406 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
407 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
408 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
409 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
410 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
411 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
412 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
413 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
414 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
415 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
416 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
417 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
418 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
419 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
420 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
421 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
422 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
423 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
424 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
425 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
426 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
427 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
428 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
429 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
430 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
431 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
432 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
433 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
434 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
435 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
436 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
437 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
438 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
439 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
440 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
441 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
442 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
443 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
444 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
445 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
446 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
447 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
448 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
449 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
450 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
451 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
452 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
453 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
454 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
455 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
456 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
457 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
458 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
459 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
460 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
461 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
462 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
463 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
464 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
465 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
466 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
467 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
468 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
469 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
470 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
471 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
472 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
473 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
474 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
475 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
476 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
477 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
478 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
479 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
480 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
481 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
482 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
483 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
484 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
485 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
486 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
487 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
488 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
489 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
490 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
491 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
492 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
493 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
494 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
495 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
496 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
497 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
498 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
499 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
500 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
501 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
502 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
503 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
504 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
505 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
506 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
507 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
508 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
509 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
510 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
511 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
512 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
513 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
514 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
515 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
516 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
517 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
518 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
519 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
520 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
521 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c),
522 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
523 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
524 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
525 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
526 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
527 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
528 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
529 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
530 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
531 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
532 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
533 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
534 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
535 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
536 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
537 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
538 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
539 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
540 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
541 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
542 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
543 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
544 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
545 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
546 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
547 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
548 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
549 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
550 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
551 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
552 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
553 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
554 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
555 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
556 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
557 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
558 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
559 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
560 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
561 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
562 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
563 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
564 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
565 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
566 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
567 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
568 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
569 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
570 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
571 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
572 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
573 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
574 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
575 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
576 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
577 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
578 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
579 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
580 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
581 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
582 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
583 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
584 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
585 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
586 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
587 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
588 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
589 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
590 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
591 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
592 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
593 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
594 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
595 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
596 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
597 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
598 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
599 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
600 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
601 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
602 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
603 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
604 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
605 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
606 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
607 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
608 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
609 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
610 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
611 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
612 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
613 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
614 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
615 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
616 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
617 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
618 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
619 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
620 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
621 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
622 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
623 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
624 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
625 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
626 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
627 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
628 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
629 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
630 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
631 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
632 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
633 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
634 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
635 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
636 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
637 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
638 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
639 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
640 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
641 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
642 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
643 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
644 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
645 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
646 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
647 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
648 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
649 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
650 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
651 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
652 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
653 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
654 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
655 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
656 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
657 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
658 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
659 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
660 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
661 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
662 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
663 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
664 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
665 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
666 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
667 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
668 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
669 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
670 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
671 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
672 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
673 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
674 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
675 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
676 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
677 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
678 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
679 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
680 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
681 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
682 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
683 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
684 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
685 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
686 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
687 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
688 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
689 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
690 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
691 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
692 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
693 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
694 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
695 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
696 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
697 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
698 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
699 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
700 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
701 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
702 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
703 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
704 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
705 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
706 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
707 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
708 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
709 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
710 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
711 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
712 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
713 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
714 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
715 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
716 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
717 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
718 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
719 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
720 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
721 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
722 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
723 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
724 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
725 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
726 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
727 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
728 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
729 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
730 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
731 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
732 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
733 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
734 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
735 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
736 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
737 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
738 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
739 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
740 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
741 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
742 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
743 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
744 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
745 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
746 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
747 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
748 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
749 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
750 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
751 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
752 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
753 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
754 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
755 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
756 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
757 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
758 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
759 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
760 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
761 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
762 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
763 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
764 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
765 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
766 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
767 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
768 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
769 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
770 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
771 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
772 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
773 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
774 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
775 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
776 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
777 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
778 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
779 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
780 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
781 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
782 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
783 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
784 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
785 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
786 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
787 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
788 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
789 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
790 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
791 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
792 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
793 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
794 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
795 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
796 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
797 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
798 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
799 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
800 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
801 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
802 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
803 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
804 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
805 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
806 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
807 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
808 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
809 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
810 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
811 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
812 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
813 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
814 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
815 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
816 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
817 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
818 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
819 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
820 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
821 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
822 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
823 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
824 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
825 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
826 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
827 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
828 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
829 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
830 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
831 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
832 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
833 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
834 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
835 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
836 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
837 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
838 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
839 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
840 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
841 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
842 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
843 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
844 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
845 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
846 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
847 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
848 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
849 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
850 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
851 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
852 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
853 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
854 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
855 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
856 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
857 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
858 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
859 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
860 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
861 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
862 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
863 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
864 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
865 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
866 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
867 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
868 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
869 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
870 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
871 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
872 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
873 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
874 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
875 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
876 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
877 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
878 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
879 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
880 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
881 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
882 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
883 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
884 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
885 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
886 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
887 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
888 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
889 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
890 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
891 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
892 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
893 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
894 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
895 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
896 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
897 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
898 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
899 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
900 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
901 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
902 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
903 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
904 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
905 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
906 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
907 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
908 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
909 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
910 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
911 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
912 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
913 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
914 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
915 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
916 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
917 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
918 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
919 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
920 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
921 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe8),
922 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
923 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
924 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
925 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe8),
926 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
927 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
928 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
929 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xec),
930 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
931 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
932 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
933 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xec),
934 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
935 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
936 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
937 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf0),
938 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
939 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
940 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
941 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf0),
942 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
943 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
944 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
945 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf4),
946 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
947 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
948 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
949 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf4),
950 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
951 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
952 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
953 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf8),
954 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
955 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
956 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
957 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf8),
958 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
959 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
960 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
961 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xfc),
962 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
963 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
964 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
965 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xfc),
966 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
967 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
968 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
969 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x100),
970 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
971 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
972 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
973 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x100),
974 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
975 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
976 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
977 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x104),
978 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
979 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
980 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
981 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x104),
982 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
983 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
984 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
985 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe0),
986 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
987 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
988 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
989 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe0),
990 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
991 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
992 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
993 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x118),
994 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
995 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
996 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
997 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x118),
998 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
999 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1000 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1001 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x11c),
1002 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1003 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1004 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1005 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x11c),
1006 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1007 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1008 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1009 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x120),
1010 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1011 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1012 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1013 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x120),
1014 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1015 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1016 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1017 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x124),
1018 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1019 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1020 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1021 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x124),
1022 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1023 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
1024 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1025 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xdc),
1026 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1027 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
1028 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1029 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xdc),
1030 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1031 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
1032 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1033 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x110),
1034 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1035 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1036 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1037 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x110),
1038 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1039 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1040 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1041 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x114),
1042 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1043 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1044 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1045 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x114),
1046 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1047 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1048 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1049 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x108),
1050 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1051 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1052 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1053 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x108),
1054 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1055 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1056 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1057 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10c),
1058 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1059 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1060 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1061 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10c),
1062 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1063 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1064 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1065 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd8),
1066 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1067 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
1068 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1069 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd8),
1070 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1071 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
1072 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1073 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x128),
1074 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1075 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
1076 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1077 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x128),
1078 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1079 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
1080 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1081 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x12c),
1082 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1083 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1084 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1085 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x12c),
1086 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1087 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1088 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1089 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x138),
1090 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1091 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1092 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1093 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x138),
1094 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1095 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1096 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1097 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x13c),
1098 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1099 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1100 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1101 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x13c),
1102 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1103 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1104 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1105 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x130),
1106 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1107 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1108 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1109 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x130),
1110 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1111 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1112 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1113 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x134),
1114 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1115 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1116 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1117 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x134),
1118 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1119 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1120 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1121 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x140),
1122 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1123 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1124 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1125 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x140),
1126 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1127 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1128 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1129 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x144),
1130 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1131 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1132 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1133 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x144),
1134 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1135 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1136 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1137 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x150),
1138 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1139 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1140 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1141 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x150),
1142 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1143 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1144 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1145 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x154),
1146 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1147 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1148 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1149 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x154),
1150 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1151 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1152 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1153 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x148),
1154 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1155 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1156 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1157 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x148),
1158 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1159 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1160 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1161 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14c),
1162 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1163 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1164 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1165 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14c),
1166 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1167 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1168 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1169 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x158),
1170 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1171 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
1172 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1173 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x158),
1174 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1175 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
1176 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1177 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x15c),
1178 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1179 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1180 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1181 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x15c),
1182 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1183 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1184 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1185 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x168),
1186 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1187 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1),
1188 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1189 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x168),
1190 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1191 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1),
1192 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1193 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x16c),
1194 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1195 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
1196 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1197 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x16c),
1198 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1199 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
1200 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1201 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x160),
1202 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1203 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
1204 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1205 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x160),
1206 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1207 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
1208 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1209 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x164),
1210 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1211 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1212 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1213 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x164),
1214 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1215 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1216 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1217 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x170),
1218 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1219 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
1220 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1221 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x170),
1222 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1223 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
1224 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1225 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x174),
1226 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1227 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
1228 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1229 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x174),
1230 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1231 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
1232 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1233 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x180),
1234 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1235 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
1236 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1237 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x180),
1238 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1239 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
1240 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1241 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x184),
1242 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1243 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1244 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1245 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x184),
1246 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1247 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1248 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1249 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x178),
1250 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1251 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
1252 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1253 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x178),
1254 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1255 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
1256 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1257 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x17c),
1258 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1259 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
1260 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1261 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x17c),
1262 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1263 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
1264 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1265 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x188),
1266 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1267 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1268 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1269 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x188),
1270 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1271 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1272 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1273 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18c),
1274 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1275 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1276 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1277 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18c),
1278 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1279 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1280 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1281 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x198),
1282 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1283 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
1284 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1285 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x198),
1286 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1287 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
1288 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1289 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x19c),
1290 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1291 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1292 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1293 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x19c),
1294 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1295 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1296 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1297 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x190),
1298 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1299 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1300 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1301 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x190),
1302 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1303 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1304 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1305 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x194),
1306 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1307 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1308 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1309 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x194),
1310 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1311 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1312 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1313 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
1314 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1315 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
1316 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1317 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
1318 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1319 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1320 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1321 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
1322 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1323 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
1324 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1325 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
1326 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1327 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
1328 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1329 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
1330 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1331 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1f),
1332 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1333 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
1334 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1335 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1f),
1336 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1337 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
1338 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1339 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
1340 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1341 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_SAMPLE_SKEW, 0x000000FF, 0x19),
1342 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1343 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_MUXSEL_SKEW, 0x000000FF, 0x20),
1344 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1345 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0x5),
1346 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1347 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0xa),
1348 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1349 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x14),
1350 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
1351 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x19),
1352 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1353 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_DESER_START_SKEW, 0x000000FF, 0x33),
1354 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xFFFFFFFF, 0xe0000000)
1355 };
1356 
1357 static const struct soc15_reg_golden golden_settings_gc_10_1_1[] =
1358 {
1359 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_4, 0xffffffff, 0x003c0014),
1360 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_GS_NGG_CLK_CTRL, 0xffff8fff, 0xffff8100),
1361 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_IA_CLK_CTRL, 0xffff0fff, 0xffff0100),
1362 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CLK_CTRL, 0xcd000000, 0x0d000100),
1363 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQ_CLK_CTRL, 0xf8ff0fff, 0x60000100),
1364 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQG_CLK_CTRL, 0x40000ff0, 0x40000100),
1365 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_VGT_CLK_CTRL, 0xffff8fff, 0xffff8100),
1366 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_WD_CLK_CTRL, 0xffff8fff, 0xffff8100),
1367 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
1368 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_VC5_ENABLE, 0x00000002, 0x00000000),
1369 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCP_SD_CNTL, 0x800007ff, 0x000005ff),
1370 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG, 0xffffffff, 0x20000000),
1371 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG2, 0xffffffff, 0x00000420),
1372 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0x00000200, 0x00000200),
1373 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x04900000),
1374 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DFSM_TILES_IN_FLIGHT, 0x0000ffff, 0x0000003f),
1375 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_LAST_OF_BURST_CONFIG, 0xffffffff, 0x03860204),
1376 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL, 0x1ff0ffff, 0x00000500),
1377 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PRIV_CONTROL, 0x000007ff, 0x000001fe),
1378 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL1_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
1379 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffe7),
1380 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffe7),
1381 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CGTT_SCLK_CTRL, 0xffff0fff, 0x10000100),
1382 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL2, 0xffffffff, 0x1402002f),
1383 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xffffbfff, 0x00000188),
1384 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
1385 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x08000009),
1386 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0x00400000, 0x04440000),
1387 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000800, 0x00000820),
1388 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
1389 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRMI_SPARE, 0xffffffff, 0xffff3101),
1390 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0x001f0000, 0x00070105),
1391 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ALU_CLK_CTRL, 0xffffffff, 0xffffffff),
1392 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ARB_CONFIG, 0x00000133, 0x00000130),
1393 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_LDS_CLK_CTRL, 0xffffffff, 0xffffffff),
1394 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
1395 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CNTL, 0x60000010, 0x479c0010),
1396 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0x00c00000, 0x00c00000),
1397 };
1398 
1399 static const struct soc15_reg_golden golden_settings_gc_10_1_2[] =
1400 {
1401 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_4, 0x003e001f, 0x003c0014),
1402 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_GS_NGG_CLK_CTRL, 0xffff8fff, 0xffff8100),
1403 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_IA_CLK_CTRL, 0xffff0fff, 0xffff0100),
1404 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CLK_CTRL, 0xff7f0fff, 0x0d000100),
1405 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQ_CLK_CTRL, 0xffffcfff, 0x60000100),
1406 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SQG_CLK_CTRL, 0xffff0fff, 0x40000100),
1407 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_VGT_CLK_CTRL, 0xffff8fff, 0xffff8100),
1408 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_WD_CLK_CTRL, 0xffff8fff, 0xffff8100),
1409 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
1410 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_VC5_ENABLE, 0x00000003, 0x00000000),
1411 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCP_SD_CNTL, 0x800007ff, 0x000005ff),
1412 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG, 0xffffffff, 0x20000000),
1413 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG2, 0xffffffff, 0x00000420),
1414 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000200),
1415 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x04900000),
1416 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DFSM_TILES_IN_FLIGHT, 0x0000ffff, 0x0000003f),
1417 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_LAST_OF_BURST_CONFIG, 0xffffffff, 0x03860204),
1418 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0x0c1800ff, 0x00000044),
1419 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL, 0x1ff0ffff, 0x00000500),
1420 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PRIV_CONTROL, 0x00007fff, 0x000001fe),
1421 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL1_PIPE_STEER, 0xffffffff, 0xe4e4e4e4),
1422 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_0, 0x77777777, 0x10321032),
1423 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_1, 0x77777777, 0x02310231),
1424 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
1425 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
1426 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CGTT_SCLK_CTRL, 0xffff0fff, 0x10000100),
1427 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL2, 0xffffffff, 0x1402002f),
1428 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xffffbfff, 0x00000188),
1429 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_EVENT_CNTL_0, 0xffffffff, 0x842a4c02),
1430 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
1431 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x08000009),
1432 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0xffffffff, 0x04440000),
1433 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000820, 0x00000820),
1434 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
1435 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRMI_SPARE, 0xffffffff, 0xffff3101),
1436 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0x001f0000, 0x00070104),
1437 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ALU_CLK_CTRL, 0xffffffff, 0xffffffff),
1438 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_ARB_CONFIG, 0x00000133, 0x00000130),
1439 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_LDS_CLK_CTRL, 0xffffffff, 0xffffffff),
1440 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
1441 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CNTL, 0xffdf80ff, 0x479c0010),
1442 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffffffff, 0x00c00000)
1443 };
1444 
1445 static bool gfx_v10_get_rlcg_flag(struct amdgpu_device *adev, u32 acc_flags, u32 hwip,
1446 				 int write, u32 *rlcg_flag)
1447 {
1448 	switch (hwip) {
1449 	case GC_HWIP:
1450 		if (amdgpu_sriov_reg_indirect_gc(adev)) {
1451 			*rlcg_flag = write ? GFX_RLCG_GC_WRITE : GFX_RLCG_GC_READ;
1452 
1453 			return true;
1454 		/* only in new version, AMDGPU_REGS_NO_KIQ and AMDGPU_REGS_RLC enabled simultaneously */
1455 		} else if ((acc_flags & AMDGPU_REGS_RLC) && !(acc_flags & AMDGPU_REGS_NO_KIQ)) {
1456 			*rlcg_flag = GFX_RLCG_GC_WRITE_OLD;
1457 
1458 			return true;
1459 		}
1460 
1461 		break;
1462 	case MMHUB_HWIP:
1463 		if (amdgpu_sriov_reg_indirect_mmhub(adev) &&
1464 		    (acc_flags & AMDGPU_REGS_RLC) && write) {
1465 			*rlcg_flag = GFX_RLCG_MMHUB_WRITE;
1466 			return true;
1467 		}
1468 
1469 		break;
1470 	default:
1471 		DRM_DEBUG("Not program register by RLCG\n");
1472 	}
1473 
1474 	return false;
1475 }
1476 
1477 static u32 gfx_v10_rlcg_rw(struct amdgpu_device *adev, u32 offset, u32 v, uint32_t flag)
1478 {
1479 	static void *scratch_reg0;
1480 	static void *scratch_reg1;
1481 	static void *scratch_reg2;
1482 	static void *scratch_reg3;
1483 	static void *spare_int;
1484 	static uint32_t grbm_cntl;
1485 	static uint32_t grbm_idx;
1486 	uint32_t i = 0;
1487 	uint32_t retries = 50000;
1488 	u32 ret = 0;
1489 
1490 	scratch_reg0 = adev->rmmio +
1491 		       (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG0) * 4;
1492 	scratch_reg1 = adev->rmmio +
1493 		       (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG1) * 4;
1494 	scratch_reg2 = adev->rmmio +
1495 		       (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG0_BASE_IDX] + mmSCRATCH_REG2) * 4;
1496 	scratch_reg3 = adev->rmmio +
1497 		       (adev->reg_offset[GC_HWIP][0][mmSCRATCH_REG1_BASE_IDX] + mmSCRATCH_REG3) * 4;
1498 
1499 	if (adev->asic_type >= CHIP_SIENNA_CICHLID) {
1500 		spare_int = adev->rmmio +
1501 			    (adev->reg_offset[GC_HWIP][0][mmRLC_SPARE_INT_0_Sienna_Cichlid_BASE_IDX]
1502 			     + mmRLC_SPARE_INT_0_Sienna_Cichlid) * 4;
1503 	} else {
1504 		spare_int = adev->rmmio +
1505 			    (adev->reg_offset[GC_HWIP][0][mmRLC_SPARE_INT_BASE_IDX] + mmRLC_SPARE_INT) * 4;
1506 	}
1507 
1508 	grbm_cntl = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_CNTL_BASE_IDX] + mmGRBM_GFX_CNTL;
1509 	grbm_idx = adev->reg_offset[GC_HWIP][0][mmGRBM_GFX_INDEX_BASE_IDX] + mmGRBM_GFX_INDEX;
1510 
1511 	if (offset == grbm_cntl || offset == grbm_idx) {
1512 		if (offset  == grbm_cntl)
1513 			writel(v, scratch_reg2);
1514 		else if (offset == grbm_idx)
1515 			writel(v, scratch_reg3);
1516 
1517 		writel(v, ((void __iomem *)adev->rmmio) + (offset * 4));
1518 	} else {
1519 		writel(v, scratch_reg0);
1520 		writel(offset | flag, scratch_reg1);
1521 		writel(1, spare_int);
1522 		for (i = 0; i < retries; i++) {
1523 			u32 tmp;
1524 
1525 			tmp = readl(scratch_reg1);
1526 			if (!(tmp & flag))
1527 				break;
1528 
1529 			udelay(10);
1530 		}
1531 
1532 		if (i >= retries)
1533 			pr_err("timeout: rlcg program reg:0x%05x failed !\n", offset);
1534 	}
1535 
1536 	ret = readl(scratch_reg0);
1537 
1538 	return ret;
1539 }
1540 
1541 static void gfx_v10_rlcg_wreg(struct amdgpu_device *adev, u32 offset, u32 value, u32 acc_flags, u32 hwip)
1542 {
1543 	u32 rlcg_flag;
1544 
1545 	if (!amdgpu_sriov_runtime(adev) &&
1546 	    gfx_v10_get_rlcg_flag(adev, acc_flags, hwip, 1, &rlcg_flag)) {
1547 		gfx_v10_rlcg_rw(adev, offset, value, rlcg_flag);
1548 		return;
1549 	}
1550 
1551 	if (acc_flags & AMDGPU_REGS_NO_KIQ)
1552 		WREG32_NO_KIQ(offset, value);
1553 	else
1554 		WREG32(offset, value);
1555 }
1556 
1557 static u32 gfx_v10_rlcg_rreg(struct amdgpu_device *adev, u32 offset, u32 acc_flags, u32 hwip)
1558 {
1559 	u32 rlcg_flag;
1560 
1561 	if (!amdgpu_sriov_runtime(adev) &&
1562 	    gfx_v10_get_rlcg_flag(adev, acc_flags, hwip, 0, &rlcg_flag))
1563 		return gfx_v10_rlcg_rw(adev, offset, 0, rlcg_flag);
1564 
1565 	if (acc_flags & AMDGPU_REGS_NO_KIQ)
1566 		return RREG32_NO_KIQ(offset);
1567 	else
1568 		return RREG32(offset);
1569 }
1570 
1571 static const struct soc15_reg_golden golden_settings_gc_10_1_nv14[] =
1572 {
1573 	/* Pending on emulation bring up */
1574 };
1575 
1576 static const struct soc15_reg_golden golden_settings_gc_rlc_spm_10_1_nv14[] =
1577 {
1578 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xE0000000L, 0x0),
1579 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1580 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
1581 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1582 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1583 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1584 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
1585 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1586 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
1587 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1588 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
1589 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1590 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
1591 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1592 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
1593 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1594 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1595 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1596 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
1597 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1598 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1599 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1600 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
1601 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1602 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1603 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1604 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
1605 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1606 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1607 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1608 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
1609 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1610 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1611 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1612 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
1613 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1614 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1615 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1616 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
1617 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1618 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1619 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1620 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
1621 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1622 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1623 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1624 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
1625 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1626 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1627 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1628 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
1629 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1630 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x20),
1631 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1632 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
1633 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1634 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
1635 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1636 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
1637 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1638 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1639 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1640 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
1641 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1642 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1643 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1644 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
1645 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1646 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1647 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1648 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
1649 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1650 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1651 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1652 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
1653 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1654 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1655 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1656 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
1657 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1658 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
1659 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1660 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
1661 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1662 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1663 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1664 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
1665 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1666 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1667 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1668 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
1669 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1670 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1671 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1672 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
1673 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1674 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1675 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1676 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
1677 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1678 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1679 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1680 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
1681 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1682 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
1683 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1684 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
1685 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1686 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1687 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1688 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
1689 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1690 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
1691 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1692 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
1693 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1694 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1695 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1696 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
1697 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1698 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1699 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1700 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
1701 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1702 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1703 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1704 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
1705 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1706 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
1707 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1708 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
1709 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1710 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
1711 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1712 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
1713 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1714 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
1715 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1716 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c),
1717 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1718 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
1719 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1720 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
1721 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1722 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1723 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1724 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
1725 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1726 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1727 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1728 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
1729 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1730 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1731 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1732 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
1733 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1734 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1735 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1736 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
1737 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1738 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
1739 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1740 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
1741 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1742 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1743 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1744 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
1745 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1746 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1747 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1748 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
1749 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1750 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
1751 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1752 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
1753 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1754 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
1755 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1756 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
1757 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1758 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
1759 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1760 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
1761 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1762 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1763 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1764 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
1765 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1766 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1767 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1768 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
1769 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1770 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1771 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1772 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
1773 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1774 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1775 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1776 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
1777 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1778 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x20),
1779 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1780 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
1781 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1782 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
1783 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1784 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
1785 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1786 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
1787 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1788 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
1789 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1790 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1791 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1792 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
1793 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1794 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1e),
1795 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1796 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
1797 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1798 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
1799 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1800 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
1801 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1802 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1803 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1804 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
1805 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1806 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1807 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1808 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
1809 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1810 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1811 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1812 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
1813 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1814 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1815 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1816 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
1817 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1818 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1819 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1820 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
1821 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1822 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1823 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1824 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
1825 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1826 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1827 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1828 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
1829 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1830 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1831 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1832 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
1833 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1834 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1835 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1836 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
1837 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1838 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1839 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1840 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
1841 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1842 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1843 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1844 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
1845 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1846 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1847 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1848 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
1849 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1850 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1851 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1852 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
1853 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1854 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
1855 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1856 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
1857 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1858 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1859 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1860 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
1861 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1862 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1863 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1864 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
1865 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1866 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
1867 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1868 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
1869 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1870 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
1871 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1872 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
1873 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1874 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
1875 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1876 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
1877 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1878 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1879 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1880 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
1881 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1882 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1883 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1884 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
1885 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1886 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1887 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1888 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
1889 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1890 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
1891 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1892 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
1893 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1894 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1895 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1896 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
1897 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1898 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1899 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1900 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
1901 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1902 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1903 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1904 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
1905 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1906 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1907 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1908 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
1909 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1910 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1911 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1912 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
1913 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1914 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1915 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1916 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
1917 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1918 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1919 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1920 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd8),
1921 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1922 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1923 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1924 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xdc),
1925 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1926 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1927 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1928 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe8),
1929 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1930 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1931 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1932 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xec),
1933 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1934 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1935 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1936 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe0),
1937 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1938 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1939 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1940 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe4),
1941 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1942 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
1943 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1944 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x100),
1945 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1946 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
1947 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1948 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x104),
1949 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1950 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1951 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1952 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x108),
1953 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1954 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1955 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1956 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10c),
1957 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1958 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1959 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1960 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x110),
1961 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1962 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
1963 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1964 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x114),
1965 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1966 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
1967 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1968 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x118),
1969 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1970 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
1971 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1972 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x11c),
1973 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1974 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
1975 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1976 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf8),
1977 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1978 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
1979 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1980 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x130),
1981 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1982 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1983 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1984 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x134),
1985 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1986 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1987 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1988 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x138),
1989 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1990 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1991 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1992 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x13c),
1993 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1994 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
1995 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1996 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf4),
1997 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
1998 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x20),
1999 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2000 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x128),
2001 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2002 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2003 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2004 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x12c),
2005 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2006 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2007 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2008 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x120),
2009 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2010 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2011 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2012 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x124),
2013 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2014 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2015 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2016 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf0),
2017 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2018 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2019 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2020 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x140),
2021 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2022 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2023 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2024 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x144),
2025 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2026 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2027 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2028 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x150),
2029 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2030 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2031 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2032 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x154),
2033 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2034 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2035 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2036 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x148),
2037 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2038 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2039 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2040 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14c),
2041 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2042 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2043 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2044 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x158),
2045 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2046 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2047 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2048 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x15c),
2049 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2050 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2051 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2052 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x168),
2053 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2054 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2055 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2056 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x16c),
2057 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2058 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2059 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2060 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x160),
2061 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2062 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2063 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2064 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x164),
2065 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2066 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2067 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2068 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x170),
2069 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2070 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2071 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2072 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x174),
2073 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2074 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
2075 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2076 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x180),
2077 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2078 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2079 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2080 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x184),
2081 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2082 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
2083 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2084 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x178),
2085 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2086 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2087 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2088 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x17c),
2089 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2090 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
2091 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2092 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x188),
2093 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2094 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2095 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2096 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18c),
2097 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2098 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2099 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2100 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x198),
2101 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2102 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2103 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2104 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x19c),
2105 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2106 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2107 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2108 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x190),
2109 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2110 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2111 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2112 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x194),
2113 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2114 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2115 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2116 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1a0),
2117 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2118 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2119 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2120 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1a4),
2121 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2122 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2123 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2124 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1b0),
2125 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2126 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2127 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2128 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1b4),
2129 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2130 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2131 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2132 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1a8),
2133 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2134 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2135 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2136 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1ac),
2137 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2138 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2139 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2140 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1b8),
2141 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2142 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2143 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2144 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1bc),
2145 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2146 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2147 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2148 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c8),
2149 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2150 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2151 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2152 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1cc),
2153 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2154 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2155 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2156 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c0),
2157 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2158 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2159 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2160 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c4),
2161 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2162 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2163 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2164 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
2165 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2166 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2167 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2168 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
2169 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2170 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2171 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2172 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
2173 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2174 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x20),
2175 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2176 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
2177 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2178 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x20),
2179 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2180 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
2181 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2182 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2183 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2184 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_SAMPLE_SKEW, 0x000000FF, 0x26),
2185 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2186 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_MUXSEL_SKEW, 0x000000FF, 0x28),
2187 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2188 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0xf),
2189 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2190 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0x15),
2191 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2192 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x1f),
2193 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2194 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x25),
2195 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2196 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_DESER_START_SKEW, 0x000000FF, 0x3b),
2197 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xFFFFFFFF, 0xe0000000)
2198 };
2199 
2200 static const struct soc15_reg_golden golden_settings_gc_10_1_2_nv12[] =
2201 {
2202 	/* Pending on emulation bring up */
2203 };
2204 
2205 static const struct soc15_reg_golden golden_settings_gc_rlc_spm_10_1_2_nv12[] =
2206 {
2207 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xe0000000L, 0x0),
2208 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2209 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
2210 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2211 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
2212 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2213 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
2214 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2215 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2216 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2217 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
2218 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2219 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2220 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2221 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
2222 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2223 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2224 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2225 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
2226 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2227 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2228 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2229 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
2230 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2231 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2232 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2233 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
2234 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2235 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2236 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2237 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
2238 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2239 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2240 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2241 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
2242 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2243 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2244 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2245 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
2246 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2247 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2248 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2249 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
2250 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2251 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2252 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2253 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8),
2254 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2255 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2256 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2257 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
2258 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2259 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2260 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2261 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
2262 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2263 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2264 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2265 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
2266 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2267 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2268 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2269 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
2270 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2271 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
2272 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2273 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
2274 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2275 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
2276 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2277 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
2278 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2279 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
2280 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2281 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
2282 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2283 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
2284 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2285 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
2286 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2287 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2288 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2289 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
2290 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2291 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2292 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2293 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
2294 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2295 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2296 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2297 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
2298 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2299 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2300 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2301 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
2302 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2303 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x2),
2304 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2305 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
2306 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2307 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1),
2308 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2309 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
2310 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2311 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
2312 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2313 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
2314 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2315 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2316 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2317 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
2318 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2319 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1),
2320 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2321 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
2322 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2323 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2324 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2325 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
2326 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2327 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2328 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2329 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
2330 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2331 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2332 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2333 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
2334 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2335 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
2336 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2337 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc),
2338 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2339 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2340 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2341 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
2342 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2343 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
2344 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2345 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
2346 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2347 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2348 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2349 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
2350 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2351 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2352 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2353 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
2354 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2355 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2356 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2357 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
2358 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2359 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2360 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2361 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
2362 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2363 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2364 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2365 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
2366 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2367 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2368 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2369 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
2370 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2371 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
2372 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2373 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
2374 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2375 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2376 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2377 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
2378 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2379 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x8),
2380 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2381 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
2382 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2383 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2384 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2385 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
2386 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2387 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2388 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2389 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
2390 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2391 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2392 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2393 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
2394 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2395 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2396 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2397 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
2398 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2399 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
2400 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2401 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
2402 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2403 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2404 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2405 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
2406 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2407 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2408 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2409 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
2410 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2411 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
2412 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2413 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
2414 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2415 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2416 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2417 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
2418 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2419 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
2420 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2421 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
2422 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2423 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
2424 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2425 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x1c),
2426 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2427 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x3),
2428 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2429 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
2430 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2431 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2432 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2433 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
2434 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2435 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
2436 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2437 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x20),
2438 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2439 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1c),
2440 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2441 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
2442 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2443 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2444 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2445 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x24),
2446 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2447 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2448 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2449 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
2450 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2451 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2452 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2453 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x28),
2454 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2455 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2456 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2457 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
2458 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2459 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2460 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2461 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
2462 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2463 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2464 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2465 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
2466 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2467 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
2468 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2469 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
2470 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2471 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
2472 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2473 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
2474 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2475 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2476 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2477 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
2478 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2479 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2480 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2481 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
2482 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2483 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2484 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2485 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x38),
2486 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2487 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2488 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2489 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
2490 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2491 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2492 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2493 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x3c),
2494 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2495 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2496 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2497 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
2498 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2499 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2500 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2501 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18),
2502 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2503 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x18),
2504 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2505 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
2506 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2507 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2508 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2509 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x50),
2510 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2511 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2512 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2513 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
2514 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2515 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2516 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2517 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x54),
2518 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2519 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2520 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2521 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
2522 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2523 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2524 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2525 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x58),
2526 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2527 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2528 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2529 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
2530 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2531 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2532 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2533 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x5c),
2534 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2535 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2536 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2537 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
2538 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2539 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2540 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2541 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14),
2542 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2543 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2544 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2545 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
2546 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2547 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2548 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2549 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x48),
2550 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2551 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2552 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2553 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
2554 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2555 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2556 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2557 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4c),
2558 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2559 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2560 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2561 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
2562 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2563 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2564 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2565 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x40),
2566 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2567 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2568 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2569 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
2570 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2571 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2572 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2573 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x44),
2574 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2575 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1a),
2576 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2577 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
2578 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2579 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2580 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2581 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10),
2582 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2583 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2584 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2585 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
2586 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2587 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2588 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2589 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x60),
2590 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2591 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2592 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2593 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
2594 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2595 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2596 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2597 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x64),
2598 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2599 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2600 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2601 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
2602 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2603 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2604 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2605 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x70),
2606 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2607 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2608 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2609 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
2610 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2611 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2612 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2613 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x74),
2614 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2615 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2616 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2617 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
2618 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2619 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2620 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2621 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x68),
2622 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2623 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2624 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2625 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
2626 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2627 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2628 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2629 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x6c),
2630 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2631 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2632 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2633 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
2634 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2635 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2636 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2637 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x78),
2638 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2639 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2640 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2641 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
2642 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2643 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2644 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2645 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x7c),
2646 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2647 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2648 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2649 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
2650 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2651 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2652 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2653 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x88),
2654 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2655 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2656 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2657 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
2658 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2659 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2660 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2661 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x8c),
2662 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2663 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2664 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2665 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
2666 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2667 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2668 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2669 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x80),
2670 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2671 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2672 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2673 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
2674 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2675 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2676 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2677 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x84),
2678 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2679 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2680 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2681 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
2682 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2683 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
2684 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2685 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x90),
2686 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2687 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
2688 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2689 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
2690 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2691 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2692 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2693 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x94),
2694 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2695 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2696 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2697 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
2698 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2699 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2700 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2701 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa0),
2702 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2703 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2704 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2705 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
2706 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2707 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2708 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2709 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa4),
2710 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2711 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
2712 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2713 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
2714 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2715 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
2716 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2717 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x98),
2718 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2719 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
2720 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2721 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
2722 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2723 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2724 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2725 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x9c),
2726 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2727 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x4),
2728 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2729 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
2730 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2731 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2732 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2733 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xa8),
2734 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2735 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2736 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2737 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
2738 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2739 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2740 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2741 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xac),
2742 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2743 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2744 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2745 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
2746 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2747 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2748 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2749 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb8),
2750 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2751 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2752 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2753 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
2754 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2755 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2756 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2757 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xbc),
2758 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2759 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2760 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2761 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
2762 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2763 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2764 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2765 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb0),
2766 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2767 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2768 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2769 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
2770 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2771 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2772 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2773 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xb4),
2774 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2775 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2776 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2777 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
2778 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2779 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2780 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2781 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc0),
2782 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2783 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2784 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2785 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
2786 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2787 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2788 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2789 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc4),
2790 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2791 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2792 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2793 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
2794 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2795 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2796 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2797 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd0),
2798 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2799 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
2800 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2801 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
2802 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2803 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2804 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2805 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd4),
2806 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2807 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2808 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2809 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
2810 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2811 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2812 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2813 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xc8),
2814 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2815 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2816 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2817 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
2818 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2819 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2820 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2821 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xcc),
2822 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2823 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
2824 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2825 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe8),
2826 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2827 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2828 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2829 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe8),
2830 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2831 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2832 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2833 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xec),
2834 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2835 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2836 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2837 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xec),
2838 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2839 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x16),
2840 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2841 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf0),
2842 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2843 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2844 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2845 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf0),
2846 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2847 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2848 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2849 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf4),
2850 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2851 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2852 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2853 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf4),
2854 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2855 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2856 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2857 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf8),
2858 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2859 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2860 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2861 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xf8),
2862 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2863 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2864 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2865 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xfc),
2866 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2867 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
2868 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2869 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xfc),
2870 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2871 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x17),
2872 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2873 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x100),
2874 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2875 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2876 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2877 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x100),
2878 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2879 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x13),
2880 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2881 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x104),
2882 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2883 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2884 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2885 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x104),
2886 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2887 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
2888 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2889 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe0),
2890 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2891 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2892 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2893 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xe0),
2894 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2895 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2896 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2897 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x118),
2898 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2899 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2900 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2901 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x118),
2902 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2903 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2904 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2905 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x11c),
2906 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2907 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2908 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2909 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x11c),
2910 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2911 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2912 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2913 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x120),
2914 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2915 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2916 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2917 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x120),
2918 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2919 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2920 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2921 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x124),
2922 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2923 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2924 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2925 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x124),
2926 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2927 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2928 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2929 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xdc),
2930 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2931 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2932 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2933 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xdc),
2934 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2935 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2936 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2937 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x110),
2938 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2939 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2940 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2941 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x110),
2942 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2943 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x15),
2944 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2945 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x114),
2946 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2947 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2948 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2949 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x114),
2950 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2951 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x14),
2952 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2953 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x108),
2954 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2955 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2956 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2957 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x108),
2958 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2959 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2960 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2961 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10c),
2962 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2963 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2964 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2965 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x10c),
2966 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2967 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x19),
2968 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2969 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd8),
2970 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2971 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2972 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2973 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0xd8),
2974 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2975 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1b),
2976 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2977 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x128),
2978 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2979 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2980 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2981 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x128),
2982 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2983 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2984 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2985 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x12c),
2986 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2987 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2988 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2989 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x12c),
2990 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2991 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
2992 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2993 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x138),
2994 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
2995 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
2996 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2997 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x138),
2998 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
2999 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
3000 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3001 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x13c),
3002 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3003 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3004 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3005 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x13c),
3006 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3007 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3008 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3009 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x130),
3010 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3011 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
3012 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3013 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x130),
3014 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3015 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x12),
3016 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3017 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x134),
3018 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3019 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
3020 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3021 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x134),
3022 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3023 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xf),
3024 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3025 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x140),
3026 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3027 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3028 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3029 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x140),
3030 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3031 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3032 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3033 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x144),
3034 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3035 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
3036 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3037 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x144),
3038 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3039 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
3040 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3041 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x150),
3042 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3043 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3044 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3045 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x150),
3046 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3047 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3048 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3049 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x154),
3050 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3051 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
3052 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3053 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x154),
3054 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3055 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
3056 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3057 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x148),
3058 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3059 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3060 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3061 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x148),
3062 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3063 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3064 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3065 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14c),
3066 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3067 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
3068 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3069 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x14c),
3070 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3071 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x7),
3072 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3073 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x158),
3074 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3075 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3076 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3077 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x158),
3078 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3079 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3080 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3081 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x15c),
3082 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3083 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
3084 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3085 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x15c),
3086 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3087 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
3088 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3089 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x168),
3090 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3091 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
3092 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3093 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x168),
3094 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3095 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xa),
3096 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3097 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x16c),
3098 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3099 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
3100 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3101 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x16c),
3102 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3103 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x9),
3104 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3105 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x160),
3106 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3107 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3108 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3109 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x160),
3110 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3111 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3112 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3113 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x164),
3114 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3115 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
3116 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3117 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x164),
3118 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3119 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x0),
3120 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3121 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x170),
3122 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3123 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3124 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3125 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x170),
3126 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3127 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3128 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3129 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x174),
3130 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3131 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3132 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3133 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x174),
3134 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3135 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3136 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3137 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x180),
3138 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3139 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3140 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3141 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x180),
3142 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3143 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3144 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3145 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x184),
3146 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3147 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3148 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3149 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x184),
3150 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3151 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3152 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3153 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x178),
3154 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3155 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3156 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3157 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x178),
3158 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3159 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x10),
3160 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3161 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x17c),
3162 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3163 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3164 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3165 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x17c),
3166 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3167 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3168 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3169 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x188),
3170 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3171 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3172 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3173 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x188),
3174 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3175 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3176 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3177 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18c),
3178 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3179 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3180 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3181 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x18c),
3182 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3183 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x5),
3184 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3185 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x198),
3186 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3187 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
3188 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3189 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x198),
3190 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3191 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xc),
3192 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3193 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x19c),
3194 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3195 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
3196 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3197 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x19c),
3198 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3199 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
3200 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3201 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x190),
3202 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3203 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3204 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3205 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x190),
3206 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3207 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xe),
3208 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3209 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x194),
3210 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3211 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
3212 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3213 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x194),
3214 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3215 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x6),
3216 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3217 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x30),
3218 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3219 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xd),
3220 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3221 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x34),
3222 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3223 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x11),
3224 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3225 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
3226 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3227 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
3228 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3229 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x0),
3230 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3231 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1d),
3232 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3233 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
3234 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3235 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1f),
3236 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3237 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x4),
3238 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3239 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0x1f),
3240 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3241 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_ADDR, 0xFFFFFFFF, 0x2c),
3242 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3243 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLB_SAMPLEDELAY_IND_DATA, 0xFFFFFFFF, 0xb),
3244 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3245 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_SAMPLE_SKEW, 0x000000FF, 0x1f),
3246 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3247 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_GLOBALS_MUXSEL_SKEW, 0x000000FF, 0x22),
3248 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3249 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0x1),
3250 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3251 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_SAMPLE_SKEW, 0x000000FF, 0x6),
3252 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3253 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x10),
3254 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x10000),
3255 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_SE_MUXSEL_SKEW, 0x000000FF, 0x15),
3256 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xffffff, 0x0),
3257 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmRLC_SPM_DESER_START_SKEW, 0x000000FF, 0x35),
3258 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_GFX_INDEX, 0xFFFFFFFF, 0xe0000000)
3259 };
3260 
3261 static const struct soc15_reg_golden golden_settings_gc_10_3[] =
3262 {
3263 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0x78000000, 0x78000100),
3264 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_PS_CLK_CTRL, 0xff7f0fff, 0x78000100),
3265 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0xff7f0fff, 0x30000100),
3266 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0xff7f0fff, 0x7e000100),
3267 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
3268 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
3269 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
3270 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
3271 	SOC15_REG_GOLDEN_VALUE(GC, 0 ,mmGCEA_SDP_TAG_RESERVE0, 0xffffffff, 0x10100100),
3272 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCEA_SDP_TAG_RESERVE1, 0xffffffff, 0x17000088),
3273 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
3274 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCUTCL2_CGTT_CLK_CTRL_Sienna_Cichlid, 0xff000000, 0xff008080),
3275 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCVM_L2_CGTT_CLK_CTRL_Sienna_Cichlid, 0xff000000, 0xff008080),
3276 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003fffff, 0x00280400),
3277 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3278 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3279 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
3280 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xf7ffffff, 0x10f80988),
3281 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG,  0x00000020, 0x00000020),
3282 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
3283 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
3284 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0xffffffbf, 0x00000820),
3285 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0xffffffff, 0x00070104),
3286 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_CONFIG, 0xe07df47f, 0x00180070),
3287 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER0_SELECT, 0xf0f001ff, 0x00000000),
3288 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER1_SELECT, 0xf0f001ff, 0x00000000),
3289 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER10_SELECT, 0xf0f001ff, 0x00000000),
3290 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER11_SELECT, 0xf0f001ff, 0x00000000),
3291 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER12_SELECT, 0xf0f001ff, 0x00000000),
3292 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER13_SELECT, 0xf0f001ff, 0x00000000),
3293 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER14_SELECT, 0xf0f001ff, 0x00000000),
3294 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER15_SELECT, 0xf0f001ff, 0x00000000),
3295 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER2_SELECT, 0xf0f001ff, 0x00000000),
3296 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER3_SELECT, 0xf0f001ff, 0x00000000),
3297 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER4_SELECT, 0xf0f001ff, 0x00000000),
3298 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER5_SELECT, 0xf0f001ff, 0x00000000),
3299 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER6_SELECT, 0xf0f001ff, 0x00000000),
3300 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER7_SELECT, 0xf0f001ff, 0x00000000),
3301 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER8_SELECT, 0xf0f001ff, 0x00000000),
3302 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER9_SELECT, 0xf0f001ff, 0x00000000),
3303 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
3304 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffbfffff, 0x00a00000)
3305 };
3306 
3307 static const struct soc15_reg_golden golden_settings_gc_10_3_sienna_cichlid[] =
3308 {
3309 	/* Pending on emulation bring up */
3310 };
3311 
3312 static const struct soc15_reg_golden golden_settings_gc_10_3_2[] =
3313 {
3314 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0xff7f0fff, 0x78000100),
3315 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_PS_CLK_CTRL, 0xff7f0fff, 0x78000100),
3316 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0xff7f0fff, 0x30000100),
3317 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0xff7f0fff, 0x7e000100),
3318 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
3319 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
3320 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
3321 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
3322 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
3323 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCUTCL2_CGTT_CLK_CTRL_Sienna_Cichlid, 0xffffffff, 0xff008080),
3324 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCVM_L2_CGTT_CLK_CTRL_Sienna_Cichlid, 0xffff8fff, 0xff008080),
3325 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003fffff, 0x00280400),
3326 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3327 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3328 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
3329 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xf7ffffff, 0x00f80988),
3330 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
3331 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
3332 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0xffffffbf, 0x00000820),
3333 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0xffffffff, 0x00070104),
3334 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_START_PHASE, 0x000000ff, 0x00000004),
3335 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_CONFIG, 0xe07df47f, 0x00180070),
3336 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER0_SELECT, 0xf0f001ff, 0x00000000),
3337 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER1_SELECT, 0xf0f001ff, 0x00000000),
3338 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER10_SELECT, 0xf0f001ff, 0x00000000),
3339 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER11_SELECT, 0xf0f001ff, 0x00000000),
3340 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER12_SELECT, 0xf0f001ff, 0x00000000),
3341 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER13_SELECT, 0xf0f001ff, 0x00000000),
3342 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER14_SELECT, 0xf0f001ff, 0x00000000),
3343 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER15_SELECT, 0xf0f001ff, 0x00000000),
3344 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER2_SELECT, 0xf0f001ff, 0x00000000),
3345 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER3_SELECT, 0xf0f001ff, 0x00000000),
3346 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER4_SELECT, 0xf0f001ff, 0x00000000),
3347 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER5_SELECT, 0xf0f001ff, 0x00000000),
3348 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER6_SELECT, 0xf0f001ff, 0x00000000),
3349 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER7_SELECT, 0xf0f001ff, 0x00000000),
3350 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER8_SELECT, 0xf0f001ff, 0x00000000),
3351 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER9_SELECT, 0xf0f001ff, 0x00000000),
3352 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
3353 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffbfffff, 0x00a00000),
3354 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmVGT_GS_MAX_WAVE_ID, 0x00000fff, 0x000003ff),
3355 
3356 	/* This is not in GDB yet. Don't remove it. It fixes a GPU hang on Navy Flounder. */
3357 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG,  0x00000020, 0x00000020),
3358 };
3359 
3360 static const struct soc15_reg_golden golden_settings_gc_10_3_vangogh[] =
3361 {
3362 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0xff7f0fff, 0x30000100),
3363 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0xff7f0fff, 0x7e000100),
3364 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_PIPE_STEER, 0x000000ff, 0x000000e4),
3365 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000200),
3366 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
3367 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_EXCEPTION_CONTROL, 0x7fff0f1f, 0x00b80000),
3368 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0x0c1807ff, 0x00000142),
3369 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Vangogh, 0x1ff1ffff, 0x00000500),
3370 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL1_PIPE_STEER, 0x000000ff, 0x000000e4),
3371 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_0, 0x77777777, 0x32103210),
3372 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_1, 0x77777777, 0x32103210),
3373 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xfffffff3),
3374 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xfffffff3),
3375 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
3376 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xf7ffffff, 0x00f80988),
3377 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
3378 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
3379 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0xffffffbf, 0x00000020),
3380 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1_Vangogh, 0xffffffff, 0x00070103),
3381 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQG_CONFIG, 0x000017ff, 0x00001000),
3382 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
3383 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffffffff, 0x00400000),
3384 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmVGT_GS_MAX_WAVE_ID, 0x00000fff, 0x000000ff),
3385 
3386 	/* This is not in GDB yet. Don't remove it. It fixes a GPU hang on VanGogh. */
3387 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG,  0x00000020, 0x00000020),
3388 };
3389 
3390 static const struct soc15_reg_golden golden_settings_gc_10_3_3[] =
3391 {
3392 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0xff7f0fff, 0x78000100),
3393 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCH_PIPE_STEER, 0x000000ff, 0x000000e4),
3394 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c200),
3395 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
3396 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
3397 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0x0c1807ff, 0x00000242),
3398 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL, 0x1ff1ffff, 0x00000500),
3399 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL1_PIPE_STEER, 0x000000ff, 0x000000e4),
3400 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_0, 0x77777777, 0x32103210),
3401 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2_PIPE_STEER_1, 0x77777777, 0x32103210),
3402 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xfffffff3),
3403 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xfffffff3),
3404 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
3405 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xf7ffffff, 0x00f80988),
3406 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG, 0x000001ff, 0x00000020),
3407 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
3408 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
3409 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0xffffffbf, 0x00000820),
3410 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfff7ffff, 0x01030000),
3411 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffffffff, 0x00100000)
3412 };
3413 
3414 static const struct soc15_reg_golden golden_settings_gc_10_3_4[] =
3415 {
3416 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0x78000000, 0x78000100),
3417 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0x30000000, 0x30000100),
3418 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0x7e000000, 0x7e000100),
3419 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
3420 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0x00000280, 0x00000280),
3421 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0x07800000, 0x00800000),
3422 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x00001d00, 0x00000500),
3423 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGE_PC_CNTL, 0x003c0000, 0x00280400),
3424 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3425 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3426 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0x40000000, 0x580f1008),
3427 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0x00040000, 0x00f80988),
3428 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0x01000000, 0x01200007),
3429 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_TIMEOUT_COUNTER, 0xffffffff, 0x00000800),
3430 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_2, 0x00000800, 0x00000820),
3431 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_CONFIG, 0x0000001f, 0x00180070),
3432 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER0_SELECT, 0xf0f001ff, 0x00000000),
3433 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER1_SELECT, 0xf0f001ff, 0x00000000),
3434 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER10_SELECT, 0xf0f001ff, 0x00000000),
3435 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER11_SELECT, 0xf0f001ff, 0x00000000),
3436 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER12_SELECT, 0xf0f001ff, 0x00000000),
3437 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER13_SELECT, 0xf0f001ff, 0x00000000),
3438 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER14_SELECT, 0xf0f001ff, 0x00000000),
3439 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER15_SELECT, 0xf0f001ff, 0x00000000),
3440 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER2_SELECT, 0xf0f001ff, 0x00000000),
3441 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER3_SELECT, 0xf0f001ff, 0x00000000),
3442 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER4_SELECT, 0xf0f001ff, 0x00000000),
3443 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER5_SELECT, 0xf0f001ff, 0x00000000),
3444 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER6_SELECT, 0xf0f001ff, 0x00000000),
3445 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER7_SELECT, 0xf0f001ff, 0x00000000),
3446 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER8_SELECT, 0xf0f001ff, 0x00000000),
3447 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER9_SELECT, 0xf0f001ff, 0x00000000),
3448 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0x01030000, 0x01030000),
3449 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0x03a00000, 0x00a00000),
3450 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG,  0x00000020, 0x00000020)
3451 };
3452 
3453 static const struct soc15_reg_golden golden_settings_gc_10_3_5[] = {
3454 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_CS_CLK_CTRL, 0x78000000, 0x78000100),
3455 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA0_CLK_CTRL, 0xb0000ff0, 0x30000100),
3456 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCGTT_SPI_RA1_CLK_CTRL, 0xff000000, 0x7e000100),
3457 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCPF_GCR_CNTL, 0x0007ffff, 0x0000c000),
3458 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG3, 0xffffffff, 0x00000280),
3459 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG4, 0xffffffff, 0x00800000),
3460 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGCR_GENERAL_CNTL_Sienna_Cichlid, 0x1ff1ffff, 0x00000500),
3461 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2A_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3462 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_ADDR_MATCH_MASK, 0xffffffff, 0xffffffcf),
3463 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CM_CTRL1, 0xff8fff0f, 0x580f1008),
3464 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGL2C_CTRL3, 0xf7ffffff, 0x00f80988),
3465 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmLDS_CONFIG, 0x000001ff, 0x00000020),
3466 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_CL_ENHANCE, 0xf17fffff, 0x01200007),
3467 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_CONFIG, 0xe07df47f, 0x00180070),
3468 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER0_SELECT, 0xf0f001ff, 0x00000000),
3469 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER1_SELECT, 0xf0f001ff, 0x00000000),
3470 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER10_SELECT, 0xf0f001ff, 0x00000000),
3471 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER11_SELECT, 0xf0f001ff, 0x00000000),
3472 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER12_SELECT, 0xf0f001ff, 0x00000000),
3473 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER13_SELECT, 0xf0f001ff, 0x00000000),
3474 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER14_SELECT, 0xf0f001ff, 0x00000000),
3475 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER15_SELECT, 0xf0f001ff, 0x00000000),
3476 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER2_SELECT, 0xf0f001ff, 0x00000000),
3477 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER3_SELECT, 0xf0f001ff, 0x00000000),
3478 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER4_SELECT, 0xf0f001ff, 0x00000000),
3479 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER5_SELECT, 0xf0f001ff, 0x00000000),
3480 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER6_SELECT, 0xf0f001ff, 0x00000000),
3481 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER7_SELECT, 0xf0f001ff, 0x00000000),
3482 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER8_SELECT, 0xf0f001ff, 0x00000000),
3483 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQ_PERFCOUNTER9_SELECT, 0xf0f001ff, 0x00000000),
3484 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX,0xfff7ffff, 0x01030000),
3485 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmUTCL1_CTRL, 0xffbfffff, 0x00a00000)
3486 };
3487 
3488 #define DEFAULT_SH_MEM_CONFIG \
3489 	((SH_MEM_ADDRESS_MODE_64 << SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \
3490 	 (SH_MEM_ALIGNMENT_MODE_UNALIGNED << SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \
3491 	 (SH_MEM_RETRY_MODE_ALL << SH_MEM_CONFIG__RETRY_MODE__SHIFT) | \
3492 	 (3 << SH_MEM_CONFIG__INITIAL_INST_PREFETCH__SHIFT))
3493 
3494 
3495 static void gfx_v10_0_set_ring_funcs(struct amdgpu_device *adev);
3496 static void gfx_v10_0_set_irq_funcs(struct amdgpu_device *adev);
3497 static void gfx_v10_0_set_gds_init(struct amdgpu_device *adev);
3498 static void gfx_v10_0_set_rlc_funcs(struct amdgpu_device *adev);
3499 static int gfx_v10_0_get_cu_info(struct amdgpu_device *adev,
3500 				 struct amdgpu_cu_info *cu_info);
3501 static uint64_t gfx_v10_0_get_gpu_clock_counter(struct amdgpu_device *adev);
3502 static void gfx_v10_0_select_se_sh(struct amdgpu_device *adev, u32 se_num,
3503 				   u32 sh_num, u32 instance);
3504 static u32 gfx_v10_0_get_wgp_active_bitmap_per_sh(struct amdgpu_device *adev);
3505 
3506 static int gfx_v10_0_rlc_backdoor_autoload_buffer_init(struct amdgpu_device *adev);
3507 static void gfx_v10_0_rlc_backdoor_autoload_buffer_fini(struct amdgpu_device *adev);
3508 static int gfx_v10_0_rlc_backdoor_autoload_enable(struct amdgpu_device *adev);
3509 static int gfx_v10_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev);
3510 static void gfx_v10_0_ring_emit_ce_meta(struct amdgpu_ring *ring, bool resume);
3511 static void gfx_v10_0_ring_emit_de_meta(struct amdgpu_ring *ring, bool resume);
3512 static void gfx_v10_0_ring_emit_frame_cntl(struct amdgpu_ring *ring, bool start, bool secure);
3513 static u32 gfx_v10_3_get_disabled_sa(struct amdgpu_device *adev);
3514 static void gfx_v10_3_program_pbb_mode(struct amdgpu_device *adev);
3515 static void gfx_v10_3_set_power_brake_sequence(struct amdgpu_device *adev);
3516 
3517 static void gfx10_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t queue_mask)
3518 {
3519 	amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_SET_RESOURCES, 6));
3520 	amdgpu_ring_write(kiq_ring, PACKET3_SET_RESOURCES_VMID_MASK(0) |
3521 			  PACKET3_SET_RESOURCES_QUEUE_TYPE(0));	/* vmid_mask:0 queue_type:0 (KIQ) */
3522 	amdgpu_ring_write(kiq_ring, lower_32_bits(queue_mask));	/* queue mask lo */
3523 	amdgpu_ring_write(kiq_ring, upper_32_bits(queue_mask));	/* queue mask hi */
3524 	amdgpu_ring_write(kiq_ring, 0);	/* gws mask lo */
3525 	amdgpu_ring_write(kiq_ring, 0);	/* gws mask hi */
3526 	amdgpu_ring_write(kiq_ring, 0);	/* oac mask */
3527 	amdgpu_ring_write(kiq_ring, 0);	/* gds heap base:0, gds heap size:0 */
3528 }
3529 
3530 static void gfx10_kiq_map_queues(struct amdgpu_ring *kiq_ring,
3531 				 struct amdgpu_ring *ring)
3532 {
3533 	struct amdgpu_device *adev = kiq_ring->adev;
3534 	uint64_t mqd_addr = amdgpu_bo_gpu_offset(ring->mqd_obj);
3535 	uint64_t wptr_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
3536 	uint32_t eng_sel = ring->funcs->type == AMDGPU_RING_TYPE_GFX ? 4 : 0;
3537 
3538 	amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_MAP_QUEUES, 5));
3539 	/* Q_sel:0, vmid:0, vidmem: 1, engine:0, num_Q:1*/
3540 	amdgpu_ring_write(kiq_ring, /* Q_sel: 0, vmid: 0, engine: 0, num_Q: 1 */
3541 			  PACKET3_MAP_QUEUES_QUEUE_SEL(0) | /* Queue_Sel */
3542 			  PACKET3_MAP_QUEUES_VMID(0) | /* VMID */
3543 			  PACKET3_MAP_QUEUES_QUEUE(ring->queue) |
3544 			  PACKET3_MAP_QUEUES_PIPE(ring->pipe) |
3545 			  PACKET3_MAP_QUEUES_ME((ring->me == 1 ? 0 : 1)) |
3546 			  PACKET3_MAP_QUEUES_QUEUE_TYPE(0) | /*queue_type: normal compute queue */
3547 			  PACKET3_MAP_QUEUES_ALLOC_FORMAT(0) | /* alloc format: all_on_one_pipe */
3548 			  PACKET3_MAP_QUEUES_ENGINE_SEL(eng_sel) |
3549 			  PACKET3_MAP_QUEUES_NUM_QUEUES(1)); /* num_queues: must be 1 */
3550 	amdgpu_ring_write(kiq_ring, PACKET3_MAP_QUEUES_DOORBELL_OFFSET(ring->doorbell_index));
3551 	amdgpu_ring_write(kiq_ring, lower_32_bits(mqd_addr));
3552 	amdgpu_ring_write(kiq_ring, upper_32_bits(mqd_addr));
3553 	amdgpu_ring_write(kiq_ring, lower_32_bits(wptr_addr));
3554 	amdgpu_ring_write(kiq_ring, upper_32_bits(wptr_addr));
3555 }
3556 
3557 static void gfx10_kiq_unmap_queues(struct amdgpu_ring *kiq_ring,
3558 				   struct amdgpu_ring *ring,
3559 				   enum amdgpu_unmap_queues_action action,
3560 				   u64 gpu_addr, u64 seq)
3561 {
3562 	uint32_t eng_sel = ring->funcs->type == AMDGPU_RING_TYPE_GFX ? 4 : 0;
3563 
3564 	amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_UNMAP_QUEUES, 4));
3565 	amdgpu_ring_write(kiq_ring, /* Q_sel: 0, vmid: 0, engine: 0, num_Q: 1 */
3566 			  PACKET3_UNMAP_QUEUES_ACTION(action) |
3567 			  PACKET3_UNMAP_QUEUES_QUEUE_SEL(0) |
3568 			  PACKET3_UNMAP_QUEUES_ENGINE_SEL(eng_sel) |
3569 			  PACKET3_UNMAP_QUEUES_NUM_QUEUES(1));
3570 	amdgpu_ring_write(kiq_ring,
3571 		  PACKET3_UNMAP_QUEUES_DOORBELL_OFFSET0(ring->doorbell_index));
3572 
3573 	if (action == PREEMPT_QUEUES_NO_UNMAP) {
3574 		amdgpu_ring_write(kiq_ring, lower_32_bits(gpu_addr));
3575 		amdgpu_ring_write(kiq_ring, upper_32_bits(gpu_addr));
3576 		amdgpu_ring_write(kiq_ring, seq);
3577 	} else {
3578 		amdgpu_ring_write(kiq_ring, 0);
3579 		amdgpu_ring_write(kiq_ring, 0);
3580 		amdgpu_ring_write(kiq_ring, 0);
3581 	}
3582 }
3583 
3584 static void gfx10_kiq_query_status(struct amdgpu_ring *kiq_ring,
3585 				   struct amdgpu_ring *ring,
3586 				   u64 addr,
3587 				   u64 seq)
3588 {
3589 	uint32_t eng_sel = ring->funcs->type == AMDGPU_RING_TYPE_GFX ? 4 : 0;
3590 
3591 	amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_QUERY_STATUS, 5));
3592 	amdgpu_ring_write(kiq_ring,
3593 			  PACKET3_QUERY_STATUS_CONTEXT_ID(0) |
3594 			  PACKET3_QUERY_STATUS_INTERRUPT_SEL(0) |
3595 			  PACKET3_QUERY_STATUS_COMMAND(2));
3596 	amdgpu_ring_write(kiq_ring, /* Q_sel: 0, vmid: 0, engine: 0, num_Q: 1 */
3597 			  PACKET3_QUERY_STATUS_DOORBELL_OFFSET(ring->doorbell_index) |
3598 			  PACKET3_QUERY_STATUS_ENG_SEL(eng_sel));
3599 	amdgpu_ring_write(kiq_ring, lower_32_bits(addr));
3600 	amdgpu_ring_write(kiq_ring, upper_32_bits(addr));
3601 	amdgpu_ring_write(kiq_ring, lower_32_bits(seq));
3602 	amdgpu_ring_write(kiq_ring, upper_32_bits(seq));
3603 }
3604 
3605 static void gfx10_kiq_invalidate_tlbs(struct amdgpu_ring *kiq_ring,
3606 				uint16_t pasid, uint32_t flush_type,
3607 				bool all_hub)
3608 {
3609 	amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_INVALIDATE_TLBS, 0));
3610 	amdgpu_ring_write(kiq_ring,
3611 			PACKET3_INVALIDATE_TLBS_DST_SEL(1) |
3612 			PACKET3_INVALIDATE_TLBS_ALL_HUB(all_hub) |
3613 			PACKET3_INVALIDATE_TLBS_PASID(pasid) |
3614 			PACKET3_INVALIDATE_TLBS_FLUSH_TYPE(flush_type));
3615 }
3616 
3617 static const struct kiq_pm4_funcs gfx_v10_0_kiq_pm4_funcs = {
3618 	.kiq_set_resources = gfx10_kiq_set_resources,
3619 	.kiq_map_queues = gfx10_kiq_map_queues,
3620 	.kiq_unmap_queues = gfx10_kiq_unmap_queues,
3621 	.kiq_query_status = gfx10_kiq_query_status,
3622 	.kiq_invalidate_tlbs = gfx10_kiq_invalidate_tlbs,
3623 	.set_resources_size = 8,
3624 	.map_queues_size = 7,
3625 	.unmap_queues_size = 6,
3626 	.query_status_size = 7,
3627 	.invalidate_tlbs_size = 2,
3628 };
3629 
3630 static void gfx_v10_0_set_kiq_pm4_funcs(struct amdgpu_device *adev)
3631 {
3632 	adev->gfx.kiq.pmf = &gfx_v10_0_kiq_pm4_funcs;
3633 }
3634 
3635 static void gfx_v10_0_init_spm_golden_registers(struct amdgpu_device *adev)
3636 {
3637 	switch (adev->asic_type) {
3638 	case CHIP_NAVI10:
3639 		soc15_program_register_sequence(adev,
3640 						golden_settings_gc_rlc_spm_10_0_nv10,
3641 						(const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_0_nv10));
3642 		break;
3643 	case CHIP_NAVI14:
3644 		soc15_program_register_sequence(adev,
3645 						golden_settings_gc_rlc_spm_10_1_nv14,
3646 						(const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_nv14));
3647 		break;
3648 	case CHIP_NAVI12:
3649 		soc15_program_register_sequence(adev,
3650 						golden_settings_gc_rlc_spm_10_1_2_nv12,
3651 						(const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_2_nv12));
3652 		break;
3653 	default:
3654 		break;
3655 	}
3656 }
3657 
3658 static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)
3659 {
3660 	switch (adev->asic_type) {
3661 	case CHIP_NAVI10:
3662 		soc15_program_register_sequence(adev,
3663 						golden_settings_gc_10_1,
3664 						(const u32)ARRAY_SIZE(golden_settings_gc_10_1));
3665 		soc15_program_register_sequence(adev,
3666 						golden_settings_gc_10_0_nv10,
3667 						(const u32)ARRAY_SIZE(golden_settings_gc_10_0_nv10));
3668 		break;
3669 	case CHIP_NAVI14:
3670 		soc15_program_register_sequence(adev,
3671 						golden_settings_gc_10_1_1,
3672 						(const u32)ARRAY_SIZE(golden_settings_gc_10_1_1));
3673 		soc15_program_register_sequence(adev,
3674 						golden_settings_gc_10_1_nv14,
3675 						(const u32)ARRAY_SIZE(golden_settings_gc_10_1_nv14));
3676 		break;
3677 	case CHIP_NAVI12:
3678 		soc15_program_register_sequence(adev,
3679 						golden_settings_gc_10_1_2,
3680 						(const u32)ARRAY_SIZE(golden_settings_gc_10_1_2));
3681 		soc15_program_register_sequence(adev,
3682 						golden_settings_gc_10_1_2_nv12,
3683 						(const u32)ARRAY_SIZE(golden_settings_gc_10_1_2_nv12));
3684 		break;
3685 	case CHIP_SIENNA_CICHLID:
3686 		soc15_program_register_sequence(adev,
3687 						golden_settings_gc_10_3,
3688 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3));
3689 		soc15_program_register_sequence(adev,
3690 						golden_settings_gc_10_3_sienna_cichlid,
3691 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3_sienna_cichlid));
3692 		break;
3693 	case CHIP_NAVY_FLOUNDER:
3694 		soc15_program_register_sequence(adev,
3695 						golden_settings_gc_10_3_2,
3696 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3_2));
3697 		break;
3698 	case CHIP_VANGOGH:
3699 		soc15_program_register_sequence(adev,
3700 						golden_settings_gc_10_3_vangogh,
3701 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3_vangogh));
3702 		break;
3703 	case CHIP_YELLOW_CARP:
3704 		soc15_program_register_sequence(adev,
3705 						golden_settings_gc_10_3_3,
3706 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3_3));
3707 		break;
3708 	case CHIP_DIMGREY_CAVEFISH:
3709 		soc15_program_register_sequence(adev,
3710                                                 golden_settings_gc_10_3_4,
3711                                                 (const u32)ARRAY_SIZE(golden_settings_gc_10_3_4));
3712 		break;
3713 	case CHIP_BEIGE_GOBY:
3714 		soc15_program_register_sequence(adev,
3715 						golden_settings_gc_10_3_5,
3716 						(const u32)ARRAY_SIZE(golden_settings_gc_10_3_5));
3717 		break;
3718 	default:
3719 		break;
3720 	}
3721 	gfx_v10_0_init_spm_golden_registers(adev);
3722 }
3723 
3724 static void gfx_v10_0_scratch_init(struct amdgpu_device *adev)
3725 {
3726 	adev->gfx.scratch.num_reg = 8;
3727 	adev->gfx.scratch.reg_base = SOC15_REG_OFFSET(GC, 0, mmSCRATCH_REG0);
3728 	adev->gfx.scratch.free_mask = (1u << adev->gfx.scratch.num_reg) - 1;
3729 }
3730 
3731 static void gfx_v10_0_write_data_to_reg(struct amdgpu_ring *ring, int eng_sel,
3732 				       bool wc, uint32_t reg, uint32_t val)
3733 {
3734 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
3735 	amdgpu_ring_write(ring, WRITE_DATA_ENGINE_SEL(eng_sel) |
3736 			  WRITE_DATA_DST_SEL(0) | (wc ? WR_CONFIRM : 0));
3737 	amdgpu_ring_write(ring, reg);
3738 	amdgpu_ring_write(ring, 0);
3739 	amdgpu_ring_write(ring, val);
3740 }
3741 
3742 static void gfx_v10_0_wait_reg_mem(struct amdgpu_ring *ring, int eng_sel,
3743 				  int mem_space, int opt, uint32_t addr0,
3744 				  uint32_t addr1, uint32_t ref, uint32_t mask,
3745 				  uint32_t inv)
3746 {
3747 	amdgpu_ring_write(ring, PACKET3(PACKET3_WAIT_REG_MEM, 5));
3748 	amdgpu_ring_write(ring,
3749 			  /* memory (1) or register (0) */
3750 			  (WAIT_REG_MEM_MEM_SPACE(mem_space) |
3751 			   WAIT_REG_MEM_OPERATION(opt) | /* wait */
3752 			   WAIT_REG_MEM_FUNCTION(3) |  /* equal */
3753 			   WAIT_REG_MEM_ENGINE(eng_sel)));
3754 
3755 	if (mem_space)
3756 		BUG_ON(addr0 & 0x3); /* Dword align */
3757 	amdgpu_ring_write(ring, addr0);
3758 	amdgpu_ring_write(ring, addr1);
3759 	amdgpu_ring_write(ring, ref);
3760 	amdgpu_ring_write(ring, mask);
3761 	amdgpu_ring_write(ring, inv); /* poll interval */
3762 }
3763 
3764 static int gfx_v10_0_ring_test_ring(struct amdgpu_ring *ring)
3765 {
3766 	struct amdgpu_device *adev = ring->adev;
3767 	uint32_t scratch;
3768 	uint32_t tmp = 0;
3769 	unsigned i;
3770 	int r;
3771 
3772 	r = amdgpu_gfx_scratch_get(adev, &scratch);
3773 	if (r) {
3774 		DRM_ERROR("amdgpu: cp failed to get scratch reg (%d).\n", r);
3775 		return r;
3776 	}
3777 
3778 	WREG32(scratch, 0xCAFEDEAD);
3779 
3780 	r = amdgpu_ring_alloc(ring, 3);
3781 	if (r) {
3782 		DRM_ERROR("amdgpu: cp failed to lock ring %d (%d).\n",
3783 			  ring->idx, r);
3784 		amdgpu_gfx_scratch_free(adev, scratch);
3785 		return r;
3786 	}
3787 
3788 	amdgpu_ring_write(ring, PACKET3(PACKET3_SET_UCONFIG_REG, 1));
3789 	amdgpu_ring_write(ring, (scratch - PACKET3_SET_UCONFIG_REG_START));
3790 	amdgpu_ring_write(ring, 0xDEADBEEF);
3791 	amdgpu_ring_commit(ring);
3792 
3793 	for (i = 0; i < adev->usec_timeout; i++) {
3794 		tmp = RREG32(scratch);
3795 		if (tmp == 0xDEADBEEF)
3796 			break;
3797 		if (amdgpu_emu_mode == 1)
3798 			msleep(1);
3799 		else
3800 			udelay(1);
3801 	}
3802 
3803 	if (i >= adev->usec_timeout)
3804 		r = -ETIMEDOUT;
3805 
3806 	amdgpu_gfx_scratch_free(adev, scratch);
3807 
3808 	return r;
3809 }
3810 
3811 static int gfx_v10_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
3812 {
3813 	struct amdgpu_device *adev = ring->adev;
3814 	struct amdgpu_ib ib;
3815 	struct dma_fence *f = NULL;
3816 	unsigned index;
3817 	uint64_t gpu_addr;
3818 	uint32_t tmp;
3819 	long r;
3820 
3821 	r = amdgpu_device_wb_get(adev, &index);
3822 	if (r)
3823 		return r;
3824 
3825 	gpu_addr = adev->wb.gpu_addr + (index * 4);
3826 	adev->wb.wb[index] = cpu_to_le32(0xCAFEDEAD);
3827 	memset(&ib, 0, sizeof(ib));
3828 	r = amdgpu_ib_get(adev, NULL, 16,
3829 					AMDGPU_IB_POOL_DIRECT, &ib);
3830 	if (r)
3831 		goto err1;
3832 
3833 	ib.ptr[0] = PACKET3(PACKET3_WRITE_DATA, 3);
3834 	ib.ptr[1] = WRITE_DATA_DST_SEL(5) | WR_CONFIRM;
3835 	ib.ptr[2] = lower_32_bits(gpu_addr);
3836 	ib.ptr[3] = upper_32_bits(gpu_addr);
3837 	ib.ptr[4] = 0xDEADBEEF;
3838 	ib.length_dw = 5;
3839 
3840 	r = amdgpu_ib_schedule(ring, 1, &ib, NULL, &f);
3841 	if (r)
3842 		goto err2;
3843 
3844 	r = dma_fence_wait_timeout(f, false, timeout);
3845 	if (r == 0) {
3846 		r = -ETIMEDOUT;
3847 		goto err2;
3848 	} else if (r < 0) {
3849 		goto err2;
3850 	}
3851 
3852 	tmp = adev->wb.wb[index];
3853 	if (tmp == 0xDEADBEEF)
3854 		r = 0;
3855 	else
3856 		r = -EINVAL;
3857 err2:
3858 	amdgpu_ib_free(adev, &ib, NULL);
3859 	dma_fence_put(f);
3860 err1:
3861 	amdgpu_device_wb_free(adev, index);
3862 	return r;
3863 }
3864 
3865 static void gfx_v10_0_free_microcode(struct amdgpu_device *adev)
3866 {
3867 	release_firmware(adev->gfx.pfp_fw);
3868 	adev->gfx.pfp_fw = NULL;
3869 	release_firmware(adev->gfx.me_fw);
3870 	adev->gfx.me_fw = NULL;
3871 	release_firmware(adev->gfx.ce_fw);
3872 	adev->gfx.ce_fw = NULL;
3873 	release_firmware(adev->gfx.rlc_fw);
3874 	adev->gfx.rlc_fw = NULL;
3875 	release_firmware(adev->gfx.mec_fw);
3876 	adev->gfx.mec_fw = NULL;
3877 	release_firmware(adev->gfx.mec2_fw);
3878 	adev->gfx.mec2_fw = NULL;
3879 
3880 	kfree(adev->gfx.rlc.register_list_format);
3881 }
3882 
3883 static void gfx_v10_0_check_fw_write_wait(struct amdgpu_device *adev)
3884 {
3885 	adev->gfx.cp_fw_write_wait = false;
3886 
3887 	switch (adev->asic_type) {
3888 	case CHIP_NAVI10:
3889 	case CHIP_NAVI12:
3890 	case CHIP_NAVI14:
3891 		if ((adev->gfx.me_fw_version >= 0x00000046) &&
3892 		    (adev->gfx.me_feature_version >= 27) &&
3893 		    (adev->gfx.pfp_fw_version >= 0x00000068) &&
3894 		    (adev->gfx.pfp_feature_version >= 27) &&
3895 		    (adev->gfx.mec_fw_version >= 0x0000005b) &&
3896 		    (adev->gfx.mec_feature_version >= 27))
3897 			adev->gfx.cp_fw_write_wait = true;
3898 		break;
3899 	case CHIP_SIENNA_CICHLID:
3900 	case CHIP_NAVY_FLOUNDER:
3901 	case CHIP_VANGOGH:
3902 	case CHIP_DIMGREY_CAVEFISH:
3903 	case CHIP_BEIGE_GOBY:
3904 	case CHIP_YELLOW_CARP:
3905 		adev->gfx.cp_fw_write_wait = true;
3906 		break;
3907 	default:
3908 		break;
3909 	}
3910 
3911 	if (!adev->gfx.cp_fw_write_wait)
3912 		DRM_WARN_ONCE("CP firmware version too old, please update!");
3913 }
3914 
3915 
3916 static void gfx_v10_0_init_rlc_ext_microcode(struct amdgpu_device *adev)
3917 {
3918 	const struct rlc_firmware_header_v2_1 *rlc_hdr;
3919 
3920 	rlc_hdr = (const struct rlc_firmware_header_v2_1 *)adev->gfx.rlc_fw->data;
3921 	adev->gfx.rlc_srlc_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_ucode_ver);
3922 	adev->gfx.rlc_srlc_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_cntl_feature_ver);
3923 	adev->gfx.rlc.save_restore_list_cntl_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_cntl_size_bytes);
3924 	adev->gfx.rlc.save_restore_list_cntl = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_cntl_offset_bytes);
3925 	adev->gfx.rlc_srlg_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_ucode_ver);
3926 	adev->gfx.rlc_srlg_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_gpm_feature_ver);
3927 	adev->gfx.rlc.save_restore_list_gpm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_gpm_size_bytes);
3928 	adev->gfx.rlc.save_restore_list_gpm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_gpm_offset_bytes);
3929 	adev->gfx.rlc_srls_fw_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_ucode_ver);
3930 	adev->gfx.rlc_srls_feature_version = le32_to_cpu(rlc_hdr->save_restore_list_srm_feature_ver);
3931 	adev->gfx.rlc.save_restore_list_srm_size_bytes = le32_to_cpu(rlc_hdr->save_restore_list_srm_size_bytes);
3932 	adev->gfx.rlc.save_restore_list_srm = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->save_restore_list_srm_offset_bytes);
3933 	adev->gfx.rlc.reg_list_format_direct_reg_list_length =
3934 			le32_to_cpu(rlc_hdr->reg_list_format_direct_reg_list_length);
3935 }
3936 
3937 static void gfx_v10_0_init_rlc_iram_dram_microcode(struct amdgpu_device *adev)
3938 {
3939 	const struct rlc_firmware_header_v2_2 *rlc_hdr;
3940 
3941 	rlc_hdr = (const struct rlc_firmware_header_v2_2 *)adev->gfx.rlc_fw->data;
3942 	adev->gfx.rlc.rlc_iram_ucode_size_bytes = le32_to_cpu(rlc_hdr->rlc_iram_ucode_size_bytes);
3943 	adev->gfx.rlc.rlc_iram_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->rlc_iram_ucode_offset_bytes);
3944 	adev->gfx.rlc.rlc_dram_ucode_size_bytes = le32_to_cpu(rlc_hdr->rlc_dram_ucode_size_bytes);
3945 	adev->gfx.rlc.rlc_dram_ucode = (u8 *)rlc_hdr + le32_to_cpu(rlc_hdr->rlc_dram_ucode_offset_bytes);
3946 }
3947 
3948 static bool gfx_v10_0_navi10_gfxoff_should_enable(struct amdgpu_device *adev)
3949 {
3950 	bool ret = false;
3951 
3952 	switch (adev->pdev->revision) {
3953 	case 0xc2:
3954 	case 0xc3:
3955 		ret = true;
3956 		break;
3957 	default:
3958 		ret = false;
3959 		break;
3960 	}
3961 
3962 	return ret ;
3963 }
3964 
3965 static void gfx_v10_0_check_gfxoff_flag(struct amdgpu_device *adev)
3966 {
3967 	switch (adev->asic_type) {
3968 	case CHIP_NAVI10:
3969 		if (!gfx_v10_0_navi10_gfxoff_should_enable(adev))
3970 			adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
3971 		break;
3972 	default:
3973 		break;
3974 	}
3975 }
3976 
3977 static int gfx_v10_0_init_microcode(struct amdgpu_device *adev)
3978 {
3979 	const char *chip_name;
3980 	char fw_name[40];
3981 	char *wks = "";
3982 	int err;
3983 	struct amdgpu_firmware_info *info = NULL;
3984 	const struct common_firmware_header *header = NULL;
3985 	const struct gfx_firmware_header_v1_0 *cp_hdr;
3986 	const struct rlc_firmware_header_v2_0 *rlc_hdr;
3987 	unsigned int *tmp = NULL;
3988 	unsigned int i = 0;
3989 	uint16_t version_major;
3990 	uint16_t version_minor;
3991 
3992 	DRM_DEBUG("\n");
3993 
3994 	switch (adev->asic_type) {
3995 	case CHIP_NAVI10:
3996 		chip_name = "navi10";
3997 		break;
3998 	case CHIP_NAVI14:
3999 		chip_name = "navi14";
4000 		if (!(adev->pdev->device == 0x7340 &&
4001 		      adev->pdev->revision != 0x00))
4002 			wks = "_wks";
4003 		break;
4004 	case CHIP_NAVI12:
4005 		chip_name = "navi12";
4006 		break;
4007 	case CHIP_SIENNA_CICHLID:
4008 		chip_name = "sienna_cichlid";
4009 		break;
4010 	case CHIP_NAVY_FLOUNDER:
4011 		chip_name = "navy_flounder";
4012 		break;
4013 	case CHIP_VANGOGH:
4014 		chip_name = "vangogh";
4015 		break;
4016 	case CHIP_DIMGREY_CAVEFISH:
4017 		chip_name = "dimgrey_cavefish";
4018 		break;
4019 	case CHIP_BEIGE_GOBY:
4020 		chip_name = "beige_goby";
4021 		break;
4022 	case CHIP_YELLOW_CARP:
4023 		chip_name = "yellow_carp";
4024 		break;
4025 	default:
4026 		BUG();
4027 	}
4028 
4029 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_pfp%s.bin", chip_name, wks);
4030 	err = request_firmware(&adev->gfx.pfp_fw, fw_name, adev->dev);
4031 	if (err)
4032 		goto out;
4033 	err = amdgpu_ucode_validate(adev->gfx.pfp_fw);
4034 	if (err)
4035 		goto out;
4036 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.pfp_fw->data;
4037 	adev->gfx.pfp_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4038 	adev->gfx.pfp_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4039 
4040 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_me%s.bin", chip_name, wks);
4041 	err = request_firmware(&adev->gfx.me_fw, fw_name, adev->dev);
4042 	if (err)
4043 		goto out;
4044 	err = amdgpu_ucode_validate(adev->gfx.me_fw);
4045 	if (err)
4046 		goto out;
4047 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
4048 	adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4049 	adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4050 
4051 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce%s.bin", chip_name, wks);
4052 	err = request_firmware(&adev->gfx.ce_fw, fw_name, adev->dev);
4053 	if (err)
4054 		goto out;
4055 	err = amdgpu_ucode_validate(adev->gfx.ce_fw);
4056 	if (err)
4057 		goto out;
4058 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.ce_fw->data;
4059 	adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4060 	adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4061 
4062 	if (!amdgpu_sriov_vf(adev)) {
4063 		snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);
4064 		err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
4065 		if (err)
4066 			goto out;
4067 		err = amdgpu_ucode_validate(adev->gfx.rlc_fw);
4068 		rlc_hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;
4069 		version_major = le16_to_cpu(rlc_hdr->header.header_version_major);
4070 		version_minor = le16_to_cpu(rlc_hdr->header.header_version_minor);
4071 
4072 		adev->gfx.rlc_fw_version = le32_to_cpu(rlc_hdr->header.ucode_version);
4073 		adev->gfx.rlc_feature_version = le32_to_cpu(rlc_hdr->ucode_feature_version);
4074 		adev->gfx.rlc.save_and_restore_offset =
4075 			le32_to_cpu(rlc_hdr->save_and_restore_offset);
4076 		adev->gfx.rlc.clear_state_descriptor_offset =
4077 			le32_to_cpu(rlc_hdr->clear_state_descriptor_offset);
4078 		adev->gfx.rlc.avail_scratch_ram_locations =
4079 			le32_to_cpu(rlc_hdr->avail_scratch_ram_locations);
4080 		adev->gfx.rlc.reg_restore_list_size =
4081 			le32_to_cpu(rlc_hdr->reg_restore_list_size);
4082 		adev->gfx.rlc.reg_list_format_start =
4083 			le32_to_cpu(rlc_hdr->reg_list_format_start);
4084 		adev->gfx.rlc.reg_list_format_separate_start =
4085 			le32_to_cpu(rlc_hdr->reg_list_format_separate_start);
4086 		adev->gfx.rlc.starting_offsets_start =
4087 			le32_to_cpu(rlc_hdr->starting_offsets_start);
4088 		adev->gfx.rlc.reg_list_format_size_bytes =
4089 			le32_to_cpu(rlc_hdr->reg_list_format_size_bytes);
4090 		adev->gfx.rlc.reg_list_size_bytes =
4091 			le32_to_cpu(rlc_hdr->reg_list_size_bytes);
4092 		adev->gfx.rlc.register_list_format =
4093 			kmalloc(adev->gfx.rlc.reg_list_format_size_bytes +
4094 					adev->gfx.rlc.reg_list_size_bytes, GFP_KERNEL);
4095 		if (!adev->gfx.rlc.register_list_format) {
4096 			err = -ENOMEM;
4097 			goto out;
4098 		}
4099 
4100 		tmp = (unsigned int *)((uintptr_t)rlc_hdr +
4101 							   le32_to_cpu(rlc_hdr->reg_list_format_array_offset_bytes));
4102 		for (i = 0 ; i < (rlc_hdr->reg_list_format_size_bytes >> 2); i++)
4103 			adev->gfx.rlc.register_list_format[i] =	le32_to_cpu(tmp[i]);
4104 
4105 		adev->gfx.rlc.register_restore = adev->gfx.rlc.register_list_format + i;
4106 
4107 		tmp = (unsigned int *)((uintptr_t)rlc_hdr +
4108 							   le32_to_cpu(rlc_hdr->reg_list_array_offset_bytes));
4109 		for (i = 0 ; i < (rlc_hdr->reg_list_size_bytes >> 2); i++)
4110 			adev->gfx.rlc.register_restore[i] = le32_to_cpu(tmp[i]);
4111 
4112 		if (version_major == 2) {
4113 			if (version_minor >= 1)
4114 				gfx_v10_0_init_rlc_ext_microcode(adev);
4115 			if (version_minor == 2)
4116 				gfx_v10_0_init_rlc_iram_dram_microcode(adev);
4117 		}
4118 	}
4119 
4120 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec%s.bin", chip_name, wks);
4121 	err = request_firmware(&adev->gfx.mec_fw, fw_name, adev->dev);
4122 	if (err)
4123 		goto out;
4124 	err = amdgpu_ucode_validate(adev->gfx.mec_fw);
4125 	if (err)
4126 		goto out;
4127 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
4128 	adev->gfx.mec_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
4129 	adev->gfx.mec_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
4130 
4131 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec2%s.bin", chip_name, wks);
4132 	err = request_firmware(&adev->gfx.mec2_fw, fw_name, adev->dev);
4133 	if (!err) {
4134 		err = amdgpu_ucode_validate(adev->gfx.mec2_fw);
4135 		if (err)
4136 			goto out;
4137 		cp_hdr = (const struct gfx_firmware_header_v1_0 *)
4138 		adev->gfx.mec2_fw->data;
4139 		adev->gfx.mec2_fw_version =
4140 		le32_to_cpu(cp_hdr->header.ucode_version);
4141 		adev->gfx.mec2_feature_version =
4142 		le32_to_cpu(cp_hdr->ucode_feature_version);
4143 	} else {
4144 		err = 0;
4145 		adev->gfx.mec2_fw = NULL;
4146 	}
4147 
4148 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
4149 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_PFP];
4150 		info->ucode_id = AMDGPU_UCODE_ID_CP_PFP;
4151 		info->fw = adev->gfx.pfp_fw;
4152 		header = (const struct common_firmware_header *)info->fw->data;
4153 		adev->firmware.fw_size +=
4154 			ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4155 
4156 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_ME];
4157 		info->ucode_id = AMDGPU_UCODE_ID_CP_ME;
4158 		info->fw = adev->gfx.me_fw;
4159 		header = (const struct common_firmware_header *)info->fw->data;
4160 		adev->firmware.fw_size +=
4161 			ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4162 
4163 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_CE];
4164 		info->ucode_id = AMDGPU_UCODE_ID_CP_CE;
4165 		info->fw = adev->gfx.ce_fw;
4166 		header = (const struct common_firmware_header *)info->fw->data;
4167 		adev->firmware.fw_size +=
4168 			ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4169 
4170 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_G];
4171 		info->ucode_id = AMDGPU_UCODE_ID_RLC_G;
4172 		info->fw = adev->gfx.rlc_fw;
4173 		if (info->fw) {
4174 			header = (const struct common_firmware_header *)info->fw->data;
4175 			adev->firmware.fw_size +=
4176 				ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
4177 		}
4178 		if (adev->gfx.rlc.save_restore_list_cntl_size_bytes &&
4179 		    adev->gfx.rlc.save_restore_list_gpm_size_bytes &&
4180 		    adev->gfx.rlc.save_restore_list_srm_size_bytes) {
4181 			info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL];
4182 			info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_CNTL;
4183 			info->fw = adev->gfx.rlc_fw;
4184 			adev->firmware.fw_size +=
4185 				ALIGN(adev->gfx.rlc.save_restore_list_cntl_size_bytes, PAGE_SIZE);
4186 
4187 			info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM];
4188 			info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_GPM_MEM;
4189 			info->fw = adev->gfx.rlc_fw;
4190 			adev->firmware.fw_size +=
4191 				ALIGN(adev->gfx.rlc.save_restore_list_gpm_size_bytes, PAGE_SIZE);
4192 
4193 			info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM];
4194 			info->ucode_id = AMDGPU_UCODE_ID_RLC_RESTORE_LIST_SRM_MEM;
4195 			info->fw = adev->gfx.rlc_fw;
4196 			adev->firmware.fw_size +=
4197 				ALIGN(adev->gfx.rlc.save_restore_list_srm_size_bytes, PAGE_SIZE);
4198 
4199 			if (adev->gfx.rlc.rlc_iram_ucode_size_bytes &&
4200 			    adev->gfx.rlc.rlc_dram_ucode_size_bytes) {
4201 				info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_IRAM];
4202 				info->ucode_id = AMDGPU_UCODE_ID_RLC_IRAM;
4203 				info->fw = adev->gfx.rlc_fw;
4204 				adev->firmware.fw_size +=
4205 					ALIGN(adev->gfx.rlc.rlc_iram_ucode_size_bytes, PAGE_SIZE);
4206 
4207 				info = &adev->firmware.ucode[AMDGPU_UCODE_ID_RLC_DRAM];
4208 				info->ucode_id = AMDGPU_UCODE_ID_RLC_DRAM;
4209 				info->fw = adev->gfx.rlc_fw;
4210 				adev->firmware.fw_size +=
4211 					ALIGN(adev->gfx.rlc.rlc_dram_ucode_size_bytes, PAGE_SIZE);
4212 			}
4213 		}
4214 
4215 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1];
4216 		info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1;
4217 		info->fw = adev->gfx.mec_fw;
4218 		header = (const struct common_firmware_header *)info->fw->data;
4219 		cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
4220 		adev->firmware.fw_size +=
4221 			ALIGN(le32_to_cpu(header->ucode_size_bytes) -
4222 			      le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
4223 
4224 		info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC1_JT];
4225 		info->ucode_id = AMDGPU_UCODE_ID_CP_MEC1_JT;
4226 		info->fw = adev->gfx.mec_fw;
4227 		adev->firmware.fw_size +=
4228 			ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4, PAGE_SIZE);
4229 
4230 		if (adev->gfx.mec2_fw) {
4231 			info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2];
4232 			info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2;
4233 			info->fw = adev->gfx.mec2_fw;
4234 			header = (const struct common_firmware_header *)info->fw->data;
4235 			cp_hdr = (const struct gfx_firmware_header_v1_0 *)info->fw->data;
4236 			adev->firmware.fw_size +=
4237 				ALIGN(le32_to_cpu(header->ucode_size_bytes) -
4238 				      le32_to_cpu(cp_hdr->jt_size) * 4,
4239 				      PAGE_SIZE);
4240 			info = &adev->firmware.ucode[AMDGPU_UCODE_ID_CP_MEC2_JT];
4241 			info->ucode_id = AMDGPU_UCODE_ID_CP_MEC2_JT;
4242 			info->fw = adev->gfx.mec2_fw;
4243 			adev->firmware.fw_size +=
4244 				ALIGN(le32_to_cpu(cp_hdr->jt_size) * 4,
4245 				      PAGE_SIZE);
4246 		}
4247 	}
4248 
4249 	gfx_v10_0_check_fw_write_wait(adev);
4250 out:
4251 	if (err) {
4252 		dev_err(adev->dev,
4253 			"gfx10: Failed to load firmware \"%s\"\n",
4254 			fw_name);
4255 		release_firmware(adev->gfx.pfp_fw);
4256 		adev->gfx.pfp_fw = NULL;
4257 		release_firmware(adev->gfx.me_fw);
4258 		adev->gfx.me_fw = NULL;
4259 		release_firmware(adev->gfx.ce_fw);
4260 		adev->gfx.ce_fw = NULL;
4261 		release_firmware(adev->gfx.rlc_fw);
4262 		adev->gfx.rlc_fw = NULL;
4263 		release_firmware(adev->gfx.mec_fw);
4264 		adev->gfx.mec_fw = NULL;
4265 		release_firmware(adev->gfx.mec2_fw);
4266 		adev->gfx.mec2_fw = NULL;
4267 	}
4268 
4269 	gfx_v10_0_check_gfxoff_flag(adev);
4270 
4271 	return err;
4272 }
4273 
4274 static u32 gfx_v10_0_get_csb_size(struct amdgpu_device *adev)
4275 {
4276 	u32 count = 0;
4277 	const struct cs_section_def *sect = NULL;
4278 	const struct cs_extent_def *ext = NULL;
4279 
4280 	/* begin clear state */
4281 	count += 2;
4282 	/* context control state */
4283 	count += 3;
4284 
4285 	for (sect = gfx10_cs_data; sect->section != NULL; ++sect) {
4286 		for (ext = sect->section; ext->extent != NULL; ++ext) {
4287 			if (sect->id == SECT_CONTEXT)
4288 				count += 2 + ext->reg_count;
4289 			else
4290 				return 0;
4291 		}
4292 	}
4293 
4294 	/* set PA_SC_TILE_STEERING_OVERRIDE */
4295 	count += 3;
4296 	/* end clear state */
4297 	count += 2;
4298 	/* clear state */
4299 	count += 2;
4300 
4301 	return count;
4302 }
4303 
4304 static void gfx_v10_0_get_csb_buffer(struct amdgpu_device *adev,
4305 				    volatile u32 *buffer)
4306 {
4307 	u32 count = 0, i;
4308 	const struct cs_section_def *sect = NULL;
4309 	const struct cs_extent_def *ext = NULL;
4310 	int ctx_reg_offset;
4311 
4312 	if (adev->gfx.rlc.cs_data == NULL)
4313 		return;
4314 	if (buffer == NULL)
4315 		return;
4316 
4317 	buffer[count++] = cpu_to_le32(PACKET3(PACKET3_PREAMBLE_CNTL, 0));
4318 	buffer[count++] = cpu_to_le32(PACKET3_PREAMBLE_BEGIN_CLEAR_STATE);
4319 
4320 	buffer[count++] = cpu_to_le32(PACKET3(PACKET3_CONTEXT_CONTROL, 1));
4321 	buffer[count++] = cpu_to_le32(0x80000000);
4322 	buffer[count++] = cpu_to_le32(0x80000000);
4323 
4324 	for (sect = adev->gfx.rlc.cs_data; sect->section != NULL; ++sect) {
4325 		for (ext = sect->section; ext->extent != NULL; ++ext) {
4326 			if (sect->id == SECT_CONTEXT) {
4327 				buffer[count++] =
4328 					cpu_to_le32(PACKET3(PACKET3_SET_CONTEXT_REG, ext->reg_count));
4329 				buffer[count++] = cpu_to_le32(ext->reg_index -
4330 						PACKET3_SET_CONTEXT_REG_START);
4331 				for (i = 0; i < ext->reg_count; i++)
4332 					buffer[count++] = cpu_to_le32(ext->extent[i]);
4333 			} else {
4334 				return;
4335 			}
4336 		}
4337 	}
4338 
4339 	ctx_reg_offset =
4340 		SOC15_REG_OFFSET(GC, 0, mmPA_SC_TILE_STEERING_OVERRIDE) - PACKET3_SET_CONTEXT_REG_START;
4341 	buffer[count++] = cpu_to_le32(PACKET3(PACKET3_SET_CONTEXT_REG, 1));
4342 	buffer[count++] = cpu_to_le32(ctx_reg_offset);
4343 	buffer[count++] = cpu_to_le32(adev->gfx.config.pa_sc_tile_steering_override);
4344 
4345 	buffer[count++] = cpu_to_le32(PACKET3(PACKET3_PREAMBLE_CNTL, 0));
4346 	buffer[count++] = cpu_to_le32(PACKET3_PREAMBLE_END_CLEAR_STATE);
4347 
4348 	buffer[count++] = cpu_to_le32(PACKET3(PACKET3_CLEAR_STATE, 0));
4349 	buffer[count++] = cpu_to_le32(0);
4350 }
4351 
4352 static void gfx_v10_0_rlc_fini(struct amdgpu_device *adev)
4353 {
4354 	/* clear state block */
4355 	amdgpu_bo_free_kernel(&adev->gfx.rlc.clear_state_obj,
4356 			&adev->gfx.rlc.clear_state_gpu_addr,
4357 			(void **)&adev->gfx.rlc.cs_ptr);
4358 
4359 	/* jump table block */
4360 	amdgpu_bo_free_kernel(&adev->gfx.rlc.cp_table_obj,
4361 			&adev->gfx.rlc.cp_table_gpu_addr,
4362 			(void **)&adev->gfx.rlc.cp_table_ptr);
4363 }
4364 
4365 static int gfx_v10_0_rlc_init(struct amdgpu_device *adev)
4366 {
4367 	const struct cs_section_def *cs_data;
4368 	int r;
4369 
4370 	adev->gfx.rlc.cs_data = gfx10_cs_data;
4371 
4372 	cs_data = adev->gfx.rlc.cs_data;
4373 
4374 	if (cs_data) {
4375 		/* init clear state block */
4376 		r = amdgpu_gfx_rlc_init_csb(adev);
4377 		if (r)
4378 			return r;
4379 	}
4380 
4381 	/* init spm vmid with 0xf */
4382 	if (adev->gfx.rlc.funcs->update_spm_vmid)
4383 		adev->gfx.rlc.funcs->update_spm_vmid(adev, 0xf);
4384 
4385 	return 0;
4386 }
4387 
4388 static void gfx_v10_0_mec_fini(struct amdgpu_device *adev)
4389 {
4390 	amdgpu_bo_free_kernel(&adev->gfx.mec.hpd_eop_obj, NULL, NULL);
4391 	amdgpu_bo_free_kernel(&adev->gfx.mec.mec_fw_obj, NULL, NULL);
4392 }
4393 
4394 static int gfx_v10_0_me_init(struct amdgpu_device *adev)
4395 {
4396 	int r;
4397 
4398 	bitmap_zero(adev->gfx.me.queue_bitmap, AMDGPU_MAX_GFX_QUEUES);
4399 
4400 	amdgpu_gfx_graphics_queue_acquire(adev);
4401 
4402 	r = gfx_v10_0_init_microcode(adev);
4403 	if (r)
4404 		DRM_ERROR("Failed to load gfx firmware!\n");
4405 
4406 	return r;
4407 }
4408 
4409 static int gfx_v10_0_mec_init(struct amdgpu_device *adev)
4410 {
4411 	int r;
4412 	u32 *hpd;
4413 	const __le32 *fw_data = NULL;
4414 	unsigned fw_size;
4415 	u32 *fw = NULL;
4416 	size_t mec_hpd_size;
4417 
4418 	const struct gfx_firmware_header_v1_0 *mec_hdr = NULL;
4419 
4420 	bitmap_zero(adev->gfx.mec.queue_bitmap, AMDGPU_MAX_COMPUTE_QUEUES);
4421 
4422 	/* take ownership of the relevant compute queues */
4423 	amdgpu_gfx_compute_queue_acquire(adev);
4424 	mec_hpd_size = adev->gfx.num_compute_rings * GFX10_MEC_HPD_SIZE;
4425 
4426 	if (mec_hpd_size) {
4427 		r = amdgpu_bo_create_reserved(adev, mec_hpd_size, PAGE_SIZE,
4428 					      AMDGPU_GEM_DOMAIN_GTT,
4429 					      &adev->gfx.mec.hpd_eop_obj,
4430 					      &adev->gfx.mec.hpd_eop_gpu_addr,
4431 					      (void **)&hpd);
4432 		if (r) {
4433 			dev_warn(adev->dev, "(%d) create HDP EOP bo failed\n", r);
4434 			gfx_v10_0_mec_fini(adev);
4435 			return r;
4436 		}
4437 
4438 		memset(hpd, 0, mec_hpd_size);
4439 
4440 		amdgpu_bo_kunmap(adev->gfx.mec.hpd_eop_obj);
4441 		amdgpu_bo_unreserve(adev->gfx.mec.hpd_eop_obj);
4442 	}
4443 
4444 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
4445 		mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
4446 
4447 		fw_data = (const __le32 *) (adev->gfx.mec_fw->data +
4448 			 le32_to_cpu(mec_hdr->header.ucode_array_offset_bytes));
4449 		fw_size = le32_to_cpu(mec_hdr->header.ucode_size_bytes);
4450 
4451 		r = amdgpu_bo_create_reserved(adev, mec_hdr->header.ucode_size_bytes,
4452 					      PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
4453 					      &adev->gfx.mec.mec_fw_obj,
4454 					      &adev->gfx.mec.mec_fw_gpu_addr,
4455 					      (void **)&fw);
4456 		if (r) {
4457 			dev_err(adev->dev, "(%d) failed to create mec fw bo\n", r);
4458 			gfx_v10_0_mec_fini(adev);
4459 			return r;
4460 		}
4461 
4462 		memcpy(fw, fw_data, fw_size);
4463 
4464 		amdgpu_bo_kunmap(adev->gfx.mec.mec_fw_obj);
4465 		amdgpu_bo_unreserve(adev->gfx.mec.mec_fw_obj);
4466 	}
4467 
4468 	return 0;
4469 }
4470 
4471 static uint32_t wave_read_ind(struct amdgpu_device *adev, uint32_t wave, uint32_t address)
4472 {
4473 	WREG32_SOC15(GC, 0, mmSQ_IND_INDEX,
4474 		(wave << SQ_IND_INDEX__WAVE_ID__SHIFT) |
4475 		(address << SQ_IND_INDEX__INDEX__SHIFT));
4476 	return RREG32_SOC15(GC, 0, mmSQ_IND_DATA);
4477 }
4478 
4479 static void wave_read_regs(struct amdgpu_device *adev, uint32_t wave,
4480 			   uint32_t thread, uint32_t regno,
4481 			   uint32_t num, uint32_t *out)
4482 {
4483 	WREG32_SOC15(GC, 0, mmSQ_IND_INDEX,
4484 		(wave << SQ_IND_INDEX__WAVE_ID__SHIFT) |
4485 		(regno << SQ_IND_INDEX__INDEX__SHIFT) |
4486 		(thread << SQ_IND_INDEX__WORKITEM_ID__SHIFT) |
4487 		(SQ_IND_INDEX__AUTO_INCR_MASK));
4488 	while (num--)
4489 		*(out++) = RREG32_SOC15(GC, 0, mmSQ_IND_DATA);
4490 }
4491 
4492 static void gfx_v10_0_read_wave_data(struct amdgpu_device *adev, uint32_t simd, uint32_t wave, uint32_t *dst, int *no_fields)
4493 {
4494 	/* in gfx10 the SIMD_ID is specified as part of the INSTANCE
4495 	 * field when performing a select_se_sh so it should be
4496 	 * zero here */
4497 	WARN_ON(simd != 0);
4498 
4499 	/* type 2 wave data */
4500 	dst[(*no_fields)++] = 2;
4501 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_STATUS);
4502 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_LO);
4503 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_PC_HI);
4504 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_EXEC_LO);
4505 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_EXEC_HI);
4506 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_HW_ID1);
4507 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_HW_ID2);
4508 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_INST_DW0);
4509 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_GPR_ALLOC);
4510 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_LDS_ALLOC);
4511 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_TRAPSTS);
4512 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_IB_STS);
4513 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_IB_STS2);
4514 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_IB_DBG1);
4515 	dst[(*no_fields)++] = wave_read_ind(adev, wave, ixSQ_WAVE_M0);
4516 }
4517 
4518 static void gfx_v10_0_read_wave_sgprs(struct amdgpu_device *adev, uint32_t simd,
4519 				     uint32_t wave, uint32_t start,
4520 				     uint32_t size, uint32_t *dst)
4521 {
4522 	WARN_ON(simd != 0);
4523 
4524 	wave_read_regs(
4525 		adev, wave, 0, start + SQIND_WAVE_SGPRS_OFFSET, size,
4526 		dst);
4527 }
4528 
4529 static void gfx_v10_0_read_wave_vgprs(struct amdgpu_device *adev, uint32_t simd,
4530 				      uint32_t wave, uint32_t thread,
4531 				      uint32_t start, uint32_t size,
4532 				      uint32_t *dst)
4533 {
4534 	wave_read_regs(
4535 		adev, wave, thread,
4536 		start + SQIND_WAVE_VGPRS_OFFSET, size, dst);
4537 }
4538 
4539 static void gfx_v10_0_select_me_pipe_q(struct amdgpu_device *adev,
4540 				       u32 me, u32 pipe, u32 q, u32 vm)
4541 {
4542 	nv_grbm_select(adev, me, pipe, q, vm);
4543 }
4544 
4545 static void gfx_v10_0_update_perfmon_mgcg(struct amdgpu_device *adev,
4546 					  bool enable)
4547 {
4548 	uint32_t data, def;
4549 
4550 	data = def = RREG32_SOC15(GC, 0, mmRLC_PERFMON_CLK_CNTL);
4551 
4552 	if (enable)
4553 		data |= RLC_PERFMON_CLK_CNTL__PERFMON_CLOCK_STATE_MASK;
4554 	else
4555 		data &= ~RLC_PERFMON_CLK_CNTL__PERFMON_CLOCK_STATE_MASK;
4556 
4557 	if (data != def)
4558 		WREG32_SOC15(GC, 0, mmRLC_PERFMON_CLK_CNTL, data);
4559 }
4560 
4561 static const struct amdgpu_gfx_funcs gfx_v10_0_gfx_funcs = {
4562 	.get_gpu_clock_counter = &gfx_v10_0_get_gpu_clock_counter,
4563 	.select_se_sh = &gfx_v10_0_select_se_sh,
4564 	.read_wave_data = &gfx_v10_0_read_wave_data,
4565 	.read_wave_sgprs = &gfx_v10_0_read_wave_sgprs,
4566 	.read_wave_vgprs = &gfx_v10_0_read_wave_vgprs,
4567 	.select_me_pipe_q = &gfx_v10_0_select_me_pipe_q,
4568 	.init_spm_golden = &gfx_v10_0_init_spm_golden_registers,
4569 	.update_perfmon_mgcg = &gfx_v10_0_update_perfmon_mgcg,
4570 };
4571 
4572 static void gfx_v10_0_gpu_early_init(struct amdgpu_device *adev)
4573 {
4574 	u32 gb_addr_config;
4575 
4576 	adev->gfx.funcs = &gfx_v10_0_gfx_funcs;
4577 
4578 	switch (adev->asic_type) {
4579 	case CHIP_NAVI10:
4580 	case CHIP_NAVI14:
4581 	case CHIP_NAVI12:
4582 		adev->gfx.config.max_hw_contexts = 8;
4583 		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
4584 		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
4585 		adev->gfx.config.sc_hiz_tile_fifo_size = 0;
4586 		adev->gfx.config.sc_earlyz_tile_fifo_size = 0x4C0;
4587 		gb_addr_config = RREG32_SOC15(GC, 0, mmGB_ADDR_CONFIG);
4588 		break;
4589 	case CHIP_SIENNA_CICHLID:
4590 	case CHIP_NAVY_FLOUNDER:
4591 	case CHIP_VANGOGH:
4592 	case CHIP_DIMGREY_CAVEFISH:
4593 	case CHIP_BEIGE_GOBY:
4594 	case CHIP_YELLOW_CARP:
4595 		adev->gfx.config.max_hw_contexts = 8;
4596 		adev->gfx.config.sc_prim_fifo_size_frontend = 0x20;
4597 		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
4598 		adev->gfx.config.sc_hiz_tile_fifo_size = 0;
4599 		adev->gfx.config.sc_earlyz_tile_fifo_size = 0x4C0;
4600 		gb_addr_config = RREG32_SOC15(GC, 0, mmGB_ADDR_CONFIG);
4601 		adev->gfx.config.gb_addr_config_fields.num_pkrs =
4602 			1 << REG_GET_FIELD(gb_addr_config, GB_ADDR_CONFIG, NUM_PKRS);
4603 		break;
4604 	default:
4605 		BUG();
4606 		break;
4607 	}
4608 
4609 	adev->gfx.config.gb_addr_config = gb_addr_config;
4610 
4611 	adev->gfx.config.gb_addr_config_fields.num_pipes = 1 <<
4612 			REG_GET_FIELD(adev->gfx.config.gb_addr_config,
4613 				      GB_ADDR_CONFIG, NUM_PIPES);
4614 
4615 	adev->gfx.config.max_tile_pipes =
4616 		adev->gfx.config.gb_addr_config_fields.num_pipes;
4617 
4618 	adev->gfx.config.gb_addr_config_fields.max_compress_frags = 1 <<
4619 			REG_GET_FIELD(adev->gfx.config.gb_addr_config,
4620 				      GB_ADDR_CONFIG, MAX_COMPRESSED_FRAGS);
4621 	adev->gfx.config.gb_addr_config_fields.num_rb_per_se = 1 <<
4622 			REG_GET_FIELD(adev->gfx.config.gb_addr_config,
4623 				      GB_ADDR_CONFIG, NUM_RB_PER_SE);
4624 	adev->gfx.config.gb_addr_config_fields.num_se = 1 <<
4625 			REG_GET_FIELD(adev->gfx.config.gb_addr_config,
4626 				      GB_ADDR_CONFIG, NUM_SHADER_ENGINES);
4627 	adev->gfx.config.gb_addr_config_fields.pipe_interleave_size = 1 << (8 +
4628 			REG_GET_FIELD(adev->gfx.config.gb_addr_config,
4629 				      GB_ADDR_CONFIG, PIPE_INTERLEAVE_SIZE));
4630 }
4631 
4632 static int gfx_v10_0_gfx_ring_init(struct amdgpu_device *adev, int ring_id,
4633 				   int me, int pipe, int queue)
4634 {
4635 	int r;
4636 	struct amdgpu_ring *ring;
4637 	unsigned int irq_type;
4638 
4639 	ring = &adev->gfx.gfx_ring[ring_id];
4640 
4641 	ring->me = me;
4642 	ring->pipe = pipe;
4643 	ring->queue = queue;
4644 
4645 	ring->ring_obj = NULL;
4646 	ring->use_doorbell = true;
4647 
4648 	if (!ring_id)
4649 		ring->doorbell_index = adev->doorbell_index.gfx_ring0 << 1;
4650 	else
4651 		ring->doorbell_index = adev->doorbell_index.gfx_ring1 << 1;
4652 	sprintf(ring->name, "gfx_%d.%d.%d", ring->me, ring->pipe, ring->queue);
4653 
4654 	irq_type = AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP + ring->pipe;
4655 	r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
4656 			     AMDGPU_RING_PRIO_DEFAULT, NULL);
4657 	if (r)
4658 		return r;
4659 	return 0;
4660 }
4661 
4662 static int gfx_v10_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
4663 				       int mec, int pipe, int queue)
4664 {
4665 	int r;
4666 	unsigned irq_type;
4667 	struct amdgpu_ring *ring;
4668 	unsigned int hw_prio;
4669 
4670 	ring = &adev->gfx.compute_ring[ring_id];
4671 
4672 	/* mec0 is me1 */
4673 	ring->me = mec + 1;
4674 	ring->pipe = pipe;
4675 	ring->queue = queue;
4676 
4677 	ring->ring_obj = NULL;
4678 	ring->use_doorbell = true;
4679 	ring->doorbell_index = (adev->doorbell_index.mec_ring0 + ring_id) << 1;
4680 	ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
4681 				+ (ring_id * GFX10_MEC_HPD_SIZE);
4682 	sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);
4683 
4684 	irq_type = AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP
4685 		+ ((ring->me - 1) * adev->gfx.mec.num_pipe_per_mec)
4686 		+ ring->pipe;
4687 	hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring) ?
4688 			AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL;
4689 	/* type-2 packets are deprecated on MEC, use type-3 instead */
4690 	r = amdgpu_ring_init(adev, ring, 1024, &adev->gfx.eop_irq, irq_type,
4691 			     hw_prio, NULL);
4692 	if (r)
4693 		return r;
4694 
4695 	return 0;
4696 }
4697 
4698 static int gfx_v10_0_sw_init(void *handle)
4699 {
4700 	int i, j, k, r, ring_id = 0;
4701 	struct amdgpu_kiq *kiq;
4702 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
4703 
4704 	switch (adev->asic_type) {
4705 	case CHIP_NAVI10:
4706 	case CHIP_NAVI14:
4707 	case CHIP_NAVI12:
4708 		adev->gfx.me.num_me = 1;
4709 		adev->gfx.me.num_pipe_per_me = 1;
4710 		adev->gfx.me.num_queue_per_pipe = 1;
4711 		adev->gfx.mec.num_mec = 2;
4712 		adev->gfx.mec.num_pipe_per_mec = 4;
4713 		adev->gfx.mec.num_queue_per_pipe = 8;
4714 		break;
4715 	case CHIP_SIENNA_CICHLID:
4716 	case CHIP_NAVY_FLOUNDER:
4717 	case CHIP_VANGOGH:
4718 	case CHIP_DIMGREY_CAVEFISH:
4719 	case CHIP_BEIGE_GOBY:
4720 	case CHIP_YELLOW_CARP:
4721 		adev->gfx.me.num_me = 1;
4722 		adev->gfx.me.num_pipe_per_me = 1;
4723 		adev->gfx.me.num_queue_per_pipe = 1;
4724 		adev->gfx.mec.num_mec = 2;
4725 		adev->gfx.mec.num_pipe_per_mec = 4;
4726 		adev->gfx.mec.num_queue_per_pipe = 4;
4727 		break;
4728 	default:
4729 		adev->gfx.me.num_me = 1;
4730 		adev->gfx.me.num_pipe_per_me = 1;
4731 		adev->gfx.me.num_queue_per_pipe = 1;
4732 		adev->gfx.mec.num_mec = 1;
4733 		adev->gfx.mec.num_pipe_per_mec = 4;
4734 		adev->gfx.mec.num_queue_per_pipe = 8;
4735 		break;
4736 	}
4737 
4738 	/* KIQ event */
4739 	r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_GRBM_CP,
4740 			      GFX_10_1__SRCID__CP_IB2_INTERRUPT_PKT,
4741 			      &adev->gfx.kiq.irq);
4742 	if (r)
4743 		return r;
4744 
4745 	/* EOP Event */
4746 	r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_GRBM_CP,
4747 			      GFX_10_1__SRCID__CP_EOP_INTERRUPT,
4748 			      &adev->gfx.eop_irq);
4749 	if (r)
4750 		return r;
4751 
4752 	/* Privileged reg */
4753 	r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_GRBM_CP, GFX_10_1__SRCID__CP_PRIV_REG_FAULT,
4754 			      &adev->gfx.priv_reg_irq);
4755 	if (r)
4756 		return r;
4757 
4758 	/* Privileged inst */
4759 	r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_GRBM_CP, GFX_10_1__SRCID__CP_PRIV_INSTR_FAULT,
4760 			      &adev->gfx.priv_inst_irq);
4761 	if (r)
4762 		return r;
4763 
4764 	adev->gfx.gfx_current_status = AMDGPU_GFX_NORMAL_MODE;
4765 
4766 	gfx_v10_0_scratch_init(adev);
4767 
4768 	r = gfx_v10_0_me_init(adev);
4769 	if (r)
4770 		return r;
4771 
4772 	r = gfx_v10_0_rlc_init(adev);
4773 	if (r) {
4774 		DRM_ERROR("Failed to init rlc BOs!\n");
4775 		return r;
4776 	}
4777 
4778 	r = gfx_v10_0_mec_init(adev);
4779 	if (r) {
4780 		DRM_ERROR("Failed to init MEC BOs!\n");
4781 		return r;
4782 	}
4783 
4784 	/* set up the gfx ring */
4785 	for (i = 0; i < adev->gfx.me.num_me; i++) {
4786 		for (j = 0; j < adev->gfx.me.num_queue_per_pipe; j++) {
4787 			for (k = 0; k < adev->gfx.me.num_pipe_per_me; k++) {
4788 				if (!amdgpu_gfx_is_me_queue_enabled(adev, i, k, j))
4789 					continue;
4790 
4791 				r = gfx_v10_0_gfx_ring_init(adev, ring_id,
4792 							    i, k, j);
4793 				if (r)
4794 					return r;
4795 				ring_id++;
4796 			}
4797 		}
4798 	}
4799 
4800 	ring_id = 0;
4801 	/* set up the compute queues - allocate horizontally across pipes */
4802 	for (i = 0; i < adev->gfx.mec.num_mec; ++i) {
4803 		for (j = 0; j < adev->gfx.mec.num_queue_per_pipe; j++) {
4804 			for (k = 0; k < adev->gfx.mec.num_pipe_per_mec; k++) {
4805 				if (!amdgpu_gfx_is_mec_queue_enabled(adev, i, k,
4806 								     j))
4807 					continue;
4808 
4809 				r = gfx_v10_0_compute_ring_init(adev, ring_id,
4810 								i, k, j);
4811 				if (r)
4812 					return r;
4813 
4814 				ring_id++;
4815 			}
4816 		}
4817 	}
4818 
4819 	r = amdgpu_gfx_kiq_init(adev, GFX10_MEC_HPD_SIZE);
4820 	if (r) {
4821 		DRM_ERROR("Failed to init KIQ BOs!\n");
4822 		return r;
4823 	}
4824 
4825 	kiq = &adev->gfx.kiq;
4826 	r = amdgpu_gfx_kiq_init_ring(adev, &kiq->ring, &kiq->irq);
4827 	if (r)
4828 		return r;
4829 
4830 	r = amdgpu_gfx_mqd_sw_init(adev, sizeof(struct v10_compute_mqd));
4831 	if (r)
4832 		return r;
4833 
4834 	/* allocate visible FB for rlc auto-loading fw */
4835 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO) {
4836 		r = gfx_v10_0_rlc_backdoor_autoload_buffer_init(adev);
4837 		if (r)
4838 			return r;
4839 	}
4840 
4841 	adev->gfx.ce_ram_size = F32_CE_PROGRAM_RAM_SIZE;
4842 
4843 	gfx_v10_0_gpu_early_init(adev);
4844 
4845 	return 0;
4846 }
4847 
4848 static void gfx_v10_0_pfp_fini(struct amdgpu_device *adev)
4849 {
4850 	amdgpu_bo_free_kernel(&adev->gfx.pfp.pfp_fw_obj,
4851 			      &adev->gfx.pfp.pfp_fw_gpu_addr,
4852 			      (void **)&adev->gfx.pfp.pfp_fw_ptr);
4853 }
4854 
4855 static void gfx_v10_0_ce_fini(struct amdgpu_device *adev)
4856 {
4857 	amdgpu_bo_free_kernel(&adev->gfx.ce.ce_fw_obj,
4858 			      &adev->gfx.ce.ce_fw_gpu_addr,
4859 			      (void **)&adev->gfx.ce.ce_fw_ptr);
4860 }
4861 
4862 static void gfx_v10_0_me_fini(struct amdgpu_device *adev)
4863 {
4864 	amdgpu_bo_free_kernel(&adev->gfx.me.me_fw_obj,
4865 			      &adev->gfx.me.me_fw_gpu_addr,
4866 			      (void **)&adev->gfx.me.me_fw_ptr);
4867 }
4868 
4869 static int gfx_v10_0_sw_fini(void *handle)
4870 {
4871 	int i;
4872 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
4873 
4874 	for (i = 0; i < adev->gfx.num_gfx_rings; i++)
4875 		amdgpu_ring_fini(&adev->gfx.gfx_ring[i]);
4876 	for (i = 0; i < adev->gfx.num_compute_rings; i++)
4877 		amdgpu_ring_fini(&adev->gfx.compute_ring[i]);
4878 
4879 	amdgpu_gfx_mqd_sw_fini(adev);
4880 	amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring);
4881 	amdgpu_gfx_kiq_fini(adev);
4882 
4883 	gfx_v10_0_pfp_fini(adev);
4884 	gfx_v10_0_ce_fini(adev);
4885 	gfx_v10_0_me_fini(adev);
4886 	gfx_v10_0_rlc_fini(adev);
4887 	gfx_v10_0_mec_fini(adev);
4888 
4889 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO)
4890 		gfx_v10_0_rlc_backdoor_autoload_buffer_fini(adev);
4891 
4892 	gfx_v10_0_free_microcode(adev);
4893 
4894 	return 0;
4895 }
4896 
4897 static void gfx_v10_0_select_se_sh(struct amdgpu_device *adev, u32 se_num,
4898 				   u32 sh_num, u32 instance)
4899 {
4900 	u32 data;
4901 
4902 	if (instance == 0xffffffff)
4903 		data = REG_SET_FIELD(0, GRBM_GFX_INDEX,
4904 				     INSTANCE_BROADCAST_WRITES, 1);
4905 	else
4906 		data = REG_SET_FIELD(0, GRBM_GFX_INDEX, INSTANCE_INDEX,
4907 				     instance);
4908 
4909 	if (se_num == 0xffffffff)
4910 		data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_BROADCAST_WRITES,
4911 				     1);
4912 	else
4913 		data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_INDEX, se_num);
4914 
4915 	if (sh_num == 0xffffffff)
4916 		data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SA_BROADCAST_WRITES,
4917 				     1);
4918 	else
4919 		data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SA_INDEX, sh_num);
4920 
4921 	WREG32_SOC15(GC, 0, mmGRBM_GFX_INDEX, data);
4922 }
4923 
4924 static u32 gfx_v10_0_get_rb_active_bitmap(struct amdgpu_device *adev)
4925 {
4926 	u32 data, mask;
4927 
4928 	data = RREG32_SOC15(GC, 0, mmCC_RB_BACKEND_DISABLE);
4929 	data |= RREG32_SOC15(GC, 0, mmGC_USER_RB_BACKEND_DISABLE);
4930 
4931 	data &= CC_RB_BACKEND_DISABLE__BACKEND_DISABLE_MASK;
4932 	data >>= GC_USER_RB_BACKEND_DISABLE__BACKEND_DISABLE__SHIFT;
4933 
4934 	mask = amdgpu_gfx_create_bitmask(adev->gfx.config.max_backends_per_se /
4935 					 adev->gfx.config.max_sh_per_se);
4936 
4937 	return (~data) & mask;
4938 }
4939 
4940 static void gfx_v10_0_setup_rb(struct amdgpu_device *adev)
4941 {
4942 	int i, j;
4943 	u32 data;
4944 	u32 active_rbs = 0;
4945 	u32 bitmap;
4946 	u32 rb_bitmap_width_per_sh = adev->gfx.config.max_backends_per_se /
4947 					adev->gfx.config.max_sh_per_se;
4948 
4949 	mutex_lock(&adev->grbm_idx_mutex);
4950 	for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
4951 		for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
4952 			bitmap = i * adev->gfx.config.max_sh_per_se + j;
4953 			if (((adev->asic_type == CHIP_SIENNA_CICHLID) ||
4954 				(adev->asic_type == CHIP_YELLOW_CARP)) &&
4955 			    ((gfx_v10_3_get_disabled_sa(adev) >> bitmap) & 1))
4956 				continue;
4957 			gfx_v10_0_select_se_sh(adev, i, j, 0xffffffff);
4958 			data = gfx_v10_0_get_rb_active_bitmap(adev);
4959 			active_rbs |= data << ((i * adev->gfx.config.max_sh_per_se + j) *
4960 					       rb_bitmap_width_per_sh);
4961 		}
4962 	}
4963 	gfx_v10_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
4964 	mutex_unlock(&adev->grbm_idx_mutex);
4965 
4966 	adev->gfx.config.backend_enable_mask = active_rbs;
4967 	adev->gfx.config.num_rbs = hweight32(active_rbs);
4968 }
4969 
4970 static u32 gfx_v10_0_init_pa_sc_tile_steering_override(struct amdgpu_device *adev)
4971 {
4972 	uint32_t num_sc;
4973 	uint32_t enabled_rb_per_sh;
4974 	uint32_t active_rb_bitmap;
4975 	uint32_t num_rb_per_sc;
4976 	uint32_t num_packer_per_sc;
4977 	uint32_t pa_sc_tile_steering_override;
4978 
4979 	/* for ASICs that integrates GFX v10.3
4980 	 * pa_sc_tile_steering_override should be set to 0 */
4981 	if (adev->asic_type >= CHIP_SIENNA_CICHLID)
4982 		return 0;
4983 
4984 	/* init num_sc */
4985 	num_sc = adev->gfx.config.max_shader_engines * adev->gfx.config.max_sh_per_se *
4986 			adev->gfx.config.num_sc_per_sh;
4987 	/* init num_rb_per_sc */
4988 	active_rb_bitmap = gfx_v10_0_get_rb_active_bitmap(adev);
4989 	enabled_rb_per_sh = hweight32(active_rb_bitmap);
4990 	num_rb_per_sc = enabled_rb_per_sh / adev->gfx.config.num_sc_per_sh;
4991 	/* init num_packer_per_sc */
4992 	num_packer_per_sc = adev->gfx.config.num_packer_per_sc;
4993 
4994 	pa_sc_tile_steering_override = 0;
4995 	pa_sc_tile_steering_override |=
4996 		(order_base_2(num_sc) << PA_SC_TILE_STEERING_OVERRIDE__NUM_SC__SHIFT) &
4997 		PA_SC_TILE_STEERING_OVERRIDE__NUM_SC_MASK;
4998 	pa_sc_tile_steering_override |=
4999 		(order_base_2(num_rb_per_sc) << PA_SC_TILE_STEERING_OVERRIDE__NUM_RB_PER_SC__SHIFT) &
5000 		PA_SC_TILE_STEERING_OVERRIDE__NUM_RB_PER_SC_MASK;
5001 	pa_sc_tile_steering_override |=
5002 		(order_base_2(num_packer_per_sc) << PA_SC_TILE_STEERING_OVERRIDE__NUM_PACKER_PER_SC__SHIFT) &
5003 		PA_SC_TILE_STEERING_OVERRIDE__NUM_PACKER_PER_SC_MASK;
5004 
5005 	return pa_sc_tile_steering_override;
5006 }
5007 
5008 #define DEFAULT_SH_MEM_BASES	(0x6000)
5009 
5010 static void gfx_v10_0_init_compute_vmid(struct amdgpu_device *adev)
5011 {
5012 	int i;
5013 	uint32_t sh_mem_bases;
5014 
5015 	/*
5016 	 * Configure apertures:
5017 	 * LDS:         0x60000000'00000000 - 0x60000001'00000000 (4GB)
5018 	 * Scratch:     0x60000001'00000000 - 0x60000002'00000000 (4GB)
5019 	 * GPUVM:       0x60010000'00000000 - 0x60020000'00000000 (1TB)
5020 	 */
5021 	sh_mem_bases = DEFAULT_SH_MEM_BASES | (DEFAULT_SH_MEM_BASES << 16);
5022 
5023 	mutex_lock(&adev->srbm_mutex);
5024 	for (i = adev->vm_manager.first_kfd_vmid; i < AMDGPU_NUM_VMID; i++) {
5025 		nv_grbm_select(adev, 0, 0, 0, i);
5026 		/* CP and shaders */
5027 		WREG32_SOC15(GC, 0, mmSH_MEM_CONFIG, DEFAULT_SH_MEM_CONFIG);
5028 		WREG32_SOC15(GC, 0, mmSH_MEM_BASES, sh_mem_bases);
5029 	}
5030 	nv_grbm_select(adev, 0, 0, 0, 0);
5031 	mutex_unlock(&adev->srbm_mutex);
5032 
5033 	/* Initialize all compute VMIDs to have no GDS, GWS, or OA
5034 	   acccess. These should be enabled by FW for target VMIDs. */
5035 	for (i = adev->vm_manager.first_kfd_vmid; i < AMDGPU_NUM_VMID; i++) {
5036 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_VMID0_BASE, 2 * i, 0);
5037 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_VMID0_SIZE, 2 * i, 0);
5038 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_GWS_VMID0, i, 0);
5039 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_OA_VMID0, i, 0);
5040 	}
5041 }
5042 
5043 static void gfx_v10_0_init_gds_vmid(struct amdgpu_device *adev)
5044 {
5045 	int vmid;
5046 
5047 	/*
5048 	 * Initialize all compute and user-gfx VMIDs to have no GDS, GWS, or OA
5049 	 * access. Compute VMIDs should be enabled by FW for target VMIDs,
5050 	 * the driver can enable them for graphics. VMID0 should maintain
5051 	 * access so that HWS firmware can save/restore entries.
5052 	 */
5053 	for (vmid = 1; vmid < AMDGPU_NUM_VMID; vmid++) {
5054 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_VMID0_BASE, 2 * vmid, 0);
5055 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_VMID0_SIZE, 2 * vmid, 0);
5056 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_GWS_VMID0, vmid, 0);
5057 		WREG32_SOC15_OFFSET(GC, 0, mmGDS_OA_VMID0, vmid, 0);
5058 	}
5059 }
5060 
5061 
5062 static void gfx_v10_0_tcp_harvest(struct amdgpu_device *adev)
5063 {
5064 	int i, j, k;
5065 	int max_wgp_per_sh = adev->gfx.config.max_cu_per_sh >> 1;
5066 	u32 tmp, wgp_active_bitmap = 0;
5067 	u32 gcrd_targets_disable_tcp = 0;
5068 	u32 utcl_invreq_disable = 0;
5069 	/*
5070 	 * GCRD_TARGETS_DISABLE field contains
5071 	 * for Navi10/Navi12: GL1C=[18:15], SQC=[14:10], TCP=[9:0]
5072 	 * for Navi14: GL1C=[21:18], SQC=[17:12], TCP=[11:0]
5073 	 */
5074 	u32 gcrd_targets_disable_mask = amdgpu_gfx_create_bitmask(
5075 		2 * max_wgp_per_sh + /* TCP */
5076 		max_wgp_per_sh + /* SQC */
5077 		4); /* GL1C */
5078 	/*
5079 	 * UTCL1_UTCL0_INVREQ_DISABLE field contains
5080 	 * for Navi10Navi12: SQG=[24], RMI=[23:20], SQC=[19:10], TCP=[9:0]
5081 	 * for Navi14: SQG=[28], RMI=[27:24], SQC=[23:12], TCP=[11:0]
5082 	 */
5083 	u32 utcl_invreq_disable_mask = amdgpu_gfx_create_bitmask(
5084 		2 * max_wgp_per_sh + /* TCP */
5085 		2 * max_wgp_per_sh + /* SQC */
5086 		4 + /* RMI */
5087 		1); /* SQG */
5088 
5089 	if (adev->asic_type == CHIP_NAVI10 ||
5090 	    adev->asic_type == CHIP_NAVI14 ||
5091 	    adev->asic_type == CHIP_NAVI12) {
5092 		mutex_lock(&adev->grbm_idx_mutex);
5093 		for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
5094 			for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
5095 				gfx_v10_0_select_se_sh(adev, i, j, 0xffffffff);
5096 				wgp_active_bitmap = gfx_v10_0_get_wgp_active_bitmap_per_sh(adev);
5097 				/*
5098 				 * Set corresponding TCP bits for the inactive WGPs in
5099 				 * GCRD_SA_TARGETS_DISABLE
5100 				 */
5101 				gcrd_targets_disable_tcp = 0;
5102 				/* Set TCP & SQC bits in UTCL1_UTCL0_INVREQ_DISABLE */
5103 				utcl_invreq_disable = 0;
5104 
5105 				for (k = 0; k < max_wgp_per_sh; k++) {
5106 					if (!(wgp_active_bitmap & (1 << k))) {
5107 						gcrd_targets_disable_tcp |= 3 << (2 * k);
5108 						utcl_invreq_disable |= (3 << (2 * k)) |
5109 							(3 << (2 * (max_wgp_per_sh + k)));
5110 					}
5111 				}
5112 
5113 				tmp = RREG32_SOC15(GC, 0, mmUTCL1_UTCL0_INVREQ_DISABLE);
5114 				/* only override TCP & SQC bits */
5115 				tmp &= 0xffffffff << (4 * max_wgp_per_sh);
5116 				tmp |= (utcl_invreq_disable & utcl_invreq_disable_mask);
5117 				WREG32_SOC15(GC, 0, mmUTCL1_UTCL0_INVREQ_DISABLE, tmp);
5118 
5119 				tmp = RREG32_SOC15(GC, 0, mmGCRD_SA_TARGETS_DISABLE);
5120 				/* only override TCP bits */
5121 				tmp &= 0xffffffff << (2 * max_wgp_per_sh);
5122 				tmp |= (gcrd_targets_disable_tcp & gcrd_targets_disable_mask);
5123 				WREG32_SOC15(GC, 0, mmGCRD_SA_TARGETS_DISABLE, tmp);
5124 			}
5125 		}
5126 
5127 		gfx_v10_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
5128 		mutex_unlock(&adev->grbm_idx_mutex);
5129 	}
5130 }
5131 
5132 static void gfx_v10_0_get_tcc_info(struct amdgpu_device *adev)
5133 {
5134 	/* TCCs are global (not instanced). */
5135 	uint32_t tcc_disable;
5136 
5137 	if (adev->asic_type >= CHIP_SIENNA_CICHLID) {
5138 		tcc_disable = RREG32_SOC15(GC, 0, mmCGTS_TCC_DISABLE_gc_10_3) |
5139 			      RREG32_SOC15(GC, 0, mmCGTS_USER_TCC_DISABLE_gc_10_3);
5140 	} else {
5141 		tcc_disable = RREG32_SOC15(GC, 0, mmCGTS_TCC_DISABLE) |
5142 			      RREG32_SOC15(GC, 0, mmCGTS_USER_TCC_DISABLE);
5143 	}
5144 
5145 	adev->gfx.config.tcc_disabled_mask =
5146 		REG_GET_FIELD(tcc_disable, CGTS_TCC_DISABLE, TCC_DISABLE) |
5147 		(REG_GET_FIELD(tcc_disable, CGTS_TCC_DISABLE, HI_TCC_DISABLE) << 16);
5148 }
5149 
5150 static void gfx_v10_0_constants_init(struct amdgpu_device *adev)
5151 {
5152 	u32 tmp;
5153 	int i;
5154 
5155 	WREG32_FIELD15(GC, 0, GRBM_CNTL, READ_TIMEOUT, 0xff);
5156 
5157 	gfx_v10_0_setup_rb(adev);
5158 	gfx_v10_0_get_cu_info(adev, &adev->gfx.cu_info);
5159 	gfx_v10_0_get_tcc_info(adev);
5160 	adev->gfx.config.pa_sc_tile_steering_override =
5161 		gfx_v10_0_init_pa_sc_tile_steering_override(adev);
5162 
5163 	/* XXX SH_MEM regs */
5164 	/* where to put LDS, scratch, GPUVM in FSA64 space */
5165 	mutex_lock(&adev->srbm_mutex);
5166 	for (i = 0; i < adev->vm_manager.id_mgr[AMDGPU_GFXHUB_0].num_ids; i++) {
5167 		nv_grbm_select(adev, 0, 0, 0, i);
5168 		/* CP and shaders */
5169 		WREG32_SOC15(GC, 0, mmSH_MEM_CONFIG, DEFAULT_SH_MEM_CONFIG);
5170 		if (i != 0) {
5171 			tmp = REG_SET_FIELD(0, SH_MEM_BASES, PRIVATE_BASE,
5172 				(adev->gmc.private_aperture_start >> 48));
5173 			tmp = REG_SET_FIELD(tmp, SH_MEM_BASES, SHARED_BASE,
5174 				(adev->gmc.shared_aperture_start >> 48));
5175 			WREG32_SOC15(GC, 0, mmSH_MEM_BASES, tmp);
5176 		}
5177 	}
5178 	nv_grbm_select(adev, 0, 0, 0, 0);
5179 
5180 	mutex_unlock(&adev->srbm_mutex);
5181 
5182 	gfx_v10_0_init_compute_vmid(adev);
5183 	gfx_v10_0_init_gds_vmid(adev);
5184 
5185 }
5186 
5187 static void gfx_v10_0_enable_gui_idle_interrupt(struct amdgpu_device *adev,
5188 					       bool enable)
5189 {
5190 	u32 tmp;
5191 
5192 	if (amdgpu_sriov_vf(adev))
5193 		return;
5194 
5195 	tmp = RREG32_SOC15(GC, 0, mmCP_INT_CNTL_RING0);
5196 
5197 	tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_BUSY_INT_ENABLE,
5198 			    enable ? 1 : 0);
5199 	tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CNTX_EMPTY_INT_ENABLE,
5200 			    enable ? 1 : 0);
5201 	tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, CMP_BUSY_INT_ENABLE,
5202 			    enable ? 1 : 0);
5203 	tmp = REG_SET_FIELD(tmp, CP_INT_CNTL_RING0, GFX_IDLE_INT_ENABLE,
5204 			    enable ? 1 : 0);
5205 
5206 	WREG32_SOC15(GC, 0, mmCP_INT_CNTL_RING0, tmp);
5207 }
5208 
5209 static int gfx_v10_0_init_csb(struct amdgpu_device *adev)
5210 {
5211 	adev->gfx.rlc.funcs->get_csb_buffer(adev, adev->gfx.rlc.cs_ptr);
5212 
5213 	/* csib */
5214 	if (adev->asic_type == CHIP_NAVI12) {
5215 		WREG32_SOC15_RLC(GC, 0, mmRLC_CSIB_ADDR_HI,
5216 				adev->gfx.rlc.clear_state_gpu_addr >> 32);
5217 		WREG32_SOC15_RLC(GC, 0, mmRLC_CSIB_ADDR_LO,
5218 				adev->gfx.rlc.clear_state_gpu_addr & 0xfffffffc);
5219 		WREG32_SOC15_RLC(GC, 0, mmRLC_CSIB_LENGTH, adev->gfx.rlc.clear_state_size);
5220 	} else {
5221 		WREG32_SOC15(GC, 0, mmRLC_CSIB_ADDR_HI,
5222 				adev->gfx.rlc.clear_state_gpu_addr >> 32);
5223 		WREG32_SOC15(GC, 0, mmRLC_CSIB_ADDR_LO,
5224 				adev->gfx.rlc.clear_state_gpu_addr & 0xfffffffc);
5225 		WREG32_SOC15(GC, 0, mmRLC_CSIB_LENGTH, adev->gfx.rlc.clear_state_size);
5226 	}
5227 	return 0;
5228 }
5229 
5230 static void gfx_v10_0_rlc_stop(struct amdgpu_device *adev)
5231 {
5232 	u32 tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
5233 
5234 	tmp = REG_SET_FIELD(tmp, RLC_CNTL, RLC_ENABLE_F32, 0);
5235 	WREG32_SOC15(GC, 0, mmRLC_CNTL, tmp);
5236 }
5237 
5238 static void gfx_v10_0_rlc_reset(struct amdgpu_device *adev)
5239 {
5240 	WREG32_FIELD15(GC, 0, GRBM_SOFT_RESET, SOFT_RESET_RLC, 1);
5241 	udelay(50);
5242 	WREG32_FIELD15(GC, 0, GRBM_SOFT_RESET, SOFT_RESET_RLC, 0);
5243 	udelay(50);
5244 }
5245 
5246 static void gfx_v10_0_rlc_smu_handshake_cntl(struct amdgpu_device *adev,
5247 					     bool enable)
5248 {
5249 	uint32_t rlc_pg_cntl;
5250 
5251 	rlc_pg_cntl = RREG32_SOC15(GC, 0, mmRLC_PG_CNTL);
5252 
5253 	if (!enable) {
5254 		/* RLC_PG_CNTL[23] = 0 (default)
5255 		 * RLC will wait for handshake acks with SMU
5256 		 * GFXOFF will be enabled
5257 		 * RLC_PG_CNTL[23] = 1
5258 		 * RLC will not issue any message to SMU
5259 		 * hence no handshake between SMU & RLC
5260 		 * GFXOFF will be disabled
5261 		 */
5262 		rlc_pg_cntl |= 0x800000;
5263 	} else
5264 		rlc_pg_cntl &= ~0x800000;
5265 	WREG32_SOC15(GC, 0, mmRLC_PG_CNTL, rlc_pg_cntl);
5266 }
5267 
5268 static void gfx_v10_0_rlc_start(struct amdgpu_device *adev)
5269 {
5270 	/* TODO: enable rlc & smu handshake until smu
5271 	 * and gfxoff feature works as expected */
5272 	if (!(amdgpu_pp_feature_mask & PP_GFXOFF_MASK))
5273 		gfx_v10_0_rlc_smu_handshake_cntl(adev, false);
5274 
5275 	WREG32_FIELD15(GC, 0, RLC_CNTL, RLC_ENABLE_F32, 1);
5276 	udelay(50);
5277 }
5278 
5279 static void gfx_v10_0_rlc_enable_srm(struct amdgpu_device *adev)
5280 {
5281 	uint32_t tmp;
5282 
5283 	/* enable Save Restore Machine */
5284 	tmp = RREG32_SOC15(GC, 0, mmRLC_SRM_CNTL);
5285 	tmp |= RLC_SRM_CNTL__AUTO_INCR_ADDR_MASK;
5286 	tmp |= RLC_SRM_CNTL__SRM_ENABLE_MASK;
5287 	WREG32_SOC15(GC, 0, mmRLC_SRM_CNTL, tmp);
5288 }
5289 
5290 static int gfx_v10_0_rlc_load_microcode(struct amdgpu_device *adev)
5291 {
5292 	const struct rlc_firmware_header_v2_0 *hdr;
5293 	const __le32 *fw_data;
5294 	unsigned i, fw_size;
5295 
5296 	if (!adev->gfx.rlc_fw)
5297 		return -EINVAL;
5298 
5299 	hdr = (const struct rlc_firmware_header_v2_0 *)adev->gfx.rlc_fw->data;
5300 	amdgpu_ucode_print_rlc_hdr(&hdr->header);
5301 
5302 	fw_data = (const __le32 *)(adev->gfx.rlc_fw->data +
5303 			   le32_to_cpu(hdr->header.ucode_array_offset_bytes));
5304 	fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
5305 
5306 	WREG32_SOC15(GC, 0, mmRLC_GPM_UCODE_ADDR,
5307 		     RLCG_UCODE_LOADING_START_ADDRESS);
5308 
5309 	for (i = 0; i < fw_size; i++)
5310 		WREG32_SOC15(GC, 0, mmRLC_GPM_UCODE_DATA,
5311 			     le32_to_cpup(fw_data++));
5312 
5313 	WREG32_SOC15(GC, 0, mmRLC_GPM_UCODE_ADDR, adev->gfx.rlc_fw_version);
5314 
5315 	return 0;
5316 }
5317 
5318 static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev)
5319 {
5320 	int r;
5321 
5322 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
5323 
5324 		r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
5325 		if (r)
5326 			return r;
5327 
5328 		gfx_v10_0_init_csb(adev);
5329 
5330 		if (!amdgpu_sriov_vf(adev)) /* enable RLC SRM */
5331 			gfx_v10_0_rlc_enable_srm(adev);
5332 	} else {
5333 		if (amdgpu_sriov_vf(adev)) {
5334 			gfx_v10_0_init_csb(adev);
5335 			return 0;
5336 		}
5337 
5338 		adev->gfx.rlc.funcs->stop(adev);
5339 
5340 		/* disable CG */
5341 		WREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL, 0);
5342 
5343 		/* disable PG */
5344 		WREG32_SOC15(GC, 0, mmRLC_PG_CNTL, 0);
5345 
5346 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
5347 			/* legacy rlc firmware loading */
5348 			r = gfx_v10_0_rlc_load_microcode(adev);
5349 			if (r)
5350 				return r;
5351 		} else if (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO) {
5352 			/* rlc backdoor autoload firmware */
5353 			r = gfx_v10_0_rlc_backdoor_autoload_enable(adev);
5354 			if (r)
5355 				return r;
5356 		}
5357 
5358 		gfx_v10_0_init_csb(adev);
5359 
5360 		adev->gfx.rlc.funcs->start(adev);
5361 
5362 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO) {
5363 			r = gfx_v10_0_wait_for_rlc_autoload_complete(adev);
5364 			if (r)
5365 				return r;
5366 		}
5367 	}
5368 	return 0;
5369 }
5370 
5371 static struct {
5372 	FIRMWARE_ID	id;
5373 	unsigned int	offset;
5374 	unsigned int	size;
5375 } rlc_autoload_info[FIRMWARE_ID_MAX];
5376 
5377 static int gfx_v10_0_parse_rlc_toc(struct amdgpu_device *adev)
5378 {
5379 	int ret;
5380 	RLC_TABLE_OF_CONTENT *rlc_toc;
5381 
5382 	ret = amdgpu_bo_create_reserved(adev, adev->psp.toc_bin_size, PAGE_SIZE,
5383 					AMDGPU_GEM_DOMAIN_GTT,
5384 					&adev->gfx.rlc.rlc_toc_bo,
5385 					&adev->gfx.rlc.rlc_toc_gpu_addr,
5386 					(void **)&adev->gfx.rlc.rlc_toc_buf);
5387 	if (ret) {
5388 		dev_err(adev->dev, "(%d) failed to create rlc toc bo\n", ret);
5389 		return ret;
5390 	}
5391 
5392 	/* Copy toc from psp sos fw to rlc toc buffer */
5393 	memcpy(adev->gfx.rlc.rlc_toc_buf, adev->psp.toc_start_addr, adev->psp.toc_bin_size);
5394 
5395 	rlc_toc = (RLC_TABLE_OF_CONTENT *)adev->gfx.rlc.rlc_toc_buf;
5396 	while (rlc_toc && (rlc_toc->id > FIRMWARE_ID_INVALID) &&
5397 		(rlc_toc->id < FIRMWARE_ID_MAX)) {
5398 		if ((rlc_toc->id >= FIRMWARE_ID_CP_CE) &&
5399 		    (rlc_toc->id <= FIRMWARE_ID_CP_MES)) {
5400 			/* Offset needs 4KB alignment */
5401 			rlc_toc->offset = ALIGN(rlc_toc->offset * 4, PAGE_SIZE);
5402 		}
5403 
5404 		rlc_autoload_info[rlc_toc->id].id = rlc_toc->id;
5405 		rlc_autoload_info[rlc_toc->id].offset = rlc_toc->offset * 4;
5406 		rlc_autoload_info[rlc_toc->id].size = rlc_toc->size * 4;
5407 
5408 		rlc_toc++;
5409 	}
5410 
5411 	return 0;
5412 }
5413 
5414 static uint32_t gfx_v10_0_calc_toc_total_size(struct amdgpu_device *adev)
5415 {
5416 	uint32_t total_size = 0;
5417 	FIRMWARE_ID id;
5418 	int ret;
5419 
5420 	ret = gfx_v10_0_parse_rlc_toc(adev);
5421 	if (ret) {
5422 		dev_err(adev->dev, "failed to parse rlc toc\n");
5423 		return 0;
5424 	}
5425 
5426 	for (id = FIRMWARE_ID_RLC_G_UCODE; id < FIRMWARE_ID_MAX; id++)
5427 		total_size += rlc_autoload_info[id].size;
5428 
5429 	/* In case the offset in rlc toc ucode is aligned */
5430 	if (total_size < rlc_autoload_info[FIRMWARE_ID_MAX-1].offset)
5431 		total_size = rlc_autoload_info[FIRMWARE_ID_MAX-1].offset +
5432 				rlc_autoload_info[FIRMWARE_ID_MAX-1].size;
5433 
5434 	return total_size;
5435 }
5436 
5437 static int gfx_v10_0_rlc_backdoor_autoload_buffer_init(struct amdgpu_device *adev)
5438 {
5439 	int r;
5440 	uint32_t total_size;
5441 
5442 	total_size = gfx_v10_0_calc_toc_total_size(adev);
5443 
5444 	r = amdgpu_bo_create_reserved(adev, total_size, PAGE_SIZE,
5445 				      AMDGPU_GEM_DOMAIN_GTT,
5446 				      &adev->gfx.rlc.rlc_autoload_bo,
5447 				      &adev->gfx.rlc.rlc_autoload_gpu_addr,
5448 				      (void **)&adev->gfx.rlc.rlc_autoload_ptr);
5449 	if (r) {
5450 		dev_err(adev->dev, "(%d) failed to create fw autoload bo\n", r);
5451 		return r;
5452 	}
5453 
5454 	return 0;
5455 }
5456 
5457 static void gfx_v10_0_rlc_backdoor_autoload_buffer_fini(struct amdgpu_device *adev)
5458 {
5459 	amdgpu_bo_free_kernel(&adev->gfx.rlc.rlc_toc_bo,
5460 			      &adev->gfx.rlc.rlc_toc_gpu_addr,
5461 			      (void **)&adev->gfx.rlc.rlc_toc_buf);
5462 	amdgpu_bo_free_kernel(&adev->gfx.rlc.rlc_autoload_bo,
5463 			      &adev->gfx.rlc.rlc_autoload_gpu_addr,
5464 			      (void **)&adev->gfx.rlc.rlc_autoload_ptr);
5465 }
5466 
5467 static void gfx_v10_0_rlc_backdoor_autoload_copy_ucode(struct amdgpu_device *adev,
5468 						       FIRMWARE_ID id,
5469 						       const void *fw_data,
5470 						       uint32_t fw_size)
5471 {
5472 	uint32_t toc_offset;
5473 	uint32_t toc_fw_size;
5474 	char *ptr = adev->gfx.rlc.rlc_autoload_ptr;
5475 
5476 	if (id <= FIRMWARE_ID_INVALID || id >= FIRMWARE_ID_MAX)
5477 		return;
5478 
5479 	toc_offset = rlc_autoload_info[id].offset;
5480 	toc_fw_size = rlc_autoload_info[id].size;
5481 
5482 	if (fw_size == 0)
5483 		fw_size = toc_fw_size;
5484 
5485 	if (fw_size > toc_fw_size)
5486 		fw_size = toc_fw_size;
5487 
5488 	memcpy(ptr + toc_offset, fw_data, fw_size);
5489 
5490 	if (fw_size < toc_fw_size)
5491 		memset(ptr + toc_offset + fw_size, 0, toc_fw_size - fw_size);
5492 }
5493 
5494 static void gfx_v10_0_rlc_backdoor_autoload_copy_toc_ucode(struct amdgpu_device *adev)
5495 {
5496 	void *data;
5497 	uint32_t size;
5498 
5499 	data = adev->gfx.rlc.rlc_toc_buf;
5500 	size = rlc_autoload_info[FIRMWARE_ID_RLC_TOC].size;
5501 
5502 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5503 						   FIRMWARE_ID_RLC_TOC,
5504 						   data, size);
5505 }
5506 
5507 static void gfx_v10_0_rlc_backdoor_autoload_copy_gfx_ucode(struct amdgpu_device *adev)
5508 {
5509 	const __le32 *fw_data;
5510 	uint32_t fw_size;
5511 	const struct gfx_firmware_header_v1_0 *cp_hdr;
5512 	const struct rlc_firmware_header_v2_0 *rlc_hdr;
5513 
5514 	/* pfp ucode */
5515 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)
5516 		adev->gfx.pfp_fw->data;
5517 	fw_data = (const __le32 *)(adev->gfx.pfp_fw->data +
5518 		le32_to_cpu(cp_hdr->header.ucode_array_offset_bytes));
5519 	fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
5520 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5521 						   FIRMWARE_ID_CP_PFP,
5522 						   fw_data, fw_size);
5523 
5524 	/* ce ucode */
5525 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)
5526 		adev->gfx.ce_fw->data;
5527 	fw_data = (const __le32 *)(adev->gfx.ce_fw->data +
5528 		le32_to_cpu(cp_hdr->header.ucode_array_offset_bytes));
5529 	fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
5530 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5531 						   FIRMWARE_ID_CP_CE,
5532 						   fw_data, fw_size);
5533 
5534 	/* me ucode */
5535 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)
5536 		adev->gfx.me_fw->data;
5537 	fw_data = (const __le32 *)(adev->gfx.me_fw->data +
5538 		le32_to_cpu(cp_hdr->header.ucode_array_offset_bytes));
5539 	fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes);
5540 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5541 						   FIRMWARE_ID_CP_ME,
5542 						   fw_data, fw_size);
5543 
5544 	/* rlc ucode */
5545 	rlc_hdr = (const struct rlc_firmware_header_v2_0 *)
5546 		adev->gfx.rlc_fw->data;
5547 	fw_data = (const __le32 *)(adev->gfx.rlc_fw->data +
5548 		le32_to_cpu(rlc_hdr->header.ucode_array_offset_bytes));
5549 	fw_size = le32_to_cpu(rlc_hdr->header.ucode_size_bytes);
5550 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5551 						   FIRMWARE_ID_RLC_G_UCODE,
5552 						   fw_data, fw_size);
5553 
5554 	/* mec1 ucode */
5555 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)
5556 		adev->gfx.mec_fw->data;
5557 	fw_data = (const __le32 *) (adev->gfx.mec_fw->data +
5558 		le32_to_cpu(cp_hdr->header.ucode_array_offset_bytes));
5559 	fw_size = le32_to_cpu(cp_hdr->header.ucode_size_bytes) -
5560 		cp_hdr->jt_size * 4;
5561 	gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5562 						   FIRMWARE_ID_CP_MEC,
5563 						   fw_data, fw_size);
5564 	/* mec2 ucode is not necessary if mec2 ucode is same as mec1 */
5565 }
5566 
5567 /* Temporarily put sdma part here */
5568 static void gfx_v10_0_rlc_backdoor_autoload_copy_sdma_ucode(struct amdgpu_device *adev)
5569 {
5570 	const __le32 *fw_data;
5571 	uint32_t fw_size;
5572 	const struct sdma_firmware_header_v1_0 *sdma_hdr;
5573 	int i;
5574 
5575 	for (i = 0; i < adev->sdma.num_instances; i++) {
5576 		sdma_hdr = (const struct sdma_firmware_header_v1_0 *)
5577 			adev->sdma.instance[i].fw->data;
5578 		fw_data = (const __le32 *) (adev->sdma.instance[i].fw->data +
5579 			le32_to_cpu(sdma_hdr->header.ucode_array_offset_bytes));
5580 		fw_size = le32_to_cpu(sdma_hdr->header.ucode_size_bytes);
5581 
5582 		if (i == 0) {
5583 			gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5584 				FIRMWARE_ID_SDMA0_UCODE, fw_data, fw_size);
5585 			gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5586 				FIRMWARE_ID_SDMA0_JT,
5587 				(uint32_t *)fw_data +
5588 				sdma_hdr->jt_offset,
5589 				sdma_hdr->jt_size * 4);
5590 		} else if (i == 1) {
5591 			gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5592 				FIRMWARE_ID_SDMA1_UCODE, fw_data, fw_size);
5593 			gfx_v10_0_rlc_backdoor_autoload_copy_ucode(adev,
5594 				FIRMWARE_ID_SDMA1_JT,
5595 				(uint32_t *)fw_data +
5596 				sdma_hdr->jt_offset,
5597 				sdma_hdr->jt_size * 4);
5598 		}
5599 	}
5600 }
5601 
5602 static int gfx_v10_0_rlc_backdoor_autoload_enable(struct amdgpu_device *adev)
5603 {
5604 	uint32_t rlc_g_offset, rlc_g_size, tmp;
5605 	uint64_t gpu_addr;
5606 
5607 	gfx_v10_0_rlc_backdoor_autoload_copy_toc_ucode(adev);
5608 	gfx_v10_0_rlc_backdoor_autoload_copy_sdma_ucode(adev);
5609 	gfx_v10_0_rlc_backdoor_autoload_copy_gfx_ucode(adev);
5610 
5611 	rlc_g_offset = rlc_autoload_info[FIRMWARE_ID_RLC_G_UCODE].offset;
5612 	rlc_g_size = rlc_autoload_info[FIRMWARE_ID_RLC_G_UCODE].size;
5613 	gpu_addr = adev->gfx.rlc.rlc_autoload_gpu_addr + rlc_g_offset;
5614 
5615 	WREG32_SOC15(GC, 0, mmRLC_HYP_BOOTLOAD_ADDR_HI, upper_32_bits(gpu_addr));
5616 	WREG32_SOC15(GC, 0, mmRLC_HYP_BOOTLOAD_ADDR_LO, lower_32_bits(gpu_addr));
5617 	WREG32_SOC15(GC, 0, mmRLC_HYP_BOOTLOAD_SIZE, rlc_g_size);
5618 
5619 	tmp = RREG32_SOC15(GC, 0, mmRLC_HYP_RESET_VECTOR);
5620 	if (!(tmp & (RLC_HYP_RESET_VECTOR__COLD_BOOT_EXIT_MASK |
5621 		   RLC_HYP_RESET_VECTOR__VDDGFX_EXIT_MASK))) {
5622 		DRM_ERROR("Neither COLD_BOOT_EXIT nor VDDGFX_EXIT is set\n");
5623 		return -EINVAL;
5624 	}
5625 
5626 	tmp = RREG32_SOC15(GC, 0, mmRLC_CNTL);
5627 	if (tmp & RLC_CNTL__RLC_ENABLE_F32_MASK) {
5628 		DRM_ERROR("RLC ROM should halt itself\n");
5629 		return -EINVAL;
5630 	}
5631 
5632 	return 0;
5633 }
5634 
5635 static int gfx_v10_0_rlc_backdoor_autoload_config_me_cache(struct amdgpu_device *adev)
5636 {
5637 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5638 	uint32_t tmp;
5639 	int i;
5640 	uint64_t addr;
5641 
5642 	/* Trigger an invalidation of the L1 instruction caches */
5643 	tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL);
5644 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5645 	WREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL, tmp);
5646 
5647 	/* Wait for invalidation complete */
5648 	for (i = 0; i < usec_timeout; i++) {
5649 		tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL);
5650 		if (1 == REG_GET_FIELD(tmp, CP_ME_IC_OP_CNTL,
5651 			INVALIDATE_CACHE_COMPLETE))
5652 			break;
5653 		udelay(1);
5654 	}
5655 
5656 	if (i >= usec_timeout) {
5657 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5658 		return -EINVAL;
5659 	}
5660 
5661 	/* Program me ucode address into intruction cache address register */
5662 	addr = adev->gfx.rlc.rlc_autoload_gpu_addr +
5663 		rlc_autoload_info[FIRMWARE_ID_CP_ME].offset;
5664 	WREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_LO,
5665 			lower_32_bits(addr) & 0xFFFFF000);
5666 	WREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_HI,
5667 			upper_32_bits(addr));
5668 
5669 	return 0;
5670 }
5671 
5672 static int gfx_v10_0_rlc_backdoor_autoload_config_ce_cache(struct amdgpu_device *adev)
5673 {
5674 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5675 	uint32_t tmp;
5676 	int i;
5677 	uint64_t addr;
5678 
5679 	/* Trigger an invalidation of the L1 instruction caches */
5680 	tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL);
5681 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5682 	WREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL, tmp);
5683 
5684 	/* Wait for invalidation complete */
5685 	for (i = 0; i < usec_timeout; i++) {
5686 		tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL);
5687 		if (1 == REG_GET_FIELD(tmp, CP_CE_IC_OP_CNTL,
5688 			INVALIDATE_CACHE_COMPLETE))
5689 			break;
5690 		udelay(1);
5691 	}
5692 
5693 	if (i >= usec_timeout) {
5694 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5695 		return -EINVAL;
5696 	}
5697 
5698 	/* Program ce ucode address into intruction cache address register */
5699 	addr = adev->gfx.rlc.rlc_autoload_gpu_addr +
5700 		rlc_autoload_info[FIRMWARE_ID_CP_CE].offset;
5701 	WREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_LO,
5702 			lower_32_bits(addr) & 0xFFFFF000);
5703 	WREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_HI,
5704 			upper_32_bits(addr));
5705 
5706 	return 0;
5707 }
5708 
5709 static int gfx_v10_0_rlc_backdoor_autoload_config_pfp_cache(struct amdgpu_device *adev)
5710 {
5711 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5712 	uint32_t tmp;
5713 	int i;
5714 	uint64_t addr;
5715 
5716 	/* Trigger an invalidation of the L1 instruction caches */
5717 	tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL);
5718 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5719 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL, tmp);
5720 
5721 	/* Wait for invalidation complete */
5722 	for (i = 0; i < usec_timeout; i++) {
5723 		tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL);
5724 		if (1 == REG_GET_FIELD(tmp, CP_PFP_IC_OP_CNTL,
5725 			INVALIDATE_CACHE_COMPLETE))
5726 			break;
5727 		udelay(1);
5728 	}
5729 
5730 	if (i >= usec_timeout) {
5731 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5732 		return -EINVAL;
5733 	}
5734 
5735 	/* Program pfp ucode address into intruction cache address register */
5736 	addr = adev->gfx.rlc.rlc_autoload_gpu_addr +
5737 		rlc_autoload_info[FIRMWARE_ID_CP_PFP].offset;
5738 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_LO,
5739 			lower_32_bits(addr) & 0xFFFFF000);
5740 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_HI,
5741 			upper_32_bits(addr));
5742 
5743 	return 0;
5744 }
5745 
5746 static int gfx_v10_0_rlc_backdoor_autoload_config_mec_cache(struct amdgpu_device *adev)
5747 {
5748 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5749 	uint32_t tmp;
5750 	int i;
5751 	uint64_t addr;
5752 
5753 	/* Trigger an invalidation of the L1 instruction caches */
5754 	tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL);
5755 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5756 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL, tmp);
5757 
5758 	/* Wait for invalidation complete */
5759 	for (i = 0; i < usec_timeout; i++) {
5760 		tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL);
5761 		if (1 == REG_GET_FIELD(tmp, CP_CPC_IC_OP_CNTL,
5762 			INVALIDATE_CACHE_COMPLETE))
5763 			break;
5764 		udelay(1);
5765 	}
5766 
5767 	if (i >= usec_timeout) {
5768 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5769 		return -EINVAL;
5770 	}
5771 
5772 	/* Program mec1 ucode address into intruction cache address register */
5773 	addr = adev->gfx.rlc.rlc_autoload_gpu_addr +
5774 		rlc_autoload_info[FIRMWARE_ID_CP_MEC].offset;
5775 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_LO,
5776 			lower_32_bits(addr) & 0xFFFFF000);
5777 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_HI,
5778 			upper_32_bits(addr));
5779 
5780 	return 0;
5781 }
5782 
5783 static int gfx_v10_0_wait_for_rlc_autoload_complete(struct amdgpu_device *adev)
5784 {
5785 	uint32_t cp_status;
5786 	uint32_t bootload_status;
5787 	int i, r;
5788 
5789 	for (i = 0; i < adev->usec_timeout; i++) {
5790 		cp_status = RREG32_SOC15(GC, 0, mmCP_STAT);
5791 		bootload_status = RREG32_SOC15(GC, 0, mmRLC_RLCS_BOOTLOAD_STATUS);
5792 		if ((cp_status == 0) &&
5793 		    (REG_GET_FIELD(bootload_status,
5794 			RLC_RLCS_BOOTLOAD_STATUS, BOOTLOAD_COMPLETE) == 1)) {
5795 			break;
5796 		}
5797 		udelay(1);
5798 	}
5799 
5800 	if (i >= adev->usec_timeout) {
5801 		dev_err(adev->dev, "rlc autoload: gc ucode autoload timeout\n");
5802 		return -ETIMEDOUT;
5803 	}
5804 
5805 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_RLC_BACKDOOR_AUTO) {
5806 		r = gfx_v10_0_rlc_backdoor_autoload_config_me_cache(adev);
5807 		if (r)
5808 			return r;
5809 
5810 		r = gfx_v10_0_rlc_backdoor_autoload_config_ce_cache(adev);
5811 		if (r)
5812 			return r;
5813 
5814 		r = gfx_v10_0_rlc_backdoor_autoload_config_pfp_cache(adev);
5815 		if (r)
5816 			return r;
5817 
5818 		r = gfx_v10_0_rlc_backdoor_autoload_config_mec_cache(adev);
5819 		if (r)
5820 			return r;
5821 	}
5822 
5823 	return 0;
5824 }
5825 
5826 static int gfx_v10_0_cp_gfx_enable(struct amdgpu_device *adev, bool enable)
5827 {
5828 	int i;
5829 	u32 tmp = RREG32_SOC15(GC, 0, mmCP_ME_CNTL);
5830 
5831 	tmp = REG_SET_FIELD(tmp, CP_ME_CNTL, ME_HALT, enable ? 0 : 1);
5832 	tmp = REG_SET_FIELD(tmp, CP_ME_CNTL, PFP_HALT, enable ? 0 : 1);
5833 	tmp = REG_SET_FIELD(tmp, CP_ME_CNTL, CE_HALT, enable ? 0 : 1);
5834 
5835 	if (adev->asic_type == CHIP_NAVI12) {
5836 		WREG32_SOC15_RLC(GC, 0, mmCP_ME_CNTL, tmp);
5837 	} else {
5838 		WREG32_SOC15(GC, 0, mmCP_ME_CNTL, tmp);
5839 	}
5840 
5841 	for (i = 0; i < adev->usec_timeout; i++) {
5842 		if (RREG32_SOC15(GC, 0, mmCP_STAT) == 0)
5843 			break;
5844 		udelay(1);
5845 	}
5846 
5847 	if (i >= adev->usec_timeout)
5848 		DRM_ERROR("failed to %s cp gfx\n", enable ? "unhalt" : "halt");
5849 
5850 	return 0;
5851 }
5852 
5853 static int gfx_v10_0_cp_gfx_load_pfp_microcode(struct amdgpu_device *adev)
5854 {
5855 	int r;
5856 	const struct gfx_firmware_header_v1_0 *pfp_hdr;
5857 	const __le32 *fw_data;
5858 	unsigned i, fw_size;
5859 	uint32_t tmp;
5860 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5861 
5862 	pfp_hdr = (const struct gfx_firmware_header_v1_0 *)
5863 		adev->gfx.pfp_fw->data;
5864 
5865 	amdgpu_ucode_print_gfx_hdr(&pfp_hdr->header);
5866 
5867 	fw_data = (const __le32 *)(adev->gfx.pfp_fw->data +
5868 		le32_to_cpu(pfp_hdr->header.ucode_array_offset_bytes));
5869 	fw_size = le32_to_cpu(pfp_hdr->header.ucode_size_bytes);
5870 
5871 	r = amdgpu_bo_create_reserved(adev, pfp_hdr->header.ucode_size_bytes,
5872 				      PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
5873 				      &adev->gfx.pfp.pfp_fw_obj,
5874 				      &adev->gfx.pfp.pfp_fw_gpu_addr,
5875 				      (void **)&adev->gfx.pfp.pfp_fw_ptr);
5876 	if (r) {
5877 		dev_err(adev->dev, "(%d) failed to create pfp fw bo\n", r);
5878 		gfx_v10_0_pfp_fini(adev);
5879 		return r;
5880 	}
5881 
5882 	memcpy(adev->gfx.pfp.pfp_fw_ptr, fw_data, fw_size);
5883 
5884 	amdgpu_bo_kunmap(adev->gfx.pfp.pfp_fw_obj);
5885 	amdgpu_bo_unreserve(adev->gfx.pfp.pfp_fw_obj);
5886 
5887 	/* Trigger an invalidation of the L1 instruction caches */
5888 	tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL);
5889 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5890 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL, tmp);
5891 
5892 	/* Wait for invalidation complete */
5893 	for (i = 0; i < usec_timeout; i++) {
5894 		tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_OP_CNTL);
5895 		if (1 == REG_GET_FIELD(tmp, CP_PFP_IC_OP_CNTL,
5896 			INVALIDATE_CACHE_COMPLETE))
5897 			break;
5898 		udelay(1);
5899 	}
5900 
5901 	if (i >= usec_timeout) {
5902 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5903 		return -EINVAL;
5904 	}
5905 
5906 	if (amdgpu_emu_mode == 1)
5907 		adev->hdp.funcs->flush_hdp(adev, NULL);
5908 
5909 	tmp = RREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_CNTL);
5910 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, VMID, 0);
5911 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, CACHE_POLICY, 0);
5912 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, EXE_DISABLE, 0);
5913 	tmp = REG_SET_FIELD(tmp, CP_PFP_IC_BASE_CNTL, ADDRESS_CLAMP, 1);
5914 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_CNTL, tmp);
5915 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_LO,
5916 		adev->gfx.pfp.pfp_fw_gpu_addr & 0xFFFFF000);
5917 	WREG32_SOC15(GC, 0, mmCP_PFP_IC_BASE_HI,
5918 		upper_32_bits(adev->gfx.pfp.pfp_fw_gpu_addr));
5919 
5920 	WREG32_SOC15(GC, 0, mmCP_HYP_PFP_UCODE_ADDR, 0);
5921 
5922 	for (i = 0; i < pfp_hdr->jt_size; i++)
5923 		WREG32_SOC15(GC, 0, mmCP_HYP_PFP_UCODE_DATA,
5924 			     le32_to_cpup(fw_data + pfp_hdr->jt_offset + i));
5925 
5926 	WREG32_SOC15(GC, 0, mmCP_HYP_PFP_UCODE_ADDR, adev->gfx.pfp_fw_version);
5927 
5928 	return 0;
5929 }
5930 
5931 static int gfx_v10_0_cp_gfx_load_ce_microcode(struct amdgpu_device *adev)
5932 {
5933 	int r;
5934 	const struct gfx_firmware_header_v1_0 *ce_hdr;
5935 	const __le32 *fw_data;
5936 	unsigned i, fw_size;
5937 	uint32_t tmp;
5938 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
5939 
5940 	ce_hdr = (const struct gfx_firmware_header_v1_0 *)
5941 		adev->gfx.ce_fw->data;
5942 
5943 	amdgpu_ucode_print_gfx_hdr(&ce_hdr->header);
5944 
5945 	fw_data = (const __le32 *)(adev->gfx.ce_fw->data +
5946 		le32_to_cpu(ce_hdr->header.ucode_array_offset_bytes));
5947 	fw_size = le32_to_cpu(ce_hdr->header.ucode_size_bytes);
5948 
5949 	r = amdgpu_bo_create_reserved(adev, ce_hdr->header.ucode_size_bytes,
5950 				      PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
5951 				      &adev->gfx.ce.ce_fw_obj,
5952 				      &adev->gfx.ce.ce_fw_gpu_addr,
5953 				      (void **)&adev->gfx.ce.ce_fw_ptr);
5954 	if (r) {
5955 		dev_err(adev->dev, "(%d) failed to create ce fw bo\n", r);
5956 		gfx_v10_0_ce_fini(adev);
5957 		return r;
5958 	}
5959 
5960 	memcpy(adev->gfx.ce.ce_fw_ptr, fw_data, fw_size);
5961 
5962 	amdgpu_bo_kunmap(adev->gfx.ce.ce_fw_obj);
5963 	amdgpu_bo_unreserve(adev->gfx.ce.ce_fw_obj);
5964 
5965 	/* Trigger an invalidation of the L1 instruction caches */
5966 	tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL);
5967 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_OP_CNTL, INVALIDATE_CACHE, 1);
5968 	WREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL, tmp);
5969 
5970 	/* Wait for invalidation complete */
5971 	for (i = 0; i < usec_timeout; i++) {
5972 		tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_OP_CNTL);
5973 		if (1 == REG_GET_FIELD(tmp, CP_CE_IC_OP_CNTL,
5974 			INVALIDATE_CACHE_COMPLETE))
5975 			break;
5976 		udelay(1);
5977 	}
5978 
5979 	if (i >= usec_timeout) {
5980 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
5981 		return -EINVAL;
5982 	}
5983 
5984 	if (amdgpu_emu_mode == 1)
5985 		adev->hdp.funcs->flush_hdp(adev, NULL);
5986 
5987 	tmp = RREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_CNTL);
5988 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_BASE_CNTL, VMID, 0);
5989 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_BASE_CNTL, CACHE_POLICY, 0);
5990 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_BASE_CNTL, EXE_DISABLE, 0);
5991 	tmp = REG_SET_FIELD(tmp, CP_CE_IC_BASE_CNTL, ADDRESS_CLAMP, 1);
5992 	WREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_LO,
5993 		adev->gfx.ce.ce_fw_gpu_addr & 0xFFFFF000);
5994 	WREG32_SOC15(GC, 0, mmCP_CE_IC_BASE_HI,
5995 		upper_32_bits(adev->gfx.ce.ce_fw_gpu_addr));
5996 
5997 	WREG32_SOC15(GC, 0, mmCP_HYP_CE_UCODE_ADDR, 0);
5998 
5999 	for (i = 0; i < ce_hdr->jt_size; i++)
6000 		WREG32_SOC15(GC, 0, mmCP_HYP_CE_UCODE_DATA,
6001 			     le32_to_cpup(fw_data + ce_hdr->jt_offset + i));
6002 
6003 	WREG32_SOC15(GC, 0, mmCP_HYP_CE_UCODE_ADDR, adev->gfx.ce_fw_version);
6004 
6005 	return 0;
6006 }
6007 
6008 static int gfx_v10_0_cp_gfx_load_me_microcode(struct amdgpu_device *adev)
6009 {
6010 	int r;
6011 	const struct gfx_firmware_header_v1_0 *me_hdr;
6012 	const __le32 *fw_data;
6013 	unsigned i, fw_size;
6014 	uint32_t tmp;
6015 	uint32_t usec_timeout = 50000;  /* wait for 50ms */
6016 
6017 	me_hdr = (const struct gfx_firmware_header_v1_0 *)
6018 		adev->gfx.me_fw->data;
6019 
6020 	amdgpu_ucode_print_gfx_hdr(&me_hdr->header);
6021 
6022 	fw_data = (const __le32 *)(adev->gfx.me_fw->data +
6023 		le32_to_cpu(me_hdr->header.ucode_array_offset_bytes));
6024 	fw_size = le32_to_cpu(me_hdr->header.ucode_size_bytes);
6025 
6026 	r = amdgpu_bo_create_reserved(adev, me_hdr->header.ucode_size_bytes,
6027 				      PAGE_SIZE, AMDGPU_GEM_DOMAIN_GTT,
6028 				      &adev->gfx.me.me_fw_obj,
6029 				      &adev->gfx.me.me_fw_gpu_addr,
6030 				      (void **)&adev->gfx.me.me_fw_ptr);
6031 	if (r) {
6032 		dev_err(adev->dev, "(%d) failed to create me fw bo\n", r);
6033 		gfx_v10_0_me_fini(adev);
6034 		return r;
6035 	}
6036 
6037 	memcpy(adev->gfx.me.me_fw_ptr, fw_data, fw_size);
6038 
6039 	amdgpu_bo_kunmap(adev->gfx.me.me_fw_obj);
6040 	amdgpu_bo_unreserve(adev->gfx.me.me_fw_obj);
6041 
6042 	/* Trigger an invalidation of the L1 instruction caches */
6043 	tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL);
6044 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_OP_CNTL, INVALIDATE_CACHE, 1);
6045 	WREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL, tmp);
6046 
6047 	/* Wait for invalidation complete */
6048 	for (i = 0; i < usec_timeout; i++) {
6049 		tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_OP_CNTL);
6050 		if (1 == REG_GET_FIELD(tmp, CP_ME_IC_OP_CNTL,
6051 			INVALIDATE_CACHE_COMPLETE))
6052 			break;
6053 		udelay(1);
6054 	}
6055 
6056 	if (i >= usec_timeout) {
6057 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
6058 		return -EINVAL;
6059 	}
6060 
6061 	if (amdgpu_emu_mode == 1)
6062 		adev->hdp.funcs->flush_hdp(adev, NULL);
6063 
6064 	tmp = RREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_CNTL);
6065 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, VMID, 0);
6066 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, CACHE_POLICY, 0);
6067 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, EXE_DISABLE, 0);
6068 	tmp = REG_SET_FIELD(tmp, CP_ME_IC_BASE_CNTL, ADDRESS_CLAMP, 1);
6069 	WREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_LO,
6070 		adev->gfx.me.me_fw_gpu_addr & 0xFFFFF000);
6071 	WREG32_SOC15(GC, 0, mmCP_ME_IC_BASE_HI,
6072 		upper_32_bits(adev->gfx.me.me_fw_gpu_addr));
6073 
6074 	WREG32_SOC15(GC, 0, mmCP_HYP_ME_UCODE_ADDR, 0);
6075 
6076 	for (i = 0; i < me_hdr->jt_size; i++)
6077 		WREG32_SOC15(GC, 0, mmCP_HYP_ME_UCODE_DATA,
6078 			     le32_to_cpup(fw_data + me_hdr->jt_offset + i));
6079 
6080 	WREG32_SOC15(GC, 0, mmCP_HYP_ME_UCODE_ADDR, adev->gfx.me_fw_version);
6081 
6082 	return 0;
6083 }
6084 
6085 static int gfx_v10_0_cp_gfx_load_microcode(struct amdgpu_device *adev)
6086 {
6087 	int r;
6088 
6089 	if (!adev->gfx.me_fw || !adev->gfx.pfp_fw || !adev->gfx.ce_fw)
6090 		return -EINVAL;
6091 
6092 	gfx_v10_0_cp_gfx_enable(adev, false);
6093 
6094 	r = gfx_v10_0_cp_gfx_load_pfp_microcode(adev);
6095 	if (r) {
6096 		dev_err(adev->dev, "(%d) failed to load pfp fw\n", r);
6097 		return r;
6098 	}
6099 
6100 	r = gfx_v10_0_cp_gfx_load_ce_microcode(adev);
6101 	if (r) {
6102 		dev_err(adev->dev, "(%d) failed to load ce fw\n", r);
6103 		return r;
6104 	}
6105 
6106 	r = gfx_v10_0_cp_gfx_load_me_microcode(adev);
6107 	if (r) {
6108 		dev_err(adev->dev, "(%d) failed to load me fw\n", r);
6109 		return r;
6110 	}
6111 
6112 	return 0;
6113 }
6114 
6115 static int gfx_v10_0_cp_gfx_start(struct amdgpu_device *adev)
6116 {
6117 	struct amdgpu_ring *ring;
6118 	const struct cs_section_def *sect = NULL;
6119 	const struct cs_extent_def *ext = NULL;
6120 	int r, i;
6121 	int ctx_reg_offset;
6122 
6123 	/* init the CP */
6124 	WREG32_SOC15(GC, 0, mmCP_MAX_CONTEXT,
6125 		     adev->gfx.config.max_hw_contexts - 1);
6126 	WREG32_SOC15(GC, 0, mmCP_DEVICE_ID, 1);
6127 
6128 	gfx_v10_0_cp_gfx_enable(adev, true);
6129 
6130 	ring = &adev->gfx.gfx_ring[0];
6131 	r = amdgpu_ring_alloc(ring, gfx_v10_0_get_csb_size(adev) + 4);
6132 	if (r) {
6133 		DRM_ERROR("amdgpu: cp failed to lock ring (%d).\n", r);
6134 		return r;
6135 	}
6136 
6137 	amdgpu_ring_write(ring, PACKET3(PACKET3_PREAMBLE_CNTL, 0));
6138 	amdgpu_ring_write(ring, PACKET3_PREAMBLE_BEGIN_CLEAR_STATE);
6139 
6140 	amdgpu_ring_write(ring, PACKET3(PACKET3_CONTEXT_CONTROL, 1));
6141 	amdgpu_ring_write(ring, 0x80000000);
6142 	amdgpu_ring_write(ring, 0x80000000);
6143 
6144 	for (sect = gfx10_cs_data; sect->section != NULL; ++sect) {
6145 		for (ext = sect->section; ext->extent != NULL; ++ext) {
6146 			if (sect->id == SECT_CONTEXT) {
6147 				amdgpu_ring_write(ring,
6148 						  PACKET3(PACKET3_SET_CONTEXT_REG,
6149 							  ext->reg_count));
6150 				amdgpu_ring_write(ring, ext->reg_index -
6151 						  PACKET3_SET_CONTEXT_REG_START);
6152 				for (i = 0; i < ext->reg_count; i++)
6153 					amdgpu_ring_write(ring, ext->extent[i]);
6154 			}
6155 		}
6156 	}
6157 
6158 	ctx_reg_offset =
6159 		SOC15_REG_OFFSET(GC, 0, mmPA_SC_TILE_STEERING_OVERRIDE) - PACKET3_SET_CONTEXT_REG_START;
6160 	amdgpu_ring_write(ring, PACKET3(PACKET3_SET_CONTEXT_REG, 1));
6161 	amdgpu_ring_write(ring, ctx_reg_offset);
6162 	amdgpu_ring_write(ring, adev->gfx.config.pa_sc_tile_steering_override);
6163 
6164 	amdgpu_ring_write(ring, PACKET3(PACKET3_PREAMBLE_CNTL, 0));
6165 	amdgpu_ring_write(ring, PACKET3_PREAMBLE_END_CLEAR_STATE);
6166 
6167 	amdgpu_ring_write(ring, PACKET3(PACKET3_CLEAR_STATE, 0));
6168 	amdgpu_ring_write(ring, 0);
6169 
6170 	amdgpu_ring_write(ring, PACKET3(PACKET3_SET_BASE, 2));
6171 	amdgpu_ring_write(ring, PACKET3_BASE_INDEX(CE_PARTITION_BASE));
6172 	amdgpu_ring_write(ring, 0x8000);
6173 	amdgpu_ring_write(ring, 0x8000);
6174 
6175 	amdgpu_ring_commit(ring);
6176 
6177 	/* submit cs packet to copy state 0 to next available state */
6178 	if (adev->gfx.num_gfx_rings > 1) {
6179 		/* maximum supported gfx ring is 2 */
6180 		ring = &adev->gfx.gfx_ring[1];
6181 		r = amdgpu_ring_alloc(ring, 2);
6182 		if (r) {
6183 			DRM_ERROR("amdgpu: cp failed to lock ring (%d).\n", r);
6184 			return r;
6185 		}
6186 
6187 		amdgpu_ring_write(ring, PACKET3(PACKET3_CLEAR_STATE, 0));
6188 		amdgpu_ring_write(ring, 0);
6189 
6190 		amdgpu_ring_commit(ring);
6191 	}
6192 	return 0;
6193 }
6194 
6195 static void gfx_v10_0_cp_gfx_switch_pipe(struct amdgpu_device *adev,
6196 					 CP_PIPE_ID pipe)
6197 {
6198 	u32 tmp;
6199 
6200 	tmp = RREG32_SOC15(GC, 0, mmGRBM_GFX_CNTL);
6201 	tmp = REG_SET_FIELD(tmp, GRBM_GFX_CNTL, PIPEID, pipe);
6202 
6203 	WREG32_SOC15(GC, 0, mmGRBM_GFX_CNTL, tmp);
6204 }
6205 
6206 static void gfx_v10_0_cp_gfx_set_doorbell(struct amdgpu_device *adev,
6207 					  struct amdgpu_ring *ring)
6208 {
6209 	u32 tmp;
6210 
6211 	if (!amdgpu_async_gfx_ring) {
6212 		tmp = RREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_CONTROL);
6213 		if (ring->use_doorbell) {
6214 			tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6215 						DOORBELL_OFFSET, ring->doorbell_index);
6216 			tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6217 						DOORBELL_EN, 1);
6218 		} else {
6219 			tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6220 						DOORBELL_EN, 0);
6221 		}
6222 		WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_CONTROL, tmp);
6223 	}
6224 	switch (adev->asic_type) {
6225 	case CHIP_SIENNA_CICHLID:
6226 	case CHIP_NAVY_FLOUNDER:
6227 	case CHIP_VANGOGH:
6228 	case CHIP_DIMGREY_CAVEFISH:
6229 	case CHIP_BEIGE_GOBY:
6230 	case CHIP_YELLOW_CARP:
6231 		tmp = REG_SET_FIELD(0, CP_RB_DOORBELL_RANGE_LOWER,
6232 				    DOORBELL_RANGE_LOWER_Sienna_Cichlid, ring->doorbell_index);
6233 		WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_RANGE_LOWER, tmp);
6234 
6235 		WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_RANGE_UPPER,
6236 			     CP_RB_DOORBELL_RANGE_UPPER__DOORBELL_RANGE_UPPER_Sienna_Cichlid_MASK);
6237 		break;
6238 	default:
6239 		tmp = REG_SET_FIELD(0, CP_RB_DOORBELL_RANGE_LOWER,
6240 				    DOORBELL_RANGE_LOWER, ring->doorbell_index);
6241 		WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_RANGE_LOWER, tmp);
6242 
6243 		WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_RANGE_UPPER,
6244 			     CP_RB_DOORBELL_RANGE_UPPER__DOORBELL_RANGE_UPPER_MASK);
6245 		break;
6246 	}
6247 }
6248 
6249 static int gfx_v10_0_cp_gfx_resume(struct amdgpu_device *adev)
6250 {
6251 	struct amdgpu_ring *ring;
6252 	u32 tmp;
6253 	u32 rb_bufsz;
6254 	u64 rb_addr, rptr_addr, wptr_gpu_addr;
6255 	u32 i;
6256 
6257 	/* Set the write pointer delay */
6258 	WREG32_SOC15(GC, 0, mmCP_RB_WPTR_DELAY, 0);
6259 
6260 	/* set the RB to use vmid 0 */
6261 	WREG32_SOC15(GC, 0, mmCP_RB_VMID, 0);
6262 
6263 	/* Init gfx ring 0 for pipe 0 */
6264 	mutex_lock(&adev->srbm_mutex);
6265 	gfx_v10_0_cp_gfx_switch_pipe(adev, PIPE_ID0);
6266 
6267 	/* Set ring buffer size */
6268 	ring = &adev->gfx.gfx_ring[0];
6269 	rb_bufsz = order_base_2(ring->ring_size / 8);
6270 	tmp = REG_SET_FIELD(0, CP_RB0_CNTL, RB_BUFSZ, rb_bufsz);
6271 	tmp = REG_SET_FIELD(tmp, CP_RB0_CNTL, RB_BLKSZ, rb_bufsz - 2);
6272 #ifdef __BIG_ENDIAN
6273 	tmp = REG_SET_FIELD(tmp, CP_RB0_CNTL, BUF_SWAP, 1);
6274 #endif
6275 	WREG32_SOC15(GC, 0, mmCP_RB0_CNTL, tmp);
6276 
6277 	/* Initialize the ring buffer's write pointers */
6278 	ring->wptr = 0;
6279 	WREG32_SOC15(GC, 0, mmCP_RB0_WPTR, lower_32_bits(ring->wptr));
6280 	WREG32_SOC15(GC, 0, mmCP_RB0_WPTR_HI, upper_32_bits(ring->wptr));
6281 
6282 	/* set the wb address wether it's enabled or not */
6283 	rptr_addr = adev->wb.gpu_addr + (ring->rptr_offs * 4);
6284 	WREG32_SOC15(GC, 0, mmCP_RB0_RPTR_ADDR, lower_32_bits(rptr_addr));
6285 	WREG32_SOC15(GC, 0, mmCP_RB0_RPTR_ADDR_HI, upper_32_bits(rptr_addr) &
6286 		     CP_RB_RPTR_ADDR_HI__RB_RPTR_ADDR_HI_MASK);
6287 
6288 	wptr_gpu_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
6289 	WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_LO,
6290 		     lower_32_bits(wptr_gpu_addr));
6291 	WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_HI,
6292 		     upper_32_bits(wptr_gpu_addr));
6293 
6294 	mdelay(1);
6295 	WREG32_SOC15(GC, 0, mmCP_RB0_CNTL, tmp);
6296 
6297 	rb_addr = ring->gpu_addr >> 8;
6298 	WREG32_SOC15(GC, 0, mmCP_RB0_BASE, rb_addr);
6299 	WREG32_SOC15(GC, 0, mmCP_RB0_BASE_HI, upper_32_bits(rb_addr));
6300 
6301 	WREG32_SOC15(GC, 0, mmCP_RB_ACTIVE, 1);
6302 
6303 	gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
6304 	mutex_unlock(&adev->srbm_mutex);
6305 
6306 	/* Init gfx ring 1 for pipe 1 */
6307 	if (adev->gfx.num_gfx_rings > 1) {
6308 		mutex_lock(&adev->srbm_mutex);
6309 		gfx_v10_0_cp_gfx_switch_pipe(adev, PIPE_ID1);
6310 		/* maximum supported gfx ring is 2 */
6311 		ring = &adev->gfx.gfx_ring[1];
6312 		rb_bufsz = order_base_2(ring->ring_size / 8);
6313 		tmp = REG_SET_FIELD(0, CP_RB1_CNTL, RB_BUFSZ, rb_bufsz);
6314 		tmp = REG_SET_FIELD(tmp, CP_RB1_CNTL, RB_BLKSZ, rb_bufsz - 2);
6315 		WREG32_SOC15(GC, 0, mmCP_RB1_CNTL, tmp);
6316 		/* Initialize the ring buffer's write pointers */
6317 		ring->wptr = 0;
6318 		WREG32_SOC15(GC, 0, mmCP_RB1_WPTR, lower_32_bits(ring->wptr));
6319 		WREG32_SOC15(GC, 0, mmCP_RB1_WPTR_HI, upper_32_bits(ring->wptr));
6320 		/* Set the wb address wether it's enabled or not */
6321 		rptr_addr = adev->wb.gpu_addr + (ring->rptr_offs * 4);
6322 		WREG32_SOC15(GC, 0, mmCP_RB1_RPTR_ADDR, lower_32_bits(rptr_addr));
6323 		WREG32_SOC15(GC, 0, mmCP_RB1_RPTR_ADDR_HI, upper_32_bits(rptr_addr) &
6324 			     CP_RB1_RPTR_ADDR_HI__RB_RPTR_ADDR_HI_MASK);
6325 		wptr_gpu_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
6326 		WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_LO,
6327 			     lower_32_bits(wptr_gpu_addr));
6328 		WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_HI,
6329 			     upper_32_bits(wptr_gpu_addr));
6330 
6331 		mdelay(1);
6332 		WREG32_SOC15(GC, 0, mmCP_RB1_CNTL, tmp);
6333 
6334 		rb_addr = ring->gpu_addr >> 8;
6335 		WREG32_SOC15(GC, 0, mmCP_RB1_BASE, rb_addr);
6336 		WREG32_SOC15(GC, 0, mmCP_RB1_BASE_HI, upper_32_bits(rb_addr));
6337 		WREG32_SOC15(GC, 0, mmCP_RB1_ACTIVE, 1);
6338 
6339 		gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
6340 		mutex_unlock(&adev->srbm_mutex);
6341 	}
6342 	/* Switch to pipe 0 */
6343 	mutex_lock(&adev->srbm_mutex);
6344 	gfx_v10_0_cp_gfx_switch_pipe(adev, PIPE_ID0);
6345 	mutex_unlock(&adev->srbm_mutex);
6346 
6347 	/* start the ring */
6348 	gfx_v10_0_cp_gfx_start(adev);
6349 
6350 	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
6351 		ring = &adev->gfx.gfx_ring[i];
6352 		ring->sched.ready = true;
6353 	}
6354 
6355 	return 0;
6356 }
6357 
6358 static void gfx_v10_0_cp_compute_enable(struct amdgpu_device *adev, bool enable)
6359 {
6360 	if (enable) {
6361 		switch (adev->asic_type) {
6362 		case CHIP_SIENNA_CICHLID:
6363 		case CHIP_NAVY_FLOUNDER:
6364 		case CHIP_VANGOGH:
6365 		case CHIP_DIMGREY_CAVEFISH:
6366 		case CHIP_BEIGE_GOBY:
6367 		case CHIP_YELLOW_CARP:
6368 			WREG32_SOC15(GC, 0, mmCP_MEC_CNTL_Sienna_Cichlid, 0);
6369 			break;
6370 		default:
6371 			WREG32_SOC15(GC, 0, mmCP_MEC_CNTL, 0);
6372 			break;
6373 		}
6374 	} else {
6375 		switch (adev->asic_type) {
6376 		case CHIP_SIENNA_CICHLID:
6377 		case CHIP_NAVY_FLOUNDER:
6378 		case CHIP_VANGOGH:
6379 		case CHIP_DIMGREY_CAVEFISH:
6380 		case CHIP_BEIGE_GOBY:
6381 		case CHIP_YELLOW_CARP:
6382 			WREG32_SOC15(GC, 0, mmCP_MEC_CNTL_Sienna_Cichlid,
6383 				     (CP_MEC_CNTL__MEC_ME1_HALT_MASK |
6384 				      CP_MEC_CNTL__MEC_ME2_HALT_MASK));
6385 			break;
6386 		default:
6387 			WREG32_SOC15(GC, 0, mmCP_MEC_CNTL,
6388 				     (CP_MEC_CNTL__MEC_ME1_HALT_MASK |
6389 				      CP_MEC_CNTL__MEC_ME2_HALT_MASK));
6390 			break;
6391 		}
6392 		adev->gfx.kiq.ring.sched.ready = false;
6393 	}
6394 	udelay(50);
6395 }
6396 
6397 static int gfx_v10_0_cp_compute_load_microcode(struct amdgpu_device *adev)
6398 {
6399 	const struct gfx_firmware_header_v1_0 *mec_hdr;
6400 	const __le32 *fw_data;
6401 	unsigned i;
6402 	u32 tmp;
6403 	u32 usec_timeout = 50000; /* Wait for 50 ms */
6404 
6405 	if (!adev->gfx.mec_fw)
6406 		return -EINVAL;
6407 
6408 	gfx_v10_0_cp_compute_enable(adev, false);
6409 
6410 	mec_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.mec_fw->data;
6411 	amdgpu_ucode_print_gfx_hdr(&mec_hdr->header);
6412 
6413 	fw_data = (const __le32 *)
6414 		(adev->gfx.mec_fw->data +
6415 		 le32_to_cpu(mec_hdr->header.ucode_array_offset_bytes));
6416 
6417 	/* Trigger an invalidation of the L1 instruction caches */
6418 	tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL);
6419 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_OP_CNTL, INVALIDATE_CACHE, 1);
6420 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL, tmp);
6421 
6422 	/* Wait for invalidation complete */
6423 	for (i = 0; i < usec_timeout; i++) {
6424 		tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_OP_CNTL);
6425 		if (1 == REG_GET_FIELD(tmp, CP_CPC_IC_OP_CNTL,
6426 				       INVALIDATE_CACHE_COMPLETE))
6427 			break;
6428 		udelay(1);
6429 	}
6430 
6431 	if (i >= usec_timeout) {
6432 		dev_err(adev->dev, "failed to invalidate instruction cache\n");
6433 		return -EINVAL;
6434 	}
6435 
6436 	if (amdgpu_emu_mode == 1)
6437 		adev->hdp.funcs->flush_hdp(adev, NULL);
6438 
6439 	tmp = RREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_CNTL);
6440 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_BASE_CNTL, CACHE_POLICY, 0);
6441 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_BASE_CNTL, EXE_DISABLE, 0);
6442 	tmp = REG_SET_FIELD(tmp, CP_CPC_IC_BASE_CNTL, ADDRESS_CLAMP, 1);
6443 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_CNTL, tmp);
6444 
6445 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_LO, adev->gfx.mec.mec_fw_gpu_addr &
6446 		     0xFFFFF000);
6447 	WREG32_SOC15(GC, 0, mmCP_CPC_IC_BASE_HI,
6448 		     upper_32_bits(adev->gfx.mec.mec_fw_gpu_addr));
6449 
6450 	/* MEC1 */
6451 	WREG32_SOC15(GC, 0, mmCP_MEC_ME1_UCODE_ADDR, 0);
6452 
6453 	for (i = 0; i < mec_hdr->jt_size; i++)
6454 		WREG32_SOC15(GC, 0, mmCP_MEC_ME1_UCODE_DATA,
6455 			     le32_to_cpup(fw_data + mec_hdr->jt_offset + i));
6456 
6457 	WREG32_SOC15(GC, 0, mmCP_MEC_ME1_UCODE_ADDR, adev->gfx.mec_fw_version);
6458 
6459 	/*
6460 	 * TODO: Loading MEC2 firmware is only necessary if MEC2 should run
6461 	 * different microcode than MEC1.
6462 	 */
6463 
6464 	return 0;
6465 }
6466 
6467 static void gfx_v10_0_kiq_setting(struct amdgpu_ring *ring)
6468 {
6469 	uint32_t tmp;
6470 	struct amdgpu_device *adev = ring->adev;
6471 
6472 	/* tell RLC which is KIQ queue */
6473 	switch (adev->asic_type) {
6474 	case CHIP_SIENNA_CICHLID:
6475 	case CHIP_NAVY_FLOUNDER:
6476 	case CHIP_VANGOGH:
6477 	case CHIP_DIMGREY_CAVEFISH:
6478 	case CHIP_BEIGE_GOBY:
6479 	case CHIP_YELLOW_CARP:
6480 		tmp = RREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS_Sienna_Cichlid);
6481 		tmp &= 0xffffff00;
6482 		tmp |= (ring->me << 5) | (ring->pipe << 3) | (ring->queue);
6483 		WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS_Sienna_Cichlid, tmp);
6484 		tmp |= 0x80;
6485 		WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS_Sienna_Cichlid, tmp);
6486 		break;
6487 	default:
6488 		tmp = RREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS);
6489 		tmp &= 0xffffff00;
6490 		tmp |= (ring->me << 5) | (ring->pipe << 3) | (ring->queue);
6491 		WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS, tmp);
6492 		tmp |= 0x80;
6493 		WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS, tmp);
6494 		break;
6495 	}
6496 }
6497 
6498 static int gfx_v10_0_gfx_mqd_init(struct amdgpu_ring *ring)
6499 {
6500 	struct amdgpu_device *adev = ring->adev;
6501 	struct v10_gfx_mqd *mqd = ring->mqd_ptr;
6502 	uint64_t hqd_gpu_addr, wb_gpu_addr;
6503 	uint32_t tmp;
6504 	uint32_t rb_bufsz;
6505 
6506 	/* set up gfx hqd wptr */
6507 	mqd->cp_gfx_hqd_wptr = 0;
6508 	mqd->cp_gfx_hqd_wptr_hi = 0;
6509 
6510 	/* set the pointer to the MQD */
6511 	mqd->cp_mqd_base_addr = ring->mqd_gpu_addr & 0xfffffffc;
6512 	mqd->cp_mqd_base_addr_hi = upper_32_bits(ring->mqd_gpu_addr);
6513 
6514 	/* set up mqd control */
6515 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_MQD_CONTROL);
6516 	tmp = REG_SET_FIELD(tmp, CP_GFX_MQD_CONTROL, VMID, 0);
6517 	tmp = REG_SET_FIELD(tmp, CP_GFX_MQD_CONTROL, PRIV_STATE, 1);
6518 	tmp = REG_SET_FIELD(tmp, CP_GFX_MQD_CONTROL, CACHE_POLICY, 0);
6519 	mqd->cp_gfx_mqd_control = tmp;
6520 
6521 	/* set up gfx_hqd_vimd with 0x0 to indicate the ring buffer's vmid */
6522 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_VMID);
6523 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_VMID, VMID, 0);
6524 	mqd->cp_gfx_hqd_vmid = 0;
6525 
6526 	/* set up default queue priority level
6527 	 * 0x0 = low priority, 0x1 = high priority */
6528 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUEUE_PRIORITY);
6529 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_QUEUE_PRIORITY, PRIORITY_LEVEL, 0);
6530 	mqd->cp_gfx_hqd_queue_priority = tmp;
6531 
6532 	/* set up time quantum */
6533 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUANTUM);
6534 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_QUANTUM, QUANTUM_EN, 1);
6535 	mqd->cp_gfx_hqd_quantum = tmp;
6536 
6537 	/* set up gfx hqd base. this is similar as CP_RB_BASE */
6538 	hqd_gpu_addr = ring->gpu_addr >> 8;
6539 	mqd->cp_gfx_hqd_base = hqd_gpu_addr;
6540 	mqd->cp_gfx_hqd_base_hi = upper_32_bits(hqd_gpu_addr);
6541 
6542 	/* set up hqd_rptr_addr/_hi, similar as CP_RB_RPTR */
6543 	wb_gpu_addr = adev->wb.gpu_addr + (ring->rptr_offs * 4);
6544 	mqd->cp_gfx_hqd_rptr_addr = wb_gpu_addr & 0xfffffffc;
6545 	mqd->cp_gfx_hqd_rptr_addr_hi =
6546 		upper_32_bits(wb_gpu_addr) & 0xffff;
6547 
6548 	/* set up rb_wptr_poll addr */
6549 	wb_gpu_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
6550 	mqd->cp_rb_wptr_poll_addr_lo = wb_gpu_addr & 0xfffffffc;
6551 	mqd->cp_rb_wptr_poll_addr_hi = upper_32_bits(wb_gpu_addr) & 0xffff;
6552 
6553 	/* set up the gfx_hqd_control, similar as CP_RB0_CNTL */
6554 	rb_bufsz = order_base_2(ring->ring_size / 4) - 1;
6555 	tmp = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_CNTL);
6556 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, RB_BUFSZ, rb_bufsz);
6557 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, RB_BLKSZ, rb_bufsz - 2);
6558 #ifdef __BIG_ENDIAN
6559 	tmp = REG_SET_FIELD(tmp, CP_GFX_HQD_CNTL, BUF_SWAP, 1);
6560 #endif
6561 	mqd->cp_gfx_hqd_cntl = tmp;
6562 
6563 	/* set up cp_doorbell_control */
6564 	tmp = RREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_CONTROL);
6565 	if (ring->use_doorbell) {
6566 		tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6567 				    DOORBELL_OFFSET, ring->doorbell_index);
6568 		tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6569 				    DOORBELL_EN, 1);
6570 	} else
6571 		tmp = REG_SET_FIELD(tmp, CP_RB_DOORBELL_CONTROL,
6572 				    DOORBELL_EN, 0);
6573 	mqd->cp_rb_doorbell_control = tmp;
6574 
6575 	/*if there are 2 gfx rings, set the lower doorbell range of the first ring,
6576 	 *otherwise the range of the second ring will override the first ring */
6577 	if (ring->doorbell_index == adev->doorbell_index.gfx_ring0 << 1)
6578 		gfx_v10_0_cp_gfx_set_doorbell(adev, ring);
6579 
6580 	/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */
6581 	ring->wptr = 0;
6582 	mqd->cp_gfx_hqd_rptr = RREG32_SOC15(GC, 0, mmCP_GFX_HQD_RPTR);
6583 
6584 	/* active the queue */
6585 	mqd->cp_gfx_hqd_active = 1;
6586 
6587 	return 0;
6588 }
6589 
6590 #ifdef BRING_UP_DEBUG
6591 static int gfx_v10_0_gfx_queue_init_register(struct amdgpu_ring *ring)
6592 {
6593 	struct amdgpu_device *adev = ring->adev;
6594 	struct v10_gfx_mqd *mqd = ring->mqd_ptr;
6595 
6596 	/* set mmCP_GFX_HQD_WPTR/_HI to 0 */
6597 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_WPTR, mqd->cp_gfx_hqd_wptr);
6598 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_WPTR_HI, mqd->cp_gfx_hqd_wptr_hi);
6599 
6600 	/* set GFX_MQD_BASE */
6601 	WREG32_SOC15(GC, 0, mmCP_MQD_BASE_ADDR, mqd->cp_mqd_base_addr);
6602 	WREG32_SOC15(GC, 0, mmCP_MQD_BASE_ADDR_HI, mqd->cp_mqd_base_addr_hi);
6603 
6604 	/* set GFX_MQD_CONTROL */
6605 	WREG32_SOC15(GC, 0, mmCP_GFX_MQD_CONTROL, mqd->cp_gfx_mqd_control);
6606 
6607 	/* set GFX_HQD_VMID to 0 */
6608 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_VMID, mqd->cp_gfx_hqd_vmid);
6609 
6610 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUEUE_PRIORITY,
6611 			mqd->cp_gfx_hqd_queue_priority);
6612 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_QUANTUM, mqd->cp_gfx_hqd_quantum);
6613 
6614 	/* set GFX_HQD_BASE, similar as CP_RB_BASE */
6615 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_BASE, mqd->cp_gfx_hqd_base);
6616 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_BASE_HI, mqd->cp_gfx_hqd_base_hi);
6617 
6618 	/* set GFX_HQD_RPTR_ADDR, similar as CP_RB_RPTR */
6619 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_RPTR_ADDR, mqd->cp_gfx_hqd_rptr_addr);
6620 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_RPTR_ADDR_HI, mqd->cp_gfx_hqd_rptr_addr_hi);
6621 
6622 	/* set GFX_HQD_CNTL, similar as CP_RB_CNTL */
6623 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_CNTL, mqd->cp_gfx_hqd_cntl);
6624 
6625 	/* set RB_WPTR_POLL_ADDR */
6626 	WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_LO, mqd->cp_rb_wptr_poll_addr_lo);
6627 	WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_ADDR_HI, mqd->cp_rb_wptr_poll_addr_hi);
6628 
6629 	/* set RB_DOORBELL_CONTROL */
6630 	WREG32_SOC15(GC, 0, mmCP_RB_DOORBELL_CONTROL, mqd->cp_rb_doorbell_control);
6631 
6632 	/* active the queue */
6633 	WREG32_SOC15(GC, 0, mmCP_GFX_HQD_ACTIVE, mqd->cp_gfx_hqd_active);
6634 
6635 	return 0;
6636 }
6637 #endif
6638 
6639 static int gfx_v10_0_gfx_init_queue(struct amdgpu_ring *ring)
6640 {
6641 	struct amdgpu_device *adev = ring->adev;
6642 	struct v10_gfx_mqd *mqd = ring->mqd_ptr;
6643 	int mqd_idx = ring - &adev->gfx.gfx_ring[0];
6644 
6645 	if (!amdgpu_in_reset(adev) && !adev->in_suspend) {
6646 		memset((void *)mqd, 0, sizeof(*mqd));
6647 		mutex_lock(&adev->srbm_mutex);
6648 		nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
6649 		gfx_v10_0_gfx_mqd_init(ring);
6650 #ifdef BRING_UP_DEBUG
6651 		gfx_v10_0_gfx_queue_init_register(ring);
6652 #endif
6653 		nv_grbm_select(adev, 0, 0, 0, 0);
6654 		mutex_unlock(&adev->srbm_mutex);
6655 		if (adev->gfx.me.mqd_backup[mqd_idx])
6656 			memcpy(adev->gfx.me.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
6657 	} else if (amdgpu_in_reset(adev)) {
6658 		/* reset mqd with the backup copy */
6659 		if (adev->gfx.me.mqd_backup[mqd_idx])
6660 			memcpy(mqd, adev->gfx.me.mqd_backup[mqd_idx], sizeof(*mqd));
6661 		/* reset the ring */
6662 		ring->wptr = 0;
6663 		adev->wb.wb[ring->wptr_offs] = 0;
6664 		amdgpu_ring_clear_ring(ring);
6665 #ifdef BRING_UP_DEBUG
6666 		mutex_lock(&adev->srbm_mutex);
6667 		nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
6668 		gfx_v10_0_gfx_queue_init_register(ring);
6669 		nv_grbm_select(adev, 0, 0, 0, 0);
6670 		mutex_unlock(&adev->srbm_mutex);
6671 #endif
6672 	} else {
6673 		amdgpu_ring_clear_ring(ring);
6674 	}
6675 
6676 	return 0;
6677 }
6678 
6679 #ifndef BRING_UP_DEBUG
6680 static int gfx_v10_0_kiq_enable_kgq(struct amdgpu_device *adev)
6681 {
6682 	struct amdgpu_kiq *kiq = &adev->gfx.kiq;
6683 	struct amdgpu_ring *kiq_ring = &adev->gfx.kiq.ring;
6684 	int r, i;
6685 
6686 	if (!kiq->pmf || !kiq->pmf->kiq_map_queues)
6687 		return -EINVAL;
6688 
6689 	r = amdgpu_ring_alloc(kiq_ring, kiq->pmf->map_queues_size *
6690 					adev->gfx.num_gfx_rings);
6691 	if (r) {
6692 		DRM_ERROR("Failed to lock KIQ (%d).\n", r);
6693 		return r;
6694 	}
6695 
6696 	for (i = 0; i < adev->gfx.num_gfx_rings; i++)
6697 		kiq->pmf->kiq_map_queues(kiq_ring, &adev->gfx.gfx_ring[i]);
6698 
6699 	return amdgpu_ring_test_helper(kiq_ring);
6700 }
6701 #endif
6702 
6703 static int gfx_v10_0_cp_async_gfx_ring_resume(struct amdgpu_device *adev)
6704 {
6705 	int r, i;
6706 	struct amdgpu_ring *ring;
6707 
6708 	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
6709 		ring = &adev->gfx.gfx_ring[i];
6710 
6711 		r = amdgpu_bo_reserve(ring->mqd_obj, false);
6712 		if (unlikely(r != 0))
6713 			goto done;
6714 
6715 		r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
6716 		if (!r) {
6717 			r = gfx_v10_0_gfx_init_queue(ring);
6718 			amdgpu_bo_kunmap(ring->mqd_obj);
6719 			ring->mqd_ptr = NULL;
6720 		}
6721 		amdgpu_bo_unreserve(ring->mqd_obj);
6722 		if (r)
6723 			goto done;
6724 	}
6725 #ifndef BRING_UP_DEBUG
6726 	r = gfx_v10_0_kiq_enable_kgq(adev);
6727 	if (r)
6728 		goto done;
6729 #endif
6730 	r = gfx_v10_0_cp_gfx_start(adev);
6731 	if (r)
6732 		goto done;
6733 
6734 	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
6735 		ring = &adev->gfx.gfx_ring[i];
6736 		ring->sched.ready = true;
6737 	}
6738 done:
6739 	return r;
6740 }
6741 
6742 static void gfx_v10_0_compute_mqd_set_priority(struct amdgpu_ring *ring, struct v10_compute_mqd *mqd)
6743 {
6744 	struct amdgpu_device *adev = ring->adev;
6745 
6746 	if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
6747 		if (amdgpu_gfx_is_high_priority_compute_queue(adev, ring)) {
6748 			mqd->cp_hqd_pipe_priority = AMDGPU_GFX_PIPE_PRIO_HIGH;
6749 			mqd->cp_hqd_queue_priority =
6750 				AMDGPU_GFX_QUEUE_PRIORITY_MAXIMUM;
6751 		}
6752 	}
6753 }
6754 
6755 static int gfx_v10_0_compute_mqd_init(struct amdgpu_ring *ring)
6756 {
6757 	struct amdgpu_device *adev = ring->adev;
6758 	struct v10_compute_mqd *mqd = ring->mqd_ptr;
6759 	uint64_t hqd_gpu_addr, wb_gpu_addr, eop_base_addr;
6760 	uint32_t tmp;
6761 
6762 	mqd->header = 0xC0310800;
6763 	mqd->compute_pipelinestat_enable = 0x00000001;
6764 	mqd->compute_static_thread_mgmt_se0 = 0xffffffff;
6765 	mqd->compute_static_thread_mgmt_se1 = 0xffffffff;
6766 	mqd->compute_static_thread_mgmt_se2 = 0xffffffff;
6767 	mqd->compute_static_thread_mgmt_se3 = 0xffffffff;
6768 	mqd->compute_misc_reserved = 0x00000003;
6769 
6770 	eop_base_addr = ring->eop_gpu_addr >> 8;
6771 	mqd->cp_hqd_eop_base_addr_lo = eop_base_addr;
6772 	mqd->cp_hqd_eop_base_addr_hi = upper_32_bits(eop_base_addr);
6773 
6774 	/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */
6775 	tmp = RREG32_SOC15(GC, 0, mmCP_HQD_EOP_CONTROL);
6776 	tmp = REG_SET_FIELD(tmp, CP_HQD_EOP_CONTROL, EOP_SIZE,
6777 			(order_base_2(GFX10_MEC_HPD_SIZE / 4) - 1));
6778 
6779 	mqd->cp_hqd_eop_control = tmp;
6780 
6781 	/* enable doorbell? */
6782 	tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL);
6783 
6784 	if (ring->use_doorbell) {
6785 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6786 				    DOORBELL_OFFSET, ring->doorbell_index);
6787 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6788 				    DOORBELL_EN, 1);
6789 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6790 				    DOORBELL_SOURCE, 0);
6791 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6792 				    DOORBELL_HIT, 0);
6793 	} else {
6794 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6795 				    DOORBELL_EN, 0);
6796 	}
6797 
6798 	mqd->cp_hqd_pq_doorbell_control = tmp;
6799 
6800 	/* disable the queue if it's active */
6801 	ring->wptr = 0;
6802 	mqd->cp_hqd_dequeue_request = 0;
6803 	mqd->cp_hqd_pq_rptr = 0;
6804 	mqd->cp_hqd_pq_wptr_lo = 0;
6805 	mqd->cp_hqd_pq_wptr_hi = 0;
6806 
6807 	/* set the pointer to the MQD */
6808 	mqd->cp_mqd_base_addr_lo = ring->mqd_gpu_addr & 0xfffffffc;
6809 	mqd->cp_mqd_base_addr_hi = upper_32_bits(ring->mqd_gpu_addr);
6810 
6811 	/* set MQD vmid to 0 */
6812 	tmp = RREG32_SOC15(GC, 0, mmCP_MQD_CONTROL);
6813 	tmp = REG_SET_FIELD(tmp, CP_MQD_CONTROL, VMID, 0);
6814 	mqd->cp_mqd_control = tmp;
6815 
6816 	/* set the pointer to the HQD, this is similar CP_RB0_BASE/_HI */
6817 	hqd_gpu_addr = ring->gpu_addr >> 8;
6818 	mqd->cp_hqd_pq_base_lo = hqd_gpu_addr;
6819 	mqd->cp_hqd_pq_base_hi = upper_32_bits(hqd_gpu_addr);
6820 
6821 	/* set up the HQD, this is similar to CP_RB0_CNTL */
6822 	tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_CONTROL);
6823 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, QUEUE_SIZE,
6824 			    (order_base_2(ring->ring_size / 4) - 1));
6825 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, RPTR_BLOCK_SIZE,
6826 			    ((order_base_2(AMDGPU_GPU_PAGE_SIZE / 4) - 1) << 8));
6827 #ifdef __BIG_ENDIAN
6828 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, ENDIAN_SWAP, 1);
6829 #endif
6830 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, UNORD_DISPATCH, 0);
6831 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, TUNNEL_DISPATCH, 0);
6832 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, PRIV_STATE, 1);
6833 	tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, KMD_QUEUE, 1);
6834 	mqd->cp_hqd_pq_control = tmp;
6835 
6836 	/* set the wb address whether it's enabled or not */
6837 	wb_gpu_addr = adev->wb.gpu_addr + (ring->rptr_offs * 4);
6838 	mqd->cp_hqd_pq_rptr_report_addr_lo = wb_gpu_addr & 0xfffffffc;
6839 	mqd->cp_hqd_pq_rptr_report_addr_hi =
6840 		upper_32_bits(wb_gpu_addr) & 0xffff;
6841 
6842 	/* only used if CP_PQ_WPTR_POLL_CNTL.CP_PQ_WPTR_POLL_CNTL__EN_MASK=1 */
6843 	wb_gpu_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
6844 	mqd->cp_hqd_pq_wptr_poll_addr_lo = wb_gpu_addr & 0xfffffffc;
6845 	mqd->cp_hqd_pq_wptr_poll_addr_hi = upper_32_bits(wb_gpu_addr) & 0xffff;
6846 
6847 	tmp = 0;
6848 	/* enable the doorbell if requested */
6849 	if (ring->use_doorbell) {
6850 		tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL);
6851 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6852 				DOORBELL_OFFSET, ring->doorbell_index);
6853 
6854 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6855 				    DOORBELL_EN, 1);
6856 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6857 				    DOORBELL_SOURCE, 0);
6858 		tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_DOORBELL_CONTROL,
6859 				    DOORBELL_HIT, 0);
6860 	}
6861 
6862 	mqd->cp_hqd_pq_doorbell_control = tmp;
6863 
6864 	/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */
6865 	ring->wptr = 0;
6866 	mqd->cp_hqd_pq_rptr = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_RPTR);
6867 
6868 	/* set the vmid for the queue */
6869 	mqd->cp_hqd_vmid = 0;
6870 
6871 	tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PERSISTENT_STATE);
6872 	tmp = REG_SET_FIELD(tmp, CP_HQD_PERSISTENT_STATE, PRELOAD_SIZE, 0x53);
6873 	mqd->cp_hqd_persistent_state = tmp;
6874 
6875 	/* set MIN_IB_AVAIL_SIZE */
6876 	tmp = RREG32_SOC15(GC, 0, mmCP_HQD_IB_CONTROL);
6877 	tmp = REG_SET_FIELD(tmp, CP_HQD_IB_CONTROL, MIN_IB_AVAIL_SIZE, 3);
6878 	mqd->cp_hqd_ib_control = tmp;
6879 
6880 	/* set static priority for a compute queue/ring */
6881 	gfx_v10_0_compute_mqd_set_priority(ring, mqd);
6882 
6883 	/* map_queues packet doesn't need activate the queue,
6884 	 * so only kiq need set this field.
6885 	 */
6886 	if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
6887 		mqd->cp_hqd_active = 1;
6888 
6889 	return 0;
6890 }
6891 
6892 static int gfx_v10_0_kiq_init_register(struct amdgpu_ring *ring)
6893 {
6894 	struct amdgpu_device *adev = ring->adev;
6895 	struct v10_compute_mqd *mqd = ring->mqd_ptr;
6896 	int j;
6897 
6898 	/* inactivate the queue */
6899 	if (amdgpu_sriov_vf(adev))
6900 		WREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE, 0);
6901 
6902 	/* disable wptr polling */
6903 	WREG32_FIELD15(GC, 0, CP_PQ_WPTR_POLL_CNTL, EN, 0);
6904 
6905 	/* write the EOP addr */
6906 	WREG32_SOC15(GC, 0, mmCP_HQD_EOP_BASE_ADDR,
6907 	       mqd->cp_hqd_eop_base_addr_lo);
6908 	WREG32_SOC15(GC, 0, mmCP_HQD_EOP_BASE_ADDR_HI,
6909 	       mqd->cp_hqd_eop_base_addr_hi);
6910 
6911 	/* set the EOP size, register value is 2^(EOP_SIZE+1) dwords */
6912 	WREG32_SOC15(GC, 0, mmCP_HQD_EOP_CONTROL,
6913 	       mqd->cp_hqd_eop_control);
6914 
6915 	/* enable doorbell? */
6916 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
6917 	       mqd->cp_hqd_pq_doorbell_control);
6918 
6919 	/* disable the queue if it's active */
6920 	if (RREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE) & 1) {
6921 		WREG32_SOC15(GC, 0, mmCP_HQD_DEQUEUE_REQUEST, 1);
6922 		for (j = 0; j < adev->usec_timeout; j++) {
6923 			if (!(RREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE) & 1))
6924 				break;
6925 			udelay(1);
6926 		}
6927 		WREG32_SOC15(GC, 0, mmCP_HQD_DEQUEUE_REQUEST,
6928 		       mqd->cp_hqd_dequeue_request);
6929 		WREG32_SOC15(GC, 0, mmCP_HQD_PQ_RPTR,
6930 		       mqd->cp_hqd_pq_rptr);
6931 		WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_LO,
6932 		       mqd->cp_hqd_pq_wptr_lo);
6933 		WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_HI,
6934 		       mqd->cp_hqd_pq_wptr_hi);
6935 	}
6936 
6937 	/* set the pointer to the MQD */
6938 	WREG32_SOC15(GC, 0, mmCP_MQD_BASE_ADDR,
6939 	       mqd->cp_mqd_base_addr_lo);
6940 	WREG32_SOC15(GC, 0, mmCP_MQD_BASE_ADDR_HI,
6941 	       mqd->cp_mqd_base_addr_hi);
6942 
6943 	/* set MQD vmid to 0 */
6944 	WREG32_SOC15(GC, 0, mmCP_MQD_CONTROL,
6945 	       mqd->cp_mqd_control);
6946 
6947 	/* set the pointer to the HQD, this is similar CP_RB0_BASE/_HI */
6948 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_BASE,
6949 	       mqd->cp_hqd_pq_base_lo);
6950 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_BASE_HI,
6951 	       mqd->cp_hqd_pq_base_hi);
6952 
6953 	/* set up the HQD, this is similar to CP_RB0_CNTL */
6954 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_CONTROL,
6955 	       mqd->cp_hqd_pq_control);
6956 
6957 	/* set the wb address whether it's enabled or not */
6958 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_RPTR_REPORT_ADDR,
6959 		mqd->cp_hqd_pq_rptr_report_addr_lo);
6960 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_RPTR_REPORT_ADDR_HI,
6961 		mqd->cp_hqd_pq_rptr_report_addr_hi);
6962 
6963 	/* only used if CP_PQ_WPTR_POLL_CNTL.CP_PQ_WPTR_POLL_CNTL__EN_MASK=1 */
6964 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_POLL_ADDR,
6965 	       mqd->cp_hqd_pq_wptr_poll_addr_lo);
6966 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_POLL_ADDR_HI,
6967 	       mqd->cp_hqd_pq_wptr_poll_addr_hi);
6968 
6969 	/* enable the doorbell if requested */
6970 	if (ring->use_doorbell) {
6971 		WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
6972 			(adev->doorbell_index.kiq * 2) << 2);
6973 		WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
6974 			(adev->doorbell_index.userqueue_end * 2) << 2);
6975 	}
6976 
6977 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_DOORBELL_CONTROL,
6978 	       mqd->cp_hqd_pq_doorbell_control);
6979 
6980 	/* reset read and write pointers, similar to CP_RB0_WPTR/_RPTR */
6981 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_LO,
6982 	       mqd->cp_hqd_pq_wptr_lo);
6983 	WREG32_SOC15(GC, 0, mmCP_HQD_PQ_WPTR_HI,
6984 	       mqd->cp_hqd_pq_wptr_hi);
6985 
6986 	/* set the vmid for the queue */
6987 	WREG32_SOC15(GC, 0, mmCP_HQD_VMID, mqd->cp_hqd_vmid);
6988 
6989 	WREG32_SOC15(GC, 0, mmCP_HQD_PERSISTENT_STATE,
6990 	       mqd->cp_hqd_persistent_state);
6991 
6992 	/* activate the queue */
6993 	WREG32_SOC15(GC, 0, mmCP_HQD_ACTIVE,
6994 	       mqd->cp_hqd_active);
6995 
6996 	if (ring->use_doorbell)
6997 		WREG32_FIELD15(GC, 0, CP_PQ_STATUS, DOORBELL_ENABLE, 1);
6998 
6999 	return 0;
7000 }
7001 
7002 static int gfx_v10_0_kiq_init_queue(struct amdgpu_ring *ring)
7003 {
7004 	struct amdgpu_device *adev = ring->adev;
7005 	struct v10_compute_mqd *mqd = ring->mqd_ptr;
7006 	int mqd_idx = AMDGPU_MAX_COMPUTE_RINGS;
7007 
7008 	gfx_v10_0_kiq_setting(ring);
7009 
7010 	if (amdgpu_in_reset(adev)) { /* for GPU_RESET case */
7011 		/* reset MQD to a clean status */
7012 		if (adev->gfx.mec.mqd_backup[mqd_idx])
7013 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(*mqd));
7014 
7015 		/* reset ring buffer */
7016 		ring->wptr = 0;
7017 		amdgpu_ring_clear_ring(ring);
7018 
7019 		mutex_lock(&adev->srbm_mutex);
7020 		nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
7021 		gfx_v10_0_kiq_init_register(ring);
7022 		nv_grbm_select(adev, 0, 0, 0, 0);
7023 		mutex_unlock(&adev->srbm_mutex);
7024 	} else {
7025 		memset((void *)mqd, 0, sizeof(*mqd));
7026 		mutex_lock(&adev->srbm_mutex);
7027 		nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
7028 		gfx_v10_0_compute_mqd_init(ring);
7029 		gfx_v10_0_kiq_init_register(ring);
7030 		nv_grbm_select(adev, 0, 0, 0, 0);
7031 		mutex_unlock(&adev->srbm_mutex);
7032 
7033 		if (adev->gfx.mec.mqd_backup[mqd_idx])
7034 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
7035 	}
7036 
7037 	return 0;
7038 }
7039 
7040 static int gfx_v10_0_kcq_init_queue(struct amdgpu_ring *ring)
7041 {
7042 	struct amdgpu_device *adev = ring->adev;
7043 	struct v10_compute_mqd *mqd = ring->mqd_ptr;
7044 	int mqd_idx = ring - &adev->gfx.compute_ring[0];
7045 
7046 	if (!amdgpu_in_reset(adev) && !adev->in_suspend) {
7047 		memset((void *)mqd, 0, sizeof(*mqd));
7048 		mutex_lock(&adev->srbm_mutex);
7049 		nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
7050 		gfx_v10_0_compute_mqd_init(ring);
7051 		nv_grbm_select(adev, 0, 0, 0, 0);
7052 		mutex_unlock(&adev->srbm_mutex);
7053 
7054 		if (adev->gfx.mec.mqd_backup[mqd_idx])
7055 			memcpy(adev->gfx.mec.mqd_backup[mqd_idx], mqd, sizeof(*mqd));
7056 	} else if (amdgpu_in_reset(adev)) { /* for GPU_RESET case */
7057 		/* reset MQD to a clean status */
7058 		if (adev->gfx.mec.mqd_backup[mqd_idx])
7059 			memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(*mqd));
7060 
7061 		/* reset ring buffer */
7062 		ring->wptr = 0;
7063 		atomic64_set((atomic64_t *)&adev->wb.wb[ring->wptr_offs], 0);
7064 		amdgpu_ring_clear_ring(ring);
7065 	} else {
7066 		amdgpu_ring_clear_ring(ring);
7067 	}
7068 
7069 	return 0;
7070 }
7071 
7072 static int gfx_v10_0_kiq_resume(struct amdgpu_device *adev)
7073 {
7074 	struct amdgpu_ring *ring;
7075 	int r;
7076 
7077 	ring = &adev->gfx.kiq.ring;
7078 
7079 	r = amdgpu_bo_reserve(ring->mqd_obj, false);
7080 	if (unlikely(r != 0))
7081 		return r;
7082 
7083 	r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
7084 	if (unlikely(r != 0))
7085 		return r;
7086 
7087 	gfx_v10_0_kiq_init_queue(ring);
7088 	amdgpu_bo_kunmap(ring->mqd_obj);
7089 	ring->mqd_ptr = NULL;
7090 	amdgpu_bo_unreserve(ring->mqd_obj);
7091 	ring->sched.ready = true;
7092 	return 0;
7093 }
7094 
7095 static int gfx_v10_0_kcq_resume(struct amdgpu_device *adev)
7096 {
7097 	struct amdgpu_ring *ring = NULL;
7098 	int r = 0, i;
7099 
7100 	gfx_v10_0_cp_compute_enable(adev, true);
7101 
7102 	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
7103 		ring = &adev->gfx.compute_ring[i];
7104 
7105 		r = amdgpu_bo_reserve(ring->mqd_obj, false);
7106 		if (unlikely(r != 0))
7107 			goto done;
7108 		r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
7109 		if (!r) {
7110 			r = gfx_v10_0_kcq_init_queue(ring);
7111 			amdgpu_bo_kunmap(ring->mqd_obj);
7112 			ring->mqd_ptr = NULL;
7113 		}
7114 		amdgpu_bo_unreserve(ring->mqd_obj);
7115 		if (r)
7116 			goto done;
7117 	}
7118 
7119 	r = amdgpu_gfx_enable_kcq(adev);
7120 done:
7121 	return r;
7122 }
7123 
7124 static int gfx_v10_0_cp_resume(struct amdgpu_device *adev)
7125 {
7126 	int r, i;
7127 	struct amdgpu_ring *ring;
7128 
7129 	if (!(adev->flags & AMD_IS_APU))
7130 		gfx_v10_0_enable_gui_idle_interrupt(adev, false);
7131 
7132 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
7133 		/* legacy firmware loading */
7134 		r = gfx_v10_0_cp_gfx_load_microcode(adev);
7135 		if (r)
7136 			return r;
7137 
7138 		r = gfx_v10_0_cp_compute_load_microcode(adev);
7139 		if (r)
7140 			return r;
7141 	}
7142 
7143 	r = gfx_v10_0_kiq_resume(adev);
7144 	if (r)
7145 		return r;
7146 
7147 	r = gfx_v10_0_kcq_resume(adev);
7148 	if (r)
7149 		return r;
7150 
7151 	if (!amdgpu_async_gfx_ring) {
7152 		r = gfx_v10_0_cp_gfx_resume(adev);
7153 		if (r)
7154 			return r;
7155 	} else {
7156 		r = gfx_v10_0_cp_async_gfx_ring_resume(adev);
7157 		if (r)
7158 			return r;
7159 	}
7160 
7161 	for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
7162 		ring = &adev->gfx.gfx_ring[i];
7163 		r = amdgpu_ring_test_helper(ring);
7164 		if (r)
7165 			return r;
7166 	}
7167 
7168 	for (i = 0; i < adev->gfx.num_compute_rings; i++) {
7169 		ring = &adev->gfx.compute_ring[i];
7170 		r = amdgpu_ring_test_helper(ring);
7171 		if (r)
7172 			return r;
7173 	}
7174 
7175 	return 0;
7176 }
7177 
7178 static void gfx_v10_0_cp_enable(struct amdgpu_device *adev, bool enable)
7179 {
7180 	gfx_v10_0_cp_gfx_enable(adev, enable);
7181 	gfx_v10_0_cp_compute_enable(adev, enable);
7182 }
7183 
7184 static bool gfx_v10_0_check_grbm_cam_remapping(struct amdgpu_device *adev)
7185 {
7186 	uint32_t data, pattern = 0xDEADBEEF;
7187 
7188 	/* check if mmVGT_ESGS_RING_SIZE_UMD
7189 	 * has been remapped to mmVGT_ESGS_RING_SIZE */
7190 	switch (adev->asic_type) {
7191 	case CHIP_SIENNA_CICHLID:
7192 	case CHIP_NAVY_FLOUNDER:
7193 	case CHIP_DIMGREY_CAVEFISH:
7194 	case CHIP_BEIGE_GOBY:
7195 		data = RREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_Sienna_Cichlid);
7196 		WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_Sienna_Cichlid, 0);
7197 		WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_UMD, pattern);
7198 
7199 		if (RREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_Sienna_Cichlid) == pattern) {
7200 			WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_UMD , data);
7201 			return true;
7202 		} else {
7203 			WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_Sienna_Cichlid, data);
7204 			return false;
7205 		}
7206 		break;
7207 	case CHIP_VANGOGH:
7208 	case CHIP_YELLOW_CARP:
7209 		return true;
7210 	default:
7211 		data = RREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE);
7212 		WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE, 0);
7213 		WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_UMD, pattern);
7214 
7215 		if (RREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE) == pattern) {
7216 			WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE_UMD, data);
7217 			return true;
7218 		} else {
7219 			WREG32_SOC15(GC, 0, mmVGT_ESGS_RING_SIZE, data);
7220 			return false;
7221 		}
7222 		break;
7223 	}
7224 }
7225 
7226 static void gfx_v10_0_setup_grbm_cam_remapping(struct amdgpu_device *adev)
7227 {
7228 	uint32_t data;
7229 
7230 	if (amdgpu_sriov_vf(adev))
7231 		return;
7232 
7233 	/* initialize cam_index to 0
7234 	 * index will auto-inc after each data writting */
7235 	WREG32_SOC15(GC, 0, mmGRBM_CAM_INDEX, 0);
7236 
7237 	switch (adev->asic_type) {
7238 	case CHIP_SIENNA_CICHLID:
7239 	case CHIP_NAVY_FLOUNDER:
7240 	case CHIP_VANGOGH:
7241 	case CHIP_DIMGREY_CAVEFISH:
7242 	case CHIP_BEIGE_GOBY:
7243 	case CHIP_YELLOW_CARP:
7244 		/* mmVGT_TF_RING_SIZE_UMD -> mmVGT_TF_RING_SIZE */
7245 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_RING_SIZE_UMD) <<
7246 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7247 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_RING_SIZE_Sienna_Cichlid) <<
7248 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7249 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7250 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7251 
7252 		/* mmVGT_TF_MEMORY_BASE_UMD -> mmVGT_TF_MEMORY_BASE */
7253 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_UMD) <<
7254 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7255 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_Sienna_Cichlid) <<
7256 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7257 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7258 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7259 
7260 		/* mmVGT_TF_MEMORY_BASE_HI_UMD -> mmVGT_TF_MEMORY_BASE_HI */
7261 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_HI_UMD) <<
7262 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7263 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_HI_Sienna_Cichlid) <<
7264 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7265 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7266 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7267 
7268 		/* mmVGT_HS_OFFCHIP_PARAM_UMD -> mmVGT_HS_OFFCHIP_PARAM */
7269 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_HS_OFFCHIP_PARAM_UMD) <<
7270 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7271 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_HS_OFFCHIP_PARAM_Sienna_Cichlid) <<
7272 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7273 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7274 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7275 
7276 		/* mmVGT_ESGS_RING_SIZE_UMD -> mmVGT_ESGS_RING_SIZE */
7277 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_ESGS_RING_SIZE_UMD) <<
7278 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7279 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_ESGS_RING_SIZE_Sienna_Cichlid) <<
7280 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7281 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7282 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7283 
7284 		/* mmVGT_GSVS_RING_SIZE_UMD -> mmVGT_GSVS_RING_SIZE */
7285 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_GSVS_RING_SIZE_UMD) <<
7286 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7287 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_GSVS_RING_SIZE_Sienna_Cichlid) <<
7288 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7289 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7290 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7291 
7292 		/* mmSPI_CONFIG_CNTL_REMAP -> mmSPI_CONFIG_CNTL */
7293 		data = (SOC15_REG_OFFSET(GC, 0, mmSPI_CONFIG_CNTL_REMAP) <<
7294 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7295 		       (SOC15_REG_OFFSET(GC, 0, mmSPI_CONFIG_CNTL_Sienna_Cichlid) <<
7296 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7297 		break;
7298 	default:
7299 		/* mmVGT_TF_RING_SIZE_UMD -> mmVGT_TF_RING_SIZE */
7300 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_RING_SIZE_UMD) <<
7301 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7302 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_RING_SIZE) <<
7303 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7304 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7305 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7306 
7307 		/* mmVGT_TF_MEMORY_BASE_UMD -> mmVGT_TF_MEMORY_BASE */
7308 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_UMD) <<
7309 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7310 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE) <<
7311 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7312 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7313 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7314 
7315 		/* mmVGT_TF_MEMORY_BASE_HI_UMD -> mmVGT_TF_MEMORY_BASE_HI */
7316 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_HI_UMD) <<
7317 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7318 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_TF_MEMORY_BASE_HI) <<
7319 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7320 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7321 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7322 
7323 		/* mmVGT_HS_OFFCHIP_PARAM_UMD -> mmVGT_HS_OFFCHIP_PARAM */
7324 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_HS_OFFCHIP_PARAM_UMD) <<
7325 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7326 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_HS_OFFCHIP_PARAM) <<
7327 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7328 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7329 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7330 
7331 		/* mmVGT_ESGS_RING_SIZE_UMD -> mmVGT_ESGS_RING_SIZE */
7332 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_ESGS_RING_SIZE_UMD) <<
7333 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7334 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_ESGS_RING_SIZE) <<
7335 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7336 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7337 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7338 
7339 		/* mmVGT_GSVS_RING_SIZE_UMD -> mmVGT_GSVS_RING_SIZE */
7340 		data = (SOC15_REG_OFFSET(GC, 0, mmVGT_GSVS_RING_SIZE_UMD) <<
7341 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7342 		       (SOC15_REG_OFFSET(GC, 0, mmVGT_GSVS_RING_SIZE) <<
7343 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7344 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7345 		WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7346 
7347 		/* mmSPI_CONFIG_CNTL_REMAP -> mmSPI_CONFIG_CNTL */
7348 		data = (SOC15_REG_OFFSET(GC, 0, mmSPI_CONFIG_CNTL_REMAP) <<
7349 			GRBM_CAM_DATA__CAM_ADDR__SHIFT) |
7350 		       (SOC15_REG_OFFSET(GC, 0, mmSPI_CONFIG_CNTL) <<
7351 			GRBM_CAM_DATA__CAM_REMAPADDR__SHIFT);
7352 		break;
7353 	}
7354 
7355 	WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA_UPPER, 0);
7356 	WREG32_SOC15(GC, 0, mmGRBM_CAM_DATA, data);
7357 }
7358 
7359 static void gfx_v10_0_disable_gpa_mode(struct amdgpu_device *adev)
7360 {
7361 	uint32_t data;
7362 	data = RREG32_SOC15(GC, 0, mmCPC_PSP_DEBUG);
7363 	data |= CPC_PSP_DEBUG__GPA_OVERRIDE_MASK;
7364 	WREG32_SOC15(GC, 0, mmCPC_PSP_DEBUG, data);
7365 
7366 	data = RREG32_SOC15(GC, 0, mmCPG_PSP_DEBUG);
7367 	data |= CPG_PSP_DEBUG__GPA_OVERRIDE_MASK;
7368 	WREG32_SOC15(GC, 0, mmCPG_PSP_DEBUG, data);
7369 }
7370 
7371 static int gfx_v10_0_hw_init(void *handle)
7372 {
7373 	int r;
7374 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7375 
7376 	if (!amdgpu_emu_mode)
7377 		gfx_v10_0_init_golden_registers(adev);
7378 
7379 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT) {
7380 		/**
7381 		 * For gfx 10, rlc firmware loading relies on smu firmware is
7382 		 * loaded firstly, so in direct type, it has to load smc ucode
7383 		 * here before rlc.
7384 		 */
7385 		if (!(adev->flags & AMD_IS_APU)) {
7386 			r = amdgpu_pm_load_smu_firmware(adev, NULL);
7387 			if (r)
7388 				return r;
7389 		}
7390 		gfx_v10_0_disable_gpa_mode(adev);
7391 	}
7392 
7393 	/* if GRBM CAM not remapped, set up the remapping */
7394 	if (!gfx_v10_0_check_grbm_cam_remapping(adev))
7395 		gfx_v10_0_setup_grbm_cam_remapping(adev);
7396 
7397 	gfx_v10_0_constants_init(adev);
7398 
7399 	r = gfx_v10_0_rlc_resume(adev);
7400 	if (r)
7401 		return r;
7402 
7403 	/*
7404 	 * init golden registers and rlc resume may override some registers,
7405 	 * reconfig them here
7406 	 */
7407 	gfx_v10_0_tcp_harvest(adev);
7408 
7409 	r = gfx_v10_0_cp_resume(adev);
7410 	if (r)
7411 		return r;
7412 
7413 	if (adev->asic_type == CHIP_SIENNA_CICHLID)
7414 		gfx_v10_3_program_pbb_mode(adev);
7415 
7416 	if (adev->asic_type >= CHIP_SIENNA_CICHLID)
7417 		gfx_v10_3_set_power_brake_sequence(adev);
7418 
7419 	return r;
7420 }
7421 
7422 #ifndef BRING_UP_DEBUG
7423 static int gfx_v10_0_kiq_disable_kgq(struct amdgpu_device *adev)
7424 {
7425 	struct amdgpu_kiq *kiq = &adev->gfx.kiq;
7426 	struct amdgpu_ring *kiq_ring = &kiq->ring;
7427 	int i;
7428 
7429 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
7430 		return -EINVAL;
7431 
7432 	if (amdgpu_ring_alloc(kiq_ring, kiq->pmf->unmap_queues_size *
7433 					adev->gfx.num_gfx_rings))
7434 		return -ENOMEM;
7435 
7436 	for (i = 0; i < adev->gfx.num_gfx_rings; i++)
7437 		kiq->pmf->kiq_unmap_queues(kiq_ring, &adev->gfx.gfx_ring[i],
7438 					   PREEMPT_QUEUES, 0, 0);
7439 
7440 	return amdgpu_ring_test_helper(kiq_ring);
7441 }
7442 #endif
7443 
7444 static int gfx_v10_0_hw_fini(void *handle)
7445 {
7446 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7447 	int r;
7448 	uint32_t tmp;
7449 
7450 	amdgpu_irq_put(adev, &adev->gfx.priv_reg_irq, 0);
7451 	amdgpu_irq_put(adev, &adev->gfx.priv_inst_irq, 0);
7452 
7453 	if (!adev->no_hw_access) {
7454 #ifndef BRING_UP_DEBUG
7455 		if (amdgpu_async_gfx_ring) {
7456 			r = gfx_v10_0_kiq_disable_kgq(adev);
7457 			if (r)
7458 				DRM_ERROR("KGQ disable failed\n");
7459 		}
7460 #endif
7461 		if (amdgpu_gfx_disable_kcq(adev))
7462 			DRM_ERROR("KCQ disable failed\n");
7463 	}
7464 
7465 	if (amdgpu_sriov_vf(adev)) {
7466 		gfx_v10_0_cp_gfx_enable(adev, false);
7467 		/* Program KIQ position of RLC_CP_SCHEDULERS during destroy */
7468 		if (adev->asic_type >= CHIP_SIENNA_CICHLID) {
7469 			tmp = RREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS_Sienna_Cichlid);
7470 			tmp &= 0xffffff00;
7471 			WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS_Sienna_Cichlid, tmp);
7472 		} else {
7473 			tmp = RREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS);
7474 			tmp &= 0xffffff00;
7475 			WREG32_SOC15(GC, 0, mmRLC_CP_SCHEDULERS, tmp);
7476 		}
7477 
7478 		return 0;
7479 	}
7480 	gfx_v10_0_cp_enable(adev, false);
7481 	gfx_v10_0_enable_gui_idle_interrupt(adev, false);
7482 
7483 	return 0;
7484 }
7485 
7486 static int gfx_v10_0_suspend(void *handle)
7487 {
7488 	return gfx_v10_0_hw_fini(handle);
7489 }
7490 
7491 static int gfx_v10_0_resume(void *handle)
7492 {
7493 	return gfx_v10_0_hw_init(handle);
7494 }
7495 
7496 static bool gfx_v10_0_is_idle(void *handle)
7497 {
7498 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7499 
7500 	if (REG_GET_FIELD(RREG32_SOC15(GC, 0, mmGRBM_STATUS),
7501 				GRBM_STATUS, GUI_ACTIVE))
7502 		return false;
7503 	else
7504 		return true;
7505 }
7506 
7507 static int gfx_v10_0_wait_for_idle(void *handle)
7508 {
7509 	unsigned i;
7510 	u32 tmp;
7511 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7512 
7513 	for (i = 0; i < adev->usec_timeout; i++) {
7514 		/* read MC_STATUS */
7515 		tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS) &
7516 			GRBM_STATUS__GUI_ACTIVE_MASK;
7517 
7518 		if (!REG_GET_FIELD(tmp, GRBM_STATUS, GUI_ACTIVE))
7519 			return 0;
7520 		udelay(1);
7521 	}
7522 	return -ETIMEDOUT;
7523 }
7524 
7525 static int gfx_v10_0_soft_reset(void *handle)
7526 {
7527 	u32 grbm_soft_reset = 0;
7528 	u32 tmp;
7529 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7530 
7531 	/* GRBM_STATUS */
7532 	tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS);
7533 	if (tmp & (GRBM_STATUS__PA_BUSY_MASK | GRBM_STATUS__SC_BUSY_MASK |
7534 		   GRBM_STATUS__BCI_BUSY_MASK | GRBM_STATUS__SX_BUSY_MASK |
7535 		   GRBM_STATUS__TA_BUSY_MASK | GRBM_STATUS__DB_BUSY_MASK |
7536 		   GRBM_STATUS__CB_BUSY_MASK | GRBM_STATUS__GDS_BUSY_MASK |
7537 		   GRBM_STATUS__SPI_BUSY_MASK | GRBM_STATUS__GE_BUSY_NO_DMA_MASK)) {
7538 		grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset,
7539 						GRBM_SOFT_RESET, SOFT_RESET_CP,
7540 						1);
7541 		grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset,
7542 						GRBM_SOFT_RESET, SOFT_RESET_GFX,
7543 						1);
7544 	}
7545 
7546 	if (tmp & (GRBM_STATUS__CP_BUSY_MASK | GRBM_STATUS__CP_COHERENCY_BUSY_MASK)) {
7547 		grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset,
7548 						GRBM_SOFT_RESET, SOFT_RESET_CP,
7549 						1);
7550 	}
7551 
7552 	/* GRBM_STATUS2 */
7553 	tmp = RREG32_SOC15(GC, 0, mmGRBM_STATUS2);
7554 	switch (adev->asic_type) {
7555 	case CHIP_SIENNA_CICHLID:
7556 	case CHIP_NAVY_FLOUNDER:
7557 	case CHIP_VANGOGH:
7558 	case CHIP_DIMGREY_CAVEFISH:
7559 	case CHIP_BEIGE_GOBY:
7560 	case CHIP_YELLOW_CARP:
7561 		if (REG_GET_FIELD(tmp, GRBM_STATUS2, RLC_BUSY_Sienna_Cichlid))
7562 			grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset,
7563 							GRBM_SOFT_RESET,
7564 							SOFT_RESET_RLC,
7565 							1);
7566 		break;
7567 	default:
7568 		if (REG_GET_FIELD(tmp, GRBM_STATUS2, RLC_BUSY))
7569 			grbm_soft_reset = REG_SET_FIELD(grbm_soft_reset,
7570 							GRBM_SOFT_RESET,
7571 							SOFT_RESET_RLC,
7572 							1);
7573 		break;
7574 	}
7575 
7576 	if (grbm_soft_reset) {
7577 		/* stop the rlc */
7578 		gfx_v10_0_rlc_stop(adev);
7579 
7580 		/* Disable GFX parsing/prefetching */
7581 		gfx_v10_0_cp_gfx_enable(adev, false);
7582 
7583 		/* Disable MEC parsing/prefetching */
7584 		gfx_v10_0_cp_compute_enable(adev, false);
7585 
7586 		if (grbm_soft_reset) {
7587 			tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
7588 			tmp |= grbm_soft_reset;
7589 			dev_info(adev->dev, "GRBM_SOFT_RESET=0x%08X\n", tmp);
7590 			WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
7591 			tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
7592 
7593 			udelay(50);
7594 
7595 			tmp &= ~grbm_soft_reset;
7596 			WREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET, tmp);
7597 			tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
7598 		}
7599 
7600 		/* Wait a little for things to settle down */
7601 		udelay(50);
7602 	}
7603 	return 0;
7604 }
7605 
7606 static uint64_t gfx_v10_0_get_gpu_clock_counter(struct amdgpu_device *adev)
7607 {
7608 	uint64_t clock;
7609 
7610 	amdgpu_gfx_off_ctrl(adev, false);
7611 	mutex_lock(&adev->gfx.gpu_clock_mutex);
7612 	switch (adev->asic_type) {
7613 	case CHIP_VANGOGH:
7614 	case CHIP_YELLOW_CARP:
7615 		clock = (uint64_t)RREG32_SOC15(SMUIO, 0, mmGOLDEN_TSC_COUNT_LOWER_Vangogh) |
7616 			((uint64_t)RREG32_SOC15(SMUIO, 0, mmGOLDEN_TSC_COUNT_UPPER_Vangogh) << 32ULL);
7617 		break;
7618 	default:
7619 		clock = (uint64_t)RREG32_SOC15(SMUIO, 0, mmGOLDEN_TSC_COUNT_LOWER) |
7620 			((uint64_t)RREG32_SOC15(SMUIO, 0, mmGOLDEN_TSC_COUNT_UPPER) << 32ULL);
7621 		break;
7622 	}
7623 	mutex_unlock(&adev->gfx.gpu_clock_mutex);
7624 	amdgpu_gfx_off_ctrl(adev, true);
7625 	return clock;
7626 }
7627 
7628 static void gfx_v10_0_ring_emit_gds_switch(struct amdgpu_ring *ring,
7629 					   uint32_t vmid,
7630 					   uint32_t gds_base, uint32_t gds_size,
7631 					   uint32_t gws_base, uint32_t gws_size,
7632 					   uint32_t oa_base, uint32_t oa_size)
7633 {
7634 	struct amdgpu_device *adev = ring->adev;
7635 
7636 	/* GDS Base */
7637 	gfx_v10_0_write_data_to_reg(ring, 0, false,
7638 				    SOC15_REG_OFFSET(GC, 0, mmGDS_VMID0_BASE) + 2 * vmid,
7639 				    gds_base);
7640 
7641 	/* GDS Size */
7642 	gfx_v10_0_write_data_to_reg(ring, 0, false,
7643 				    SOC15_REG_OFFSET(GC, 0, mmGDS_VMID0_SIZE) + 2 * vmid,
7644 				    gds_size);
7645 
7646 	/* GWS */
7647 	gfx_v10_0_write_data_to_reg(ring, 0, false,
7648 				    SOC15_REG_OFFSET(GC, 0, mmGDS_GWS_VMID0) + vmid,
7649 				    gws_size << GDS_GWS_VMID0__SIZE__SHIFT | gws_base);
7650 
7651 	/* OA */
7652 	gfx_v10_0_write_data_to_reg(ring, 0, false,
7653 				    SOC15_REG_OFFSET(GC, 0, mmGDS_OA_VMID0) + vmid,
7654 				    (1 << (oa_size + oa_base)) - (1 << oa_base));
7655 }
7656 
7657 static int gfx_v10_0_early_init(void *handle)
7658 {
7659 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7660 
7661 	switch (adev->asic_type) {
7662 	case CHIP_NAVI10:
7663 	case CHIP_NAVI14:
7664 	case CHIP_NAVI12:
7665 		adev->gfx.num_gfx_rings = GFX10_NUM_GFX_RINGS_NV1X;
7666 		break;
7667 	case CHIP_SIENNA_CICHLID:
7668 	case CHIP_NAVY_FLOUNDER:
7669 	case CHIP_VANGOGH:
7670 	case CHIP_DIMGREY_CAVEFISH:
7671 	case CHIP_BEIGE_GOBY:
7672 	case CHIP_YELLOW_CARP:
7673 		adev->gfx.num_gfx_rings = GFX10_NUM_GFX_RINGS_Sienna_Cichlid;
7674 		break;
7675 	default:
7676 		break;
7677 	}
7678 
7679 	adev->gfx.num_compute_rings = min(amdgpu_gfx_get_num_kcq(adev),
7680 					  AMDGPU_MAX_COMPUTE_RINGS);
7681 
7682 	gfx_v10_0_set_kiq_pm4_funcs(adev);
7683 	gfx_v10_0_set_ring_funcs(adev);
7684 	gfx_v10_0_set_irq_funcs(adev);
7685 	gfx_v10_0_set_gds_init(adev);
7686 	gfx_v10_0_set_rlc_funcs(adev);
7687 
7688 	return 0;
7689 }
7690 
7691 static int gfx_v10_0_late_init(void *handle)
7692 {
7693 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
7694 	int r;
7695 
7696 	r = amdgpu_irq_get(adev, &adev->gfx.priv_reg_irq, 0);
7697 	if (r)
7698 		return r;
7699 
7700 	r = amdgpu_irq_get(adev, &adev->gfx.priv_inst_irq, 0);
7701 	if (r)
7702 		return r;
7703 
7704 	return 0;
7705 }
7706 
7707 static bool gfx_v10_0_is_rlc_enabled(struct amdgpu_device *adev)
7708 {
7709 	uint32_t rlc_cntl;
7710 
7711 	/* if RLC is not enabled, do nothing */
7712 	rlc_cntl = RREG32_SOC15(GC, 0, mmRLC_CNTL);
7713 	return (REG_GET_FIELD(rlc_cntl, RLC_CNTL, RLC_ENABLE_F32)) ? true : false;
7714 }
7715 
7716 static void gfx_v10_0_set_safe_mode(struct amdgpu_device *adev)
7717 {
7718 	uint32_t data;
7719 	unsigned i;
7720 
7721 	data = RLC_SAFE_MODE__CMD_MASK;
7722 	data |= (1 << RLC_SAFE_MODE__MESSAGE__SHIFT);
7723 
7724 	switch (adev->asic_type) {
7725 	case CHIP_SIENNA_CICHLID:
7726 	case CHIP_NAVY_FLOUNDER:
7727 	case CHIP_VANGOGH:
7728 	case CHIP_DIMGREY_CAVEFISH:
7729 	case CHIP_BEIGE_GOBY:
7730 	case CHIP_YELLOW_CARP:
7731 		WREG32_SOC15(GC, 0, mmRLC_SAFE_MODE_Sienna_Cichlid, data);
7732 
7733 		/* wait for RLC_SAFE_MODE */
7734 		for (i = 0; i < adev->usec_timeout; i++) {
7735 			if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE_Sienna_Cichlid),
7736 					   RLC_SAFE_MODE, CMD))
7737 				break;
7738 			udelay(1);
7739 		}
7740 		break;
7741 	default:
7742 		WREG32_SOC15(GC, 0, mmRLC_SAFE_MODE, data);
7743 
7744 		/* wait for RLC_SAFE_MODE */
7745 		for (i = 0; i < adev->usec_timeout; i++) {
7746 			if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE),
7747 					   RLC_SAFE_MODE, CMD))
7748 				break;
7749 			udelay(1);
7750 		}
7751 		break;
7752 	}
7753 }
7754 
7755 static void gfx_v10_0_unset_safe_mode(struct amdgpu_device *adev)
7756 {
7757 	uint32_t data;
7758 
7759 	data = RLC_SAFE_MODE__CMD_MASK;
7760 	switch (adev->asic_type) {
7761 	case CHIP_SIENNA_CICHLID:
7762 	case CHIP_NAVY_FLOUNDER:
7763 	case CHIP_VANGOGH:
7764 	case CHIP_DIMGREY_CAVEFISH:
7765 	case CHIP_BEIGE_GOBY:
7766 	case CHIP_YELLOW_CARP:
7767 		WREG32_SOC15(GC, 0, mmRLC_SAFE_MODE_Sienna_Cichlid, data);
7768 		break;
7769 	default:
7770 		WREG32_SOC15(GC, 0, mmRLC_SAFE_MODE, data);
7771 		break;
7772 	}
7773 }
7774 
7775 static void gfx_v10_0_update_medium_grain_clock_gating(struct amdgpu_device *adev,
7776 						      bool enable)
7777 {
7778 	uint32_t data, def;
7779 
7780 	/* It is disabled by HW by default */
7781 	if (enable && (adev->cg_flags & AMD_CG_SUPPORT_GFX_MGCG)) {
7782 		/* 0 - Disable some blocks' MGCG */
7783 		WREG32_SOC15(GC, 0, mmGRBM_GFX_INDEX, 0xe0000000);
7784 		WREG32_SOC15(GC, 0, mmCGTT_WD_CLK_CTRL, 0xff000000);
7785 		WREG32_SOC15(GC, 0, mmCGTT_VGT_CLK_CTRL, 0xff000000);
7786 		WREG32_SOC15(GC, 0, mmCGTT_IA_CLK_CTRL, 0xff000000);
7787 
7788 		/* 1 - RLC_CGTT_MGCG_OVERRIDE */
7789 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7790 		data &= ~(RLC_CGTT_MGCG_OVERRIDE__GRBM_CGTT_SCLK_OVERRIDE_MASK |
7791 			  RLC_CGTT_MGCG_OVERRIDE__RLC_CGTT_SCLK_OVERRIDE_MASK |
7792 			  RLC_CGTT_MGCG_OVERRIDE__GFXIP_MGCG_OVERRIDE_MASK |
7793 			  RLC_CGTT_MGCG_OVERRIDE__GFXIP_MGLS_OVERRIDE_MASK |
7794 			  RLC_CGTT_MGCG_OVERRIDE__ENABLE_CGTS_LEGACY_MASK);
7795 
7796 		if (def != data)
7797 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7798 
7799 		/* MGLS is a global flag to control all MGLS in GFX */
7800 		if (adev->cg_flags & AMD_CG_SUPPORT_GFX_MGLS) {
7801 			/* 2 - RLC memory Light sleep */
7802 			if (adev->cg_flags & AMD_CG_SUPPORT_GFX_RLC_LS) {
7803 				def = data = RREG32_SOC15(GC, 0, mmRLC_MEM_SLP_CNTL);
7804 				data |= RLC_MEM_SLP_CNTL__RLC_MEM_LS_EN_MASK;
7805 				if (def != data)
7806 					WREG32_SOC15(GC, 0, mmRLC_MEM_SLP_CNTL, data);
7807 			}
7808 			/* 3 - CP memory Light sleep */
7809 			if (adev->cg_flags & AMD_CG_SUPPORT_GFX_CP_LS) {
7810 				def = data = RREG32_SOC15(GC, 0, mmCP_MEM_SLP_CNTL);
7811 				data |= CP_MEM_SLP_CNTL__CP_MEM_LS_EN_MASK;
7812 				if (def != data)
7813 					WREG32_SOC15(GC, 0, mmCP_MEM_SLP_CNTL, data);
7814 			}
7815 		}
7816 	} else {
7817 		/* 1 - MGCG_OVERRIDE */
7818 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7819 		data |= (RLC_CGTT_MGCG_OVERRIDE__RLC_CGTT_SCLK_OVERRIDE_MASK |
7820 			 RLC_CGTT_MGCG_OVERRIDE__GRBM_CGTT_SCLK_OVERRIDE_MASK |
7821 			 RLC_CGTT_MGCG_OVERRIDE__GFXIP_MGCG_OVERRIDE_MASK |
7822 			 RLC_CGTT_MGCG_OVERRIDE__GFXIP_MGLS_OVERRIDE_MASK);
7823 		if (def != data)
7824 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7825 
7826 		/* 2 - disable MGLS in CP */
7827 		data = RREG32_SOC15(GC, 0, mmCP_MEM_SLP_CNTL);
7828 		if (data & CP_MEM_SLP_CNTL__CP_MEM_LS_EN_MASK) {
7829 			data &= ~CP_MEM_SLP_CNTL__CP_MEM_LS_EN_MASK;
7830 			WREG32_SOC15(GC, 0, mmCP_MEM_SLP_CNTL, data);
7831 		}
7832 
7833 		/* 3 - disable MGLS in RLC */
7834 		data = RREG32_SOC15(GC, 0, mmRLC_MEM_SLP_CNTL);
7835 		if (data & RLC_MEM_SLP_CNTL__RLC_MEM_LS_EN_MASK) {
7836 			data &= ~RLC_MEM_SLP_CNTL__RLC_MEM_LS_EN_MASK;
7837 			WREG32_SOC15(GC, 0, mmRLC_MEM_SLP_CNTL, data);
7838 		}
7839 
7840 	}
7841 }
7842 
7843 static void gfx_v10_0_update_3d_clock_gating(struct amdgpu_device *adev,
7844 					   bool enable)
7845 {
7846 	uint32_t data, def;
7847 
7848 	/* Enable 3D CGCG/CGLS */
7849 	if (enable && (adev->cg_flags & AMD_CG_SUPPORT_GFX_3D_CGCG)) {
7850 		/* write cmd to clear cgcg/cgls ov */
7851 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7852 		/* unset CGCG override */
7853 		data &= ~RLC_CGTT_MGCG_OVERRIDE__GFXIP_GFX3D_CG_OVERRIDE_MASK;
7854 		/* update CGCG and CGLS override bits */
7855 		if (def != data)
7856 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7857 		/* enable 3Dcgcg FSM(0x0000363f) */
7858 		def = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D);
7859 		data = (0x36 << RLC_CGCG_CGLS_CTRL_3D__CGCG_GFX_IDLE_THRESHOLD__SHIFT) |
7860 			RLC_CGCG_CGLS_CTRL_3D__CGCG_EN_MASK;
7861 		if (adev->cg_flags & AMD_CG_SUPPORT_GFX_3D_CGLS)
7862 			data |= (0x000F << RLC_CGCG_CGLS_CTRL_3D__CGLS_REP_COMPANSAT_DELAY__SHIFT) |
7863 				RLC_CGCG_CGLS_CTRL_3D__CGLS_EN_MASK;
7864 		if (def != data)
7865 			WREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D, data);
7866 
7867 		/* set IDLE_POLL_COUNT(0x00900100) */
7868 		def = RREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_CNTL);
7869 		data = (0x0100 << CP_RB_WPTR_POLL_CNTL__POLL_FREQUENCY__SHIFT) |
7870 			(0x0090 << CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT);
7871 		if (def != data)
7872 			WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_CNTL, data);
7873 	} else {
7874 		/* Disable CGCG/CGLS */
7875 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D);
7876 		/* disable cgcg, cgls should be disabled */
7877 		data &= ~(RLC_CGCG_CGLS_CTRL_3D__CGCG_EN_MASK |
7878 			  RLC_CGCG_CGLS_CTRL_3D__CGLS_EN_MASK);
7879 		/* disable cgcg and cgls in FSM */
7880 		if (def != data)
7881 			WREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D, data);
7882 	}
7883 }
7884 
7885 static void gfx_v10_0_update_coarse_grain_clock_gating(struct amdgpu_device *adev,
7886 						      bool enable)
7887 {
7888 	uint32_t def, data;
7889 
7890 	if (enable && (adev->cg_flags & AMD_CG_SUPPORT_GFX_CGCG)) {
7891 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7892 		/* unset CGCG override */
7893 		data &= ~RLC_CGTT_MGCG_OVERRIDE__GFXIP_CGCG_OVERRIDE_MASK;
7894 		if (adev->cg_flags & AMD_CG_SUPPORT_GFX_CGLS)
7895 			data &= ~RLC_CGTT_MGCG_OVERRIDE__GFXIP_CGLS_OVERRIDE_MASK;
7896 		else
7897 			data |= RLC_CGTT_MGCG_OVERRIDE__GFXIP_CGLS_OVERRIDE_MASK;
7898 		/* update CGCG and CGLS override bits */
7899 		if (def != data)
7900 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7901 
7902 		/* enable cgcg FSM(0x0000363F) */
7903 		def = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL);
7904 		data = (0x36 << RLC_CGCG_CGLS_CTRL__CGCG_GFX_IDLE_THRESHOLD__SHIFT) |
7905 			RLC_CGCG_CGLS_CTRL__CGCG_EN_MASK;
7906 		if (adev->cg_flags & AMD_CG_SUPPORT_GFX_CGLS)
7907 			data |= (0x000F << RLC_CGCG_CGLS_CTRL__CGLS_REP_COMPANSAT_DELAY__SHIFT) |
7908 				RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK;
7909 		if (def != data)
7910 			WREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL, data);
7911 
7912 		/* set IDLE_POLL_COUNT(0x00900100) */
7913 		def = RREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_CNTL);
7914 		data = (0x0100 << CP_RB_WPTR_POLL_CNTL__POLL_FREQUENCY__SHIFT) |
7915 			(0x0090 << CP_RB_WPTR_POLL_CNTL__IDLE_POLL_COUNT__SHIFT);
7916 		if (def != data)
7917 			WREG32_SOC15(GC, 0, mmCP_RB_WPTR_POLL_CNTL, data);
7918 	} else {
7919 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL);
7920 		/* reset CGCG/CGLS bits */
7921 		data &= ~(RLC_CGCG_CGLS_CTRL__CGCG_EN_MASK | RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK);
7922 		/* disable cgcg and cgls in FSM */
7923 		if (def != data)
7924 			WREG32_SOC15(GC, 0, mmRLC_CGCG_CGLS_CTRL, data);
7925 	}
7926 }
7927 
7928 static void gfx_v10_0_update_fine_grain_clock_gating(struct amdgpu_device *adev,
7929 						      bool enable)
7930 {
7931 	uint32_t def, data;
7932 
7933 	if (enable && (adev->cg_flags & AMD_CG_SUPPORT_GFX_FGCG)) {
7934 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7935 		/* unset FGCG override */
7936 		data &= ~RLC_CGTT_MGCG_OVERRIDE__GFXIP_FGCG_OVERRIDE_MASK;
7937 		/* update FGCG override bits */
7938 		if (def != data)
7939 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7940 
7941 		def = data = RREG32_SOC15(GC, 0, mmRLC_CLK_CNTL);
7942 		/* unset RLC SRAM CLK GATER override */
7943 		data &= ~RLC_CLK_CNTL__RLC_SRAM_CLK_GATER_OVERRIDE_MASK;
7944 		/* update RLC SRAM CLK GATER override bits */
7945 		if (def != data)
7946 			WREG32_SOC15(GC, 0, mmRLC_CLK_CNTL, data);
7947 	} else {
7948 		def = data = RREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE);
7949 		/* reset FGCG bits */
7950 		data |= RLC_CGTT_MGCG_OVERRIDE__GFXIP_FGCG_OVERRIDE_MASK;
7951 		/* disable FGCG*/
7952 		if (def != data)
7953 			WREG32_SOC15(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE, data);
7954 
7955 		def = data = RREG32_SOC15(GC, 0, mmRLC_CLK_CNTL);
7956 		/* reset RLC SRAM CLK GATER bits */
7957 		data |= RLC_CLK_CNTL__RLC_SRAM_CLK_GATER_OVERRIDE_MASK;
7958 		/* disable RLC SRAM CLK*/
7959 		if (def != data)
7960 			WREG32_SOC15(GC, 0, mmRLC_CLK_CNTL, data);
7961 	}
7962 }
7963 
7964 static int gfx_v10_0_update_gfx_clock_gating(struct amdgpu_device *adev,
7965 					    bool enable)
7966 {
7967 	amdgpu_gfx_rlc_enter_safe_mode(adev);
7968 
7969 	if (enable) {
7970 		/* enable FGCG firstly*/
7971 		gfx_v10_0_update_fine_grain_clock_gating(adev, enable);
7972 		/* CGCG/CGLS should be enabled after MGCG/MGLS
7973 		 * ===  MGCG + MGLS ===
7974 		 */
7975 		gfx_v10_0_update_medium_grain_clock_gating(adev, enable);
7976 		/* ===  CGCG /CGLS for GFX 3D Only === */
7977 		gfx_v10_0_update_3d_clock_gating(adev, enable);
7978 		/* ===  CGCG + CGLS === */
7979 		gfx_v10_0_update_coarse_grain_clock_gating(adev, enable);
7980 	} else {
7981 		/* CGCG/CGLS should be disabled before MGCG/MGLS
7982 		 * ===  CGCG + CGLS ===
7983 		 */
7984 		gfx_v10_0_update_coarse_grain_clock_gating(adev, enable);
7985 		/* ===  CGCG /CGLS for GFX 3D Only === */
7986 		gfx_v10_0_update_3d_clock_gating(adev, enable);
7987 		/* ===  MGCG + MGLS === */
7988 		gfx_v10_0_update_medium_grain_clock_gating(adev, enable);
7989 		/* disable fgcg at last*/
7990 		gfx_v10_0_update_fine_grain_clock_gating(adev, enable);
7991 	}
7992 
7993 	if (adev->cg_flags &
7994 	    (AMD_CG_SUPPORT_GFX_MGCG |
7995 	     AMD_CG_SUPPORT_GFX_CGLS |
7996 	     AMD_CG_SUPPORT_GFX_CGCG |
7997 	     AMD_CG_SUPPORT_GFX_3D_CGCG |
7998 	     AMD_CG_SUPPORT_GFX_3D_CGLS))
7999 		gfx_v10_0_enable_gui_idle_interrupt(adev, enable);
8000 
8001 	amdgpu_gfx_rlc_exit_safe_mode(adev);
8002 
8003 	return 0;
8004 }
8005 
8006 static void gfx_v10_0_update_spm_vmid(struct amdgpu_device *adev, unsigned vmid)
8007 {
8008 	u32 reg, data;
8009 	/* not for *_SOC15 */
8010 	reg = SOC15_REG_OFFSET(GC, 0, mmRLC_SPM_MC_CNTL);
8011 	if (amdgpu_sriov_is_pp_one_vf(adev))
8012 		data = RREG32_NO_KIQ(reg);
8013 	else
8014 		data = RREG32_SOC15(GC, 0, mmRLC_SPM_MC_CNTL);
8015 
8016 	data &= ~RLC_SPM_MC_CNTL__RLC_SPM_VMID_MASK;
8017 	data |= (vmid & RLC_SPM_MC_CNTL__RLC_SPM_VMID_MASK) << RLC_SPM_MC_CNTL__RLC_SPM_VMID__SHIFT;
8018 
8019 	if (amdgpu_sriov_is_pp_one_vf(adev))
8020 		WREG32_SOC15_NO_KIQ(GC, 0, mmRLC_SPM_MC_CNTL, data);
8021 	else
8022 		WREG32_SOC15(GC, 0, mmRLC_SPM_MC_CNTL, data);
8023 }
8024 
8025 static bool gfx_v10_0_check_rlcg_range(struct amdgpu_device *adev,
8026 					uint32_t offset,
8027 					struct soc15_reg_rlcg *entries, int arr_size)
8028 {
8029 	int i;
8030 	uint32_t reg;
8031 
8032 	if (!entries)
8033 		return false;
8034 
8035 	for (i = 0; i < arr_size; i++) {
8036 		const struct soc15_reg_rlcg *entry;
8037 
8038 		entry = &entries[i];
8039 		reg = adev->reg_offset[entry->hwip][entry->instance][entry->segment] + entry->reg;
8040 		if (offset == reg)
8041 			return true;
8042 	}
8043 
8044 	return false;
8045 }
8046 
8047 static bool gfx_v10_0_is_rlcg_access_range(struct amdgpu_device *adev, u32 offset)
8048 {
8049 	return gfx_v10_0_check_rlcg_range(adev, offset, NULL, 0);
8050 }
8051 
8052 static void gfx_v10_cntl_power_gating(struct amdgpu_device *adev, bool enable)
8053 {
8054 	u32 data = RREG32_SOC15(GC, 0, mmRLC_PG_CNTL);
8055 
8056 	if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG))
8057 		data |= RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK;
8058 	else
8059 		data &= ~RLC_PG_CNTL__GFX_POWER_GATING_ENABLE_MASK;
8060 
8061 	WREG32_SOC15(GC, 0, mmRLC_PG_CNTL, data);
8062 
8063 	/*
8064 	 * CGPG enablement required and the register to program the hysteresis value
8065 	 * RLC_PG_DELAY_3.CGCG_ACTIVE_BEFORE_CGPG to the desired CGPG hysteresis value
8066 	 * in refclk count. Note that RLC FW is modified to take 16 bits from
8067 	 * RLC_PG_DELAY_3[15:0] as the hysteresis instead of just 8 bits.
8068 	 *
8069 	 * The recommendation from RLC team is setting RLC_PG_DELAY_3 to 200us as part)
8070 	 * of CGPG enablement starting point.
8071 	 * Power/performance team will optimize it and might give a new value later.
8072 	 */
8073 	if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
8074 		switch (adev->asic_type) {
8075 		case CHIP_VANGOGH:
8076 			data = 0x4E20 & RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK_Vangogh;
8077 			WREG32_SOC15(GC, 0, mmRLC_PG_DELAY_3, data);
8078 			break;
8079 		case CHIP_YELLOW_CARP:
8080 			data = 0x1388 & RLC_PG_DELAY_3__CGCG_ACTIVE_BEFORE_CGPG_MASK_Vangogh;
8081 			WREG32_SOC15(GC, 0, mmRLC_PG_DELAY_3, data);
8082 			break;
8083 		default:
8084 			break;
8085 		}
8086 	}
8087 }
8088 
8089 static void gfx_v10_cntl_pg(struct amdgpu_device *adev, bool enable)
8090 {
8091 	amdgpu_gfx_rlc_enter_safe_mode(adev);
8092 
8093 	gfx_v10_cntl_power_gating(adev, enable);
8094 
8095 	amdgpu_gfx_rlc_exit_safe_mode(adev);
8096 }
8097 
8098 static const struct amdgpu_rlc_funcs gfx_v10_0_rlc_funcs = {
8099 	.is_rlc_enabled = gfx_v10_0_is_rlc_enabled,
8100 	.set_safe_mode = gfx_v10_0_set_safe_mode,
8101 	.unset_safe_mode = gfx_v10_0_unset_safe_mode,
8102 	.init = gfx_v10_0_rlc_init,
8103 	.get_csb_size = gfx_v10_0_get_csb_size,
8104 	.get_csb_buffer = gfx_v10_0_get_csb_buffer,
8105 	.resume = gfx_v10_0_rlc_resume,
8106 	.stop = gfx_v10_0_rlc_stop,
8107 	.reset = gfx_v10_0_rlc_reset,
8108 	.start = gfx_v10_0_rlc_start,
8109 	.update_spm_vmid = gfx_v10_0_update_spm_vmid,
8110 };
8111 
8112 static const struct amdgpu_rlc_funcs gfx_v10_0_rlc_funcs_sriov = {
8113 	.is_rlc_enabled = gfx_v10_0_is_rlc_enabled,
8114 	.set_safe_mode = gfx_v10_0_set_safe_mode,
8115 	.unset_safe_mode = gfx_v10_0_unset_safe_mode,
8116 	.init = gfx_v10_0_rlc_init,
8117 	.get_csb_size = gfx_v10_0_get_csb_size,
8118 	.get_csb_buffer = gfx_v10_0_get_csb_buffer,
8119 	.resume = gfx_v10_0_rlc_resume,
8120 	.stop = gfx_v10_0_rlc_stop,
8121 	.reset = gfx_v10_0_rlc_reset,
8122 	.start = gfx_v10_0_rlc_start,
8123 	.update_spm_vmid = gfx_v10_0_update_spm_vmid,
8124 	.rlcg_wreg = gfx_v10_rlcg_wreg,
8125 	.rlcg_rreg = gfx_v10_rlcg_rreg,
8126 	.is_rlcg_access_range = gfx_v10_0_is_rlcg_access_range,
8127 };
8128 
8129 static int gfx_v10_0_set_powergating_state(void *handle,
8130 					  enum amd_powergating_state state)
8131 {
8132 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
8133 	bool enable = (state == AMD_PG_STATE_GATE);
8134 
8135 	if (amdgpu_sriov_vf(adev))
8136 		return 0;
8137 
8138 	switch (adev->asic_type) {
8139 	case CHIP_NAVI10:
8140 	case CHIP_NAVI14:
8141 	case CHIP_NAVI12:
8142 	case CHIP_SIENNA_CICHLID:
8143 	case CHIP_NAVY_FLOUNDER:
8144 	case CHIP_DIMGREY_CAVEFISH:
8145 	case CHIP_BEIGE_GOBY:
8146 		amdgpu_gfx_off_ctrl(adev, enable);
8147 		break;
8148 	case CHIP_VANGOGH:
8149 	case CHIP_YELLOW_CARP:
8150 		gfx_v10_cntl_pg(adev, enable);
8151 		amdgpu_gfx_off_ctrl(adev, enable);
8152 		break;
8153 	default:
8154 		break;
8155 	}
8156 	return 0;
8157 }
8158 
8159 static int gfx_v10_0_set_clockgating_state(void *handle,
8160 					  enum amd_clockgating_state state)
8161 {
8162 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
8163 
8164 	if (amdgpu_sriov_vf(adev))
8165 		return 0;
8166 
8167 	switch (adev->asic_type) {
8168 	case CHIP_NAVI10:
8169 	case CHIP_NAVI14:
8170 	case CHIP_NAVI12:
8171 	case CHIP_SIENNA_CICHLID:
8172 	case CHIP_NAVY_FLOUNDER:
8173 	case CHIP_VANGOGH:
8174 	case CHIP_DIMGREY_CAVEFISH:
8175 	case CHIP_BEIGE_GOBY:
8176 	case CHIP_YELLOW_CARP:
8177 		gfx_v10_0_update_gfx_clock_gating(adev,
8178 						 state == AMD_CG_STATE_GATE);
8179 		break;
8180 	default:
8181 		break;
8182 	}
8183 	return 0;
8184 }
8185 
8186 static void gfx_v10_0_get_clockgating_state(void *handle, u32 *flags)
8187 {
8188 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
8189 	int data;
8190 
8191 	/* AMD_CG_SUPPORT_GFX_FGCG */
8192 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE));
8193 	if (!(data & RLC_CGTT_MGCG_OVERRIDE__GFXIP_FGCG_OVERRIDE_MASK))
8194 		*flags |= AMD_CG_SUPPORT_GFX_FGCG;
8195 
8196 	/* AMD_CG_SUPPORT_GFX_MGCG */
8197 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmRLC_CGTT_MGCG_OVERRIDE));
8198 	if (!(data & RLC_CGTT_MGCG_OVERRIDE__GFXIP_MGCG_OVERRIDE_MASK))
8199 		*flags |= AMD_CG_SUPPORT_GFX_MGCG;
8200 
8201 	/* AMD_CG_SUPPORT_GFX_CGCG */
8202 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmRLC_CGCG_CGLS_CTRL));
8203 	if (data & RLC_CGCG_CGLS_CTRL__CGCG_EN_MASK)
8204 		*flags |= AMD_CG_SUPPORT_GFX_CGCG;
8205 
8206 	/* AMD_CG_SUPPORT_GFX_CGLS */
8207 	if (data & RLC_CGCG_CGLS_CTRL__CGLS_EN_MASK)
8208 		*flags |= AMD_CG_SUPPORT_GFX_CGLS;
8209 
8210 	/* AMD_CG_SUPPORT_GFX_RLC_LS */
8211 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmRLC_MEM_SLP_CNTL));
8212 	if (data & RLC_MEM_SLP_CNTL__RLC_MEM_LS_EN_MASK)
8213 		*flags |= AMD_CG_SUPPORT_GFX_RLC_LS | AMD_CG_SUPPORT_GFX_MGLS;
8214 
8215 	/* AMD_CG_SUPPORT_GFX_CP_LS */
8216 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmCP_MEM_SLP_CNTL));
8217 	if (data & CP_MEM_SLP_CNTL__CP_MEM_LS_EN_MASK)
8218 		*flags |= AMD_CG_SUPPORT_GFX_CP_LS | AMD_CG_SUPPORT_GFX_MGLS;
8219 
8220 	/* AMD_CG_SUPPORT_GFX_3D_CGCG */
8221 	data = RREG32_KIQ(SOC15_REG_OFFSET(GC, 0, mmRLC_CGCG_CGLS_CTRL_3D));
8222 	if (data & RLC_CGCG_CGLS_CTRL_3D__CGCG_EN_MASK)
8223 		*flags |= AMD_CG_SUPPORT_GFX_3D_CGCG;
8224 
8225 	/* AMD_CG_SUPPORT_GFX_3D_CGLS */
8226 	if (data & RLC_CGCG_CGLS_CTRL_3D__CGLS_EN_MASK)
8227 		*flags |= AMD_CG_SUPPORT_GFX_3D_CGLS;
8228 }
8229 
8230 static u64 gfx_v10_0_ring_get_rptr_gfx(struct amdgpu_ring *ring)
8231 {
8232 	return ring->adev->wb.wb[ring->rptr_offs]; /* gfx10 is 32bit rptr*/
8233 }
8234 
8235 static u64 gfx_v10_0_ring_get_wptr_gfx(struct amdgpu_ring *ring)
8236 {
8237 	struct amdgpu_device *adev = ring->adev;
8238 	u64 wptr;
8239 
8240 	/* XXX check if swapping is necessary on BE */
8241 	if (ring->use_doorbell) {
8242 		wptr = atomic64_read((atomic64_t *)&adev->wb.wb[ring->wptr_offs]);
8243 	} else {
8244 		wptr = RREG32_SOC15(GC, 0, mmCP_RB0_WPTR);
8245 		wptr += (u64)RREG32_SOC15(GC, 0, mmCP_RB0_WPTR_HI) << 32;
8246 	}
8247 
8248 	return wptr;
8249 }
8250 
8251 static void gfx_v10_0_ring_set_wptr_gfx(struct amdgpu_ring *ring)
8252 {
8253 	struct amdgpu_device *adev = ring->adev;
8254 
8255 	if (ring->use_doorbell) {
8256 		/* XXX check if swapping is necessary on BE */
8257 		atomic64_set((atomic64_t *)&adev->wb.wb[ring->wptr_offs], ring->wptr);
8258 		WDOORBELL64(ring->doorbell_index, ring->wptr);
8259 	} else {
8260 		WREG32_SOC15(GC, 0, mmCP_RB0_WPTR, lower_32_bits(ring->wptr));
8261 		WREG32_SOC15(GC, 0, mmCP_RB0_WPTR_HI, upper_32_bits(ring->wptr));
8262 	}
8263 }
8264 
8265 static u64 gfx_v10_0_ring_get_rptr_compute(struct amdgpu_ring *ring)
8266 {
8267 	return ring->adev->wb.wb[ring->rptr_offs]; /* gfx10 hardware is 32bit rptr */
8268 }
8269 
8270 static u64 gfx_v10_0_ring_get_wptr_compute(struct amdgpu_ring *ring)
8271 {
8272 	u64 wptr;
8273 
8274 	/* XXX check if swapping is necessary on BE */
8275 	if (ring->use_doorbell)
8276 		wptr = atomic64_read((atomic64_t *)&ring->adev->wb.wb[ring->wptr_offs]);
8277 	else
8278 		BUG();
8279 	return wptr;
8280 }
8281 
8282 static void gfx_v10_0_ring_set_wptr_compute(struct amdgpu_ring *ring)
8283 {
8284 	struct amdgpu_device *adev = ring->adev;
8285 
8286 	/* XXX check if swapping is necessary on BE */
8287 	if (ring->use_doorbell) {
8288 		atomic64_set((atomic64_t *)&adev->wb.wb[ring->wptr_offs], ring->wptr);
8289 		WDOORBELL64(ring->doorbell_index, ring->wptr);
8290 	} else {
8291 		BUG(); /* only DOORBELL method supported on gfx10 now */
8292 	}
8293 }
8294 
8295 static void gfx_v10_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)
8296 {
8297 	struct amdgpu_device *adev = ring->adev;
8298 	u32 ref_and_mask, reg_mem_engine;
8299 	const struct nbio_hdp_flush_reg *nbio_hf_reg = adev->nbio.hdp_flush_reg;
8300 
8301 	if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) {
8302 		switch (ring->me) {
8303 		case 1:
8304 			ref_and_mask = nbio_hf_reg->ref_and_mask_cp2 << ring->pipe;
8305 			break;
8306 		case 2:
8307 			ref_and_mask = nbio_hf_reg->ref_and_mask_cp6 << ring->pipe;
8308 			break;
8309 		default:
8310 			return;
8311 		}
8312 		reg_mem_engine = 0;
8313 	} else {
8314 		ref_and_mask = nbio_hf_reg->ref_and_mask_cp0;
8315 		reg_mem_engine = 1; /* pfp */
8316 	}
8317 
8318 	gfx_v10_0_wait_reg_mem(ring, reg_mem_engine, 0, 1,
8319 			       adev->nbio.funcs->get_hdp_flush_req_offset(adev),
8320 			       adev->nbio.funcs->get_hdp_flush_done_offset(adev),
8321 			       ref_and_mask, ref_and_mask, 0x20);
8322 }
8323 
8324 static void gfx_v10_0_ring_emit_ib_gfx(struct amdgpu_ring *ring,
8325 				       struct amdgpu_job *job,
8326 				       struct amdgpu_ib *ib,
8327 				       uint32_t flags)
8328 {
8329 	unsigned vmid = AMDGPU_JOB_GET_VMID(job);
8330 	u32 header, control = 0;
8331 
8332 	if (ib->flags & AMDGPU_IB_FLAG_CE)
8333 		header = PACKET3(PACKET3_INDIRECT_BUFFER_CNST, 2);
8334 	else
8335 		header = PACKET3(PACKET3_INDIRECT_BUFFER, 2);
8336 
8337 	control |= ib->length_dw | (vmid << 24);
8338 
8339 	if ((amdgpu_sriov_vf(ring->adev) || amdgpu_mcbp) && (ib->flags & AMDGPU_IB_FLAG_PREEMPT)) {
8340 		control |= INDIRECT_BUFFER_PRE_ENB(1);
8341 
8342 		if (flags & AMDGPU_IB_PREEMPTED)
8343 			control |= INDIRECT_BUFFER_PRE_RESUME(1);
8344 
8345 		if (!(ib->flags & AMDGPU_IB_FLAG_CE) && vmid)
8346 			gfx_v10_0_ring_emit_de_meta(ring,
8347 				    (!amdgpu_sriov_vf(ring->adev) && flags & AMDGPU_IB_PREEMPTED) ? true : false);
8348 	}
8349 
8350 	amdgpu_ring_write(ring, header);
8351 	BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
8352 	amdgpu_ring_write(ring,
8353 #ifdef __BIG_ENDIAN
8354 		(2 << 0) |
8355 #endif
8356 		lower_32_bits(ib->gpu_addr));
8357 	amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr));
8358 	amdgpu_ring_write(ring, control);
8359 }
8360 
8361 static void gfx_v10_0_ring_emit_ib_compute(struct amdgpu_ring *ring,
8362 					   struct amdgpu_job *job,
8363 					   struct amdgpu_ib *ib,
8364 					   uint32_t flags)
8365 {
8366 	unsigned vmid = AMDGPU_JOB_GET_VMID(job);
8367 	u32 control = INDIRECT_BUFFER_VALID | ib->length_dw | (vmid << 24);
8368 
8369 	/* Currently, there is a high possibility to get wave ID mismatch
8370 	 * between ME and GDS, leading to a hw deadlock, because ME generates
8371 	 * different wave IDs than the GDS expects. This situation happens
8372 	 * randomly when at least 5 compute pipes use GDS ordered append.
8373 	 * The wave IDs generated by ME are also wrong after suspend/resume.
8374 	 * Those are probably bugs somewhere else in the kernel driver.
8375 	 *
8376 	 * Writing GDS_COMPUTE_MAX_WAVE_ID resets wave ID counters in ME and
8377 	 * GDS to 0 for this ring (me/pipe).
8378 	 */
8379 	if (ib->flags & AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID) {
8380 		amdgpu_ring_write(ring, PACKET3(PACKET3_SET_CONFIG_REG, 1));
8381 		amdgpu_ring_write(ring, mmGDS_COMPUTE_MAX_WAVE_ID);
8382 		amdgpu_ring_write(ring, ring->adev->gds.gds_compute_max_wave_id);
8383 	}
8384 
8385 	amdgpu_ring_write(ring, PACKET3(PACKET3_INDIRECT_BUFFER, 2));
8386 	BUG_ON(ib->gpu_addr & 0x3); /* Dword align */
8387 	amdgpu_ring_write(ring,
8388 #ifdef __BIG_ENDIAN
8389 				(2 << 0) |
8390 #endif
8391 				lower_32_bits(ib->gpu_addr));
8392 	amdgpu_ring_write(ring, upper_32_bits(ib->gpu_addr));
8393 	amdgpu_ring_write(ring, control);
8394 }
8395 
8396 static void gfx_v10_0_ring_emit_fence(struct amdgpu_ring *ring, u64 addr,
8397 				     u64 seq, unsigned flags)
8398 {
8399 	bool write64bit = flags & AMDGPU_FENCE_FLAG_64BIT;
8400 	bool int_sel = flags & AMDGPU_FENCE_FLAG_INT;
8401 
8402 	/* RELEASE_MEM - flush caches, send int */
8403 	amdgpu_ring_write(ring, PACKET3(PACKET3_RELEASE_MEM, 6));
8404 	amdgpu_ring_write(ring, (PACKET3_RELEASE_MEM_GCR_SEQ |
8405 				 PACKET3_RELEASE_MEM_GCR_GL2_WB |
8406 				 PACKET3_RELEASE_MEM_GCR_GLM_INV | /* must be set with GLM_WB */
8407 				 PACKET3_RELEASE_MEM_GCR_GLM_WB |
8408 				 PACKET3_RELEASE_MEM_CACHE_POLICY(3) |
8409 				 PACKET3_RELEASE_MEM_EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
8410 				 PACKET3_RELEASE_MEM_EVENT_INDEX(5)));
8411 	amdgpu_ring_write(ring, (PACKET3_RELEASE_MEM_DATA_SEL(write64bit ? 2 : 1) |
8412 				 PACKET3_RELEASE_MEM_INT_SEL(int_sel ? 2 : 0)));
8413 
8414 	/*
8415 	 * the address should be Qword aligned if 64bit write, Dword
8416 	 * aligned if only send 32bit data low (discard data high)
8417 	 */
8418 	if (write64bit)
8419 		BUG_ON(addr & 0x7);
8420 	else
8421 		BUG_ON(addr & 0x3);
8422 	amdgpu_ring_write(ring, lower_32_bits(addr));
8423 	amdgpu_ring_write(ring, upper_32_bits(addr));
8424 	amdgpu_ring_write(ring, lower_32_bits(seq));
8425 	amdgpu_ring_write(ring, upper_32_bits(seq));
8426 	amdgpu_ring_write(ring, 0);
8427 }
8428 
8429 static void gfx_v10_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
8430 {
8431 	int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
8432 	uint32_t seq = ring->fence_drv.sync_seq;
8433 	uint64_t addr = ring->fence_drv.gpu_addr;
8434 
8435 	gfx_v10_0_wait_reg_mem(ring, usepfp, 1, 0, lower_32_bits(addr),
8436 			       upper_32_bits(addr), seq, 0xffffffff, 4);
8437 }
8438 
8439 static void gfx_v10_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
8440 					 unsigned vmid, uint64_t pd_addr)
8441 {
8442 	amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr);
8443 
8444 	/* compute doesn't have PFP */
8445 	if (ring->funcs->type == AMDGPU_RING_TYPE_GFX) {
8446 		/* sync PFP to ME, otherwise we might get invalid PFP reads */
8447 		amdgpu_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0));
8448 		amdgpu_ring_write(ring, 0x0);
8449 	}
8450 }
8451 
8452 static void gfx_v10_0_ring_emit_fence_kiq(struct amdgpu_ring *ring, u64 addr,
8453 					  u64 seq, unsigned int flags)
8454 {
8455 	struct amdgpu_device *adev = ring->adev;
8456 
8457 	/* we only allocate 32bit for each seq wb address */
8458 	BUG_ON(flags & AMDGPU_FENCE_FLAG_64BIT);
8459 
8460 	/* write fence seq to the "addr" */
8461 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
8462 	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
8463 				 WRITE_DATA_DST_SEL(5) | WR_CONFIRM));
8464 	amdgpu_ring_write(ring, lower_32_bits(addr));
8465 	amdgpu_ring_write(ring, upper_32_bits(addr));
8466 	amdgpu_ring_write(ring, lower_32_bits(seq));
8467 
8468 	if (flags & AMDGPU_FENCE_FLAG_INT) {
8469 		/* set register to trigger INT */
8470 		amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
8471 		amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
8472 					 WRITE_DATA_DST_SEL(0) | WR_CONFIRM));
8473 		amdgpu_ring_write(ring, SOC15_REG_OFFSET(GC, 0, mmCPC_INT_STATUS));
8474 		amdgpu_ring_write(ring, 0);
8475 		amdgpu_ring_write(ring, 0x20000000); /* src_id is 178 */
8476 	}
8477 }
8478 
8479 static void gfx_v10_0_ring_emit_sb(struct amdgpu_ring *ring)
8480 {
8481 	amdgpu_ring_write(ring, PACKET3(PACKET3_SWITCH_BUFFER, 0));
8482 	amdgpu_ring_write(ring, 0);
8483 }
8484 
8485 static void gfx_v10_0_ring_emit_cntxcntl(struct amdgpu_ring *ring,
8486 					 uint32_t flags)
8487 {
8488 	uint32_t dw2 = 0;
8489 
8490 	if (amdgpu_mcbp || amdgpu_sriov_vf(ring->adev))
8491 		gfx_v10_0_ring_emit_ce_meta(ring,
8492 				    (!amdgpu_sriov_vf(ring->adev) && flags & AMDGPU_IB_PREEMPTED) ? true : false);
8493 
8494 	dw2 |= 0x80000000; /* set load_enable otherwise this package is just NOPs */
8495 	if (flags & AMDGPU_HAVE_CTX_SWITCH) {
8496 		/* set load_global_config & load_global_uconfig */
8497 		dw2 |= 0x8001;
8498 		/* set load_cs_sh_regs */
8499 		dw2 |= 0x01000000;
8500 		/* set load_per_context_state & load_gfx_sh_regs for GFX */
8501 		dw2 |= 0x10002;
8502 
8503 		/* set load_ce_ram if preamble presented */
8504 		if (AMDGPU_PREAMBLE_IB_PRESENT & flags)
8505 			dw2 |= 0x10000000;
8506 	} else {
8507 		/* still load_ce_ram if this is the first time preamble presented
8508 		 * although there is no context switch happens.
8509 		 */
8510 		if (AMDGPU_PREAMBLE_IB_PRESENT_FIRST & flags)
8511 			dw2 |= 0x10000000;
8512 	}
8513 
8514 	amdgpu_ring_write(ring, PACKET3(PACKET3_CONTEXT_CONTROL, 1));
8515 	amdgpu_ring_write(ring, dw2);
8516 	amdgpu_ring_write(ring, 0);
8517 }
8518 
8519 static unsigned gfx_v10_0_ring_emit_init_cond_exec(struct amdgpu_ring *ring)
8520 {
8521 	unsigned ret;
8522 
8523 	amdgpu_ring_write(ring, PACKET3(PACKET3_COND_EXEC, 3));
8524 	amdgpu_ring_write(ring, lower_32_bits(ring->cond_exe_gpu_addr));
8525 	amdgpu_ring_write(ring, upper_32_bits(ring->cond_exe_gpu_addr));
8526 	amdgpu_ring_write(ring, 0); /* discard following DWs if *cond_exec_gpu_addr==0 */
8527 	ret = ring->wptr & ring->buf_mask;
8528 	amdgpu_ring_write(ring, 0x55aa55aa); /* patch dummy value later */
8529 
8530 	return ret;
8531 }
8532 
8533 static void gfx_v10_0_ring_emit_patch_cond_exec(struct amdgpu_ring *ring, unsigned offset)
8534 {
8535 	unsigned cur;
8536 	BUG_ON(offset > ring->buf_mask);
8537 	BUG_ON(ring->ring[offset] != 0x55aa55aa);
8538 
8539 	cur = (ring->wptr - 1) & ring->buf_mask;
8540 	if (likely(cur > offset))
8541 		ring->ring[offset] = cur - offset;
8542 	else
8543 		ring->ring[offset] = (ring->buf_mask + 1) - offset + cur;
8544 }
8545 
8546 static int gfx_v10_0_ring_preempt_ib(struct amdgpu_ring *ring)
8547 {
8548 	int i, r = 0;
8549 	struct amdgpu_device *adev = ring->adev;
8550 	struct amdgpu_kiq *kiq = &adev->gfx.kiq;
8551 	struct amdgpu_ring *kiq_ring = &kiq->ring;
8552 	unsigned long flags;
8553 
8554 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
8555 		return -EINVAL;
8556 
8557 	spin_lock_irqsave(&kiq->ring_lock, flags);
8558 
8559 	if (amdgpu_ring_alloc(kiq_ring, kiq->pmf->unmap_queues_size)) {
8560 		spin_unlock_irqrestore(&kiq->ring_lock, flags);
8561 		return -ENOMEM;
8562 	}
8563 
8564 	/* assert preemption condition */
8565 	amdgpu_ring_set_preempt_cond_exec(ring, false);
8566 
8567 	/* assert IB preemption, emit the trailing fence */
8568 	kiq->pmf->kiq_unmap_queues(kiq_ring, ring, PREEMPT_QUEUES_NO_UNMAP,
8569 				   ring->trail_fence_gpu_addr,
8570 				   ++ring->trail_seq);
8571 	amdgpu_ring_commit(kiq_ring);
8572 
8573 	spin_unlock_irqrestore(&kiq->ring_lock, flags);
8574 
8575 	/* poll the trailing fence */
8576 	for (i = 0; i < adev->usec_timeout; i++) {
8577 		if (ring->trail_seq ==
8578 		    le32_to_cpu(*(ring->trail_fence_cpu_addr)))
8579 			break;
8580 		udelay(1);
8581 	}
8582 
8583 	if (i >= adev->usec_timeout) {
8584 		r = -EINVAL;
8585 		DRM_ERROR("ring %d failed to preempt ib\n", ring->idx);
8586 	}
8587 
8588 	/* deassert preemption condition */
8589 	amdgpu_ring_set_preempt_cond_exec(ring, true);
8590 	return r;
8591 }
8592 
8593 static void gfx_v10_0_ring_emit_ce_meta(struct amdgpu_ring *ring, bool resume)
8594 {
8595 	struct amdgpu_device *adev = ring->adev;
8596 	struct v10_ce_ib_state ce_payload = {0};
8597 	uint64_t csa_addr;
8598 	int cnt;
8599 
8600 	cnt = (sizeof(ce_payload) >> 2) + 4 - 2;
8601 	csa_addr = amdgpu_csa_vaddr(ring->adev);
8602 
8603 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, cnt));
8604 	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(2) |
8605 				 WRITE_DATA_DST_SEL(8) |
8606 				 WR_CONFIRM) |
8607 				 WRITE_DATA_CACHE_POLICY(0));
8608 	amdgpu_ring_write(ring, lower_32_bits(csa_addr +
8609 			      offsetof(struct v10_gfx_meta_data, ce_payload)));
8610 	amdgpu_ring_write(ring, upper_32_bits(csa_addr +
8611 			      offsetof(struct v10_gfx_meta_data, ce_payload)));
8612 
8613 	if (resume)
8614 		amdgpu_ring_write_multiple(ring, adev->virt.csa_cpu_addr +
8615 					   offsetof(struct v10_gfx_meta_data,
8616 						    ce_payload),
8617 					   sizeof(ce_payload) >> 2);
8618 	else
8619 		amdgpu_ring_write_multiple(ring, (void *)&ce_payload,
8620 					   sizeof(ce_payload) >> 2);
8621 }
8622 
8623 static void gfx_v10_0_ring_emit_de_meta(struct amdgpu_ring *ring, bool resume)
8624 {
8625 	struct amdgpu_device *adev = ring->adev;
8626 	struct v10_de_ib_state de_payload = {0};
8627 	uint64_t csa_addr, gds_addr;
8628 	int cnt;
8629 
8630 	csa_addr = amdgpu_csa_vaddr(ring->adev);
8631 	gds_addr = ALIGN(csa_addr + AMDGPU_CSA_SIZE - adev->gds.gds_size,
8632 			 PAGE_SIZE);
8633 	de_payload.gds_backup_addrlo = lower_32_bits(gds_addr);
8634 	de_payload.gds_backup_addrhi = upper_32_bits(gds_addr);
8635 
8636 	cnt = (sizeof(de_payload) >> 2) + 4 - 2;
8637 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, cnt));
8638 	amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(1) |
8639 				 WRITE_DATA_DST_SEL(8) |
8640 				 WR_CONFIRM) |
8641 				 WRITE_DATA_CACHE_POLICY(0));
8642 	amdgpu_ring_write(ring, lower_32_bits(csa_addr +
8643 			      offsetof(struct v10_gfx_meta_data, de_payload)));
8644 	amdgpu_ring_write(ring, upper_32_bits(csa_addr +
8645 			      offsetof(struct v10_gfx_meta_data, de_payload)));
8646 
8647 	if (resume)
8648 		amdgpu_ring_write_multiple(ring, adev->virt.csa_cpu_addr +
8649 					   offsetof(struct v10_gfx_meta_data,
8650 						    de_payload),
8651 					   sizeof(de_payload) >> 2);
8652 	else
8653 		amdgpu_ring_write_multiple(ring, (void *)&de_payload,
8654 					   sizeof(de_payload) >> 2);
8655 }
8656 
8657 static void gfx_v10_0_ring_emit_frame_cntl(struct amdgpu_ring *ring, bool start,
8658 				    bool secure)
8659 {
8660 	uint32_t v = secure ? FRAME_TMZ : 0;
8661 
8662 	amdgpu_ring_write(ring, PACKET3(PACKET3_FRAME_CONTROL, 0));
8663 	amdgpu_ring_write(ring, v | FRAME_CMD(start ? 0 : 1));
8664 }
8665 
8666 static void gfx_v10_0_ring_emit_rreg(struct amdgpu_ring *ring, uint32_t reg,
8667 				     uint32_t reg_val_offs)
8668 {
8669 	struct amdgpu_device *adev = ring->adev;
8670 
8671 	amdgpu_ring_write(ring, PACKET3(PACKET3_COPY_DATA, 4));
8672 	amdgpu_ring_write(ring, 0 |	/* src: register*/
8673 				(5 << 8) |	/* dst: memory */
8674 				(1 << 20));	/* write confirm */
8675 	amdgpu_ring_write(ring, reg);
8676 	amdgpu_ring_write(ring, 0);
8677 	amdgpu_ring_write(ring, lower_32_bits(adev->wb.gpu_addr +
8678 				reg_val_offs * 4));
8679 	amdgpu_ring_write(ring, upper_32_bits(adev->wb.gpu_addr +
8680 				reg_val_offs * 4));
8681 }
8682 
8683 static void gfx_v10_0_ring_emit_wreg(struct amdgpu_ring *ring, uint32_t reg,
8684 				   uint32_t val)
8685 {
8686 	uint32_t cmd = 0;
8687 
8688 	switch (ring->funcs->type) {
8689 	case AMDGPU_RING_TYPE_GFX:
8690 		cmd = WRITE_DATA_ENGINE_SEL(1) | WR_CONFIRM;
8691 		break;
8692 	case AMDGPU_RING_TYPE_KIQ:
8693 		cmd = (1 << 16); /* no inc addr */
8694 		break;
8695 	default:
8696 		cmd = WR_CONFIRM;
8697 		break;
8698 	}
8699 	amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
8700 	amdgpu_ring_write(ring, cmd);
8701 	amdgpu_ring_write(ring, reg);
8702 	amdgpu_ring_write(ring, 0);
8703 	amdgpu_ring_write(ring, val);
8704 }
8705 
8706 static void gfx_v10_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
8707 					uint32_t val, uint32_t mask)
8708 {
8709 	gfx_v10_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
8710 }
8711 
8712 static void gfx_v10_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
8713 						   uint32_t reg0, uint32_t reg1,
8714 						   uint32_t ref, uint32_t mask)
8715 {
8716 	int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
8717 	struct amdgpu_device *adev = ring->adev;
8718 	bool fw_version_ok = false;
8719 
8720 	fw_version_ok = adev->gfx.cp_fw_write_wait;
8721 
8722 	if (fw_version_ok)
8723 		gfx_v10_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1,
8724 				       ref, mask, 0x20);
8725 	else
8726 		amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1,
8727 							   ref, mask);
8728 }
8729 
8730 static void gfx_v10_0_ring_soft_recovery(struct amdgpu_ring *ring,
8731 					 unsigned vmid)
8732 {
8733 	struct amdgpu_device *adev = ring->adev;
8734 	uint32_t value = 0;
8735 
8736 	value = REG_SET_FIELD(value, SQ_CMD, CMD, 0x03);
8737 	value = REG_SET_FIELD(value, SQ_CMD, MODE, 0x01);
8738 	value = REG_SET_FIELD(value, SQ_CMD, CHECK_VMID, 1);
8739 	value = REG_SET_FIELD(value, SQ_CMD, VM_ID, vmid);
8740 	WREG32_SOC15(GC, 0, mmSQ_CMD, value);
8741 }
8742 
8743 static void
8744 gfx_v10_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
8745 				      uint32_t me, uint32_t pipe,
8746 				      enum amdgpu_interrupt_state state)
8747 {
8748 	uint32_t cp_int_cntl, cp_int_cntl_reg;
8749 
8750 	if (!me) {
8751 		switch (pipe) {
8752 		case 0:
8753 			cp_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_INT_CNTL_RING0);
8754 			break;
8755 		case 1:
8756 			cp_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_INT_CNTL_RING1);
8757 			break;
8758 		default:
8759 			DRM_DEBUG("invalid pipe %d\n", pipe);
8760 			return;
8761 		}
8762 	} else {
8763 		DRM_DEBUG("invalid me %d\n", me);
8764 		return;
8765 	}
8766 
8767 	switch (state) {
8768 	case AMDGPU_IRQ_STATE_DISABLE:
8769 		cp_int_cntl = RREG32_SOC15_IP(GC, cp_int_cntl_reg);
8770 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
8771 					    TIME_STAMP_INT_ENABLE, 0);
8772 		WREG32_SOC15_IP(GC, cp_int_cntl_reg, cp_int_cntl);
8773 		break;
8774 	case AMDGPU_IRQ_STATE_ENABLE:
8775 		cp_int_cntl = RREG32_SOC15_IP(GC, cp_int_cntl_reg);
8776 		cp_int_cntl = REG_SET_FIELD(cp_int_cntl, CP_INT_CNTL_RING0,
8777 					    TIME_STAMP_INT_ENABLE, 1);
8778 		WREG32_SOC15_IP(GC, cp_int_cntl_reg, cp_int_cntl);
8779 		break;
8780 	default:
8781 		break;
8782 	}
8783 }
8784 
8785 static void gfx_v10_0_set_compute_eop_interrupt_state(struct amdgpu_device *adev,
8786 						     int me, int pipe,
8787 						     enum amdgpu_interrupt_state state)
8788 {
8789 	u32 mec_int_cntl, mec_int_cntl_reg;
8790 
8791 	/*
8792 	 * amdgpu controls only the first MEC. That's why this function only
8793 	 * handles the setting of interrupts for this specific MEC. All other
8794 	 * pipes' interrupts are set by amdkfd.
8795 	 */
8796 
8797 	if (me == 1) {
8798 		switch (pipe) {
8799 		case 0:
8800 			mec_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE0_INT_CNTL);
8801 			break;
8802 		case 1:
8803 			mec_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE1_INT_CNTL);
8804 			break;
8805 		case 2:
8806 			mec_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE2_INT_CNTL);
8807 			break;
8808 		case 3:
8809 			mec_int_cntl_reg = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE3_INT_CNTL);
8810 			break;
8811 		default:
8812 			DRM_DEBUG("invalid pipe %d\n", pipe);
8813 			return;
8814 		}
8815 	} else {
8816 		DRM_DEBUG("invalid me %d\n", me);
8817 		return;
8818 	}
8819 
8820 	switch (state) {
8821 	case AMDGPU_IRQ_STATE_DISABLE:
8822 		mec_int_cntl = RREG32_SOC15_IP(GC, mec_int_cntl_reg);
8823 		mec_int_cntl = REG_SET_FIELD(mec_int_cntl, CP_ME1_PIPE0_INT_CNTL,
8824 					     TIME_STAMP_INT_ENABLE, 0);
8825 		WREG32_SOC15_IP(GC, mec_int_cntl_reg, mec_int_cntl);
8826 		break;
8827 	case AMDGPU_IRQ_STATE_ENABLE:
8828 		mec_int_cntl = RREG32_SOC15_IP(GC, mec_int_cntl_reg);
8829 		mec_int_cntl = REG_SET_FIELD(mec_int_cntl, CP_ME1_PIPE0_INT_CNTL,
8830 					     TIME_STAMP_INT_ENABLE, 1);
8831 		WREG32_SOC15_IP(GC, mec_int_cntl_reg, mec_int_cntl);
8832 		break;
8833 	default:
8834 		break;
8835 	}
8836 }
8837 
8838 static int gfx_v10_0_set_eop_interrupt_state(struct amdgpu_device *adev,
8839 					    struct amdgpu_irq_src *src,
8840 					    unsigned type,
8841 					    enum amdgpu_interrupt_state state)
8842 {
8843 	switch (type) {
8844 	case AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP:
8845 		gfx_v10_0_set_gfx_eop_interrupt_state(adev, 0, 0, state);
8846 		break;
8847 	case AMDGPU_CP_IRQ_GFX_ME0_PIPE1_EOP:
8848 		gfx_v10_0_set_gfx_eop_interrupt_state(adev, 0, 1, state);
8849 		break;
8850 	case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE0_EOP:
8851 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 1, 0, state);
8852 		break;
8853 	case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE1_EOP:
8854 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 1, 1, state);
8855 		break;
8856 	case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE2_EOP:
8857 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 1, 2, state);
8858 		break;
8859 	case AMDGPU_CP_IRQ_COMPUTE_MEC1_PIPE3_EOP:
8860 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 1, 3, state);
8861 		break;
8862 	case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE0_EOP:
8863 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 2, 0, state);
8864 		break;
8865 	case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE1_EOP:
8866 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 2, 1, state);
8867 		break;
8868 	case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE2_EOP:
8869 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 2, 2, state);
8870 		break;
8871 	case AMDGPU_CP_IRQ_COMPUTE_MEC2_PIPE3_EOP:
8872 		gfx_v10_0_set_compute_eop_interrupt_state(adev, 2, 3, state);
8873 		break;
8874 	default:
8875 		break;
8876 	}
8877 	return 0;
8878 }
8879 
8880 static int gfx_v10_0_eop_irq(struct amdgpu_device *adev,
8881 			     struct amdgpu_irq_src *source,
8882 			     struct amdgpu_iv_entry *entry)
8883 {
8884 	int i;
8885 	u8 me_id, pipe_id, queue_id;
8886 	struct amdgpu_ring *ring;
8887 
8888 	DRM_DEBUG("IH: CP EOP\n");
8889 	me_id = (entry->ring_id & 0x0c) >> 2;
8890 	pipe_id = (entry->ring_id & 0x03) >> 0;
8891 	queue_id = (entry->ring_id & 0x70) >> 4;
8892 
8893 	switch (me_id) {
8894 	case 0:
8895 		if (pipe_id == 0)
8896 			amdgpu_fence_process(&adev->gfx.gfx_ring[0]);
8897 		else
8898 			amdgpu_fence_process(&adev->gfx.gfx_ring[1]);
8899 		break;
8900 	case 1:
8901 	case 2:
8902 		for (i = 0; i < adev->gfx.num_compute_rings; i++) {
8903 			ring = &adev->gfx.compute_ring[i];
8904 			/* Per-queue interrupt is supported for MEC starting from VI.
8905 			  * The interrupt can only be enabled/disabled per pipe instead of per queue.
8906 			  */
8907 			if ((ring->me == me_id) && (ring->pipe == pipe_id) && (ring->queue == queue_id))
8908 				amdgpu_fence_process(ring);
8909 		}
8910 		break;
8911 	}
8912 	return 0;
8913 }
8914 
8915 static int gfx_v10_0_set_priv_reg_fault_state(struct amdgpu_device *adev,
8916 					      struct amdgpu_irq_src *source,
8917 					      unsigned type,
8918 					      enum amdgpu_interrupt_state state)
8919 {
8920 	switch (state) {
8921 	case AMDGPU_IRQ_STATE_DISABLE:
8922 	case AMDGPU_IRQ_STATE_ENABLE:
8923 		WREG32_FIELD15(GC, 0, CP_INT_CNTL_RING0,
8924 			       PRIV_REG_INT_ENABLE,
8925 			       state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
8926 		break;
8927 	default:
8928 		break;
8929 	}
8930 
8931 	return 0;
8932 }
8933 
8934 static int gfx_v10_0_set_priv_inst_fault_state(struct amdgpu_device *adev,
8935 					       struct amdgpu_irq_src *source,
8936 					       unsigned type,
8937 					       enum amdgpu_interrupt_state state)
8938 {
8939 	switch (state) {
8940 	case AMDGPU_IRQ_STATE_DISABLE:
8941 	case AMDGPU_IRQ_STATE_ENABLE:
8942 		WREG32_FIELD15(GC, 0, CP_INT_CNTL_RING0,
8943 			       PRIV_INSTR_INT_ENABLE,
8944 			       state == AMDGPU_IRQ_STATE_ENABLE ? 1 : 0);
8945 		break;
8946 	default:
8947 		break;
8948 	}
8949 
8950 	return 0;
8951 }
8952 
8953 static void gfx_v10_0_handle_priv_fault(struct amdgpu_device *adev,
8954 					struct amdgpu_iv_entry *entry)
8955 {
8956 	u8 me_id, pipe_id, queue_id;
8957 	struct amdgpu_ring *ring;
8958 	int i;
8959 
8960 	me_id = (entry->ring_id & 0x0c) >> 2;
8961 	pipe_id = (entry->ring_id & 0x03) >> 0;
8962 	queue_id = (entry->ring_id & 0x70) >> 4;
8963 
8964 	switch (me_id) {
8965 	case 0:
8966 		for (i = 0; i < adev->gfx.num_gfx_rings; i++) {
8967 			ring = &adev->gfx.gfx_ring[i];
8968 			/* we only enabled 1 gfx queue per pipe for now */
8969 			if (ring->me == me_id && ring->pipe == pipe_id)
8970 				drm_sched_fault(&ring->sched);
8971 		}
8972 		break;
8973 	case 1:
8974 	case 2:
8975 		for (i = 0; i < adev->gfx.num_compute_rings; i++) {
8976 			ring = &adev->gfx.compute_ring[i];
8977 			if (ring->me == me_id && ring->pipe == pipe_id &&
8978 			    ring->queue == queue_id)
8979 				drm_sched_fault(&ring->sched);
8980 		}
8981 		break;
8982 	default:
8983 		BUG();
8984 	}
8985 }
8986 
8987 static int gfx_v10_0_priv_reg_irq(struct amdgpu_device *adev,
8988 				  struct amdgpu_irq_src *source,
8989 				  struct amdgpu_iv_entry *entry)
8990 {
8991 	DRM_ERROR("Illegal register access in command stream\n");
8992 	gfx_v10_0_handle_priv_fault(adev, entry);
8993 	return 0;
8994 }
8995 
8996 static int gfx_v10_0_priv_inst_irq(struct amdgpu_device *adev,
8997 				   struct amdgpu_irq_src *source,
8998 				   struct amdgpu_iv_entry *entry)
8999 {
9000 	DRM_ERROR("Illegal instruction in command stream\n");
9001 	gfx_v10_0_handle_priv_fault(adev, entry);
9002 	return 0;
9003 }
9004 
9005 static int gfx_v10_0_kiq_set_interrupt_state(struct amdgpu_device *adev,
9006 					     struct amdgpu_irq_src *src,
9007 					     unsigned int type,
9008 					     enum amdgpu_interrupt_state state)
9009 {
9010 	uint32_t tmp, target;
9011 	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
9012 
9013 	if (ring->me == 1)
9014 		target = SOC15_REG_OFFSET(GC, 0, mmCP_ME1_PIPE0_INT_CNTL);
9015 	else
9016 		target = SOC15_REG_OFFSET(GC, 0, mmCP_ME2_PIPE0_INT_CNTL);
9017 	target += ring->pipe;
9018 
9019 	switch (type) {
9020 	case AMDGPU_CP_KIQ_IRQ_DRIVER0:
9021 		if (state == AMDGPU_IRQ_STATE_DISABLE) {
9022 			tmp = RREG32_SOC15(GC, 0, mmCPC_INT_CNTL);
9023 			tmp = REG_SET_FIELD(tmp, CPC_INT_CNTL,
9024 					    GENERIC2_INT_ENABLE, 0);
9025 			WREG32_SOC15(GC, 0, mmCPC_INT_CNTL, tmp);
9026 
9027 			tmp = RREG32_SOC15_IP(GC, target);
9028 			tmp = REG_SET_FIELD(tmp, CP_ME2_PIPE0_INT_CNTL,
9029 					    GENERIC2_INT_ENABLE, 0);
9030 			WREG32_SOC15_IP(GC, target, tmp);
9031 		} else {
9032 			tmp = RREG32_SOC15(GC, 0, mmCPC_INT_CNTL);
9033 			tmp = REG_SET_FIELD(tmp, CPC_INT_CNTL,
9034 					    GENERIC2_INT_ENABLE, 1);
9035 			WREG32_SOC15(GC, 0, mmCPC_INT_CNTL, tmp);
9036 
9037 			tmp = RREG32_SOC15_IP(GC, target);
9038 			tmp = REG_SET_FIELD(tmp, CP_ME2_PIPE0_INT_CNTL,
9039 					    GENERIC2_INT_ENABLE, 1);
9040 			WREG32_SOC15_IP(GC, target, tmp);
9041 		}
9042 		break;
9043 	default:
9044 		BUG(); /* kiq only support GENERIC2_INT now */
9045 		break;
9046 	}
9047 	return 0;
9048 }
9049 
9050 static int gfx_v10_0_kiq_irq(struct amdgpu_device *adev,
9051 			     struct amdgpu_irq_src *source,
9052 			     struct amdgpu_iv_entry *entry)
9053 {
9054 	u8 me_id, pipe_id, queue_id;
9055 	struct amdgpu_ring *ring = &(adev->gfx.kiq.ring);
9056 
9057 	me_id = (entry->ring_id & 0x0c) >> 2;
9058 	pipe_id = (entry->ring_id & 0x03) >> 0;
9059 	queue_id = (entry->ring_id & 0x70) >> 4;
9060 	DRM_DEBUG("IH: CPC GENERIC2_INT, me:%d, pipe:%d, queue:%d\n",
9061 		   me_id, pipe_id, queue_id);
9062 
9063 	amdgpu_fence_process(ring);
9064 	return 0;
9065 }
9066 
9067 static void gfx_v10_0_emit_mem_sync(struct amdgpu_ring *ring)
9068 {
9069 	const unsigned int gcr_cntl =
9070 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GL2_INV(1) |
9071 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GL2_WB(1) |
9072 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GLM_INV(1) |
9073 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GLM_WB(1) |
9074 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GL1_INV(1) |
9075 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GLV_INV(1) |
9076 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GLK_INV(1) |
9077 			PACKET3_ACQUIRE_MEM_GCR_CNTL_GLI_INV(1);
9078 
9079 	/* ACQUIRE_MEM - make one or more surfaces valid for use by the subsequent operations */
9080 	amdgpu_ring_write(ring, PACKET3(PACKET3_ACQUIRE_MEM, 6));
9081 	amdgpu_ring_write(ring, 0); /* CP_COHER_CNTL */
9082 	amdgpu_ring_write(ring, 0xffffffff);  /* CP_COHER_SIZE */
9083 	amdgpu_ring_write(ring, 0xffffff);  /* CP_COHER_SIZE_HI */
9084 	amdgpu_ring_write(ring, 0); /* CP_COHER_BASE */
9085 	amdgpu_ring_write(ring, 0);  /* CP_COHER_BASE_HI */
9086 	amdgpu_ring_write(ring, 0x0000000A); /* POLL_INTERVAL */
9087 	amdgpu_ring_write(ring, gcr_cntl); /* GCR_CNTL */
9088 }
9089 
9090 static const struct amd_ip_funcs gfx_v10_0_ip_funcs = {
9091 	.name = "gfx_v10_0",
9092 	.early_init = gfx_v10_0_early_init,
9093 	.late_init = gfx_v10_0_late_init,
9094 	.sw_init = gfx_v10_0_sw_init,
9095 	.sw_fini = gfx_v10_0_sw_fini,
9096 	.hw_init = gfx_v10_0_hw_init,
9097 	.hw_fini = gfx_v10_0_hw_fini,
9098 	.suspend = gfx_v10_0_suspend,
9099 	.resume = gfx_v10_0_resume,
9100 	.is_idle = gfx_v10_0_is_idle,
9101 	.wait_for_idle = gfx_v10_0_wait_for_idle,
9102 	.soft_reset = gfx_v10_0_soft_reset,
9103 	.set_clockgating_state = gfx_v10_0_set_clockgating_state,
9104 	.set_powergating_state = gfx_v10_0_set_powergating_state,
9105 	.get_clockgating_state = gfx_v10_0_get_clockgating_state,
9106 };
9107 
9108 static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_gfx = {
9109 	.type = AMDGPU_RING_TYPE_GFX,
9110 	.align_mask = 0xff,
9111 	.nop = PACKET3(PACKET3_NOP, 0x3FFF),
9112 	.support_64bit_ptrs = true,
9113 	.vmhub = AMDGPU_GFXHUB_0,
9114 	.get_rptr = gfx_v10_0_ring_get_rptr_gfx,
9115 	.get_wptr = gfx_v10_0_ring_get_wptr_gfx,
9116 	.set_wptr = gfx_v10_0_ring_set_wptr_gfx,
9117 	.emit_frame_size = /* totally 242 maximum if 16 IBs */
9118 		5 + /* COND_EXEC */
9119 		7 + /* PIPELINE_SYNC */
9120 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
9121 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
9122 		2 + /* VM_FLUSH */
9123 		8 + /* FENCE for VM_FLUSH */
9124 		20 + /* GDS switch */
9125 		4 + /* double SWITCH_BUFFER,
9126 		     * the first COND_EXEC jump to the place
9127 		     * just prior to this double SWITCH_BUFFER
9128 		     */
9129 		5 + /* COND_EXEC */
9130 		7 + /* HDP_flush */
9131 		4 + /* VGT_flush */
9132 		14 + /*	CE_META */
9133 		31 + /*	DE_META */
9134 		3 + /* CNTX_CTRL */
9135 		5 + /* HDP_INVL */
9136 		8 + 8 + /* FENCE x2 */
9137 		2 + /* SWITCH_BUFFER */
9138 		8, /* gfx_v10_0_emit_mem_sync */
9139 	.emit_ib_size =	4, /* gfx_v10_0_ring_emit_ib_gfx */
9140 	.emit_ib = gfx_v10_0_ring_emit_ib_gfx,
9141 	.emit_fence = gfx_v10_0_ring_emit_fence,
9142 	.emit_pipeline_sync = gfx_v10_0_ring_emit_pipeline_sync,
9143 	.emit_vm_flush = gfx_v10_0_ring_emit_vm_flush,
9144 	.emit_gds_switch = gfx_v10_0_ring_emit_gds_switch,
9145 	.emit_hdp_flush = gfx_v10_0_ring_emit_hdp_flush,
9146 	.test_ring = gfx_v10_0_ring_test_ring,
9147 	.test_ib = gfx_v10_0_ring_test_ib,
9148 	.insert_nop = amdgpu_ring_insert_nop,
9149 	.pad_ib = amdgpu_ring_generic_pad_ib,
9150 	.emit_switch_buffer = gfx_v10_0_ring_emit_sb,
9151 	.emit_cntxcntl = gfx_v10_0_ring_emit_cntxcntl,
9152 	.init_cond_exec = gfx_v10_0_ring_emit_init_cond_exec,
9153 	.patch_cond_exec = gfx_v10_0_ring_emit_patch_cond_exec,
9154 	.preempt_ib = gfx_v10_0_ring_preempt_ib,
9155 	.emit_frame_cntl = gfx_v10_0_ring_emit_frame_cntl,
9156 	.emit_wreg = gfx_v10_0_ring_emit_wreg,
9157 	.emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
9158 	.emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
9159 	.soft_recovery = gfx_v10_0_ring_soft_recovery,
9160 	.emit_mem_sync = gfx_v10_0_emit_mem_sync,
9161 };
9162 
9163 static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_compute = {
9164 	.type = AMDGPU_RING_TYPE_COMPUTE,
9165 	.align_mask = 0xff,
9166 	.nop = PACKET3(PACKET3_NOP, 0x3FFF),
9167 	.support_64bit_ptrs = true,
9168 	.vmhub = AMDGPU_GFXHUB_0,
9169 	.get_rptr = gfx_v10_0_ring_get_rptr_compute,
9170 	.get_wptr = gfx_v10_0_ring_get_wptr_compute,
9171 	.set_wptr = gfx_v10_0_ring_set_wptr_compute,
9172 	.emit_frame_size =
9173 		20 + /* gfx_v10_0_ring_emit_gds_switch */
9174 		7 + /* gfx_v10_0_ring_emit_hdp_flush */
9175 		5 + /* hdp invalidate */
9176 		7 + /* gfx_v10_0_ring_emit_pipeline_sync */
9177 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
9178 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
9179 		2 + /* gfx_v10_0_ring_emit_vm_flush */
9180 		8 + 8 + 8 + /* gfx_v10_0_ring_emit_fence x3 for user fence, vm fence */
9181 		8, /* gfx_v10_0_emit_mem_sync */
9182 	.emit_ib_size =	7, /* gfx_v10_0_ring_emit_ib_compute */
9183 	.emit_ib = gfx_v10_0_ring_emit_ib_compute,
9184 	.emit_fence = gfx_v10_0_ring_emit_fence,
9185 	.emit_pipeline_sync = gfx_v10_0_ring_emit_pipeline_sync,
9186 	.emit_vm_flush = gfx_v10_0_ring_emit_vm_flush,
9187 	.emit_gds_switch = gfx_v10_0_ring_emit_gds_switch,
9188 	.emit_hdp_flush = gfx_v10_0_ring_emit_hdp_flush,
9189 	.test_ring = gfx_v10_0_ring_test_ring,
9190 	.test_ib = gfx_v10_0_ring_test_ib,
9191 	.insert_nop = amdgpu_ring_insert_nop,
9192 	.pad_ib = amdgpu_ring_generic_pad_ib,
9193 	.emit_wreg = gfx_v10_0_ring_emit_wreg,
9194 	.emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
9195 	.emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
9196 	.emit_mem_sync = gfx_v10_0_emit_mem_sync,
9197 };
9198 
9199 static const struct amdgpu_ring_funcs gfx_v10_0_ring_funcs_kiq = {
9200 	.type = AMDGPU_RING_TYPE_KIQ,
9201 	.align_mask = 0xff,
9202 	.nop = PACKET3(PACKET3_NOP, 0x3FFF),
9203 	.support_64bit_ptrs = true,
9204 	.vmhub = AMDGPU_GFXHUB_0,
9205 	.get_rptr = gfx_v10_0_ring_get_rptr_compute,
9206 	.get_wptr = gfx_v10_0_ring_get_wptr_compute,
9207 	.set_wptr = gfx_v10_0_ring_set_wptr_compute,
9208 	.emit_frame_size =
9209 		20 + /* gfx_v10_0_ring_emit_gds_switch */
9210 		7 + /* gfx_v10_0_ring_emit_hdp_flush */
9211 		5 + /*hdp invalidate */
9212 		7 + /* gfx_v10_0_ring_emit_pipeline_sync */
9213 		SOC15_FLUSH_GPU_TLB_NUM_WREG * 5 +
9214 		SOC15_FLUSH_GPU_TLB_NUM_REG_WAIT * 7 +
9215 		2 + /* gfx_v10_0_ring_emit_vm_flush */
9216 		8 + 8 + 8, /* gfx_v10_0_ring_emit_fence_kiq x3 for user fence, vm fence */
9217 	.emit_ib_size =	7, /* gfx_v10_0_ring_emit_ib_compute */
9218 	.emit_ib = gfx_v10_0_ring_emit_ib_compute,
9219 	.emit_fence = gfx_v10_0_ring_emit_fence_kiq,
9220 	.test_ring = gfx_v10_0_ring_test_ring,
9221 	.test_ib = gfx_v10_0_ring_test_ib,
9222 	.insert_nop = amdgpu_ring_insert_nop,
9223 	.pad_ib = amdgpu_ring_generic_pad_ib,
9224 	.emit_rreg = gfx_v10_0_ring_emit_rreg,
9225 	.emit_wreg = gfx_v10_0_ring_emit_wreg,
9226 	.emit_reg_wait = gfx_v10_0_ring_emit_reg_wait,
9227 	.emit_reg_write_reg_wait = gfx_v10_0_ring_emit_reg_write_reg_wait,
9228 };
9229 
9230 static void gfx_v10_0_set_ring_funcs(struct amdgpu_device *adev)
9231 {
9232 	int i;
9233 
9234 	adev->gfx.kiq.ring.funcs = &gfx_v10_0_ring_funcs_kiq;
9235 
9236 	for (i = 0; i < adev->gfx.num_gfx_rings; i++)
9237 		adev->gfx.gfx_ring[i].funcs = &gfx_v10_0_ring_funcs_gfx;
9238 
9239 	for (i = 0; i < adev->gfx.num_compute_rings; i++)
9240 		adev->gfx.compute_ring[i].funcs = &gfx_v10_0_ring_funcs_compute;
9241 }
9242 
9243 static const struct amdgpu_irq_src_funcs gfx_v10_0_eop_irq_funcs = {
9244 	.set = gfx_v10_0_set_eop_interrupt_state,
9245 	.process = gfx_v10_0_eop_irq,
9246 };
9247 
9248 static const struct amdgpu_irq_src_funcs gfx_v10_0_priv_reg_irq_funcs = {
9249 	.set = gfx_v10_0_set_priv_reg_fault_state,
9250 	.process = gfx_v10_0_priv_reg_irq,
9251 };
9252 
9253 static const struct amdgpu_irq_src_funcs gfx_v10_0_priv_inst_irq_funcs = {
9254 	.set = gfx_v10_0_set_priv_inst_fault_state,
9255 	.process = gfx_v10_0_priv_inst_irq,
9256 };
9257 
9258 static const struct amdgpu_irq_src_funcs gfx_v10_0_kiq_irq_funcs = {
9259 	.set = gfx_v10_0_kiq_set_interrupt_state,
9260 	.process = gfx_v10_0_kiq_irq,
9261 };
9262 
9263 static void gfx_v10_0_set_irq_funcs(struct amdgpu_device *adev)
9264 {
9265 	adev->gfx.eop_irq.num_types = AMDGPU_CP_IRQ_LAST;
9266 	adev->gfx.eop_irq.funcs = &gfx_v10_0_eop_irq_funcs;
9267 
9268 	adev->gfx.kiq.irq.num_types = AMDGPU_CP_KIQ_IRQ_LAST;
9269 	adev->gfx.kiq.irq.funcs = &gfx_v10_0_kiq_irq_funcs;
9270 
9271 	adev->gfx.priv_reg_irq.num_types = 1;
9272 	adev->gfx.priv_reg_irq.funcs = &gfx_v10_0_priv_reg_irq_funcs;
9273 
9274 	adev->gfx.priv_inst_irq.num_types = 1;
9275 	adev->gfx.priv_inst_irq.funcs = &gfx_v10_0_priv_inst_irq_funcs;
9276 }
9277 
9278 static void gfx_v10_0_set_rlc_funcs(struct amdgpu_device *adev)
9279 {
9280 	switch (adev->asic_type) {
9281 	case CHIP_NAVI10:
9282 	case CHIP_NAVI14:
9283 	case CHIP_NAVY_FLOUNDER:
9284 	case CHIP_VANGOGH:
9285 	case CHIP_DIMGREY_CAVEFISH:
9286 	case CHIP_BEIGE_GOBY:
9287 	case CHIP_YELLOW_CARP:
9288 		adev->gfx.rlc.funcs = &gfx_v10_0_rlc_funcs;
9289 		break;
9290 	case CHIP_NAVI12:
9291 	case CHIP_SIENNA_CICHLID:
9292 		adev->gfx.rlc.funcs = &gfx_v10_0_rlc_funcs_sriov;
9293 		break;
9294 	default:
9295 		break;
9296 	}
9297 }
9298 
9299 static void gfx_v10_0_set_gds_init(struct amdgpu_device *adev)
9300 {
9301 	unsigned total_cu = adev->gfx.config.max_cu_per_sh *
9302 			    adev->gfx.config.max_sh_per_se *
9303 			    adev->gfx.config.max_shader_engines;
9304 
9305 	adev->gds.gds_size = 0x10000;
9306 	adev->gds.gds_compute_max_wave_id = total_cu * 32 - 1;
9307 	adev->gds.gws_size = 64;
9308 	adev->gds.oa_size = 16;
9309 }
9310 
9311 static void gfx_v10_0_set_user_wgp_inactive_bitmap_per_sh(struct amdgpu_device *adev,
9312 							  u32 bitmap)
9313 {
9314 	u32 data;
9315 
9316 	if (!bitmap)
9317 		return;
9318 
9319 	data = bitmap << GC_USER_SHADER_ARRAY_CONFIG__INACTIVE_WGPS__SHIFT;
9320 	data &= GC_USER_SHADER_ARRAY_CONFIG__INACTIVE_WGPS_MASK;
9321 
9322 	WREG32_SOC15(GC, 0, mmGC_USER_SHADER_ARRAY_CONFIG, data);
9323 }
9324 
9325 static u32 gfx_v10_0_get_wgp_active_bitmap_per_sh(struct amdgpu_device *adev)
9326 {
9327 	u32 data, wgp_bitmask;
9328 	data = RREG32_SOC15(GC, 0, mmCC_GC_SHADER_ARRAY_CONFIG);
9329 	data |= RREG32_SOC15(GC, 0, mmGC_USER_SHADER_ARRAY_CONFIG);
9330 
9331 	data &= CC_GC_SHADER_ARRAY_CONFIG__INACTIVE_WGPS_MASK;
9332 	data >>= CC_GC_SHADER_ARRAY_CONFIG__INACTIVE_WGPS__SHIFT;
9333 
9334 	wgp_bitmask =
9335 		amdgpu_gfx_create_bitmask(adev->gfx.config.max_cu_per_sh >> 1);
9336 
9337 	return (~data) & wgp_bitmask;
9338 }
9339 
9340 static u32 gfx_v10_0_get_cu_active_bitmap_per_sh(struct amdgpu_device *adev)
9341 {
9342 	u32 wgp_idx, wgp_active_bitmap;
9343 	u32 cu_bitmap_per_wgp, cu_active_bitmap;
9344 
9345 	wgp_active_bitmap = gfx_v10_0_get_wgp_active_bitmap_per_sh(adev);
9346 	cu_active_bitmap = 0;
9347 
9348 	for (wgp_idx = 0; wgp_idx < 16; wgp_idx++) {
9349 		/* if there is one WGP enabled, it means 2 CUs will be enabled */
9350 		cu_bitmap_per_wgp = 3 << (2 * wgp_idx);
9351 		if (wgp_active_bitmap & (1 << wgp_idx))
9352 			cu_active_bitmap |= cu_bitmap_per_wgp;
9353 	}
9354 
9355 	return cu_active_bitmap;
9356 }
9357 
9358 static int gfx_v10_0_get_cu_info(struct amdgpu_device *adev,
9359 				 struct amdgpu_cu_info *cu_info)
9360 {
9361 	int i, j, k, counter, active_cu_number = 0;
9362 	u32 mask, bitmap, ao_bitmap, ao_cu_mask = 0;
9363 	unsigned disable_masks[4 * 2];
9364 
9365 	if (!adev || !cu_info)
9366 		return -EINVAL;
9367 
9368 	amdgpu_gfx_parse_disable_cu(disable_masks, 4, 2);
9369 
9370 	mutex_lock(&adev->grbm_idx_mutex);
9371 	for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {
9372 		for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {
9373 			bitmap = i * adev->gfx.config.max_sh_per_se + j;
9374 			if (((adev->asic_type == CHIP_SIENNA_CICHLID) ||
9375 				(adev->asic_type == CHIP_YELLOW_CARP)) &&
9376 			    ((gfx_v10_3_get_disabled_sa(adev) >> bitmap) & 1))
9377 				continue;
9378 			mask = 1;
9379 			ao_bitmap = 0;
9380 			counter = 0;
9381 			gfx_v10_0_select_se_sh(adev, i, j, 0xffffffff);
9382 			if (i < 4 && j < 2)
9383 				gfx_v10_0_set_user_wgp_inactive_bitmap_per_sh(
9384 					adev, disable_masks[i * 2 + j]);
9385 			bitmap = gfx_v10_0_get_cu_active_bitmap_per_sh(adev);
9386 			cu_info->bitmap[i][j] = bitmap;
9387 
9388 			for (k = 0; k < adev->gfx.config.max_cu_per_sh; k++) {
9389 				if (bitmap & mask) {
9390 					if (counter < adev->gfx.config.max_cu_per_sh)
9391 						ao_bitmap |= mask;
9392 					counter++;
9393 				}
9394 				mask <<= 1;
9395 			}
9396 			active_cu_number += counter;
9397 			if (i < 2 && j < 2)
9398 				ao_cu_mask |= (ao_bitmap << (i * 16 + j * 8));
9399 			cu_info->ao_cu_bitmap[i][j] = ao_bitmap;
9400 		}
9401 	}
9402 	gfx_v10_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);
9403 	mutex_unlock(&adev->grbm_idx_mutex);
9404 
9405 	cu_info->number = active_cu_number;
9406 	cu_info->ao_cu_mask = ao_cu_mask;
9407 	cu_info->simd_per_cu = NUM_SIMD_PER_CU;
9408 
9409 	return 0;
9410 }
9411 
9412 static u32 gfx_v10_3_get_disabled_sa(struct amdgpu_device *adev)
9413 {
9414 	uint32_t efuse_setting, vbios_setting, disabled_sa, max_sa_mask;
9415 
9416 	efuse_setting = RREG32_SOC15(GC, 0, mmCC_GC_SA_UNIT_DISABLE);
9417 	efuse_setting &= CC_GC_SA_UNIT_DISABLE__SA_DISABLE_MASK;
9418 	efuse_setting >>= CC_GC_SA_UNIT_DISABLE__SA_DISABLE__SHIFT;
9419 
9420 	vbios_setting = RREG32_SOC15(GC, 0, mmGC_USER_SA_UNIT_DISABLE);
9421 	vbios_setting &= GC_USER_SA_UNIT_DISABLE__SA_DISABLE_MASK;
9422 	vbios_setting >>= GC_USER_SA_UNIT_DISABLE__SA_DISABLE__SHIFT;
9423 
9424 	max_sa_mask = amdgpu_gfx_create_bitmask(adev->gfx.config.max_sh_per_se *
9425 						adev->gfx.config.max_shader_engines);
9426 	disabled_sa = efuse_setting | vbios_setting;
9427 	disabled_sa &= max_sa_mask;
9428 
9429 	return disabled_sa;
9430 }
9431 
9432 static void gfx_v10_3_program_pbb_mode(struct amdgpu_device *adev)
9433 {
9434 	uint32_t max_sa_per_se, max_sa_per_se_mask, max_shader_engines;
9435 	uint32_t disabled_sa_mask, se_index, disabled_sa_per_se;
9436 
9437 	disabled_sa_mask = gfx_v10_3_get_disabled_sa(adev);
9438 
9439 	max_sa_per_se = adev->gfx.config.max_sh_per_se;
9440 	max_sa_per_se_mask = (1 << max_sa_per_se) - 1;
9441 	max_shader_engines = adev->gfx.config.max_shader_engines;
9442 
9443 	for (se_index = 0; max_shader_engines > se_index; se_index++) {
9444 		disabled_sa_per_se = disabled_sa_mask >> (se_index * max_sa_per_se);
9445 		disabled_sa_per_se &= max_sa_per_se_mask;
9446 		if (disabled_sa_per_se == max_sa_per_se_mask) {
9447 			WREG32_FIELD15(GC, 0, PA_SC_ENHANCE_3, FORCE_PBB_WORKLOAD_MODE_TO_ZERO, 1);
9448 			break;
9449 		}
9450 	}
9451 }
9452 
9453 static void gfx_v10_3_set_power_brake_sequence(struct amdgpu_device *adev)
9454 {
9455 	WREG32_SOC15(GC, 0, mmGRBM_GFX_INDEX,
9456 		     (0x1 << GRBM_GFX_INDEX__SA_BROADCAST_WRITES__SHIFT) |
9457 		     (0x1 << GRBM_GFX_INDEX__INSTANCE_BROADCAST_WRITES__SHIFT) |
9458 		     (0x1 << GRBM_GFX_INDEX__SE_BROADCAST_WRITES__SHIFT));
9459 
9460 	WREG32_SOC15(GC, 0, mmGC_CAC_IND_INDEX, ixPWRBRK_STALL_PATTERN_CTRL);
9461 	WREG32_SOC15(GC, 0, mmGC_CAC_IND_DATA,
9462 		     (0x1 << PWRBRK_STALL_PATTERN_CTRL__PWRBRK_STEP_INTERVAL__SHIFT) |
9463 		     (0x12 << PWRBRK_STALL_PATTERN_CTRL__PWRBRK_BEGIN_STEP__SHIFT) |
9464 		     (0x13 << PWRBRK_STALL_PATTERN_CTRL__PWRBRK_END_STEP__SHIFT) |
9465 		     (0xf << PWRBRK_STALL_PATTERN_CTRL__PWRBRK_THROTTLE_PATTERN_BIT_NUMS__SHIFT));
9466 
9467 	WREG32_SOC15(GC, 0, mmGC_THROTTLE_CTRL_Sienna_Cichlid,
9468 		     (0x1 << GC_THROTTLE_CTRL__PWRBRK_STALL_EN__SHIFT) |
9469 		     (0x1 << GC_THROTTLE_CTRL__PATTERN_MODE__SHIFT) |
9470 		     (0x5 << GC_THROTTLE_CTRL__RELEASE_STEP_INTERVAL__SHIFT));
9471 
9472 	WREG32_SOC15(GC, 0, mmDIDT_IND_INDEX, ixDIDT_SQ_THROTTLE_CTRL);
9473 
9474 	WREG32_SOC15(GC, 0, mmDIDT_IND_DATA,
9475 		     (0x1 << DIDT_SQ_THROTTLE_CTRL__PWRBRK_STALL_EN__SHIFT));
9476 }
9477 
9478 const struct amdgpu_ip_block_version gfx_v10_0_ip_block =
9479 {
9480 	.type = AMD_IP_BLOCK_TYPE_GFX,
9481 	.major = 10,
9482 	.minor = 0,
9483 	.rev = 0,
9484 	.funcs = &gfx_v10_0_ip_funcs,
9485 };
9486