Skip to content

Commit 4b27a33

Browse files
alexsierragalexdeucher
authored andcommitted
drm/amdgpu: Force order between a read and write to the same address
Setting register to force ordering to prevent read/write or write/read hazards for un-cached modes. Signed-off-by: Alex Sierra <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x
1 parent 884e9b0 commit 4b27a33

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ MODULE_FIRMWARE("amdgpu/gc_11_5_0_me.bin");
8989
MODULE_FIRMWARE("amdgpu/gc_11_5_0_mec.bin");
9090
MODULE_FIRMWARE("amdgpu/gc_11_5_0_rlc.bin");
9191

92+
static const struct soc15_reg_golden golden_settings_gc_11_0[] = {
93+
SOC15_REG_GOLDEN_VALUE(GC, 0, regTCP_CNTL, 0x20000000, 0x20000000)
94+
};
95+
9296
static const struct soc15_reg_golden golden_settings_gc_11_0_1[] =
9397
{
9498
SOC15_REG_GOLDEN_VALUE(GC, 0, regCGTT_GS_NGG_CLK_CTRL, 0x9fff8fff, 0x00000010),
@@ -304,6 +308,10 @@ static void gfx_v11_0_init_golden_registers(struct amdgpu_device *adev)
304308
default:
305309
break;
306310
}
311+
soc15_program_register_sequence(adev,
312+
golden_settings_gc_11_0,
313+
(const u32)ARRAY_SIZE(golden_settings_gc_11_0));
314+
307315
}
308316

309317
static void gfx_v11_0_write_data_to_reg(struct amdgpu_ring *ring, int eng_sel,

drivers/gpu/drm/amd/include/asic_reg/gc/gc_11_0_0_offset.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6369,6 +6369,8 @@
63696369
#define regTCP_INVALIDATE_BASE_IDX 1
63706370
#define regTCP_STATUS 0x19a1
63716371
#define regTCP_STATUS_BASE_IDX 1
6372+
#define regTCP_CNTL 0x19a2
6373+
#define regTCP_CNTL_BASE_IDX 1
63726374
#define regTCP_CNTL2 0x19a3
63736375
#define regTCP_CNTL2_BASE_IDX 1
63746376
#define regTCP_DEBUG_INDEX 0x19a5

0 commit comments

Comments
 (0)