diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/fb_gm20b.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hw_gmmu_gm20b.h | 6 |
3 files changed, 24 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c index 3d4604c5..c65cd450 100644 --- a/drivers/gpu/nvgpu/gm20b/fb_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/fb_gm20b.c | |||
@@ -91,6 +91,16 @@ static void gm20b_fb_set_mmu_page_size(struct gk20a *g) | |||
91 | gk20a_writel(g, fb_mmu_ctrl_r(), fb_mmu_ctrl); | 91 | gk20a_writel(g, fb_mmu_ctrl_r(), fb_mmu_ctrl); |
92 | } | 92 | } |
93 | 93 | ||
94 | static bool gm20b_fb_set_use_full_comp_tag_line(struct gk20a *g) | ||
95 | { | ||
96 | /* set large page size in fb */ | ||
97 | u32 fb_mmu_ctrl = gk20a_readl(g, fb_mmu_ctrl_r()); | ||
98 | fb_mmu_ctrl |= fb_mmu_ctrl_use_full_comp_tag_line_true_f(); | ||
99 | gk20a_writel(g, fb_mmu_ctrl_r(), fb_mmu_ctrl); | ||
100 | |||
101 | return true; | ||
102 | } | ||
103 | |||
94 | static int gm20b_fb_compression_page_size(struct gk20a *g) | 104 | static int gm20b_fb_compression_page_size(struct gk20a *g) |
95 | { | 105 | { |
96 | return SZ_128K; | 106 | return SZ_128K; |
@@ -135,6 +145,7 @@ void gm20b_init_fb(struct gpu_ops *gops) | |||
135 | gops->fb.reset = fb_gk20a_reset; | 145 | gops->fb.reset = fb_gk20a_reset; |
136 | gops->fb.init_fs_state = fb_gm20b_init_fs_state; | 146 | gops->fb.init_fs_state = fb_gm20b_init_fs_state; |
137 | gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size; | 147 | gops->fb.set_mmu_page_size = gm20b_fb_set_mmu_page_size; |
148 | gops->fb.set_use_full_comp_tag_line = gm20b_fb_set_use_full_comp_tag_line; | ||
138 | gops->fb.compression_page_size = gm20b_fb_compression_page_size; | 149 | gops->fb.compression_page_size = gm20b_fb_compression_page_size; |
139 | gops->fb.compressible_page_size = gm20b_fb_compressible_page_size; | 150 | gops->fb.compressible_page_size = gm20b_fb_compressible_page_size; |
140 | gops->fb.dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info; | 151 | gops->fb.dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info; |
diff --git a/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h index 5ec4a46e..d68f6479 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_fb_gm20b.h | |||
@@ -94,6 +94,14 @@ static inline u32 fb_mmu_ctrl_use_pdb_big_page_size_false_f(void) | |||
94 | { | 94 | { |
95 | return 0x0; | 95 | return 0x0; |
96 | } | 96 | } |
97 | static inline u32 fb_mmu_ctrl_use_full_comp_tag_line_v(u32 r) | ||
98 | { | ||
99 | return (r >> 12) & 0x1; | ||
100 | } | ||
101 | static inline u32 fb_mmu_ctrl_use_full_comp_tag_line_true_f(void) | ||
102 | { | ||
103 | return 0x1000; | ||
104 | } | ||
97 | static inline u32 fb_priv_mmu_phy_secure_r(void) | 105 | static inline u32 fb_priv_mmu_phy_secure_r(void) |
98 | { | 106 | { |
99 | return 0x00100ce4; | 107 | return 0x00100ce4; |
diff --git a/drivers/gpu/nvgpu/gm20b/hw_gmmu_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_gmmu_gm20b.h index 32b65912..572f727f 100644 --- a/drivers/gpu/nvgpu/gm20b/hw_gmmu_gm20b.h +++ b/drivers/gpu/nvgpu/gm20b/hw_gmmu_gm20b.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
5 | * under the terms and conditions of the GNU General Public License, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -210,6 +210,10 @@ static inline u32 gmmu_pte_read_disable_true_f(void) | |||
210 | { | 210 | { |
211 | return 0x40000000; | 211 | return 0x40000000; |
212 | } | 212 | } |
213 | static inline u32 gmmu_pte_comptagline_s(void) | ||
214 | { | ||
215 | return 17; | ||
216 | } | ||
213 | static inline u32 gmmu_pte_comptagline_f(u32 v) | 217 | static inline u32 gmmu_pte_comptagline_f(u32 v) |
214 | { | 218 | { |
215 | return (v & 0x1ffff) << 12; | 219 | return (v & 0x1ffff) << 12; |