Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Fix PCI bus domain ID
Browse files Browse the repository at this point in the history
SWDEV-256338

Change-Id: I09afdca4f1a08f99ce662a4c4ed8a51d85500699
  • Loading branch information
gargrahul committed Dec 2, 2020
1 parent 5cefcaf commit 3e91378
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions device/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,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_;
Expand Down
7 changes: 7 additions & 0 deletions device/rocm/rocdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e91378

Please sign in to comment.