From 271456272d09d6c21728cc92bedc8ec6f7f48c8b Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 16 Aug 2018 13:56:42 -0700 Subject: gpu: nvgpu: Use FB reg for getting HUB MMU dbg mode When we program MMU debug mode, we program it to both HUB and GPC MMU. The query retrieved the value from GPC MMU, which introduces a dependency from FB to GR. Change the code to retrieve the mode from HUB MMU instead. Change-Id: I6fa98e050480f7405395b7e44965defa386734d4 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1801419 Reviewed-by: svc-misra-checker GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fb/fb_gm20b.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c index 36ec21b1..5e78f636 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c +++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c @@ -202,9 +202,9 @@ void gm20b_fb_read_wpr_info(struct gk20a *g, struct wpr_carveout_info *inf) bool gm20b_fb_debug_mode_enabled(struct gk20a *g) { - u32 debug_ctrl = gk20a_readl(g, gr_gpcs_pri_mmu_debug_ctrl_r()); - return gr_gpcs_pri_mmu_debug_ctrl_debug_v(debug_ctrl) == - gr_gpcs_pri_mmu_debug_ctrl_debug_enabled_v(); + u32 debug_ctrl = gk20a_readl(g, fb_mmu_debug_ctrl_r()); + return fb_mmu_debug_ctrl_debug_v(debug_ctrl) == + fb_mmu_debug_ctrl_debug_enabled_v(); } void gm20b_fb_set_debug_mode(struct gk20a *g, bool enable) -- cgit v1.2.2