Commit d1d22df1 authored by Mukul Joshi's avatar Mukul Joshi Committed by Alex Deucher

drm/amdkfd: Populate memory info before adding GPU node to topology

The local memory info needs to be fetched before the GPU node is added
to topology. Without this, the sysfs is incorrectly populated and the
size is reported as 0. This was causing rocr tests to fail. This issue
was caused because of a bad merge.
Signed-off-by: default avatarMukul Joshi <mukul.joshi@amd.com>
Reviewed-by: default avatarAmber Lin <Amber.Lin@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 1bd6dd21
...@@ -743,6 +743,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, ...@@ -743,6 +743,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
node->max_proc_per_quantum = max_proc_per_quantum; node->max_proc_per_quantum = max_proc_per_quantum;
atomic_set(&node->sram_ecc_flag, 0); atomic_set(&node->sram_ecc_flag, 0);
amdgpu_amdkfd_get_local_mem_info(kfd->adev, &kfd->local_mem_info);
dev_info(kfd_device, "Total number of KFD nodes to be created: %d\n", dev_info(kfd_device, "Total number of KFD nodes to be created: %d\n",
kfd->num_nodes); kfd->num_nodes);
for (i = 0; i < kfd->num_nodes; i++) { for (i = 0; i < kfd->num_nodes; i++) {
...@@ -793,8 +795,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, ...@@ -793,8 +795,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
if (kfd_resume_iommu(kfd)) if (kfd_resume_iommu(kfd))
goto kfd_resume_iommu_error; goto kfd_resume_iommu_error;
amdgpu_amdkfd_get_local_mem_info(kfd->adev, &kfd->local_mem_info);
kfd->init_complete = true; kfd->init_complete = true;
dev_info(kfd_device, "added device %x:%x\n", kfd->adev->pdev->vendor, dev_info(kfd_device, "added device %x:%x\n", kfd->adev->pdev->vendor,
kfd->adev->pdev->device); kfd->adev->pdev->device);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment