libhsakmt: add NumCpQueues and NumSdmaQueuesPerEngine data field (v3)

NumCpQueues and NumSdmaQueuesPerEngine should be got by kfd driver not hardcode.
So add two data fields in HsaNodeProperties then thunk is able to get it from sysfs
that exposed by kfd.

v2: change NumCpQueues/NumSdmaQueuesPerEngine to one byte.
v3: merge two commits as one to avoid ABI update two times.

Change-Id: Ie386e4685f13493e22db6e207a399db6a4c5b9dc
Signed-off-by: Huang Rui <ray.huang@amd.com>


[ROCm/ROCR-Runtime commit: 06464b917d]
这个提交包含在:
Huang Rui 编写, Ray Huang 于 2020-01-03 23:27:42 -05:00 提交
1 父节点 22b5e2b003
当前提交 cc2162d8e9
3 个文件已更改
+12 -13

没有与搜索条件相匹配的文件

@@ -145,16 +145,6 @@ void GetHwQueueInfo(const HsaNodeProperties *props,
unsigned int *p_num_sdma_engines,
unsigned int *p_num_sdma_xgmi_engines,
unsigned int *p_num_sdma_queues_per_engine) {
int num_cp_queues = 24;
int num_sdma_queues_per_engine = 2;
if (props->EngineId.ui32.Major == 9) {
if (props->EngineId.ui32.Stepping == 6) // VEGA20
num_sdma_queues_per_engine = 8;
} else if (props->EngineId.ui32.Major == 10) { // NAVI
num_sdma_queues_per_engine = 8;
}
if (p_num_sdma_engines)
*p_num_sdma_engines = props->NumSdmaEngines;
@@ -162,10 +152,10 @@ void GetHwQueueInfo(const HsaNodeProperties *props,
*p_num_sdma_xgmi_engines = props->NumSdmaXgmiEngines;
if (p_num_sdma_queues_per_engine)
*p_num_sdma_queues_per_engine = num_sdma_queues_per_engine;
*p_num_sdma_queues_per_engine = props->NumSdmaQueuesPerEngine;
if (p_num_cp_queues)
*p_num_cp_queues = num_cp_queues;
*p_num_cp_queues = props->NumCpQueues;
}
bool isTonga(const HsaNodeProperties *props) {