From: jsg Date: Tue, 14 Dec 2021 13:24:12 +0000 (+0000) Subject: drm/amdgpu: add amdgpu_amdkfd_resume_iommu X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0b21fb23b009e5971dc44edfbce57e4378f94ef4;p=openbsd drm/amdgpu: add amdgpu_amdkfd_resume_iommu From James Zhu fe9dca7dda61f8f3b3000df2abe88c60d1bfab93 in linux 5.10.y/5.10.85 8066008482e533e91934bee49765bf8b4a7c40db in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c index bd2a008176c..d32bc80d404 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -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; diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h index 9f52e7b77ed..17723f11b80 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd.h @@ -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);