diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/driver_common.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/os_linux.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c | 3 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/driver_common.c b/drivers/gpu/nvgpu/os/linux/driver_common.c index b81cc90c..4d345aaa 100644 --- a/drivers/gpu/nvgpu/os/linux/driver_common.c +++ b/drivers/gpu/nvgpu/os/linux/driver_common.c | |||
@@ -98,8 +98,7 @@ static void nvgpu_init_gr_vars(struct gk20a *g) | |||
98 | gk20a_init_gr(g); | 98 | gk20a_init_gr(g); |
99 | 99 | ||
100 | nvgpu_log_info(g, "total ram pages : %lu", totalram_pages); | 100 | nvgpu_log_info(g, "total ram pages : %lu", totalram_pages); |
101 | g->gr.max_comptag_mem = totalram_pages | 101 | g->gr.max_comptag_mem = totalram_size_in_mb; |
102 | >> (10 - (PAGE_SHIFT - 10)); | ||
103 | 102 | ||
104 | /* Deduct the part taken by the running system */ | 103 | /* Deduct the part taken by the running system */ |
105 | if (platform->comptag_mem_deduct && | 104 | if (platform->comptag_mem_deduct && |
diff --git a/drivers/gpu/nvgpu/os/linux/os_linux.h b/drivers/gpu/nvgpu/os/linux/os_linux.h index 13c20a81..5f35db09 100644 --- a/drivers/gpu/nvgpu/os/linux/os_linux.h +++ b/drivers/gpu/nvgpu/os/linux/os_linux.h | |||
@@ -165,4 +165,6 @@ static inline struct device *dev_from_gk20a(struct gk20a *g) | |||
165 | 165 | ||
166 | #define INTERFACE_NAME "nvhost%s-gpu" | 166 | #define INTERFACE_NAME "nvhost%s-gpu" |
167 | 167 | ||
168 | #define totalram_size_in_mb (totalram_pages >> (10 - (PAGE_SHIFT - 10))) | ||
169 | |||
168 | #endif | 170 | #endif |
diff --git a/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c index 83191316..33c067c6 100644 --- a/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c +++ b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.c | |||
@@ -439,8 +439,7 @@ int vgpu_probe(struct platform_device *pdev) | |||
439 | gk20a_init_gr(gk20a); | 439 | gk20a_init_gr(gk20a); |
440 | 440 | ||
441 | nvgpu_log_info(gk20a, "total ram pages : %lu", totalram_pages); | 441 | nvgpu_log_info(gk20a, "total ram pages : %lu", totalram_pages); |
442 | gk20a->gr.max_comptag_mem = totalram_pages | 442 | gk20a->gr.max_comptag_mem = totalram_size_in_mb; |
443 | >> (10 - (PAGE_SHIFT - 10)); | ||
444 | 443 | ||
445 | nvgpu_ref_init(&gk20a->refcount); | 444 | nvgpu_ref_init(&gk20a->refcount); |
446 | 445 | ||