summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c16
1 files changed, 16 insertions, 0 deletions
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