summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-08-07 02:26:51 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:48 -0400
commit04112d11a855d6fb5af0bcfd053124c99c9cf69d (patch)
tree6f3766e7a2ae76d5d965eff7094a1eb5c32bd2fc /drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
parentc6a5d3369dfb261dcd289438efc00cacd448c31e (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/453809 Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c9
1 files changed, 4 insertions, 5 deletions
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)
58 if (max_comptag_lines > hw_max_comptag_lines) 58 if (max_comptag_lines > hw_max_comptag_lines)
59 max_comptag_lines = hw_max_comptag_lines; 59 max_comptag_lines = hw_max_comptag_lines;
60 60
61 /* no hybird fb */
62 compbit_backing_size = 61 compbit_backing_size =
63 DIV_ROUND_UP(max_comptag_lines, comptags_per_cacheline) * 62 DIV_ROUND_UP(max_comptag_lines, comptags_per_cacheline) *
64 cacheline_size * slices_per_ltc * gr->num_fbps; 63 cacheline_size * slices_per_ltc * g->ltc_count;
65 64
66 /* aligned to 2KB * num_fbps */ 65 /* aligned to 2KB * ltc_count */
67 compbit_backing_size += 66 compbit_backing_size +=
68 gr->num_fbps << ltc_ltcs_ltss_cbc_base_alignment_shift_v(); 67 g->ltc_count << ltc_ltcs_ltss_cbc_base_alignment_shift_v();
69 68
70 /* must be a multiple of 64KB */ 69 /* must be a multiple of 64KB */
71 compbit_backing_size = roundup(compbit_backing_size, 64*1024); 70 compbit_backing_size = roundup(compbit_backing_size, 64*1024);
72 71
73 max_comptag_lines = 72 max_comptag_lines =
74 (compbit_backing_size * comptags_per_cacheline) / 73 (compbit_backing_size * comptags_per_cacheline) /
75 cacheline_size * slices_per_ltc * gr->num_fbps; 74 cacheline_size * slices_per_ltc * g->ltc_count;
76 75
77 if (max_comptag_lines > hw_max_comptag_lines) 76 if (max_comptag_lines > hw_max_comptag_lines)
78 max_comptag_lines = hw_max_comptag_lines; 77 max_comptag_lines = hw_max_comptag_lines;