summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/mm_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/mm_vgpu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
index bfaacff5..8af01158 100644
--- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c
@@ -531,8 +531,26 @@ static void vgpu_mm_tlb_invalidate(struct vm_gk20a *vm)
531 WARN_ON(err || msg.ret); 531 WARN_ON(err || msg.ret);
532} 532}
533 533
534static void vgpu_mm_mmu_set_debug_mode(struct gk20a *g, bool enable)
535{
536 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
537 struct tegra_vgpu_cmd_msg msg;
538 struct tegra_vgpu_mmu_debug_mode *p = &msg.params.mmu_debug_mode;
539 int err;
540
541 gk20a_dbg_fn("");
542
543 msg.cmd = TEGRA_VGPU_CMD_SET_MMU_DEBUG_MODE;
544 msg.handle = platform->virt_handle;
545 p->enable = (u32)enable;
546 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
547 WARN_ON(err || msg.ret);
548}
549
534void vgpu_init_mm_ops(struct gpu_ops *gops) 550void vgpu_init_mm_ops(struct gpu_ops *gops)
535{ 551{
552 gops->mm.is_debug_mode_enabled = NULL;
553 gops->mm.set_debug_mode = vgpu_mm_mmu_set_debug_mode;
536 gops->mm.gmmu_map = vgpu_locked_gmmu_map; 554 gops->mm.gmmu_map = vgpu_locked_gmmu_map;
537 gops->mm.gmmu_unmap = vgpu_locked_gmmu_unmap; 555 gops->mm.gmmu_unmap = vgpu_locked_gmmu_unmap;
538 gops->mm.vm_remove = vgpu_vm_remove_support; 556 gops->mm.vm_remove = vgpu_vm_remove_support;