aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
diff options
context:
space:
mode:
authorHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>2024-05-01 14:09:04 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-05-13 16:12:02 -0400
commit8e8c68f4c90d80ba9a3b52fe832917f6878a15fa (patch)
tree01cc178f25891c5fdf5d4e1d8540e03d91475b59 /drivers/gpu/drm/amd/amdkfd/kfd_topology.c
parentb61467778e69c8e7e43dff9d1e2e8940c5df42fa (diff)
drm/amdkfd: Use dev_error intead of pr_error
No functional change. This will help in moving gpu_id creation to next step while still being able to identify the correct GPU Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_topology.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_topology.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 8b42f15a2847..219dcf504f24 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1772,7 +1772,7 @@ static void kfd_fill_cache_non_crat_info(struct kfd_topology_device *dev, struct
pr_debug("Added [%d] GPU cache entries\n", num_of_entries);
}
-static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
+static int kfd_topology_add_device_locked(struct kfd_node *gpu,
struct kfd_topology_device **dev)
{
int proximity_domain = ++topology_crat_proximity_domain;
@@ -1785,8 +1785,7 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
COMPUTE_UNIT_GPU, gpu,
proximity_domain);
if (res) {
- pr_err("Error creating VCRAT for GPU (ID: 0x%x)\n",
- gpu_id);
+ dev_err(gpu->adev->dev, "Error creating VCRAT\n");
topology_crat_proximity_domain--;
goto err;
}
@@ -1797,8 +1796,7 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
&temp_topology_device_list,
proximity_domain);
if (res) {
- pr_err("Error parsing VCRAT for GPU (ID: 0x%x)\n",
- gpu_id);
+ dev_err(gpu->adev->dev, "Error parsing VCRAT\n");
topology_crat_proximity_domain--;
goto err;
}
@@ -1824,8 +1822,8 @@ static int kfd_topology_add_device_locked(struct kfd_node *gpu, uint32_t gpu_id,
if (!res)
sys_props.generation_count++;
else
- pr_err("Failed to update GPU (ID: 0x%x) to sysfs topology. res=%d\n",
- gpu_id, res);
+ dev_err(gpu->adev->dev, "Failed to update GPU to sysfs topology. res=%d\n",
+ res);
err:
kfd_destroy_crat_image(crat_image);
@@ -1950,11 +1948,10 @@ int kfd_topology_add_device(struct kfd_node *gpu)
gpu_id = kfd_generate_gpu_id(gpu);
if (gpu->xcp && !gpu->xcp->ddev) {
dev_warn(gpu->adev->dev,
- "Won't add GPU (ID: 0x%x) to topology since it has no drm node assigned.",
- gpu_id);
+ "Won't add GPU to topology since it has no drm node assigned.");
return 0;
} else {
- pr_debug("Adding new GPU (ID: 0x%x) to topology\n", gpu_id);
+ dev_dbg(gpu->adev->dev, "Adding new GPU to topology\n");
}
/* Check to see if this gpu device exists in the topology_device_list.
@@ -1966,7 +1963,7 @@ int kfd_topology_add_device(struct kfd_node *gpu)
down_write(&topology_lock);
dev = kfd_assign_gpu(gpu);
if (!dev)
- res = kfd_topology_add_device_locked(gpu, gpu_id, &dev);
+ res = kfd_topology_add_device_locked(gpu, &dev);
up_write(&topology_lock);
if (res)
return res;