summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 67aa49c6..3389aca5 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -56,6 +56,8 @@
56#include "hw_sim_gk20a.h" 56#include "hw_sim_gk20a.h"
57#include "hw_top_gk20a.h" 57#include "hw_top_gk20a.h"
58#include "hw_ltc_gk20a.h" 58#include "hw_ltc_gk20a.h"
59#include "hw_gr_gk20a.h"
60#include "hw_fb_gk20a.h"
59#include "gk20a_scale.h" 61#include "gk20a_scale.h"
60#include "dbg_gpu_gk20a.h" 62#include "dbg_gpu_gk20a.h"
61#include "hal.h" 63#include "hal.h"
@@ -727,6 +729,21 @@ static int gk20a_detect_chip(struct gk20a *g)
727 return gpu_init_hal(g); 729 return gpu_init_hal(g);
728} 730}
729 731
732void gk20a_pm_restore_debug_setting(struct gk20a *g)
733{
734 u32 mmu_debug_ctrl;
735
736 /* restore mmu debug state */
737 if (g->mmu_debug_ctrl)
738 mmu_debug_ctrl = fb_mmu_debug_ctrl_debug_enabled_v();
739 else
740 mmu_debug_ctrl = fb_mmu_debug_ctrl_debug_disabled_v();
741
742 mmu_debug_ctrl = gk20a_readl(g, fb_mmu_debug_ctrl_r());
743 mmu_debug_ctrl = set_field(mmu_debug_ctrl, fb_mmu_debug_ctrl_debug_m(), mmu_debug_ctrl);
744 gk20a_writel(g, fb_mmu_debug_ctrl_r(), mmu_debug_ctrl);
745}
746
730static int gk20a_pm_finalize_poweron(struct device *dev) 747static int gk20a_pm_finalize_poweron(struct device *dev)
731{ 748{
732 struct platform_device *pdev = to_platform_device(dev); 749 struct platform_device *pdev = to_platform_device(dev);
@@ -851,6 +868,9 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
851 goto done; 868 goto done;
852 } 869 }
853 870
871 /* Restore the debug setting */
872 gk20a_pm_restore_debug_setting(g);
873
854 gk20a_channel_resume(g); 874 gk20a_channel_resume(g);
855 set_user_nice(current, nice_value); 875 set_user_nice(current, nice_value);
856 876