diff options
author | Thomas Fleury <tfleury@nvidia.com> | 2017-08-01 20:17:34 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-07 16:47:06 -0400 |
commit | 525489f26eba34804de93a07d6035fc3458deeab (patch) | |
tree | 05208cc22149f2d24be3cf3ab77c696e8f780e41 /drivers/gpu/nvgpu/common/linux/vm.c | |
parent | 2492142224e3cc7f83f19cdebdadf5cc54fb2956 (diff) |
gpu: nvgpu: fix debugfs to disable big pages
After setting 'Y' in disable_bigpage, in native SMMU case,
we could still see 64K GMMU pages beeing used.
Fixed the following:
- enforce disable_bigpage in nvgpu_vm_map
- update GPU characteristics so that new clients know
whether or not big pages are enabled. For instance
this may affect how CUDA requests memory mapping.
JIRA EVLR-1694
Change-Id: I62841096add3bd798c5c11090054f82c8a2be832
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1532429
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vm.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vm.c b/drivers/gpu/nvgpu/common/linux/vm.c index d47d6bb1..dec05209 100644 --- a/drivers/gpu/nvgpu/common/linux/vm.c +++ b/drivers/gpu/nvgpu/common/linux/vm.c | |||
@@ -260,7 +260,10 @@ u64 nvgpu_vm_map(struct vm_gk20a *vm, | |||
260 | map_offset = offset_align; | 260 | map_offset = offset_align; |
261 | 261 | ||
262 | bfr.align = nvgpu_get_buffer_alignment(g, sgl, aperture); | 262 | bfr.align = nvgpu_get_buffer_alignment(g, sgl, aperture); |
263 | bfr.pgsz_idx = __get_pte_size(vm, map_offset, | 263 | if (g->mm.disable_bigpage) |
264 | bfr.pgsz_idx = gmmu_page_size_small; | ||
265 | else | ||
266 | bfr.pgsz_idx = __get_pte_size(vm, map_offset, | ||
264 | min_t(u64, bfr.size, bfr.align)); | 267 | min_t(u64, bfr.size, bfr.align)); |
265 | mapping_size = mapping_size ? mapping_size : bfr.size; | 268 | mapping_size = mapping_size ? mapping_size : bfr.size; |
266 | 269 | ||