mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Add a macro of totalram_size_in_mb
There are two (would be more) places calculating the ram size in MB from page numbers, so this patch just simply adds a macro for simplification. Bug 2327574 Bug 2284925 Change-Id: Ie5dc387d547e1b8ce98946f0637dc17a6897e5a6 Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1810333 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
471be33718
commit
bd47d00ce7
@@ -98,8 +98,7 @@ static void nvgpu_init_gr_vars(struct gk20a *g)
|
||||
gk20a_init_gr(g);
|
||||
|
||||
nvgpu_log_info(g, "total ram pages : %lu", totalram_pages);
|
||||
g->gr.max_comptag_mem = totalram_pages
|
||||
>> (10 - (PAGE_SHIFT - 10));
|
||||
g->gr.max_comptag_mem = totalram_size_in_mb;
|
||||
|
||||
/* Deduct the part taken by the running system */
|
||||
if (platform->comptag_mem_deduct &&
|
||||
|
||||
Reference in New Issue
Block a user