libhsakmt: support vram-only and VA-only alloc/free.
Signed-off-by: Xiaogang.Chen <Xiaogang.Chen@amd.com> Change-Id: I47cf53642d2ea197c08b20e84d7cae04b2d431e0
This commit is contained in:
committed by
Xiaogang Chen
parent
0a2989083b
commit
0138487aa4
@@ -171,6 +171,13 @@ HSAKMT_STATUS HSAKMTAPI hsaKmtAllocMemory(HSAuint32 PreferredNode,
|
||||
}
|
||||
|
||||
/* GPU allocated VRAM */
|
||||
/* sanity check cannot do OnlyAddress and NoAddress alloc at same time */
|
||||
if (MemFlags.ui32.OnlyAddress && MemFlags.ui32.NoAddress) {
|
||||
pr_err("[%s] allocate addr-only and memory-only at same time\n",
|
||||
__func__);
|
||||
return HSAKMT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
*MemoryAddress = fmm_allocate_device(gpu_id, PreferredNode, *MemoryAddress,
|
||||
SizeInBytes, MemFlags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user