Support IPC sharing of non paged system memory

Non paged system memory is allocated with node id 0. However, since a
gpu node is required for allocating system memory via KFD, the first
dgpu is used. In hsaKmtShareMemory() if system memory use the same
(first) dgpu.

Change-Id: I85789a89a4e4f7888e3826826401ea89ce4d1718
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Этот коммит содержится в:
Harish Kasiviswanathan
2017-07-24 15:12:24 -04:00
родитель 20f0de71df
Коммит 186527d0b7
+8 -1
Просмотреть файл
@@ -2597,7 +2597,14 @@ HSAKMT_STATUS fmm_share_memory(void *MemoryAddress,
r = validate_nodeid(obj->node_id, &gpu_id);
if (r != HSAKMT_STATUS_SUCCESS)
return r;
if (!gpu_id && is_dgpu) {
/* Sharing non paged system memory. Use first dgpu which was
* used during allocation. See fmm_allocate_host_gpu()
*/
r = find_first_dgpu(&gpu_id);
if (r != HSAKMT_STATUS_SUCCESS)
return r;
}
exportArgs.handle = obj->handle;
exportArgs.gpu_id = gpu_id;