Commit f4feb9fa authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

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: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bb71c74d
...@@ -488,6 +488,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr, ...@@ -488,6 +488,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
dev->node_props.num_sdma_xgmi_engines); dev->node_props.num_sdma_xgmi_engines);
sysfs_show_32bit_prop(buffer, "num_sdma_queues_per_engine", sysfs_show_32bit_prop(buffer, "num_sdma_queues_per_engine",
dev->node_props.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) { if (dev->gpu) {
log_max_watch_addr = log_max_watch_addr =
...@@ -1316,6 +1318,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu) ...@@ -1316,6 +1318,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
dev->node_props.num_gws = (hws_gws_support && dev->node_props.num_gws = (hws_gws_support &&
dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ? dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ?
amdgpu_amdkfd_get_num_gws(dev->gpu->kgd) : 0; 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_mem_clk_max_info(dev);
kfd_fill_iolink_non_crat_info(dev); kfd_fill_iolink_non_crat_info(dev);
......
...@@ -82,6 +82,7 @@ struct kfd_node_properties { ...@@ -82,6 +82,7 @@ struct kfd_node_properties {
uint32_t num_sdma_engines; uint32_t num_sdma_engines;
uint32_t num_sdma_xgmi_engines; uint32_t num_sdma_xgmi_engines;
uint32_t num_sdma_queues_per_engine; uint32_t num_sdma_queues_per_engine;
uint32_t num_cp_queues;
char name[KFD_TOPOLOGY_PUBLIC_NAME_SIZE]; char name[KFD_TOPOLOGY_PUBLIC_NAME_SIZE];
}; };
......
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