SWDEV-339709 - Device Atomic test failed
Code change for Linux Change-Id: I002881c188b9de351618a06ee8b5ce2aa5d9fd95
This commit is contained in:
committed by
Maneesh Gupta
parent
c2b64f8bf5
commit
91e2cd5d67
@@ -352,6 +352,7 @@ bool Memory::pinSystemMemory(void* hostPtr, size_t size) {
|
||||
}
|
||||
|
||||
void Memory::syncCacheFromHost(VirtualGPU& gpu, device::Memory::SyncFlags syncFlags) {
|
||||
amd::ScopedLock lock(owner()->lockMemoryOps());
|
||||
// If the last writer was another GPU, then make a writeback
|
||||
if (!isHostMemDirectAccess() && (owner()->getLastWriter() != nullptr) &&
|
||||
(&dev() != owner()->getLastWriter())) {
|
||||
@@ -407,7 +408,6 @@ void Memory::syncCacheFromHost(VirtualGPU& gpu, device::Memory::SyncFlags syncFl
|
||||
syncFlagsTmp.skipEntire_ = syncFlags.skipEntire_;
|
||||
}
|
||||
|
||||
amd::ScopedLock lock(owner()->lockMemoryOps());
|
||||
for (auto& sub : owner()->subBuffers()) {
|
||||
//! \note Don't allow subbuffer's allocation in the worker thread.
|
||||
//! It may cause a system lock, because possible resource
|
||||
@@ -462,6 +462,8 @@ void Memory::syncCacheFromHost(VirtualGPU& gpu, device::Memory::SyncFlags syncFl
|
||||
}
|
||||
}
|
||||
|
||||
gpu.releaseGpuMemoryFence();
|
||||
|
||||
// Should never fail
|
||||
assert(result && "Memory synchronization failed!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user