summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2014-03-11 09:09:32 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:09:05 -0400
commit2c615d68b835697f1c77dcb4f069ce5a84abd3d6 (patch)
tree550b471d20150555d9af83f0baa5fc1dac3f9b3c /drivers
parent177e4e4735b1e7e5f40beab2ac74f020c3a64d86 (diff)
gpu: nvgpu: Fall-back to 4k pages
This patch modifies the code to fall-back to 4k pages if the current VA does not support 128k pages. Bug 1409151 Change-Id: I94e9ca5953740388db689bc9306b0392191e29d2 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 5440b3c2..c6883b61 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -1321,7 +1321,10 @@ u64 gk20a_vm_map(struct vm_gk20a *vm,
1321 bfr.pgsz_idx = NV_GMMU_VA_IS_UPPER(offset_align) ? 1321 bfr.pgsz_idx = NV_GMMU_VA_IS_UPPER(offset_align) ?
1322 gmmu_page_size_big : gmmu_page_size_small; 1322 gmmu_page_size_big : gmmu_page_size_small;
1323 } else { 1323 } else {
1324 gmmu_select_page_size(&bfr); 1324 if (vm->big_pages)
1325 gmmu_select_page_size(&bfr);
1326 else
1327 bfr.pgsz_idx = gmmu_page_size_small;
1325 } 1328 }
1326 1329
1327 /* validate/adjust bfr attributes */ 1330 /* validate/adjust bfr attributes */