Make the number of per agent SDMA engines queryable.

Change-Id: Iae1cc9b7ec783fdda05f9384f0ad0327ea1a8cc3
This commit is contained in:
Jonathan Kim
2023-02-01 12:26:03 -05:00
والد 5873a78d58
کامیت 4f283d9bb3
3فایلهای تغییر یافته به همراه25 افزوده شده و 0 حذف شده
@@ -376,6 +376,12 @@ hsa_status_t CpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION:
*((uint32_t*)value) = 0;
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_ENG:
*((uint32_t*)value) = 0;
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG:
*((uint32_t*)value) = 0;
break;
case HSA_AMD_AGENT_INFO_IOMMU_SUPPORT:
*((hsa_amd_iommu_version_t*)value) = HSA_IOMMU_SUPPORT_NONE;
break;
@@ -1111,6 +1111,12 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
case HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.uCodeEngineVersions.uCodeSDMA);
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_ENG:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.NumSdmaEngines);
break;
case HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG:
*((uint32_t*)value) = static_cast<uint32_t>(properties_.NumSdmaXgmiEngines);
break;
case HSA_AMD_AGENT_INFO_IOMMU_SUPPORT:
if (properties_.Capability.ui32.HSAMMUPresent)
*((hsa_amd_iommu_version_t*)value) = HSA_IOMMU_SUPPORT_V2;
@@ -361,6 +361,19 @@ typedef enum hsa_amd_agent_info_s {
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_SDMA_UCODE_VERSION = 0xA109,
/**
* Queries the number of SDMA engines.
* If HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG query returns non-zero,
* this query returns the the number of SDMA engines optimized for
* host to device bidirectional traffic.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_NUM_SDMA_ENG = 0xA10A,
/**
* Queries the number of additional SDMA engines optimized for D2D xGMI copies.
* The type of this attribute is uint32_t.
*/
HSA_AMD_AGENT_INFO_NUM_SDMA_XGMI_ENG = 0xA10B,
/**
* Queries for version of IOMMU supported by agent.
* The type of this attribute is hsa_amd_iommu_version_t.