Commit a261a20c authored by Ben Skeggs's avatar Ben Skeggs

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: default avatarBen Skeggs <bskeggs@redhat.com>
parent 13e95729
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#define VOLTA_USERMODE_A 0x0000c361 #define VOLTA_USERMODE_A 0x0000c361
#define MAXWELL_FAULT_BUFFER_A /* clb069.h */ 0x0000b069 #define MAXWELL_FAULT_BUFFER_A /* clb069.h */ 0x0000b069
#define VOLTA_FAULT_BUFFER_A /* clb069.h */ 0x0000c369
#define NV03_CHANNEL_DMA /* cl506b.h */ 0x0000006b #define NV03_CHANNEL_DMA /* cl506b.h */ 0x0000006b
#define NV10_CHANNEL_DMA /* cl506b.h */ 0x0000006e #define NV10_CHANNEL_DMA /* cl506b.h */ 0x0000006e
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <subdev/mmu.h> #include <subdev/mmu.h>
#include <engine/fifo.h> #include <engine/fifo.h>
#include <nvif/class.h>
static void static void
gv100_fault_buffer_process(struct nvkm_fault_buffer *buffer) gv100_fault_buffer_process(struct nvkm_fault_buffer *buffer)
{ {
...@@ -166,6 +168,13 @@ gv100_fault_intr(struct nvkm_fault *fault) ...@@ -166,6 +168,13 @@ gv100_fault_intr(struct nvkm_fault *fault)
} }
} }
if (stat & 0x08000000) {
if (fault->buffer[1]) {
nvkm_event_send(&fault->event, 1, 1, NULL, 0);
stat &= ~0x08000000;
}
}
if (stat) { if (stat) {
nvkm_debug(subdev, "intr %08x\n", stat); nvkm_debug(subdev, "intr %08x\n", stat);
} }
...@@ -208,6 +217,13 @@ gv100_fault = { ...@@ -208,6 +217,13 @@ gv100_fault = {
.buffer.init = gv100_fault_buffer_init, .buffer.init = gv100_fault_buffer_init,
.buffer.fini = gv100_fault_buffer_fini, .buffer.fini = gv100_fault_buffer_fini,
.buffer.intr = gv100_fault_buffer_intr, .buffer.intr = gv100_fault_buffer_intr,
/*TODO: Figure out how to expose non-replayable fault buffer, which,
* for some reason, is where recoverable CE faults appear...
*
* It's a bit tricky, as both NVKM and SVM will need access to
* the non-replayable fault buffer.
*/
.user = { { 0, 0, VOLTA_FAULT_BUFFER_A }, 1 },
}; };
int int
......
...@@ -157,6 +157,7 @@ tu102_fault = { ...@@ -157,6 +157,7 @@ tu102_fault = {
.buffer.init = tu102_fault_buffer_init, .buffer.init = tu102_fault_buffer_init,
.buffer.fini = tu102_fault_buffer_fini, .buffer.fini = tu102_fault_buffer_fini,
.buffer.intr = tu102_fault_buffer_intr, .buffer.intr = tu102_fault_buffer_intr,
.user = { { 0, 0, VOLTA_FAULT_BUFFER_A }, 1 },
}; };
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment