summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ltc_common.c
diff options
context:
space:
mode:
authorKevin Huang <kevinh@nvidia.com>2014-05-23 16:45:57 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:10:03 -0400
commit7d917f43a5a8abc41988e606ef5e7311dcf23ff8 (patch)
tree224224ab2160dca7cc6fca19bd5d6a0a6ebb9bae /drivers/gpu/nvgpu/gk20a/ltc_common.c
parent28c35a1b99cdfc8ef950241471a213a211bd1836 (diff)
gpu: nvgpu: gm20b: fix compression sharing
For GM20B alone, the LTC count is already accounted for the HW logic for the CBC base calculation from the postDivide address. So SW doesn't have to explicity divide it by the LTC count in the postDivide address calculation. Bug 1477079 Change-Id: I558bbe66bbcfb7edfa21210d0dc22c6170149260 Signed-off-by: Kevin Huang <kevinh@nvidia.com> Reviewed-on: http://git-master/r/414264 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ltc_common.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c
index 72477983..75530b25 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_common.c
+++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c
@@ -291,7 +291,7 @@ static void gk20a_ltc_init_cbc(struct gk20a *g, struct gr_gk20a *gr)
291 compbit_base_post_divide64 = compbit_store_base_iova >> 291 compbit_base_post_divide64 = compbit_store_base_iova >>
292 ltc_ltcs_ltss_cbc_base_alignment_shift_v(); 292 ltc_ltcs_ltss_cbc_base_alignment_shift_v();
293 293
294 do_div(compbit_base_post_divide64, gr->num_fbps); 294 do_div(compbit_base_post_divide64, g->ltc_count);
295 compbit_base_post_divide = u64_lo32(compbit_base_post_divide64); 295 compbit_base_post_divide = u64_lo32(compbit_base_post_divide64);
296 296
297 compbit_base_post_multiply64 = ((u64)compbit_base_post_divide * 297 compbit_base_post_multiply64 = ((u64)compbit_base_post_divide *
@@ -300,6 +300,11 @@ static void gk20a_ltc_init_cbc(struct gk20a *g, struct gr_gk20a *gr)
300 if (compbit_base_post_multiply64 < compbit_store_base_iova) 300 if (compbit_base_post_multiply64 < compbit_store_base_iova)
301 compbit_base_post_divide++; 301 compbit_base_post_divide++;
302 302
303 /* Bug 1477079 indicates sw adjustment on the posted divided base. */
304 if (g->ops.ltc.cbc_fix_config)
305 compbit_base_post_divide =
306 g->ops.ltc.cbc_fix_config(g, compbit_base_post_divide);
307
303 gk20a_writel(g, ltc_ltcs_ltss_cbc_base_r(), 308 gk20a_writel(g, ltc_ltcs_ltss_cbc_base_r(),
304 compbit_base_post_divide); 309 compbit_base_post_divide);
305 310