Implement flat scratch support for dGPU
hsaKmtAllocMemory only allocates aligned address space and sets up the scratch_physical aperture to match the allocated address space. Actual allocation of backing memory happens in hsaKmtMapMemoryToGPU. Change-Id: Ie709815ab9bedb3d682e096b4005fdfb5e94d3a7
此提交包含在:
+2
-2
@@ -155,7 +155,7 @@ hsaKmtAllocMemory(
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!MemFlags.ui32.HostAccess && MemFlags.ui32.NonPaged) {
|
||||
if (!MemFlags.ui32.HostAccess && MemFlags.ui32.NonPaged && !MemFlags.ui32.Scratch) {
|
||||
*MemoryAddress = fmm_allocate_device(gpu_id, SizeInBytes);
|
||||
|
||||
if (*MemoryAddress == NULL)
|
||||
@@ -163,7 +163,7 @@ hsaKmtAllocMemory(
|
||||
|
||||
return HSAKMT_STATUS_SUCCESS;
|
||||
}
|
||||
if (MemFlags.ui32.HostAccess && MemFlags.ui32.Scratch ) {
|
||||
if (MemFlags.ui32.Scratch ) {
|
||||
*MemoryAddress = fmm_allocate_scratch(gpu_id, SizeInBytes);
|
||||
|
||||
if (*MemoryAddress == NULL)
|
||||
|
||||
新增問題並參考
封鎖使用者