drm/nouveau/fifo/gf100-: recover from host mmu faults
authorBen Skeggs <bskeggs@redhat.com>
Fri, 9 Dec 2016 07:13:08 +0000 (17:13 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 13 Dec 2016 01:38:51 +0000 (11:38 +1000)
This has been on the TODO list for a while now, recovering from things
such as attempting to execute a push buffer or touch a semaphore in an
unmapped memory area.

The only thing required on the HW side here is that the offending
channel is removed from the runlist, and *not* a full reset of PFIFO.

This used to be a bit messier to handle before the rework to make use
of engine topology info, but is apparently now trivial.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c

index 352a0baec84d70332245caaf857ad3ba09118c7b..ec68ea9747d523a696d0028f127af0bef41475ac 100644 (file)
@@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
        list_del_init(&chan->head);
        chan->killed = true;
 
-       fifo->recover.mask |= 1ULL << engine->subdev.index;
+       if (engine != &fifo->base.engine)
+               fifo->recover.mask |= 1ULL << engine->subdev.index;
        schedule_work(&fifo->recover.work);
 }
 
index 103c0afaaa6d1414169276bc7af6b672bb7bedf9..38c0910722c02c23c3ccf598f1839f732affcb24 100644 (file)
@@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = {
        { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
        { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
        { 0x06, "SCHED" },
-       { 0x07, "HOST0" },
-       { 0x08, "HOST1" },
-       { 0x09, "HOST2" },
-       { 0x0a, "HOST3" },
-       { 0x0b, "HOST4" },
-       { 0x0c, "HOST5" },
-       { 0x0d, "HOST6" },
-       { 0x0e, "HOST7" },
+       { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
+       { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
+       { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
+       { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
+       { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
+       { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
+       { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
+       { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
        { 0x0f, "HOSTSR" },
        { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD },
        { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP },
index bd1ff877aa0687c70193faba68659af5ce08856e..29c080683b32c4d417aff3ed0bc03b663a937151 100644 (file)
@@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = {
        { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
        { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
        { 0x06, "SCHED" },
-       { 0x07, "HOST0" },
-       { 0x08, "HOST1" },
-       { 0x09, "HOST2" },
-       { 0x0a, "HOST3" },
-       { 0x0b, "HOST4" },
-       { 0x0c, "HOST5" },
-       { 0x0d, "HOST6" },
-       { 0x0e, "HOST7" },
+       { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
+       { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
+       { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
+       { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
+       { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
+       { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
+       { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
+       { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
        { 0x0f, "HOSTSR" },
        { 0x13, "PERF" },
        { 0x17, "PMU" },
index eff83f7fb7058b5e64bc16028d77bc1776cfd772..b2635aea9f6e3f260040974957eeadf7b072908e 100644 (file)
@@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = {
        { 0x03, "IFB", NULL, NVKM_ENGINE_IFB },
        { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
        { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
-       { 0x06, "HOST0" },
-       { 0x07, "HOST1" },
-       { 0x08, "HOST2" },
-       { 0x09, "HOST3" },
-       { 0x0a, "HOST4" },
-       { 0x0b, "HOST5" },
-       { 0x0c, "HOST6" },
-       { 0x0d, "HOST7" },
-       { 0x0e, "HOST8" },
-       { 0x0f, "HOST9" },
-       { 0x10, "HOST10" },
+       { 0x06, "HOST0", NULL, NVKM_ENGINE_FIFO },
+       { 0x07, "HOST1", NULL, NVKM_ENGINE_FIFO },
+       { 0x08, "HOST2", NULL, NVKM_ENGINE_FIFO },
+       { 0x09, "HOST3", NULL, NVKM_ENGINE_FIFO },
+       { 0x0a, "HOST4", NULL, NVKM_ENGINE_FIFO },
+       { 0x0b, "HOST5", NULL, NVKM_ENGINE_FIFO },
+       { 0x0c, "HOST6", NULL, NVKM_ENGINE_FIFO },
+       { 0x0d, "HOST7", NULL, NVKM_ENGINE_FIFO },
+       { 0x0e, "HOST8", NULL, NVKM_ENGINE_FIFO },
+       { 0x0f, "HOST9", NULL, NVKM_ENGINE_FIFO },
+       { 0x10, "HOST10", NULL, NVKM_ENGINE_FIFO },
        { 0x13, "PERF" },
        { 0x17, "PMU" },
        { 0x18, "PTP" },