summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
diff options
context:
space:
mode:
authorSeshendra Gadagottu <sgadagottu@nvidia.com>2015-02-25 20:38:05 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:57:28 -0400
commit182730599e3636b337b76fa49adbc1a5b243667f (patch)
treedcb44fbcdb0ebcd55066f661ba826849b07fd2e2 /drivers/gpu/nvgpu/gm20b/fb_gm20b.c
parentced17a2d31a49b771b0cc9715f15330a408f8e69 (diff)
gpu: nvgpu: support for dumping vpr/wpr info
Added support for dumping vpr/wpr info for gm20b. This dump info called when ever gk20a_mm_fb_flush is timed-out. Bug 200082817 Change-Id: I21b0372d0e3f976a189c9c428c015165b715bf88 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/711439 (cherry picked from commit b69897d71c8f6119b49ceb8d3273cdb354178cc5) Reviewed-on: http://git-master/r/712675 GVS: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/fb_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/fb_gm20b.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
index deef7896..666d27e9 100644
--- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GM20B GPC MMU 2 * GM20B GPC MMU
3 * 3 *
4 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
5* 5*
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -95,11 +95,41 @@ static int gm20b_fb_compression_page_size(struct gk20a *g)
95 return SZ_128K; 95 return SZ_128K;
96} 96}
97 97
98static void gm20b_fb_dump_vpr_wpr_info(struct gk20a *g)
99{
100 u32 val;
101
102 /* print vpr and wpr info */
103 val = gk20a_readl(g, fb_mmu_vpr_info_r());
104 val &= ~0x3;
105 val |= fb_mmu_vpr_info_index_addr_lo_v();
106 gk20a_writel(g, fb_mmu_vpr_info_r(), val);
107 gk20a_err(dev_from_gk20a(g), "VPR: %08x %08x %08x %08x",
108 gk20a_readl(g, fb_mmu_vpr_info_r()),
109 gk20a_readl(g, fb_mmu_vpr_info_r()),
110 gk20a_readl(g, fb_mmu_vpr_info_r()),
111 gk20a_readl(g, fb_mmu_vpr_info_r()));
112
113 val = gk20a_readl(g, fb_mmu_wpr_info_r());
114 val &= ~0xf;
115 val |= (fb_mmu_wpr_info_index_allow_read_v());
116 gk20a_writel(g, fb_mmu_wpr_info_r(), val);
117 gk20a_err(dev_from_gk20a(g), "WPR: %08x %08x %08x %08x %08x %08x",
118 gk20a_readl(g, fb_mmu_wpr_info_r()),
119 gk20a_readl(g, fb_mmu_wpr_info_r()),
120 gk20a_readl(g, fb_mmu_wpr_info_r()),
121 gk20a_readl(g, fb_mmu_wpr_info_r()),
122 gk20a_readl(g, fb_mmu_wpr_info_r()),
123 gk20a_readl(g, fb_mmu_wpr_info_r()));
124
125}
126
98void gm20b_init_fb(struct gpu_ops *gops) 127void gm20b_init_fb(struct gpu_ops *gops)
99{ 128{
100 gops->fb.init_fs_state = fb_gm20b_init_fs_state; 129 gops->fb.init_fs_state = fb_gm20b_init_fs_state;
101 gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size; 130 gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size;
102 gops->fb.compression_page_size = gm20b_fb_compression_page_size; 131 gops->fb.compression_page_size = gm20b_fb_compression_page_size;
132 gops->fb.dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info;
103 gm20b_init_uncompressed_kind_map(); 133 gm20b_init_uncompressed_kind_map();
104 gm20b_init_kind_attr(); 134 gm20b_init_kind_attr();
105} 135}