diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/gr_gp10b.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 973653a0..c6f5022b 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c | |||
@@ -872,6 +872,42 @@ static void gr_gp10b_commit_global_attrib_cb(struct gk20a *g, | |||
872 | gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(), patch); | 872 | gr_gpcs_tpcs_tex_rm_cb_1_valid_true_f(), patch); |
873 | } | 873 | } |
874 | 874 | ||
875 | static void gr_gp10b_commit_global_bundle_cb(struct gk20a *g, | ||
876 | struct channel_ctx_gk20a *ch_ctx, | ||
877 | u64 addr, u64 size, bool patch) | ||
878 | { | ||
879 | u32 data; | ||
880 | |||
881 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_scc_bundle_cb_base_r(), | ||
882 | gr_scc_bundle_cb_base_addr_39_8_f(addr), patch); | ||
883 | |||
884 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_scc_bundle_cb_size_r(), | ||
885 | gr_scc_bundle_cb_size_div_256b_f(size) | | ||
886 | gr_scc_bundle_cb_size_valid_true_f(), patch); | ||
887 | |||
888 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_gpcs_swdx_bundle_cb_base_r(), | ||
889 | gr_gpcs_swdx_bundle_cb_base_addr_39_8_f(addr), patch); | ||
890 | |||
891 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_gpcs_swdx_bundle_cb_size_r(), | ||
892 | gr_gpcs_swdx_bundle_cb_size_div_256b_f(size) | | ||
893 | gr_gpcs_swdx_bundle_cb_size_valid_true_f(), patch); | ||
894 | |||
895 | /* data for state_limit */ | ||
896 | data = (g->gr.bundle_cb_default_size * | ||
897 | gr_scc_bundle_cb_size_div_256b_byte_granularity_v()) / | ||
898 | gr_pd_ab_dist_cfg2_state_limit_scc_bundle_granularity_v(); | ||
899 | |||
900 | data = min_t(u32, data, g->gr.min_gpm_fifo_depth); | ||
901 | |||
902 | gk20a_dbg_info("bundle cb token limit : %d, state limit : %d", | ||
903 | g->gr.bundle_cb_token_limit, data); | ||
904 | |||
905 | gr_gk20a_ctx_patch_write(g, ch_ctx, gr_pd_ab_dist_cfg2_r(), | ||
906 | gr_pd_ab_dist_cfg2_token_limit_f(g->gr.bundle_cb_token_limit) | | ||
907 | gr_pd_ab_dist_cfg2_state_limit_f(data), patch); | ||
908 | |||
909 | } | ||
910 | |||
875 | void gp10b_init_gr(struct gpu_ops *gops) | 911 | void gp10b_init_gr(struct gpu_ops *gops) |
876 | { | 912 | { |
877 | gm20b_init_gr(gops); | 913 | gm20b_init_gr(gops); |
@@ -884,6 +920,7 @@ void gp10b_init_gr(struct gpu_ops *gops) | |||
884 | gops->gr.calc_global_ctx_buffer_size = | 920 | gops->gr.calc_global_ctx_buffer_size = |
885 | gr_gp10b_calc_global_ctx_buffer_size; | 921 | gr_gp10b_calc_global_ctx_buffer_size; |
886 | gops->gr.commit_global_attrib_cb = gr_gp10b_commit_global_attrib_cb; | 922 | gops->gr.commit_global_attrib_cb = gr_gp10b_commit_global_attrib_cb; |
923 | gops->gr.commit_global_bundle_cb = gr_gp10b_commit_global_bundle_cb; | ||
887 | gops->gr.handle_sw_method = gr_gp10b_handle_sw_method; | 924 | gops->gr.handle_sw_method = gr_gp10b_handle_sw_method; |
888 | gops->gr.cb_size_default = gr_gp10b_cb_size_default; | 925 | gops->gr.cb_size_default = gr_gp10b_cb_size_default; |
889 | gops->gr.set_alpha_circular_buffer_size = | 926 | gops->gr.set_alpha_circular_buffer_size = |