Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 14328aa5 authored by Philip Cox's avatar Philip Cox Committed by Alex Deucher
Browse files

drm/amdkfd: Add navi10 support to amdkfd. (v3)



KFD (kernel fusion driver) is the kernel driver
for the compute backend for usermode compute
stack.

v2: squash in updates (Alex)
v3: squash in rebase fixes (Alex)

Signed-off-by: default avatarOak Zeng <Oak.Zeng@amd.com>
Signed-off-by: default avatarPhilip Cox <Philip.Cox@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e0d07657
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -693,6 +693,14 @@ MODULE_PARM_DESC(halt_if_hws_hang, "Halt if HWS hang is detected (0 = off (defau
bool hws_gws_support;
module_param(hws_gws_support, bool, 0444);
MODULE_PARM_DESC(hws_gws_support, "MEC FW support gws barriers (false = not supported (Default), true = supported)");

/**
  * DOC: queue_preemption_timeout_ms (int)
  * queue preemption timeout in ms (1 = Minimum, 9000 = default)
  */
int queue_preemption_timeout_ms;
module_param(queue_preemption_timeout_ms, int, 0644);
MODULE_PARM_DESC(queue_preemption_timeout_ms, "queue preemption timeout in ms (1 = Minimum, 9000 = default)");
#endif

/**
+3 −0
Original line number Diff line number Diff line
@@ -36,16 +36,19 @@ AMDKFD_FILES := $(AMDKFD_PATH)/kfd_module.o \
		$(AMDKFD_PATH)/kfd_mqd_manager_cik.o \
		$(AMDKFD_PATH)/kfd_mqd_manager_vi.o \
		$(AMDKFD_PATH)/kfd_mqd_manager_v9.o \
		$(AMDKFD_PATH)/kfd_mqd_manager_v10.o \
		$(AMDKFD_PATH)/kfd_kernel_queue.o \
		$(AMDKFD_PATH)/kfd_kernel_queue_cik.o \
		$(AMDKFD_PATH)/kfd_kernel_queue_vi.o \
		$(AMDKFD_PATH)/kfd_kernel_queue_v9.o \
		$(AMDKFD_PATH)/kfd_kernel_queue_v10.o \
		$(AMDKFD_PATH)/kfd_packet_manager.o \
		$(AMDKFD_PATH)/kfd_process_queue_manager.o \
		$(AMDKFD_PATH)/kfd_device_queue_manager.o \
		$(AMDKFD_PATH)/kfd_device_queue_manager_cik.o \
		$(AMDKFD_PATH)/kfd_device_queue_manager_vi.o \
		$(AMDKFD_PATH)/kfd_device_queue_manager_v9.o \
		$(AMDKFD_PATH)/kfd_device_queue_manager_v10.o \
		$(AMDKFD_PATH)/kfd_interrupt.o \
		$(AMDKFD_PATH)/kfd_events.o \
		$(AMDKFD_PATH)/cik_event_interrupt.o \
+299 −0
Original line number Diff line number Diff line
@@ -561,3 +561,302 @@ static const uint32_t cwsr_trap_gfx9_hex[] = {
	0xbf8a0000, 0x95806f6c,
	0xbf810000, 0x00000000,
};

static const uint32_t cwsr_trap_gfx10_hex[] = {
	0xbf820001, 0xbf82012e,
	0xb0804004, 0xb970f802,
	0x8a708670, 0xb971f803,
	0x8771ff71, 0x00000400,
	0xbf850008, 0xb971f803,
	0x8771ff71, 0x000001ff,
	0xbf850001, 0x806c846c,
	0x876dff6d, 0x0000ffff,
	0xbe80226c, 0xb971f803,
	0x8771ff71, 0x00000100,
	0xbf840006, 0xbef60380,
	0xb9f60203, 0x876dff6d,
	0x0000ffff, 0x80ec886c,
	0x82ed806d, 0xbef60380,
	0xb9f60283, 0xb973f816,
	0xb9762c07, 0x8f769c76,
	0x886d766d, 0xb97603c7,
	0x8f769b76, 0x886d766d,
	0xb976f807, 0x8776ff76,
	0x00007fff, 0xb9f6f807,
	0xbeee037e, 0xbeef037f,
	0xbefe0480, 0xbf900004,
	0xbf8e0002, 0xbf88fffe,
	0xbef4037e, 0x8775ff7f,
	0x0000ffff, 0x8875ff75,
	0x00040000, 0xbef60380,
	0xbef703ff, 0x00807fac,
	0x8776ff7f, 0x08000000,
	0x90768376, 0x88777677,
	0x8776ff7f, 0x70000000,
	0x90768176, 0x88777677,
	0xbefb037c, 0xbefa0380,
	0xb97202dc, 0x8872727f,
	0xbefe03c1, 0x877c8172,
	0xbf06817c, 0xbf850002,
	0xbeff0380, 0xbf820001,
	0xbeff03c1, 0xb9712a05,
	0x80718171, 0x8f718271,
	0x877c8172, 0xbf06817c,
	0xbf85000d, 0x8f768771,
	0xbef603ff, 0x01000000,
	0xbefc0380, 0x7e008700,
	0xe0704000, 0x7a5d0000,
	0x807c817c, 0x807aff7a,
	0x00000080, 0xbf0a717c,
	0xbf85fff8, 0xbf82001b,
	0x8f768871, 0xbef603ff,
	0x01000000, 0xbefc0380,
	0x7e008700, 0xe0704000,
	0x7a5d0000, 0x807c817c,
	0x807aff7a, 0x00000100,
	0xbf0a717c, 0xbf85fff8,
	0xb9711e06, 0x8771c171,
	0xbf84000c, 0x8f718371,
	0x80717c71, 0xbefe03c1,
	0xbeff0380, 0x7e008700,
	0xe0704000, 0x7a5d0000,
	0x807c817c, 0x807aff7a,
	0x00000080, 0xbf0a717c,
	0xbf85fff8, 0xbf8a0000,
	0x8776ff72, 0x04000000,
	0xbf84002b, 0xbefe03c1,
	0x877c8172, 0xbf06817c,
	0xbf850002, 0xbeff0380,
	0xbf820001, 0xbeff03c1,
	0xb9714306, 0x8771c171,
	0xbf840021, 0x8f718671,
	0x8f718271, 0xbef60371,
	0xbef603ff, 0x01000000,
	0xd7650000, 0x000100c1,
	0xd7660000, 0x000200c1,
	0x16000084, 0x877c8172,
	0xbf06817c, 0xbefc0380,
	0xbf85000a, 0x807cff7c,
	0x00000080, 0x807aff7a,
	0x00000080, 0xd5250000,
	0x0001ff00, 0x00000080,
	0xbf0a717c, 0xbf85fff7,
	0xbf820009, 0x807cff7c,
	0x00000100, 0x807aff7a,
	0x00000100, 0xd5250000,
	0x0001ff00, 0x00000100,
	0xbf0a717c, 0xbf85fff7,
	0x877c8172, 0xbf06817c,
	0xbf850003, 0x8f7687ff,
	0x0000006a, 0xbf820002,
	0x8f7688ff, 0x0000006a,
	0xbef603ff, 0x01000000,
	0x877c8172, 0xbf06817c,
	0xbefc0380, 0xbf800000,
	0xbf85000b, 0xbe802e00,
	0x7e000200, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0x807c817c,
	0xbf0aff7c, 0x0000006a,
	0xbf85fff6, 0xbf82000a,
	0xbe802e00, 0x7e000200,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000100,
	0x807c817c, 0xbf0aff7c,
	0x0000006a, 0xbf85fff6,
	0xbef60384, 0xbef603ff,
	0x01000000, 0x877c8172,
	0xbf06817c, 0xbf850030,
	0x7e00027b, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0x7e00026c,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000080,
	0x7e00026d, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0x7e00026e,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000080,
	0x7e00026f, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0x7e000270,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000080,
	0xb971f803, 0x7e000271,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000080,
	0x7e000273, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0xb97bf801,
	0x7e00027b, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000080, 0xbf82002f,
	0x7e00027b, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000100, 0x7e00026c,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000100,
	0x7e00026d, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000100, 0x7e00026e,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000100,
	0x7e00026f, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000100, 0x7e000270,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000100,
	0xb971f803, 0x7e000271,
	0xe0704000, 0x7a5d0000,
	0x807aff7a, 0x00000100,
	0x7e000273, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000100, 0xb97bf801,
	0x7e00027b, 0xe0704000,
	0x7a5d0000, 0x807aff7a,
	0x00000100, 0xbf820119,
	0xbef4037e, 0x8775ff7f,
	0x0000ffff, 0x8875ff75,
	0x00040000, 0xbef60380,
	0xbef703ff, 0x00807fac,
	0x8772ff7f, 0x08000000,
	0x90728372, 0x88777277,
	0x8772ff7f, 0x70000000,
	0x90728172, 0x88777277,
	0xb97902dc, 0x8879797f,
	0xbef80380, 0xbefe03c1,
	0x877c8179, 0xbf06817c,
	0xbf850002, 0xbeff0380,
	0xbf820001, 0xbeff03c1,
	0xb96f2a05, 0x806f816f,
	0x8f6f826f, 0x877c8179,
	0xbf06817c, 0xbf850013,
	0x8f76876f, 0xbef603ff,
	0x01000000, 0xbef20378,
	0x8078ff78, 0x00000080,
	0xbefc0381, 0xe0304000,
	0x785d0000, 0xbf8c3f70,
	0x7e008500, 0x807c817c,
	0x8078ff78, 0x00000080,
	0xbf0a6f7c, 0xbf85fff7,
	0xe0304000, 0x725d0000,
	0xbf820023, 0x8f76886f,
	0xbef603ff, 0x01000000,
	0xbef20378, 0x8078ff78,
	0x00000100, 0xbefc0381,
	0xe0304000, 0x785d0000,
	0xbf8c3f70, 0x7e008500,
	0x807c817c, 0x8078ff78,
	0x00000100, 0xbf0a6f7c,
	0xbf85fff7, 0xb96f1e06,
	0x876fc16f, 0xbf84000e,
	0x8f6f836f, 0x806f7c6f,
	0xbefe03c1, 0xbeff0380,
	0xe0304000, 0x785d0000,
	0xbf8c3f70, 0x7e008500,
	0x807c817c, 0x8078ff78,
	0x00000080, 0xbf0a6f7c,
	0xbf85fff7, 0xbeff03c1,
	0xe0304000, 0x725d0000,
	0x8772ff79, 0x04000000,
	0xbf840020, 0xbefe03c1,
	0x877c8179, 0xbf06817c,
	0xbf850002, 0xbeff0380,
	0xbf820001, 0xbeff03c1,
	0xb96f4306, 0x876fc16f,
	0xbf840016, 0x8f6f866f,
	0x8f6f826f, 0xbef6036f,
	0xbef603ff, 0x01000000,
	0x877c8172, 0xbf06817c,
	0xbefc0380, 0xbf850007,
	0x807cff7c, 0x00000080,
	0x8078ff78, 0x00000080,
	0xbf0a6f7c, 0xbf85fffa,
	0xbf820006, 0x807cff7c,
	0x00000100, 0x8078ff78,
	0x00000100, 0xbf0a6f7c,
	0xbf85fffa, 0x877c8179,
	0xbf06817c, 0xbf850003,
	0x8f7687ff, 0x0000006a,
	0xbf820002, 0x8f7688ff,
	0x0000006a, 0xbef603ff,
	0x01000000, 0x877c8179,
	0xbf06817c, 0xbf850012,
	0xf4211cba, 0xf0000000,
	0x8078ff78, 0x00000080,
	0xbefc0381, 0xf421003a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xbf8cc07f,
	0xbe803000, 0xbf800000,
	0x807c817c, 0xbf0aff7c,
	0x0000006a, 0xbf85fff5,
	0xbe800372, 0xbf820011,
	0xf4211cba, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xbefc0381, 0xf421003a,
	0xf0000000, 0x8078ff78,
	0x00000100, 0xbf8cc07f,
	0xbe803000, 0xbf800000,
	0x807c817c, 0xbf0aff7c,
	0x0000006a, 0xbf85fff5,
	0xbe800372, 0xbef60384,
	0xbef603ff, 0x01000000,
	0x877c8179, 0xbf06817c,
	0xbf850025, 0xf4211bfa,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211b3a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211b7a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211eba,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211efa,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211c3a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211c7a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211cfa,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xf4211e7a,
	0xf0000000, 0x8078ff78,
	0x00000080, 0xbf820024,
	0xf4211bfa, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211b3a, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211b7a, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211eba, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211efa, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211c3a, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211c7a, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211cfa, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xf4211e7a, 0xf0000000,
	0x8078ff78, 0x00000100,
	0xbf8cc07f, 0x876dff6d,
	0x0000ffff, 0xbefc036f,
	0xbefe037a, 0xbeff037b,
	0x876f71ff, 0x000003ff,
	0xb9ef4803, 0xb9f3f816,
	0x876f71ff, 0xfffff800,
	0x906f8b6f, 0xb9efa2c3,
	0xb9f9f801, 0x876fff6d,
	0xf0000000, 0x906f9c6f,
	0x8f6f906f, 0xbef20380,
	0x88726f72, 0x876fff6d,
	0x08000000, 0x906f9b6f,
	0x8f6f8f6f, 0x88726f72,
	0x876fff70, 0x00800000,
	0x906f976f, 0xb9f2f807,
	0xb9f0f802, 0xbf8a0000,
	0xbe80226c, 0xbf810000,
	0xbf9f0000, 0xbf9f0000,
	0xbf9f0000, 0xbf9f0000,
	0xbf9f0000, 0x00000000,
};
+1124 −0

File added.

Preview size limit exceeded, changes collapsed.

+5 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ static struct kfd_gpu_cache_info carrizo_cache_info[] = {
/* TODO - check & update Vega10 cache details */
#define vega10_cache_info carrizo_cache_info
#define raven_cache_info carrizo_cache_info
/* TODO - check & update Navi10 cache details */
#define navi10_cache_info carrizo_cache_info

static void kfd_populated_cu_info_cpu(struct kfd_topology_device *dev,
		struct crat_subtype_computeunit *cu)
@@ -666,6 +668,9 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
	case CHIP_RAVEN:
		pcache_info = raven_cache_info;
		num_of_cache_types = ARRAY_SIZE(raven_cache_info);
	case CHIP_NAVI10:
		pcache_info = navi10_cache_info;
		num_of_cache_types = ARRAY_SIZE(navi10_cache_info);
		break;
	default:
		return -EINVAL;
Loading