gpu: nvgpu: gp10b: Fix clipping of alpha/beta size

Alpha and beta sizes need to be clipped to a maximum value. For
alpha CB we were using beta size in clipping, and for both we were
not using number of TPCs to determine the max value.

Change-Id: I0c925464ba4c9f575e6e59dd5ba7759aa1cb6381
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/752667
Reviewed-by: Automatic_Commit_Validation_User
This commit is contained in:
Terje Bergstrom
2015-06-04 12:15:36 -07:00
committed by Deepak Nibade
parent 32002c59ba
commit 477ca4b648

View File

@@ -267,9 +267,9 @@ static int gr_gp10b_calc_global_ctx_buffer_size(struct gk20a *g)
+ (gr->alpha_cb_default_size >> 1);
gr->attrib_cb_size = min(gr->attrib_cb_size,
gr_gpc0_ppc0_cbm_beta_cb_size_v_f(0xffffffff));
gr->alpha_cb_size = min(gr->attrib_cb_size,
gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(0xffffffff));
gr_gpc0_ppc0_cbm_beta_cb_size_v_f(~0) / g->gr.tpc_count);
gr->alpha_cb_size = min(gr->alpha_cb_size,
gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(~0) / g->gr.tpc_count);
size = gr->attrib_cb_size *
gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v() *