Skip to content

Commit a261a20

Browse files
author
Ben Skeggs
committed
drm/nouveau/fault/gv100-: expose VoltaFaultBufferA
This nvclass exposes the replayable fault buffer, which will be used by SVM to manage GPU page faults. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 parent 13e9572 commit a261a20

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

drivers/gpu/drm/nouveau/include/nvif/class.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#define VOLTA_USERMODE_A 0x0000c361
5656

5757
#define MAXWELL_FAULT_BUFFER_A /* clb069.h */ 0x0000b069
58+
#define VOLTA_FAULT_BUFFER_A /* clb069.h */ 0x0000c369
5859

5960
#define NV03_CHANNEL_DMA /* cl506b.h */ 0x0000006b
6061
#define NV10_CHANNEL_DMA /* cl506b.h */ 0x0000006e

drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
#include <subdev/mmu.h>
2626
#include <engine/fifo.h>
2727

28+
#include <nvif/class.h>
29+
2830
static void
2931
gv100_fault_buffer_process(struct nvkm_fault_buffer *buffer)
3032
{
@@ -166,6 +168,13 @@ gv100_fault_intr(struct nvkm_fault *fault)
166168
}
167169
}
168170

171+
if (stat & 0x08000000) {
172+
if (fault->buffer[1]) {
173+
nvkm_event_send(&fault->event, 1, 1, NULL, 0);
174+
stat &= ~0x08000000;
175+
}
176+
}
177+
169178
if (stat) {
170179
nvkm_debug(subdev, "intr %08x\n", stat);
171180
}
@@ -208,6 +217,13 @@ gv100_fault = {
208217
.buffer.init = gv100_fault_buffer_init,
209218
.buffer.fini = gv100_fault_buffer_fini,
210219
.buffer.intr = gv100_fault_buffer_intr,
220+
/*TODO: Figure out how to expose non-replayable fault buffer, which,
221+
* for some reason, is where recoverable CE faults appear...
222+
*
223+
* It's a bit tricky, as both NVKM and SVM will need access to
224+
* the non-replayable fault buffer.
225+
*/
226+
.user = { { 0, 0, VOLTA_FAULT_BUFFER_A }, 1 },
211227
};
212228

213229
int

drivers/gpu/drm/nouveau/nvkm/subdev/fault/tu102.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ tu102_fault = {
157157
.buffer.init = tu102_fault_buffer_init,
158158
.buffer.fini = tu102_fault_buffer_fini,
159159
.buffer.intr = tu102_fault_buffer_intr,
160+
.user = { { 0, 0, VOLTA_FAULT_BUFFER_A }, 1 },
160161
};
161162

162163
int

0 commit comments

Comments
 (0)