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