From 04112d11a855d6fb5af0bcfd053124c99c9cf69d Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 7 Aug 2014 09:26:51 +0300 Subject: gpu: nvgpu: gm20b: Comptag size must use LTC count Calculation for comptag backing store must use number of LTCs instead of number of FBPs. Change-Id: If0aa636e09a3d24459987e626fe53bb7c96f1b15 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/453809 Reviewed-by: Shridhar Rasal Reviewed-by: Alex Waterman --- drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index 683aa2ac..759b1d5a 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c @@ -58,21 +58,20 @@ static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) if (max_comptag_lines > hw_max_comptag_lines) max_comptag_lines = hw_max_comptag_lines; - /* no hybird fb */ compbit_backing_size = DIV_ROUND_UP(max_comptag_lines, comptags_per_cacheline) * - cacheline_size * slices_per_ltc * gr->num_fbps; + cacheline_size * slices_per_ltc * g->ltc_count; - /* aligned to 2KB * num_fbps */ + /* aligned to 2KB * ltc_count */ compbit_backing_size += - gr->num_fbps << ltc_ltcs_ltss_cbc_base_alignment_shift_v(); + g->ltc_count << ltc_ltcs_ltss_cbc_base_alignment_shift_v(); /* must be a multiple of 64KB */ compbit_backing_size = roundup(compbit_backing_size, 64*1024); max_comptag_lines = (compbit_backing_size * comptags_per_cacheline) / - cacheline_size * slices_per_ltc * gr->num_fbps; + cacheline_size * slices_per_ltc * g->ltc_count; if (max_comptag_lines > hw_max_comptag_lines) max_comptag_lines = hw_max_comptag_lines; -- cgit v1.2.2