summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-06-04 15:15:36 -0400
committerDeepak Nibade <dnibade@nvidia.com>2016-12-27 04:52:06 -0500
commit477ca4b64888b02c211d0e0ea9d67544a88bd4b5 (patch)
tree08a6529fb271032d07c6239c82edd1842ee1c406 /drivers/gpu/nvgpu/gp10b/gr_gp10b.c
parent32002c59bac11d3bdb9080e653666039e4848bde (diff)
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
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/gr_gp10b.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
index c6f5022b..045847b2 100644
--- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c
@@ -267,9 +267,9 @@ static int gr_gp10b_calc_global_ctx_buffer_size(struct gk20a *g)
267 + (gr->alpha_cb_default_size >> 1); 267 + (gr->alpha_cb_default_size >> 1);
268 268
269 gr->attrib_cb_size = min(gr->attrib_cb_size, 269 gr->attrib_cb_size = min(gr->attrib_cb_size,
270 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(0xffffffff)); 270 gr_gpc0_ppc0_cbm_beta_cb_size_v_f(~0) / g->gr.tpc_count);
271 gr->alpha_cb_size = min(gr->attrib_cb_size, 271 gr->alpha_cb_size = min(gr->alpha_cb_size,
272 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(0xffffffff)); 272 gr_gpc0_ppc0_cbm_alpha_cb_size_v_f(~0) / g->gr.tpc_count);
273 273
274 size = gr->attrib_cb_size * 274 size = gr->attrib_cb_size *
275 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v() * 275 gr_gpc0_ppc0_cbm_beta_cb_size_v_granularity_v() *