Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: init iommu after amdkfd device init

This patch is to fix clinfo failure in Raven/Picasso:

Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.2 AMD-APP (3364.0)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback

Platform Name: AMD Accelerated Parallel Processing Number of devices: 0

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Tested-by: James Zhu <James.Zhu@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yifan Zhang and committed by
Alex Deucher
286826d7 499f4d38

+4 -4
+4 -4
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 2360 2360 if (r) 2361 2361 goto init_failed; 2362 2362 2363 - r = amdgpu_amdkfd_resume_iommu(adev); 2364 - if (r) 2365 - goto init_failed; 2366 - 2367 2363 r = amdgpu_device_ip_hw_init_phase1(adev); 2368 2364 if (r) 2369 2365 goto init_failed; ··· 2397 2401 /* Don't init kfd if whole hive need to be reset during init */ 2398 2402 if (!adev->gmc.xgmi.pending_reset) 2399 2403 amdgpu_amdkfd_device_init(adev); 2404 + 2405 + r = amdgpu_amdkfd_resume_iommu(adev); 2406 + if (r) 2407 + goto init_failed; 2400 2408 2401 2409 amdgpu_fru_get_product_info(adev); 2402 2410