diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-14 13:29:51 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-12-14 13:29:51 +0000 |
commit | 3ec14773103f88ed7ee41f0c311e11ce06f2ca25 (patch) | |
tree | 4404d16b43f5e1a77ac0bdaed31415c37f9be7b1 /sys/dev/pci/drm | |
parent | ab60abb5c58f9cdaf17e3f511d34456c413e5bf9 (diff) |
drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
From Yifan Zhang
f3d9114ac99f4358809f44b390b304b8b53fb4a4 in linux 5.10.y/5.10.85
afd18180c07026f94a80ff024acef5f4159084a4 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/amdkfd/kfd_device.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 50707448cc7..eaeb9c7dc30 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -2303,10 +2303,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) amdgpu_xgmi_add_device(adev); amdgpu_amdkfd_device_init(adev); - r = amdgpu_amdkfd_resume_iommu(adev); - if (r) - goto init_failed; - amdgpu_fru_get_product_info(adev); init_failed: diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_device.c b/sys/dev/pci/drm/amd/amdkfd/kfd_device.c index 1204dae8579..84313135c2e 100644 --- a/sys/dev/pci/drm/amd/amdkfd/kfd_device.c +++ b/sys/dev/pci/drm/amd/amdkfd/kfd_device.c @@ -751,6 +751,9 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, kfd_cwsr_init(kfd); + if(kgd2kfd_resume_iommu(kfd)) + goto device_iommu_error; + if (kfd_resume(kfd)) goto kfd_resume_error; |