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>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user