From e0587aaf4d8f803004365eef2b08c0becd1042cb Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Tue, 30 Apr 2019 17:19:51 -0700 Subject: gpu: nvgpu: set FB/HSMMU debug mode Set NV_PFB_HSMMU_PRI_MMU_DEBUG_CTRL and NV_PFB_PRI_MMU_DEBUG_CTRL in addition to NV_PGRAPH_PRI_GPCS_MMU_DEBUG_CTRL, in NVGPU_DBG_GPU_IOCTL_SET_CTX_MMU_DEBUG_MODE Bug 2515097 Bug 2713590 Change-Id: I1763b43e79fac3edb68a35980683d58bfa89519f Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/2115785 (cherry picked from commit 8057514a9f7fc5f175e2e0571dfa91d78ebb6410) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2208771 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Kajetan Dutka Reviewed-by: Alex Waterman Reviewed-by: Winnie Hsu Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: Kajetan Dutka Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fb/fb_gm20b.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/common/fb/fb_gm20b.c') diff --git a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c index f62bf9df..739274c5 100644 --- a/drivers/gpu/nvgpu/common/fb/fb_gm20b.c +++ b/drivers/gpu/nvgpu/common/fb/fb_gm20b.c @@ -1,7 +1,7 @@ /* * GM20B GPC MMU * - * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -311,7 +311,7 @@ bool gm20b_fb_debug_mode_enabled(struct gk20a *g) fb_mmu_debug_ctrl_debug_enabled_v(); } -void gm20b_fb_set_debug_mode(struct gk20a *g, bool enable) +void gm20b_fb_set_mmu_debug_mode(struct gk20a *g, bool enable) { u32 reg_val, fb_debug_ctrl; @@ -323,10 +323,15 @@ void gm20b_fb_set_debug_mode(struct gk20a *g, bool enable) g->mmu_debug_ctrl = false; } - reg_val = gk20a_readl(g, fb_mmu_debug_ctrl_r()); + reg_val = nvgpu_readl(g, fb_mmu_debug_ctrl_r()); reg_val = set_field(reg_val, fb_mmu_debug_ctrl_debug_m(), fb_debug_ctrl); - gk20a_writel(g, fb_mmu_debug_ctrl_r(), reg_val); + nvgpu_writel(g, fb_mmu_debug_ctrl_r(), reg_val); +} +void gm20b_fb_set_debug_mode(struct gk20a *g, bool enable) +{ + gm20b_fb_set_mmu_debug_mode(g, enable); g->ops.gr.set_debug_mode(g, enable); } + -- cgit v1.2.2