From: Tong Liu01 <Tong.Liu01@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: "Jack Xiao" <Jack.Xiao@amd.com>,
guchun.chen@amd.com, "Feifei Xu" <Feifei.Xu@amd.com>,
horace.chen@amd.com, "Kevin Wang" <Kevin1.Wang@amd.com>,
"Tong Liu01" <Tong.Liu01@amd.com>,
"Tuikov Luben" <Luben.Tuikov@amd.com>,
"Deucher Alexander" <Alexander.Deucher@amd.com>,
"Evan Quan" <Evan.Quan@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Monk Liu" <Monk.Liu@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>
Subject: [PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded
Date: Wed, 22 Mar 2023 10:36:55 +0800 [thread overview]
Message-ID: <20230322023655.337567-1-Tong.Liu01@amd.com> (raw)
[why]
For Navi12 and CHIP_SIENNA_CICHLID SRIOV, TMR is not loaded. Should
also skip tmr unload
Signed-off-by: Tong Liu01 <Tong.Liu01@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 0b9e99c35a05..0a3d9f7e277b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -839,7 +839,15 @@ static void psp_prep_tmr_unload_cmd_buf(struct psp_context *psp,
static int psp_tmr_unload(struct psp_context *psp)
{
int ret;
- struct psp_gfx_cmd_resp *cmd = acquire_psp_cmd_buf(psp);
+ struct psp_gfx_cmd_resp *cmd;
+
+ /* For Navi12 and CHIP_SIENNA_CICHLID SRIOV, do not set up TMR.
+ * Already set up by host driver.
+ */
+ if (amdgpu_sriov_vf(psp->adev) && psp_skip_tmr(psp))
+ return 0;
+
+ cmd = acquire_psp_cmd_buf(psp);
psp_prep_tmr_unload_cmd_buf(psp, cmd);
dev_dbg(psp->adev->dev, "free PSP TMR buffer\n");
--
2.34.1
next reply other threads:[~2023-03-22 2:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 2:36 Tong Liu01 [this message]
2023-03-22 3:26 ` [PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded Chen, Guchun
-- strict thread matches above, loose matches on Subject: below --
2023-03-21 9:19 Tong Liu01
2023-03-21 14:30 ` Deucher, Alexander
2023-03-22 1:40 ` Chen, Guchun
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=20230322023655.337567-1-Tong.Liu01@amd.com \
--to=tong.liu01@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Evan.Quan@amd.com \
--cc=Feifei.Xu@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=Jack.Xiao@amd.com \
--cc=Kevin1.Wang@amd.com \
--cc=Luben.Tuikov@amd.com \
--cc=Monk.Liu@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=guchun.chen@amd.com \
--cc=horace.chen@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 NNTP newsgroup(s).