kfdtest: add MES judging API in test utility.

Signed-off-by: Yifan Zhang <yifan1.zhang@amd.com>
Change-Id: I978fc85b7c81ea65b97953a50d2d0312bcba95bf
Этот коммит содержится в:
Yifan Zhang
2023-02-23 13:51:51 +08:00
коммит произвёл Yifan1 Zhang
родитель 64aa9009e1
Коммит 564913526a
4 изменённых файлов: 12 добавлений и 0 удалений
+5
Просмотреть файл
@@ -164,6 +164,11 @@ unsigned int KFDBaseComponentTest::GetFamilyIdFromNodeId(unsigned int nodeId)
return FamilyIdFromNode(m_NodeInfo.GetNodeProperties(nodeId));
}
bool KFDBaseComponentTest::isMES(unsigned int nodeId)
{
return CheckMES(m_NodeInfo.GetNodeProperties(nodeId));
}
int KFDBaseComponentTest::FindDRMRenderNode(int gpuNode) {
HsaNodeProperties *nodeProperties;
_HSAKMT_STATUS status;
+1
Просмотреть файл
@@ -58,6 +58,7 @@ class KFDBaseComponentTest : public testing::Test {
// @return DRM Render Node if successful or -1 on failure
int FindDRMRenderNode(int gpuNode);
unsigned int GetFamilyIdFromNodeId(unsigned int nodeId);
bool isMES(unsigned int nodeId);
unsigned int GetFamilyIdFromDefaultNode(){ return m_FamilyId; }
// @brief Executed before the first test that uses KFDBaseComponentTest.
+5
Просмотреть файл
@@ -234,6 +234,11 @@ bool isTonga(const HsaNodeProperties *props) {
return false;
}
bool CheckMES(const HsaNodeProperties *props) {
/* MES devices need GART mappings and therefore need non-paged memory */
return (props->EngineId.ui32.Major >= 11) ? true : false;
}
const uint32_t GetGfxVersion(const HsaNodeProperties *props) {
return ((props->EngineId.ui32.Major << 16) |
(props->EngineId.ui32.Minor << 8) |
+1
Просмотреть файл
@@ -50,6 +50,7 @@ HSAKMT_STATUS CreateQueueTypeEvent(bool ManualReset, bool IsSignaled, unsigned i
bool is_dgpu();
bool isTonga(const HsaNodeProperties *props);
bool CheckMES(const HsaNodeProperties *props);
bool hasPciAtomicsSupport(int node);
unsigned int FamilyIdFromNode(const HsaNodeProperties *props);
const uint32_t GetGfxVersion(const HsaNodeProperties *props);