SWDEV-271182 - Fix HdpMemFlushCntl and HdpRegFlushCntl

Change-Id: Ib690b475c2c4514c862ded5fc2bdd1049e27bd46


[ROCm/clr commit: df0b14ff47]
Šī revīzija ir iekļauta:
Rahul Garg
2021-02-04 19:57:22 +00:00
vecāks 28eacbf594
revīzija ff35f82881
2 mainīti faili ar 17 papildinājumiem un 0 dzēšanām
@@ -461,6 +461,12 @@ struct Info : public amd::EmbeddedObject {
//! Returns PCI Bus Domain ID
uint32_t pciDomainID;
//! Returns sddress of HDP_MEM_COHERENCY_FLUSH_CNTL register
uint32_t* hdpMemFlushCntl;
//! Returns sddress of HDP_REG_COHERENCY_FLUSH_CNTL register
uint32_t* hdpRegFlushCntl;
//! Semaphore information
uint32_t maxSemaphores_;
uint32_t maxSemaphoreSize_;
@@ -710,6 +710,17 @@ bool Device::create() {
}
#endif
// Get Agent HDP Flush Register Memory
hsa_amd_hdp_flush_t hdpInfo;
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(_bkendDevice,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_HDP_FLUSH), &hdpInfo)) {
LogPrintfError("Unable to determine HDP flush info for HSA device %s", agent_name);
return false;
}
info_.hdpMemFlushCntl = hdpInfo.HDP_MEM_FLUSH_CNTL;
info_.hdpRegFlushCntl = hdpInfo.HDP_REG_FLUSH_CNTL;
if (populateOCLDeviceConstants() == false) {
LogPrintfError("populateOCLDeviceConstants failed for HSA device %s (PCI ID %x)", agent_name,
pciDeviceId_);