All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Zhu <James.Zhu@amd.com>
To: <stable@vger.kernel.org>
Cc: <jzhums@gmail.com>, <alexander.deucher@amd.com>,
	<kolAflash@kolahilft.de>, Felix Kuehling <Felix.Kuehling@amd.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 4/6] drm/amdgpu: move iommu_resume before ip init/resume
Date: Thu, 9 Dec 2021 17:09:54 -0500	[thread overview]
Message-ID: <20211209220956.3466442-5-James.Zhu@amd.com> (raw)
In-Reply-To: <20211209220956.3466442-1-James.Zhu@amd.com>

commit f02abeb0779700c308e661a412451b38962b8a0b upstream.

Separate iommu_resume from kfd_resume, and move it before
other amdgpu ip init/resume.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211277
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: James Zhu <James.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 97723f2b5ece..2947bded074a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2220,6 +2220,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
 	if (r)
 		goto init_failed;
 
+	r = amdgpu_amdkfd_resume_iommu(adev);
+	if (r)
+		goto init_failed;
+
 	r = amdgpu_device_ip_hw_init_phase1(adev);
 	if (r)
 		goto init_failed;
@@ -2913,6 +2917,10 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
 {
 	int r;
 
+	r = amdgpu_amdkfd_resume_iommu(adev);
+	if (r)
+		return r;
+
 	r = amdgpu_device_ip_resume_phase1(adev);
 	if (r)
 		return r;
@@ -4296,6 +4304,10 @@ static int amdgpu_do_asic_reset(struct amdgpu_hive_info *hive,
 
 			if (!r) {
 				dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n");
+				r = amdgpu_amdkfd_resume_iommu(tmp_adev);
+				if (r)
+					goto out;
+
 				r = amdgpu_device_ip_resume_phase1(tmp_adev);
 				if (r)
 					goto out;
-- 
2.25.1


  parent reply	other threads:[~2021-12-09 22:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 22:09 [PATCH 0/6] Bug:211277 fix backport for 5.10 stable James Zhu
2021-12-09 22:09 ` [PATCH 1/6] drm/amd/amdkfd: adjust dummy functions' placement James Zhu
2021-12-09 22:09 ` [PATCH 2/6] drm/amdkfd: separate kfd_iommu_resume from kfd_resume James Zhu
2021-12-09 22:09 ` [PATCH 3/6] drm/amdgpu: add amdgpu_amdkfd_resume_iommu James Zhu
2021-12-09 22:09 ` James Zhu [this message]
2021-12-09 22:09 ` [PATCH 5/6] drm/amdgpu: init iommu after amdkfd device init James Zhu
2021-12-09 22:09 ` [PATCH 6/6] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu
2021-12-10 13:33   ` Greg Kroah-Hartman
2021-12-10 14:14     ` James Zhu
2021-12-10 14:35       ` Greg Kroah-Hartman
2021-12-10 14:46         ` James Zhu
2021-12-10 15:12           ` Greg Kroah-Hartman
2021-12-10 15:33             ` James Zhu
2021-12-10  6:33 ` [PATCH 0/6] Bug:211277 fix backport for 5.10 stable Greg KH

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=20211209220956.3466442-5-James.Zhu@amd.com \
    --to=james.zhu@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jzhums@gmail.com \
    --cc=kolAflash@kolahilft.de \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.