From: jsg Date: Tue, 14 Dec 2021 13:28:06 +0000 (+0000) Subject: drm/amdgpu: init iommu after amdkfd device init X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=daff3080e50c904064f0b4486a0f67033a0ee8ec;p=openbsd drm/amdgpu: init iommu after amdkfd device init From Yifan Zhang 7508a9aa65b959bbc6d9e42c9683520bddb7db0d in linux 5.10.y/5.10.85 714d9e4574d54596973ee3b0624ee4a16264d700 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 5eaad334878..50707448cc7 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -2268,10 +2268,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev) if (r) goto init_failed; - r = amdgpu_amdkfd_resume_iommu(adev); - if (r) - goto init_failed; - r = amdgpu_device_ip_hw_init_phase1(adev); if (r) goto init_failed; @@ -2307,6 +2303,10 @@ 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: