drm/amdgpu: reduce the full gpu access time in amdgpu_device_init.
Subsystems (2)
PATCH 1/1 drm/amdgpu: reduce the full gpu access time in amdgpu_device_init.
[Why]
the function "pci_p2pdma_add_resource" in "kfd_ais_init", and function "devm_memremap_pages" in "kgd2kfd_init_zone_device", sometimes will cost time about 4s,but the gpu full access time is 3s, will cause gim reset vf.
[How]
move the two function after release full gpu access(amdgpu_virt_release_full_gpu).
Signed-off-by chong li <[email protected]>
Change-Id I2db38d905d9dd7fedc4c6a38e325320268c2d84d
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -6
@@ -3331,12 +3331,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)if (adev->mman.buffer_funcs_ring->sched.ready)amdgpu_ttm_set_buffer_funcs_status (adev, true); -/* Don't init kfd if whole hive need to be reset during init */ -if (adev->init_lvl->level !=AMDGPU_INIT_LEVEL_MINIMAL_XGMI ) { -kgd2kfd_init_zone_device (adev); -amdgpu_amdkfd_device_init (adev); - } -amdgpu_fru_get_product_info (adev);if (!amdgpu_sriov_vf (adev) ||amdgpu_sriov_ras_cper_en (adev))
@@ -4926,6 +4920,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,flush_delayed_work (&adev->delayed_init_work); } +/* Don't init kfd if whole hive need to be reset during init */ +if (adev->init_lvl->level !=AMDGPU_INIT_LEVEL_MINIMAL_XGMI ) { +kgd2kfd_init_zone_device (adev); +amdgpu_amdkfd_device_init (adev); + } +if (adev->init_lvl->level ==AMDGPU_INIT_LEVEL_MINIMAL_XGMI )amdgpu_xgmi_reset_on_init (adev);/*
Signature · 1 line
2.48.1