From: "David (Ming Qiang) Wu" <David.Wu3@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <Christian.Koenig@amd.com>
Cc: <alexander.deucher@amd.com>, <leo.liu@amd.com>, <sonny.jiang@amd.com>
Subject: [PATCH] drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend
Date: Thu, 9 May 2024 15:58:51 -0400 [thread overview]
Message-ID: <20240509195851.1481475-1-David.Wu3@amd.com> (raw)
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>
---
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_0.c | 7 +++++++
1 file changed, 7 insertions(+)
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;
--
2.34.1
next reply other threads:[~2024-05-09 19:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 19:58 David (Ming Qiang) Wu [this message]
2024-05-10 13:15 ` [PATCH] drm/amdgpu/vcn: set VCN5 power gating state to GATE on suspend Liu, Leo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240509195851.1481475-1-David.Wu3@amd.com \
--to=david.wu3@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=leo.liu@amd.com \
--cc=sonny.jiang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).