drm/amdgpu/vcn5.0.1: use correct dpm helper
Subsystems (2)
Alex Deucher
maintainerPATCH 1/4 drm/amdgpu/vcn5.0.1: use correct dpm helper
The VCN and UVD helpers were split in
commit ff69bba05f08 ("drm/amd/pm: add inst to dpm_set_powergating_by_smu") However, this happened in parallel to the vcn 5.0.1 development so it was missed there.
--- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +8 -4
@@ -575,8 +575,10 @@ static int vcn_v5_0_1_start(struct amdgpu_device *adev)uint32_t tmp;int i, j, k, r, vcn_inst; -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_uvd (adev, true); +for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { +if (adev->pm.dpm_enabled) +amdgpu_dpm_enable_vcn (adev, true, i); + }for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { fw_shared = adev->vcn.inst[i].fw_shared.cpu_addr;
@@ -816,8 +818,10 @@ static int vcn_v5_0_1_stop(struct amdgpu_device *adev)WREG32_SOC15 (VCN , vcn_inst, regUVD_STATUS,0 ); } -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_uvd (adev, false); +for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { +if (adev->pm.dpm_enabled) +amdgpu_dpm_enable_vcn (adev, false, i); + }return 0 ; }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 2/4 drm/amdgpu/vcn5.0.1: drop dpm power helpers
VCN 5.0.1 doesn't support powergating so there is
no need to call these.
--- drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c +0 -10
@@ -575,11 +575,6 @@ static int vcn_v5_0_1_start(struct amdgpu_device *adev)uint32_t tmp;int i, j, k, r, vcn_inst; -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, true, i); - } -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { fw_shared = adev->vcn.inst[i].fw_shared.cpu_addr;
@@ -818,11 +813,6 @@ static int vcn_v5_0_1_stop(struct amdgpu_device *adev)WREG32_SOC15 (VCN , vcn_inst, regUVD_STATUS,0 ); } -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, false, i); - } -return 0 ; }
Signature · 1 line
2.48.1
Alex Deucher
maintainerPATCH 3/4 drm/amdgpu/vcn2.5: drop dpm power helpers
In reply to Alex DeucherVCN 2.5 doesn't support powergating so there is
no need to call these.
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +0 -6
@@ -1011,9 +1011,6 @@ static int vcn_v2_5_start(struct amdgpu_device *adev, int i)if (adev->vcn.harvest_config & (1 << i))return 0 ; -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, true, i); -if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG )return vcn_v2_5_start_dpg_mode (adev, i, adev->vcn.indirect_sram);
@@ -1465,9 +1462,6 @@ static int vcn_v2_5_stop(struct amdgpu_device *adev, int i)UVD_POWER_STATUS__UVD_POWER_STATUS_MASK , ~UVD_POWER_STATUS__UVD_POWER_STATUS_MASK); -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, false, i); -return 0 ; }
Signature · 1 line
2.48.1
Re: [PATCH 3/4] drm/amdgpu/vcn2.5: drop dpm power helpers
Quoted 5 lines · Alex Deucher
VCN 2.5 doesn't support powergating so there is
no need to call these.Signed-off-by Alex Deucher <[email protected]>
Dropping this one. VCN 2.5 doesn't support powergating, but this function gets used for other stuff in the smu code.
Alex
Quoted 31 lines
--- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 6 ------ 1 file changed, 6 deletions(-)drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +0
-7@@ -1011,9 +1011,6 @@ static int vcn_v2_5_start(struct amdgpu_device *adev, int i)if (adev->vcn.harvest_config & (1 << i))return 0 ; -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, true, i); -if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG )return vcn_v2_5_start_dpg_mode (adev, i, adev->vcn.indirect_sram);@@ -1465,9 +1462,6 @@ static int vcn_v2_5_stop(struct amdgpu_device *adev, int i)UVD_POWER_STATUS__UVD_POWER_STATUS_MASK , ~UVD_POWER_STATUS__UVD_POWER_STATUS_MASK); -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, false, i); -return 0 ; } --2.48.1
Alex Deucher
maintainerPATCH 4/4 drm/amdgpu/vcn4.0.3: drop dpm power helpers
In reply to Alex DeucherVCN 4.0.3 doesn't support powergating so there is
no need to call these.
--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0 -10
@@ -1127,11 +1127,6 @@ static int vcn_v4_0_3_start(struct amdgpu_device *adev)int i, j, k, r, vcn_inst;uint32_t tmp; -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, true, i); - } -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) {if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) { r =vcn_v4_0_3_start_dpg_mode (adev, i, adev->vcn.indirect_sram);
@@ -1403,11 +1398,6 @@ static int vcn_v4_0_3_stop(struct amdgpu_device *adev)vcn_v4_0_3_enable_clock_gating (adev, i); } Done: -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, false, i); - } -return 0 ; }
Signature · 1 line
2.48.1
Re: [PATCH 4/4] drm/amdgpu/vcn4.0.3: drop dpm power helpers
Quoted 4 lines · Alex Deucher
VCN 4.0.3 doesn't support powergating so there is
no need to call these.Signed-off-by Alex Deucher <[email protected]>
Patches 1, 2 & 4
Patch 3
Thanks,
Lijo
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c +0
-10@@ -1127,11 +1127,6 @@ static int vcn_v4_0_3_start(struct amdgpu_device *adev)int i, j, k, r, vcn_inst;uint32_t tmp; -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, true, i); - } -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) {if (adev->pg_flags &AMD_PG_SUPPORT_VCN_DPG ) { r =vcn_v4_0_3_start_dpg_mode (adev, i, adev->vcn.indirect_sram);@@ -1403,11 +1398,6 @@ static int vcn_v4_0_3_stop(struct amdgpu_device *adev)vcn_v4_0_3_enable_clock_gating (adev, i); } Done: -for (i =0 ; i < adev->vcn.num_vcn_inst; ++i) { -if (adev->pm.dpm_enabled) -amdgpu_dpm_enable_vcn (adev, false, i); - } -return 0 ; }