drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
Subsystems (2)
PATCH v2 1/1 drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
v1: fix GFX10_ADDR_CONFIG programming for vcn1
v2: 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 speical offset
3. update vcn_4_0 and vcn_5_0
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 - drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
@@ -66,7 +66,6 @@#define VCN_ENC_CMD_REG_WAIT 0x0000000c#define VCN_AON_SOC_ADDRESS_2_0 0x1f800 -#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_VID_IP_ADDRESS_2_0 0x0#define VCN_AON_IP_ADDRESS_2_0 0x30000
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x1fd#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x503
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1 -0
@@ -40,6 +40,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +2 -1
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_HARVEST_MMSCH 0
@@ -614,7 +615,7 @@ static void vcn_v4_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC15_DPG_MODE (inst_idx,SOC15_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); }/**
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 -0
@@ -45,6 +45,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000static const struct amdgpu_hwip_reg_entry vcn_reg_list_4_0_3[] = {SOC15_REG_ENTRY_STR (VCN ,0 , regUVD_POWER_STATUS),
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +1 -0
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 (0x48300 + 0x38000) +#define VCN1_AON_SOC_ADDRESS_3_0 (0x48000 + 0x38000)#define VCN_HARVEST_MMSCH 0
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1 -1
@@ -533,7 +533,7 @@ static void vcn_v5_0_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC24_DPG_MODE (inst_idx,SOC24_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect);return ; }
Signature · 1 line
2.48.0.rc0.12.gaaf18a9a82
[AMD Official Use Only - AMD Internal Distribution Only]
Quoted 172 lines
-----Original Message-----
From: Dong, Ruijing <[email protected]>
Sent: May 5, 2025 10:46 AM
To: [email protected]; Jamadar, Saleemkhan <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Liu, Leo <[email protected]>; Dong, Ruijing <[email protected]>
Subject: [PATCH v2] drm/amdgpu/vcn: using separateVCN1_AON_SOCoffsetv1: fix
GFX10_ADDR_CONFIGprogramming for vcn1
v2:VCN1_AON_SOC_ADDRESS_3_0offset varies on different
VCN generations, the issue in vcn4.0.5 is caused by a differentVCN1_AON_SOC_ADDRESS_3_0offset.This patch does the following:
1. use the same offset for other VCN generations.
2. use the vcn4.0.5 speical offset
3. updatevcn_4_0andvcn_5_0Signed-off-by Ruijing Dong <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 - drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0
-1@@ -66,7 +66,6 @@#define VCN_ENC_CMD_REG_WAIT 0x0000000c#define VCN_AON_SOC_ADDRESS_2_0 0x1f800 -#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_VID_IP_ADDRESS_2_0 0x0#define VCN_AON_IP_ADDRESS_2_0 0x30000drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1
-0@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000 #define
mmUVD_CONTEXT_ID_INTERNAL_OFFSET0x1fd#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x503drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1
-0@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000 #define
mmUVD_CONTEXT_ID_INTERNAL_OFFSET0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0fdrivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1
-0@@ -40,6 +40,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000 #define
mmUVD_CONTEXT_ID_INTERNAL_OFFSET0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0fdrivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +1
-0@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000 #define VCN_HARVEST_MMSCH 0drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +1
-1@@ -614,7 +615,7 @@ static void vcn_v4_0_mc_resume_dpg_mode(structamdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC15_DPG_MODE (inst_idx ,SOC15_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev- >gfx.config.gb_addr_config, 0, indirect); + VCN, inst_idx, regUVD_GFX10_ADDR_CONFIG), adev- >gfx.config.gb_addr_config, 0, indirect);}
/**
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1
-0@@ -45,6 +45,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000static const struct amdgpu_hwip_reg_entry vcn_reg_list_4_0_3[] = {SOC15_REG_ENTRY_STR (VCN ,0 , regUVD_POWER_STATUS),drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +1
-0@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 (0x48300 + 0x38000) +#define VCN1_AON_SOC_ADDRESS_3_0 (0x48000 +0x38000 )#define VCN_HARVEST_MMSCH 0drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +1
-1@@ -533,7 +533,7 @@ static void vcn_v5_0_0_mc_resume_dpg_mode(structamdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC24_DPG_MODE (inst_idx ,SOC24_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev- >gfx.config.gb_addr_config, 0, indirect); + VCN, inst_idx, regUVD_GFX10_ADDR_CONFIG), adev- >gfx.config.gb_addr_config, 0, indirect);return;}
--
2.48.0.rc0.12.gaaf18a9a82
[AMD Official Use Only - AMD Internal Distribution Only]
-----Original Message-----
From: Dong, Ruijing <[email protected]>
Sent: Monday, May 5, 2025 8:16 PM
To: [email protected]; Jamadar, Saleemkhan <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Liu, Leo <[email protected]>; Dong, Ruijing <[email protected]>
Subject: [PATCH v2] drm/amdgpu/vcn: using separate VCN1_AON_SOC offset
v1: fix GFX10_ADDR_CONFIG programming for vcn1
v2: 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 speical offset
3. update vcn_4_0 and vcn_5_0
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 - drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 2 +- 8 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +0 -1
@@ -66,7 +66,6 @@#define VCN_ENC_CMD_REG_WAIT 0x0000000c#define VCN_AON_SOC_ADDRESS_2_0 0x1f800 -#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_VID_IP_ADDRESS_2_0 0x0#define VCN_AON_IP_ADDRESS_2_0 0x30000
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x1fd#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x503
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +1 -0
@@ -39,6 +39,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c +1 -0
@@ -40,6 +40,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fa00#define VCN1_VID_SOC_ADDRESS_3_0 0x48200 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define mmUVD_CONTEXT_ID_INTERNAL_OFFSET 0x27#define mmUVD_GPCOM_VCPU_CMD_INTERNAL_OFFSET 0x0f
drivers/gpu/drm/amd/amdgpu/vcn_v4_0.c +3 -1
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000#define VCN_HARVEST_MMSCH 0
@@ -614,7 +615,7 @@ static void vcn_v4_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC15_DPG_MODE (inst_idx,SOC15_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), +adev->gfx.config.gb_addr_config,0 , indirect); }
/**
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +1 -0
@@ -45,6 +45,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 0x48300 +#define VCN1_AON_SOC_ADDRESS_3_0 0x48000static const struct amdgpu_hwip_reg_entry vcn_reg_list_4_0_3[] = { SOC15_REG_ENTRY_STR(VCN, 0, regUVD_POWER_STATUS), diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
index a8cfc63713ad..558469744f3a 100644
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c +1 -0
@@ -46,6 +46,7 @@#define VCN_VID_SOC_ADDRESS_2_0 0x1fb00#define VCN1_VID_SOC_ADDRESS_3_0 (0x48300 + 0x38000) +#define VCN1_AON_SOC_ADDRESS_3_0 (0x48000 + 0x38000)#define VCN_HARVEST_MMSCH 0
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c +2 -1
@@ -533,7 +533,7 @@ static void vcn_v5_0_0_mc_resume_dpg_mode(struct amdgpu_vcn_inst *vinst,/* VCN global tiling registers */ WREG32_SOC24_DPG_MODE (inst_idx,SOC24_DPG_MODE_OFFSET ( -VCN ,0 , regUVD_GFX10_ADDR_CONFIG), adev->gfx.config.gb_addr_config,0 , indirect); +VCN , inst_idx, regUVD_GFX10_ADDR_CONFIG), +adev->gfx.config.gb_addr_config,0 , indirect);return ;
}
--
2.48.0.rc0.12.gaaf18a9a82