summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_device.c
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2023-05-12 08:22:57 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 17:37:24 +0300
commit9a3ce1a7a9e5372d8c275bf3fbef4456c8407145 (patch)
tree53d5cae231f6e29a8449b99c26a5d6001500fcb5 /drivers/gpu/drm/amd/amdkfd/kfd_device.c
parent0409022c15623d91c112e51f38cb62633becd432 (diff)
downloadlinux-9a3ce1a7a9e5372d8c275bf3fbef4456c8407145.tar.xz
drm/amdgpu: Do not access members of xcp w/o check (v2)
Not all the asic needs xcp. ensure check xcp availabity before accessing its member. v2: add missing change in kfd_topology.c Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 2cfef3f9456f..986543a000bf 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -784,7 +784,7 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
atomic_set(&node->sram_ecc_flag, 0);
amdgpu_amdkfd_get_local_mem_info(kfd->adev,
- &node->local_mem_info, node->xcp->id);
+ &node->local_mem_info, node->xcp);
/* Initialize the KFD node */
if (kfd_init_node(node)) {