Support gfx802 dGPU

Signed-off-by: Ben Goz <ben.goz@amd.com>


[ROCm/ROCR-Runtime commit: fb8378a18b]
This commit is contained in:
Ben Goz
2015-08-23 17:42:27 +03:00
parent 779c76a4e7
commit 9db147f2d4
9 changed files with 513 additions and 118 deletions
+11
View File
@@ -30,7 +30,9 @@
#include <errno.h>
#include <unistd.h>
#include <sys/mman.h>
#include <stdio.h>
#include "linux/kfd_ioctl.h"
#include "fmm.h"
static HSAuint64 *events_page = NULL;
@@ -70,6 +72,15 @@ hsaKmtCreateEvent(
args.event_type = EventDesc->EventType;
args.auto_reset = !ManualReset;
/* dGPU code */
if (is_dgpu && events_page == NULL) {
events_page = allocate_exec_aligned_memory_gpu(KFD_SIGNAL_EVENT_LIMIT * 8, 0x9000);
if (!events_page) {
return HSAKMT_STATUS_ERROR;
}
fmm_get_handle(events_page, &args.event_page_offset);
}
if (kmtIoctl(kfd_fd, AMDKFD_IOC_CREATE_EVENT, &args) != 0) {
free(e);
*Event = NULL;