SWDEV-377991 - Remove liquidflash support

Change-Id: Iba6455e5c0210c3223a06fec332404cd9f489154


[ROCm/clr commit: 53a10c9039]
This commit is contained in:
German
2023-01-19 18:53:11 -05:00
committed by German Andryeyev
parent 304d9e1430
commit b5b078e036
13 changed files with 6 additions and 281 deletions
-65
View File
@@ -726,71 +726,6 @@ bool ThreadTraceMemObjectsCommand::validateMemory() {
return true;
}
void TransferBufferFileCommand::releaseResources() {
for (uint i = 0; i < NumStagingBuffers; ++i) {
if (NULL != staging_[i]) {
staging_[i]->release();
}
}
// Call the parent
OneMemoryArgCommand::releaseResources();
}
void TransferBufferFileCommand::submit(device::VirtualDevice& device) {
device::Memory* mem = memory_->getDeviceMemory(queue()->device());
if (memory_->getMemFlags() &
(CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_PERSISTENT_MEM_AMD)) {
void* srcDstBuffer = nullptr;
if (memory_->getMemFlags() & CL_MEM_USE_PERSISTENT_MEM_AMD) {
// Lock protected multiple maps for persistent memory
amd::ScopedLock lock(mem->owner()->lockMemoryOps());
srcDstBuffer = mem->cpuMap(device);
} else {
srcDstBuffer = mem->cpuMap(device);
}
// Make HD transfer to the host accessible memory
bool writeBuffer(type() == CL_COMMAND_READ_SSG_FILE_AMD);
if (memory_->getMemFlags() & CL_MEM_USE_PERSISTENT_MEM_AMD) {
// Lock protected multiple maps for persistent memory
amd::ScopedLock lock(mem->owner()->lockMemoryOps());
mem->cpuUnmap(device);
} else {
mem->cpuUnmap(device);
}
} else {
device.submitTransferBufferFromFile(*this);
}
}
bool TransferBufferFileCommand::validateMemory() {
// Check if the destination buffer has direct host access
if (!(memory_->getMemFlags() &
(CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR | CL_MEM_USE_PERSISTENT_MEM_AMD))) {
// Allocate staging buffers
for (uint i = 0; i < NumStagingBuffers; ++i) {
staging_[i] = new (memory_->getContext())
Buffer(memory_->getContext(), StagingBufferMemType, StagingBufferSize);
if (NULL == staging_[i] || !staging_[i]->create(nullptr)) {
DevLogPrintfError("Staging Create failed, Staging[%d]: 0x%x", i, staging_[i]);
return false;
}
device::Memory* mem = staging_[i]->getDeviceMemory(queue()->device());
if (NULL == mem) {
LogPrintfError("Can't allocate staging buffer - 0x%08X bytes!", staging_[i]->getSize());
return false;
}
}
}
device::Memory* mem = memory_->getDeviceMemory(queue()->device());
if (NULL == mem) {
LogPrintfError("Can't allocate memory size - 0x%08X bytes!", memory_->getSize());
return false;
}
return true;
}
bool CopyMemoryP2PCommand::validateMemory() {
amd::Device* queue_device = &queue()->device();