mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
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>
This commit is contained in:
committed by
Dan Willemsen
parent
c6a5d3369d
commit
04112d11a8
@@ -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)
|
if (max_comptag_lines > hw_max_comptag_lines)
|
||||||
max_comptag_lines = hw_max_comptag_lines;
|
max_comptag_lines = hw_max_comptag_lines;
|
||||||
|
|
||||||
/* no hybird fb */
|
|
||||||
compbit_backing_size =
|
compbit_backing_size =
|
||||||
DIV_ROUND_UP(max_comptag_lines, comptags_per_cacheline) *
|
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 +=
|
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 */
|
/* must be a multiple of 64KB */
|
||||||
compbit_backing_size = roundup(compbit_backing_size, 64*1024);
|
compbit_backing_size = roundup(compbit_backing_size, 64*1024);
|
||||||
|
|
||||||
max_comptag_lines =
|
max_comptag_lines =
|
||||||
(compbit_backing_size * comptags_per_cacheline) /
|
(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)
|
if (max_comptag_lines > hw_max_comptag_lines)
|
||||||
max_comptag_lines = hw_max_comptag_lines;
|
max_comptag_lines = hw_max_comptag_lines;
|
||||||
|
|||||||
Reference in New Issue
Block a user