aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-12-09 02:13:08 -0500
committerBen Skeggs <bskeggs@redhat.com>2016-12-12 20:38:51 -0500
commitec884f74f1ec8ffa6a77a2769087117aeec80c1f (patch)
treee635f221f275f439aa2b16cbdea13a9c4d86f504
parenta8f6cb7bb300c246ef97c06ad13a7f0ceaea5c65 (diff)
drm/nouveau/fifo/gf100-: recover from host mmu faults
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>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c3
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c16
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c16
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c22
4 files changed, 29 insertions, 28 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
index 352a0baec84d..ec68ea9747d5 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
@@ -180,7 +180,8 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
180 list_del_init(&chan->head); 180 list_del_init(&chan->head);
181 chan->killed = true; 181 chan->killed = true;
182 182
183 fifo->recover.mask |= 1ULL << engine->subdev.index; 183 if (engine != &fifo->base.engine)
184 fifo->recover.mask |= 1ULL << engine->subdev.index;
184 schedule_work(&fifo->recover.work); 185 schedule_work(&fifo->recover.work);
185} 186}
186 187
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
index 103c0afaaa6d..38c0910722c0 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
@@ -743,14 +743,14 @@ gk104_fifo_fault_engine[] = {
743 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, 743 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
744 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, 744 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
745 { 0x06, "SCHED" }, 745 { 0x06, "SCHED" },
746 { 0x07, "HOST0" }, 746 { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
747 { 0x08, "HOST1" }, 747 { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
748 { 0x09, "HOST2" }, 748 { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
749 { 0x0a, "HOST3" }, 749 { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
750 { 0x0b, "HOST4" }, 750 { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
751 { 0x0c, "HOST5" }, 751 { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
752 { 0x0d, "HOST6" }, 752 { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
753 { 0x0e, "HOST7" }, 753 { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
754 { 0x0f, "HOSTSR" }, 754 { 0x0f, "HOSTSR" },
755 { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD }, 755 { 0x10, "MSVLD", NULL, NVKM_ENGINE_MSVLD },
756 { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP }, 756 { 0x11, "MSPPP", NULL, NVKM_ENGINE_MSPPP },
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
index bd1ff877aa06..29c080683b32 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
@@ -32,14 +32,14 @@ gm107_fifo_fault_engine[] = {
32 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, 32 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
33 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, 33 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
34 { 0x06, "SCHED" }, 34 { 0x06, "SCHED" },
35 { 0x07, "HOST0" }, 35 { 0x07, "HOST0", NULL, NVKM_ENGINE_FIFO },
36 { 0x08, "HOST1" }, 36 { 0x08, "HOST1", NULL, NVKM_ENGINE_FIFO },
37 { 0x09, "HOST2" }, 37 { 0x09, "HOST2", NULL, NVKM_ENGINE_FIFO },
38 { 0x0a, "HOST3" }, 38 { 0x0a, "HOST3", NULL, NVKM_ENGINE_FIFO },
39 { 0x0b, "HOST4" }, 39 { 0x0b, "HOST4", NULL, NVKM_ENGINE_FIFO },
40 { 0x0c, "HOST5" }, 40 { 0x0c, "HOST5", NULL, NVKM_ENGINE_FIFO },
41 { 0x0d, "HOST6" }, 41 { 0x0d, "HOST6", NULL, NVKM_ENGINE_FIFO },
42 { 0x0e, "HOST7" }, 42 { 0x0e, "HOST7", NULL, NVKM_ENGINE_FIFO },
43 { 0x0f, "HOSTSR" }, 43 { 0x0f, "HOSTSR" },
44 { 0x13, "PERF" }, 44 { 0x13, "PERF" },
45 { 0x17, "PMU" }, 45 { 0x17, "PMU" },
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
index eff83f7fb705..b2635aea9f6e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
@@ -30,17 +30,17 @@ gp100_fifo_fault_engine[] = {
30 { 0x03, "IFB", NULL, NVKM_ENGINE_IFB }, 30 { 0x03, "IFB", NULL, NVKM_ENGINE_IFB },
31 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR }, 31 { 0x04, "BAR1", NULL, NVKM_SUBDEV_BAR },
32 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM }, 32 { 0x05, "BAR2", NULL, NVKM_SUBDEV_INSTMEM },
33 { 0x06, "HOST0" }, 33 { 0x06, "HOST0", NULL, NVKM_ENGINE_FIFO },
34 { 0x07, "HOST1" }, 34 { 0x07, "HOST1", NULL, NVKM_ENGINE_FIFO },
35 { 0x08, "HOST2" }, 35 { 0x08, "HOST2", NULL, NVKM_ENGINE_FIFO },
36 { 0x09, "HOST3" }, 36 { 0x09, "HOST3", NULL, NVKM_ENGINE_FIFO },
37 { 0x0a, "HOST4" }, 37 { 0x0a, "HOST4", NULL, NVKM_ENGINE_FIFO },
38 { 0x0b, "HOST5" }, 38 { 0x0b, "HOST5", NULL, NVKM_ENGINE_FIFO },
39 { 0x0c, "HOST6" }, 39 { 0x0c, "HOST6", NULL, NVKM_ENGINE_FIFO },
40 { 0x0d, "HOST7" }, 40 { 0x0d, "HOST7", NULL, NVKM_ENGINE_FIFO },
41 { 0x0e, "HOST8" }, 41 { 0x0e, "HOST8", NULL, NVKM_ENGINE_FIFO },
42 { 0x0f, "HOST9" }, 42 { 0x0f, "HOST9", NULL, NVKM_ENGINE_FIFO },
43 { 0x10, "HOST10" }, 43 { 0x10, "HOST10", NULL, NVKM_ENGINE_FIFO },
44 { 0x13, "PERF" }, 44 { 0x13, "PERF" },
45 { 0x17, "PMU" }, 45 { 0x17, "PMU" },
46 { 0x18, "PTP" }, 46 { 0x18, "PTP" },