Skip to content

Commit b7e84fb

Browse files
ruijingdongalexdeucher
authored andcommitted
drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
VCN1_AON_SOC_ADDRESS_3_0 offset varies on different VCN generations, the issue in vcn4.0.5 is caused by a different VCN1_AON_SOC_ADDRESS_3_0 offset. This patch does the following: 1. use the same offset for other VCN generations. 2. use the vcn4.0.5 special offset 3. update vcn_4_0 and vcn_5_0 Acked-by: Saleemkhan Jamadar <[email protected]> Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Ruijing Dong <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit 5c89ced) Cc: [email protected]
1 parent 65924ec commit b7e84fb

File tree

8 files changed

+10
-3
lines changed

8 files changed

+10
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
#define VCN_ENC_CMD_REG_WAIT 0x0000000c
6767

6868
#define VCN_AON_SOC_ADDRESS_2_0 0x1f800
69-
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
7069
#define VCN_VID_IP_ADDRESS_2_0 0x0
7170
#define VCN_AON_IP_ADDRESS_2_0 0x30000
7271

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00
4141
#define VCN1_VID_SOC_ADDRESS_3_0 0x48200
42+
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
4243

4344
#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x1fd
4445
#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x503

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00
4141
#define VCN1_VID_SOC_ADDRESS_3_0 0x48200
42+
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
4243

4344
#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27
4445
#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040

4141
#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00
4242
#define VCN1_VID_SOC_ADDRESS_3_0 0x48200
43+
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
4344

4445
#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27
4546
#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00
4848
#define VCN1_VID_SOC_ADDRESS_3_0 0x48300
49+
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
4950

5051
#define VCN_HARVEST_MMSCH 0
5152

@@ -614,7 +615,8 @@ static void vcn_v4_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,
614615

615616
/* VCN global tiling registers */
616617
WREG32_SOC15_DPG_MODE(inst_idx, SOC15_DPG_MODE_OFFSET(
617-
VCN, 0, regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config, 0, indirect);
618+
VCN, inst_idx, regUVD_GFX10_ADDR_CONFIG),
619+
adev->gfx.config.gb_addr_config, 0, indirect);
618620
}
619621

620622
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545

4646
#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00
4747
#define VCN1_VID_SOC_ADDRESS_3_0 0x48300
48+
#define VCN1_AON_SOC_ADDRESS_3_0 0x48000
4849

4950
static const struct amdgpu_hwip_reg_entry vcn_reg_list_4_0_3[] = {
5051
SOC15_REG_ENTRY_STR(VCN, 0, regUVD_POWER_STATUS),

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00
4848
#define VCN1_VID_SOC_ADDRESS_3_0 (0x48300 + 0x38000)
49+
#define VCN1_AON_SOC_ADDRESS_3_0 (0x48000 + 0x38000)
4950

5051
#define VCN_HARVEST_MMSCH 0
5152

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ static void vcn_v5_0_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,
533533

534534
/* VCN global tiling registers */
535535
WREG32_SOC24_DPG_MODE(inst_idx, SOC24_DPG_MODE_OFFSET(
536-
VCN, 0, regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config, 0, indirect);
536+
VCN, inst_idx, regUVD_GFX10_ADDR_CONFIG),
537+
adev->gfx.config.gb_addr_config, 0, indirect);
537538

538539
return;
539540
}

0 commit comments

Comments
 (0)