diff options
| author | Huang Rui <[email protected]> | 2019-12-16 07:02:51 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-12-19 15:10:18 +0000 |
| commit | f4feb9fa45ee604f44fcc1fb4fb806a0c611acd0 (patch) | |
| tree | 396b24906e9fb3de9c98383cdbb19c6c650cdb2c | |
| parent | drm/amdkfd: expose num_sdma_queues_per_engine data field to topology node (v2) (diff) | |
| download | kernel-f4feb9fa45ee604f44fcc1fb4fb806a0c611acd0.tar.gz kernel-f4feb9fa45ee604f44fcc1fb4fb806a0c611acd0.zip | |
drm/amdkfd: expose num_cp_queues data field to topology node (v2)
Thunk driver would like to know the num_cp_queues data, however this data relied
on different asic specific. So it's better to get it from kfd driver.
v2: don't update name size.
Signed-off-by: Huang Rui <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_topology.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c index cc01ccd92082..203c823d65f1 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c @@ -488,6 +488,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr, dev->node_props.num_sdma_xgmi_engines); sysfs_show_32bit_prop(buffer, "num_sdma_queues_per_engine", dev->node_props.num_sdma_queues_per_engine); + sysfs_show_32bit_prop(buffer, "num_cp_queues", + dev->node_props.num_cp_queues); if (dev->gpu) { log_max_watch_addr = @@ -1316,6 +1318,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu) dev->node_props.num_gws = (hws_gws_support && dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ? amdgpu_amdkfd_get_num_gws(dev->gpu->kgd) : 0; + dev->node_props.num_cp_queues = get_queues_num(dev->gpu->dqm); kfd_fill_mem_clk_max_info(dev); kfd_fill_iolink_non_crat_info(dev); diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h index e1c9719f994e..74e9b1682af8 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.h @@ -82,6 +82,7 @@ struct kfd_node_properties { uint32_t num_sdma_engines; uint32_t num_sdma_xgmi_engines; uint32_t num_sdma_queues_per_engine; + uint32_t num_cp_queues; char name[KFD_TOPOLOGY_PUBLIC_NAME_SIZE]; }; |
