drm/amdkfd: fix boot failure when iommu is disabled in Picasso.
authorjsg <jsg@openbsd.org>
Tue, 14 Dec 2021 13:29:50 +0000 (13:29 +0000)
committerjsg <jsg@openbsd.org>
Tue, 14 Dec 2021 13:29:50 +0000 (13:29 +0000)
From Yifan Zhang
f3d9114ac99f4358809f44b390b304b8b53fb4a4 in linux 5.10.y/5.10.85
afd18180c07026f94a80ff024acef5f4159084a4 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
sys/dev/pci/drm/amd/amdkfd/kfd_device.c

index 5070744..eaeb9c7 100644 (file)
@@ -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:
index 1204dae..8431313 100644 (file)
@@ -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;