drm/amdgpu: fix bug mclk can't change on Polaris
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix bug mclk can't change on Polaris
From: Rex Zhu <[email protected]>
the root cause is we gate the clock to uvd vcpu. mclk's change should need the response from uvd if it is power on.
Signed-off-by Rex Zhu <[email protected]>
Acked-by Christian König <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c +4 -2
@@ -640,7 +640,7 @@ static void uvd_v5_0_enable_clock_gating(struct amdgpu_device *adev, bool enableUVD_SUVD_CGC_GATE__SDB_MASK ;if (enable) { - data3 |= (UVD_CGC_GATE__SYS_MASK | + data3 |= (UVD_CGC_GATE__SYS_MASK | UVD_CGC_GATE__UDEC_MASK | UVD_CGC_GATE__MPEG2_MASK | UVD_CGC_GATE__RBC_MASK |
@@ -656,9 +656,11 @@ static void uvd_v5_0_enable_clock_gating(struct amdgpu_device *adev, bool enableUVD_CGC_GATE__UDEC_DB_MASK |UVD_CGC_GATE__UDEC_MP_MASK |UVD_CGC_GATE__WCB_MASK | -UVD_CGC_GATE__VCPU_MASK |UVD_CGC_GATE__JPEG_MASK | UVD_CGC_GATE__SCPU_MASK); +/* only in pg enabled, we can gate clock to vcpu*/ +if (adev->pg_flags &AMD_PG_SUPPORT_UVD ) + data3 |=UVD_CGC_GATE__VCPU_MASK ; data3 &= ~UVD_CGC_GATE__REGS_MASK ; data1 |= suvd_flags; }else {
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +4 -1
@@ -879,10 +879,13 @@ static void uvd_v6_0_enable_clock_gating(struct amdgpu_device *adev, bool enableUVD_CGC_GATE__UDEC_DB_MASK |UVD_CGC_GATE__UDEC_MP_MASK |UVD_CGC_GATE__WCB_MASK | -UVD_CGC_GATE__VCPU_MASK |UVD_CGC_GATE__JPEG_MASK |UVD_CGC_GATE__SCPU_MASK | UVD_CGC_GATE__JPEG2_MASK); +/* only in pg enabled, we can gate clock to vcpu*/ +if (adev->pg_flags &AMD_PG_SUPPORT_UVD ) + data3 |=UVD_CGC_GATE__VCPU_MASK ; + data3 &= ~UVD_CGC_GATE__REGS_MASK ; }else { data3 =0 ;
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1480368574-29681-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amd/powerplay: initialize the soft_regs offset in struct smu7_hwmgr
From: Rex Zhu <[email protected]>
This could lead to mclk dpm problems on some boards.
Signed-off-by Rex Zhu <[email protected]>
Reviewed-by Huang Rui <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smc.c +4 -1
@@ -2214,6 +2214,7 @@ uint32_t polaris10_get_mac_definition(uint32_t value)int polaris10_process_firmware_header (struct pp_hwmgr *hwmgr) {struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smumgr->backend); +struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);uint32_t tmp;int result;bool error = false;
@@ -2233,8 +2234,10 @@ int polaris10_process_firmware_header(struct pp_hwmgr *hwmgr) offsetof(SMU74_Firmware_Header , SoftRegisters), &tmp, SMC_RAM_END); -if (!result) +if (!result) { + data->soft_regs_start = tmp; smu_data->smu7_data.soft_regs_start = tmp; + } error |= (0 != result);
Signature · 6 lines
2.5.5 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx