drm/amdgpu: add amdgpu_amdkfd_resume_iommu
authorjsg <jsg@openbsd.org>
Tue, 14 Dec 2021 13:24:12 +0000 (13:24 +0000)
committerjsg <jsg@openbsd.org>
Tue, 14 Dec 2021 13:24:12 +0000 (13:24 +0000)
From James Zhu
fe9dca7dda61f8f3b3000df2abe88c60d1bfab93 in linux 5.10.y/5.10.85
8066008482e533e91934bee49765bf8b4a7c40db in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h

index bd2a008..d32bc80 100644 (file)
@@ -196,6 +196,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;
index 9f52e7b..17723f1 100644 (file)
@@ -121,6 +121,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);