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>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH 2/5] drm/amdgpu: add amdgpu_amdkfd_resume_iommu
Date: Fri, 3 Dec 2021 12:27:29 -0500	[thread overview]
Message-ID: <1638552452-4198-3-git-send-email-James.Zhu@amd.com> (raw)
In-Reply-To: <1638552452-4198-1-git-send-email-James.Zhu@amd.com>

commit 8066008482e533e91934bee49765bf8b4a7c40db upstream.

Add amdgpu_amdkfd_resume_iommu for amdgpu.

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>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 10 ++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 0544460..ef83047 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -194,6 +194,16 @@ void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm)
 		kgd2kfd_suspend(adev->kfd.dev, run_pm);
 }
 
+int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev)
+{
+	int r = 0;
+
+	if (adev->kfd.dev)
+		r = kgd2kfd_resume_iommu(adev->kfd.dev);
+
+	return r;
+}
+
 int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm)
 {
 	int r = 0;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
index 7f78bcf..896ae32 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
@@ -126,6 +126,7 @@ int amdgpu_amdkfd_init(void);
 void amdgpu_amdkfd_fini(void);
 
 void amdgpu_amdkfd_suspend(struct amdgpu_device *adev, bool run_pm);
+int amdgpu_amdkfd_resume_iommu(struct amdgpu_device *adev);
 int amdgpu_amdkfd_resume(struct amdgpu_device *adev, bool run_pm);
 void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev,
 			const void *ih_ring_entry);
-- 
2.7.4


  parent reply	other threads:[~2021-12-03 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 17:27 [PATCH 0/5] Bug:211277 fix backport for 5.10, 5.12 stable James Zhu
2021-12-03 17:27 ` [PATCH 1/5] drm/amdkfd: separate kfd_iommu_resume from kfd_resume James Zhu
2021-12-03 17:27 ` James Zhu [this message]
2021-12-03 17:27 ` [PATCH 3/5] drm/amdgpu: move iommu_resume before ip init/resume James Zhu
2021-12-03 17:27 ` [PATCH 4/5] drm/amdgpu: init iommu after amdkfd device init James Zhu
2021-12-03 17:27 ` [PATCH 5/5] drm/amdkfd: fix boot failure when iommu is disabled in Picasso James Zhu
2021-12-05 12:45   ` Greg Kroah-Hartman
2021-12-05 12:42 ` [PATCH 0/5] Bug:211277 fix backport for 5.10, 5.12 stable Greg KH
2021-12-07  8:04 ` 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=1638552452-4198-3-git-send-email-James.Zhu@amd.com \
    --to=james.zhu@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.