Add fallback for GPUVM doorbell mapping

Upstream KFD doesn't support mapping doorbells to GPUVM yet. Fall
back to the old method.

Change-Id: I452a6fc59b88329b833844e3914c480c2f13c82d
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Этот коммит содержится в:
Felix Kuehling
2018-01-25 21:18:33 -05:00
родитель 7495e74257
Коммит 0462744965
+9 -2
Просмотреть файл
@@ -304,9 +304,16 @@ static HSAKMT_STATUS map_doorbell(HSAuint32 NodeId, HSAuint32 gpu_id,
get_doorbell_map_info(get_device_id_by_node(NodeId),
&doorbells[NodeId]);
if (doorbells[NodeId].use_gpuvm)
if (doorbells[NodeId].use_gpuvm) {
status = map_doorbell_dgpu(NodeId, gpu_id, doorbell_offset);
else
if (status != HSAKMT_STATUS_SUCCESS) {
/* Fall back to the old method if KFD doesn't
* support doorbells in GPUVM
*/
doorbells[NodeId].use_gpuvm = false;
status = map_doorbell_apu(NodeId, gpu_id, doorbell_offset);
}
} else
status = map_doorbell_apu(NodeId, gpu_id, doorbell_offset);
if (status != HSAKMT_STATUS_SUCCESS)