aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorDavid (Ming Qiang) Wu <David.Wu3@amd.com>2024-05-09 15:44:04 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-05-13 15:45:21 -0400
commita166ec28dbc0d13cd6f3d84818cdce778055f2e4 (patch)
treeefa02ef83ca29b13600cd19bfccdecedab89e4b3 /drivers/gpu/drm/amd/amdgpu
parent10fe1a79cd1bff3048e13120e93c02f8ecd05e9d (diff)
downloadlinux-a166ec28dbc0d13cd6f3d84818cdce778055f2e4.tar.gz
linux-a166ec28dbc0d13cd6f3d84818cdce778055f2e4.tar.bz2
linux-a166ec28dbc0d13cd6f3d84818cdce778055f2e4.zip
drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend
On suspend, we need to set power gating state to GATE when VCN5 is busy, otherwise we will get following error on resume: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring vcn_unified_0 test failed (-110) [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block <vcn_v5_0_0> failed -110 amdgpu: amdgpu_device_ip_resume failed (-110). PM: dpm_run_callback(): pci_pm_resume+0x0/0x100 returns -110 PM: failed to resume async: error -110 Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
index 9b87d6a49b39..36d4ca645c56 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c
@@ -229,6 +229,13 @@ static int vcn_v5_0_0_hw_fini(void *handle)
for (i = 0; i < adev->vcn.num_vcn_inst; ++i) {
if (adev->vcn.harvest_config & (1 << i))
continue;
+ if (!amdgpu_sriov_vf(adev)) {
+ if ((adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG) ||
+ (adev->vcn.cur_state != AMD_PG_STATE_GATE &&
+ RREG32_SOC15(VCN, i, regUVD_STATUS))) {
+ vcn_v5_0_0_set_powergating_state(adev, AMD_PG_STATE_GATE);
+ }
+ }
}
return 0;