summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-10-16 08:15:11 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:46 -0400
commit2eb6dcb4694c8b83e22c50d9fd4d3fdd85b93c46 (patch)
tree0a2d10c9873b81fd6a6821959874d4345cc6bfad /drivers/gpu/nvgpu/gm20b/fb_gm20b.c
parentecc6f27fd13e7560d124faf67d114b93d47b73de (diff)
gpu: nvgpu: Implement 64k large page support
Implement support for 64kB large page size. Add an API to create an address space via IOCTL so that we can accept flags, and assign one flag for enabling 64kB large page size. Also adds APIs to set per-context large page size. This is possible only on Maxwell, so return error if caller tries to set large page size on Kepler. Default large page size is still 128kB. Change-Id: I20b51c8f6d4a984acae8411ace3de9000c78e82f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/fb_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/fb_gm20b.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
index 34ad6418..a2aa81d8 100644
--- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c
@@ -82,9 +82,18 @@ void gm20b_init_kind_attr(void)
82 } 82 }
83} 83}
84 84
85static void gm20b_fb_set_mmu_page_size(struct gk20a *g)
86{
87 /* set large page size in fb */
88 u32 fb_mmu_ctrl = gk20a_readl(g, fb_mmu_ctrl_r());
89 fb_mmu_ctrl |= fb_mmu_ctrl_use_pdb_big_page_size_true_f();
90 gk20a_writel(g, fb_mmu_ctrl_r(), fb_mmu_ctrl);
91}
92
85void gm20b_init_fb(struct gpu_ops *gops) 93void gm20b_init_fb(struct gpu_ops *gops)
86{ 94{
87 gops->fb.init_fs_state = fb_gm20b_init_fs_state; 95 gops->fb.init_fs_state = fb_gm20b_init_fs_state;
96 gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size;
88 gm20b_init_uncompressed_kind_map(); 97 gm20b_init_uncompressed_kind_map();
89 gm20b_init_kind_attr(); 98 gm20b_init_kind_attr();
90} 99}