summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-12-08 07:06:04 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:27 -0400
commit69bb5e156944d5df715d6bb388fd1c97fe458f18 (patch)
tree3dccb664a28eec9d72b8f40cb78afd31779e6cc0 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent0abb99eb9c145711f0021280b19825d6cd0b5f3f (diff)
gpu: nvgpu: Simplify pagepool size query
Make pagepool size query into a function instead of storing the value during boot time in a structure. This simplifies the structure and users of pagepool size do not need to worry about whether it has already been set. Change-Id: Iba16e840cdf9b6c39449730237aa7d8fdff47848 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/660907
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index 44fa6189..66b94943 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -770,12 +770,9 @@ static void gr_gm20b_detect_sm_arch(struct gk20a *g)
770 gr_gpc0_tpc0_sm_arch_warp_count_v(v); 770 gr_gpc0_tpc0_sm_arch_warp_count_v(v);
771} 771}
772 772
773static void gr_gm20b_buffer_size_defaults(struct gk20a *g) 773static u32 gr_gm20b_pagepool_default_size(struct gk20a *g)
774{ 774{
775 g->gr.pagepool_default_size = 775 return gr_scc_pagepool_total_pages_hwmax_value_v();
776 gr_scc_pagepool_total_pages_hwmax_value_v();
777 g->gr.pagepool_max_size =
778 gr_scc_pagepool_total_pages_hwmax_value_v();
779} 776}
780 777
781void gm20b_init_gr(struct gpu_ops *gops) 778void gm20b_init_gr(struct gpu_ops *gops)
@@ -815,5 +812,5 @@ void gm20b_init_gr(struct gpu_ops *gops)
815 gops->gr.detect_sm_arch = gr_gm20b_detect_sm_arch; 812 gops->gr.detect_sm_arch = gr_gm20b_detect_sm_arch;
816 gops->gr.add_zbc_color = gr_gk20a_add_zbc_color; 813 gops->gr.add_zbc_color = gr_gk20a_add_zbc_color;
817 gops->gr.add_zbc_depth = gr_gk20a_add_zbc_depth; 814 gops->gr.add_zbc_depth = gr_gk20a_add_zbc_depth;
818 gops->gr.buffer_size_defaults = gr_gm20b_buffer_size_defaults; 815 gops->gr.pagepool_default_size = gr_gm20b_pagepool_default_size;
819} 816}