diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-06-05 15:42:12 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:52:06 -0500 |
commit | 6b4a7ed432327bc9bc0e1983613ac17e5200d822 (patch) | |
tree | 4e4651c7a1b10560cee54f091b4f62ffc66bc330 /drivers/gpu/nvgpu/gp10b | |
parent | dfe6493dcba650318275b73e62fe2e5d35b36622 (diff) |
gpu: nvgpu: gp10b: Rewrite compbit backing store calc
Compbit backing store did not take into account number of GOBS
per comptagline per slice.
Bug 1604102
Change-Id: I42666e72ea54697b6fbc7318e65a6a09d867f5b6
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/754706
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sami Kiminki <skiminki@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index 68f4eafa..d6fca6e4 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | |||
@@ -80,8 +80,11 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) | |||
80 | max_comptag_lines = hw_max_comptag_lines; | 80 | max_comptag_lines = hw_max_comptag_lines; |
81 | 81 | ||
82 | compbit_backing_size = | 82 | compbit_backing_size = |
83 | DIV_ROUND_UP(max_comptag_lines, comptags_per_cacheline) * | 83 | roundup(max_comptag_lines * gobs_per_comptagline_per_slice, |
84 | cacheline_size * slices_per_ltc * g->ltc_count; | 84 | cacheline_size); |
85 | compbit_backing_size = | ||
86 | roundup(compbit_backing_size * slices_per_ltc * g->ltc_count, | ||
87 | g->ops.fb.compressible_page_size(g)); | ||
85 | 88 | ||
86 | /* aligned to 2KB * ltc_count */ | 89 | /* aligned to 2KB * ltc_count */ |
87 | compbit_backing_size += | 90 | compbit_backing_size += |
@@ -90,13 +93,6 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) | |||
90 | /* must be a multiple of 64KB */ | 93 | /* must be a multiple of 64KB */ |
91 | compbit_backing_size = roundup(compbit_backing_size, 64*1024); | 94 | compbit_backing_size = roundup(compbit_backing_size, 64*1024); |
92 | 95 | ||
93 | max_comptag_lines = | ||
94 | (compbit_backing_size * comptags_per_cacheline) / | ||
95 | (cacheline_size * slices_per_ltc * g->ltc_count); | ||
96 | |||
97 | if (max_comptag_lines > hw_max_comptag_lines) | ||
98 | max_comptag_lines = hw_max_comptag_lines; | ||
99 | |||
100 | gk20a_dbg_info("compbit backing store size : %d", | 96 | gk20a_dbg_info("compbit backing store size : %d", |
101 | compbit_backing_size); | 97 | compbit_backing_size); |
102 | gk20a_dbg_info("max comptag lines : %d", | 98 | gk20a_dbg_info("max comptag lines : %d", |