From 4df9290536dc02250eac2abbf0d4dc5d27f0edcc Mon Sep 17 00:00:00 2001 From: Arto Merilainen Date: Thu, 31 Jul 2014 13:35:48 +0300 Subject: gpu: nvgpu: Fix compbit base calculation Compression bit base was calculated incorrectly in cases where number of LTCs was not 1. This patch fixes the code. Change-Id: I25e3fa7446b238202d93ce8a72ed919d11fb6e30 Signed-off-by: Arto Merilainen Reviewed-on: http://git-master/r/449281 Reviewed-by: Deepak Nibade Reviewed-by: Automatic_Commit_Validation_User Tested-by: Jussi Rasanen GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/gk20a/ltc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/ltc_common.c') diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c index 7d160efb..55e822f6 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_common.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c @@ -242,7 +242,7 @@ static void gk20a_ltc_init_cbc(struct gk20a *g, struct gr_gk20a *gr) compbit_base_post_divide = u64_lo32(compbit_base_post_divide64); compbit_base_post_multiply64 = ((u64)compbit_base_post_divide * - gr->num_fbps) << ltc_ltcs_ltss_cbc_base_alignment_shift_v(); + g->ltc_count) << ltc_ltcs_ltss_cbc_base_alignment_shift_v(); if (compbit_base_post_multiply64 < compbit_store_base_iova) compbit_base_post_divide++; -- cgit v1.2.2