Fix PCI bus domain ID
SWDEV-256338
Change-Id: I09afdca4f1a08f99ce662a4c4ed8a51d85500699
[ROCm/clr commit: a224dc2a7b]
This commit is contained in:
@@ -455,6 +455,9 @@ struct Info : public amd::EmbeddedObject {
|
||||
//! Returns the topology for the device
|
||||
cl_device_topology_amd deviceTopology_;
|
||||
|
||||
//! Returns PCI Bus Domain ID
|
||||
uint32_t pciDomainID;
|
||||
|
||||
//! Semaphore information
|
||||
uint32_t maxSemaphores_;
|
||||
uint32_t maxSemaphoreSize_;
|
||||
|
||||
@@ -618,6 +618,13 @@ bool Device::create() {
|
||||
info_.deviceTopology_.pcie.bus = (hsa_bdf_id & (0xFF << 8)) >> 8;
|
||||
info_.deviceTopology_.pcie.device = (hsa_bdf_id & (0x1F << 3)) >> 3;
|
||||
info_.deviceTopology_.pcie.function = (hsa_bdf_id & 0x07);
|
||||
uint32_t pci_domain_id = 0;
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
hsa_agent_get_info(_bkendDevice,
|
||||
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_DOMAIN), &pci_domain_id)) {
|
||||
return false;
|
||||
}
|
||||
info_.pciDomainID = pci_domain_id;
|
||||
|
||||
#ifdef WITH_AMDGPU_PRO
|
||||
// Create amdgpu-pro device interface for SSG support
|
||||
|
||||
Reference in New Issue
Block a user