SWDEV-204804 - Detecing pcie atomic support

- check pcie atomci support for printf functionality
- if not enabled printf wont work

Signed-off-by: sdashmiz <shadi.dashmiz@amd.com>
Change-Id: Ib366e8e71772b02210c4a830bca4bd8cc7a11664
이 커밋은 다음에 포함됨:
sdashmiz 작성하고 Shadi Dashmiz가 2022-04-22 08:53:16 -04:00를 커밋함
1 부모 b3a3779a06
커밋 15f1632dfa
4 파일이 변경됨
+22 -1

검색과 일치하는 파일 없음

+12
파일 보기
@@ -207,6 +207,16 @@ void Device::setupCpuAgent() {
system_segment_.handle, system_coarse_segment_.handle, _bkendDevice.handle);
}
void Device::checkAtomicSupport() {
std::vector<amd::Device::LinkAttrType> link_attrs;
link_attrs.push_back(std::make_pair(LinkAttribute::kLinkAtomicSupport, 0));
if (findLinkInfo(system_segment_, &link_attrs)) {
if (link_attrs[0].second == 1) {
info_.pcie_atomics_ = true;
}
}
}
Device::~Device() {
#ifdef WITH_AMDGPU_PRO
delete pro_device_;
@@ -1167,6 +1177,8 @@ bool Device::populateOCLDeviceConstants() {
setupCpuAgent();
checkAtomicSupport();
assert(system_segment_.handle != 0);
if (HSA_STATUS_SUCCESS != hsa_amd_agent_iterate_memory_pools(
_bkendDevice, Device::iterateGpuMemoryPoolCallback, this)) {