Extended DRM memory manager with function to copy memory to allocation

Related-To: NEO-2687

Change-Id: I2cd20c1d59dc0c28609fca7a11a5d805e2f21de4
This commit is contained in:
Milczarek, Slawomir
2019-07-07 20:33:17 +02:00
committed by sys_ocldev
parent a38e9da034
commit 6b77f94275
12 changed files with 85 additions and 16 deletions

View File

@ -726,7 +726,7 @@ void Kernel::substituteKernelHeap(void *newKernelHeap, size_t newKernelHeapSize)
auto currentAllocationSize = pKernelInfo->kernelAllocation->getUnderlyingBufferSize();
bool status = false;
if (currentAllocationSize >= newKernelHeapSize) {
status = memoryManager->copyMemoryToAllocation(pKernelInfo->kernelAllocation, newKernelHeap, static_cast<uint32_t>(newKernelHeapSize));
status = memoryManager->copyMemoryToAllocation(pKernelInfo->kernelAllocation, newKernelHeap, newKernelHeapSize);
} else {
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(pKernelInfo->kernelAllocation);
pKernelInfo->kernelAllocation = nullptr;