Commit 15017d64 authored by Daniel Krebs's avatar Daniel Krebs
Browse files

gpu: get up to 1k DMA mappings and make it only a warning if it's more than one

parent bf1e5f87
Pipeline #74315 failed with stages
in 1 minute and 13 seconds
...@@ -271,16 +271,16 @@ bool Gpu::makeAccessibleToPCIeAndVA(const MemoryBlock& mem) ...@@ -271,16 +271,16 @@ bool Gpu::makeAccessibleToPCIeAndVA(const MemoryBlock& mem)
mm.getProcessAddressSpace(), mem.getAddrSpaceId()); mm.getProcessAddressSpace(), mem.getAddrSpaceId());
// retrieve bus address // retrieve bus address
uint64_t addr[8]; static constexpr size_t maxDmaAddresses = 1 << 10;
ret = gdr_map_dma(pImpl->gdr, mh, 3, 0, 0, addr, 8); uint64_t addr[maxDmaAddresses];
ret = gdr_map_dma(pImpl->gdr, mh, 3, 0, 0, addr, maxDmaAddresses);
for(int i = 0; i < ret; i++) { for(int i = 0; i < ret; i++) {
logger->debug("DMA addr[{}]: {:#x}", i, addr[i]); logger->debug("DMA addr[{}]: {:#x}", i, addr[i]);
} }
if(ret != 1) { if(ret != 1) {
logger->error("Only one DMA address per block supported at the moment"); logger->warn("Only one DMA address per block supported at the moment, use first");
return false;
} }
// mapping to access memory block from peer devices via PCIe // mapping to access memory block from peer devices via PCIe
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment