From 63e9d8eb9ad80724f2567aaa7c05cb2c7acfd4b1 Mon Sep 17 00:00:00 2001 From: Aparna Das Date: Fri, 31 Jan 2020 12:34:07 -0800 Subject: gpu: nvgpu: vgpu: add mmu_debug_mode support Added two new IVC commands that set gr and fb mmu debug mode. Bug 2586624 Change-Id: I358fb04713a9754fb209c0a90d02130dd4a1caf6 Reviewed-on: https://git-master.nvidia.com/r/2204980 (cherry picked from commit db4e5b09891aff075dfffb7cc2fe0630a71ab9a6) Signed-off-by: Aparna Das Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2288347 Reviewed-by: Kajetan Dutka Reviewed-by: Yu-Huan Hsu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: Kajetan Dutka Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gv11b.c | 2 +- drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/gv11b') diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gv11b.c index 2190478e..a6c11719 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_gv11b.c @@ -44,7 +44,7 @@ int vgpu_gv11b_init_gpu_characteristics(struct gk20a *g) __nvgpu_set_enabled(g, NVGPU_SUPPORT_SYNCPOINT_ADDRESS, true); __nvgpu_set_enabled(g, NVGPU_SUPPORT_USER_SYNCPOINT, true); __nvgpu_set_enabled(g, NVGPU_SUPPORT_PLATFORM_ATOMIC, true); - __nvgpu_set_enabled(g, NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE, false); + __nvgpu_set_enabled(g, NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE, true); return 0; } diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c index f51d4c35..cfd4e385 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_hal_gv11b.c @@ -49,6 +49,7 @@ #include "vgpu/dbg_vgpu.h" #include "vgpu/fecs_trace_vgpu.h" #include "vgpu/css_vgpu.h" +#include "vgpu/fb_vgpu.h" #include "vgpu/gm20b/vgpu_gr_gm20b.h" #include "vgpu/gp10b/vgpu_mm_gp10b.h" #include "vgpu/gp10b/vgpu_gr_gp10b.h" @@ -189,7 +190,7 @@ static const struct gpu_ops vgpu_gv11b_ops = { .get_hw_accessor_stream_out_mode = gr_gv100_get_hw_accessor_stream_out_mode, .update_hwpm_ctxsw_mode = vgpu_gr_update_hwpm_ctxsw_mode, - .set_mmu_debug_mode = NULL, + .set_mmu_debug_mode = vgpu_gr_set_mmu_debug_mode, .record_sm_error_state = gv11b_gr_record_sm_error_state, .clear_sm_error_state = vgpu_gr_clear_sm_error_state, .suspend_contexts = vgpu_gr_suspend_contexts, @@ -291,7 +292,7 @@ static const struct gpu_ops vgpu_gv11b_ops = { .read_wpr_info = NULL, .is_debug_mode_enabled = NULL, .set_debug_mode = vgpu_mm_mmu_set_debug_mode, - .set_mmu_debug_mode = NULL, + .set_mmu_debug_mode = vgpu_fb_set_mmu_debug_mode, .tlb_invalidate = vgpu_mm_tlb_invalidate, .hub_isr = gv11b_fb_hub_isr, .enable_hub_intr = gv11b_fb_enable_hub_intr, -- cgit v1.2.2