summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-07-31 16:30:17 +1000
committerJérôme Glisse <jglisse@redhat.com>2017-08-09 18:13:31 -0400
commitce651b123b9cf2e88fe6d4843921235b2df17375 (patch)
tree05ce5374161482c0d7885fb28361d6e6f905b930
parent5e81254f91d719a728a8665c055fa609263827bb (diff)
mmu/gp100: allow gcc/tex to generate replayable faults
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c5
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.h1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c16
3 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c
index 94f29af37024..79face6c74b8 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c
@@ -47,6 +47,11 @@ gf100_vmm_join(struct nvkm_vmm *base, struct nvkm_gpuobj *inst)
u64 addr = nvkm_memory_addr(vmm->pd);
u64 limit = vmm->base.limit;
+ if (vmm->func->join) {
+ vmm->func->join(vmm, inst);
+ return 0;
+ }
+
nvkm_kmap(inst);
nvkm_wo32(inst, 0x0200, lower_32_bits(addr));
nvkm_wo32(inst, 0x0204, upper_32_bits(addr));
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.h b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.h
index 8a4b921eb5af..a2f3e859bec6 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.h
@@ -11,6 +11,7 @@ struct gf100_vmm {
};
struct gf100_vmm_func {
+ void (*join)(struct gf100_vmm *, struct nvkm_gpuobj *inst);
};
int gf100_vmm_new_(const struct gf100_vmm_func *, struct nvkm_mmu *,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
index 49e82f211b08..8cb344abc613 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
@@ -21,8 +21,24 @@
*/
#include "vmmgf100.h"
+#include <core/gpuobj.h>
+
+static void
+gp100_vmm_join(struct gf100_vmm *vmm, struct nvkm_gpuobj *inst)
+{
+ u64 addr = nvkm_memory_addr(vmm->pd);
+
+ nvkm_kmap(inst);
+ nvkm_wo32(inst, 0x0200, lower_32_bits(addr) | 0x00000030);
+ nvkm_wo32(inst, 0x0204, upper_32_bits(addr));
+ nvkm_wo32(inst, 0x0208, lower_32_bits(vmm->base.limit));
+ nvkm_wo32(inst, 0x020c, upper_32_bits(vmm->base.limit));
+ nvkm_done(inst);
+}
+
static const struct gf100_vmm_func
gp100_vmm = {
+ .join = gp100_vmm_join,
};
static int