@@ -202,6 +202,12 @@ static const struct amdgpu_hwip_reg_entry gc_gfx_queue_reg_list_12[] = {
202
202
SOC15_REG_ENTRY_STR (GC , 0 , regCP_IB1_BUFSZ )
203
203
};
204
204
205
+ static const struct soc15_reg_golden golden_settings_gc_12_0 [] = {
206
+ SOC15_REG_GOLDEN_VALUE (GC , 0 , regDB_MEM_CONFIG , 0x0000000f , 0x0000000f ),
207
+ SOC15_REG_GOLDEN_VALUE (GC , 0 , regCB_HW_CONTROL_1 , 0x03000000 , 0x03000000 ),
208
+ SOC15_REG_GOLDEN_VALUE (GC , 0 , regGL2C_CTRL5 , 0x00000070 , 0x00000020 )
209
+ };
210
+
205
211
#define DEFAULT_SH_MEM_CONFIG \
206
212
((SH_MEM_ADDRESS_MODE_64 << SH_MEM_CONFIG__ADDRESS_MODE__SHIFT) | \
207
213
(SH_MEM_ALIGNMENT_MODE_UNALIGNED << SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT) | \
@@ -3432,6 +3438,24 @@ static void gfx_v12_0_disable_gpa_mode(struct amdgpu_device *adev)
3432
3438
WREG32_SOC15 (GC , 0 , regCPG_PSP_DEBUG , data );
3433
3439
}
3434
3440
3441
+ static void gfx_v12_0_init_golden_registers (struct amdgpu_device * adev )
3442
+ {
3443
+ if (amdgpu_sriov_vf (adev ))
3444
+ return ;
3445
+
3446
+ switch (amdgpu_ip_version (adev , GC_HWIP , 0 )) {
3447
+ case IP_VERSION (12 , 0 , 0 ):
3448
+ case IP_VERSION (12 , 0 , 1 ):
3449
+ if (adev -> rev_id == 0 )
3450
+ soc15_program_register_sequence (adev ,
3451
+ golden_settings_gc_12_0 ,
3452
+ (const u32 )ARRAY_SIZE (golden_settings_gc_12_0 ));
3453
+ break ;
3454
+ default :
3455
+ break ;
3456
+ }
3457
+ }
3458
+
3435
3459
static int gfx_v12_0_hw_init (void * handle )
3436
3460
{
3437
3461
int r ;
@@ -3472,6 +3496,9 @@ static int gfx_v12_0_hw_init(void *handle)
3472
3496
}
3473
3497
}
3474
3498
3499
+ if (!amdgpu_emu_mode )
3500
+ gfx_v12_0_init_golden_registers (adev );
3501
+
3475
3502
adev -> gfx .is_poweron = true;
3476
3503
3477
3504
if (get_gb_addr_config (adev ))
0 commit comments