summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/mm_gp106.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/mm_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/mm_gp106.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/mm_gp106.c b/drivers/gpu/nvgpu/gp106/mm_gp106.c
index 4a3a4a19..7864880f 100644
--- a/drivers/gpu/nvgpu/gp106/mm_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/mm_gp106.c
@@ -39,8 +39,9 @@ size_t gp106_mm_get_vidmem_size(struct gk20a *g)
39 u32 ecc = fb_mmu_local_memory_range_ecc_mode_v(range); 39 u32 ecc = fb_mmu_local_memory_range_ecc_mode_v(range);
40 size_t bytes = ((size_t)mag << scale) * SZ_1M; 40 size_t bytes = ((size_t)mag << scale) * SZ_1M;
41 41
42 if (ecc) 42 if (ecc) {
43 bytes = bytes / 16 * 15; 43 bytes = bytes / 16 * 15;
44 }
44 45
45 return bytes; 46 return bytes;
46} 47}