summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-06-22 15:55:17 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-30 21:34:59 -0400
commit001c7c3185d9b087f89f48a41bee27d2d06721f6 (patch)
treec869be82279688a5dbe5d1145da09ca2323aef92 /drivers/gpu/nvgpu/gm20b/mm_gm20b.c
parent82c0c96290602b1baf296133c7f55ae1848e433a (diff)
gpu: nvgpu: Per chip default big page size
Make default big page size query a HAL op instead of per-platform constant. This allows querying for default big page size without accessing Linux specific gk20a_platform structure. JIRA NVGPU-38 Change-Id: Ibfbd1319764fdae5fdb06700fb64d23f6f3dd01a Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master/r/1507928 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/mm_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/mm_gm20b.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
index 0595fe2e..bdb3b827 100644
--- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
@@ -45,6 +45,11 @@ static u32 gm20b_mm_get_big_page_sizes(void)
45 return SZ_64K | SZ_128K; 45 return SZ_64K | SZ_128K;
46} 46}
47 47
48static u32 gm20b_mm_get_default_big_page_size(void)
49{
50 return SZ_128K;
51}
52
48static bool gm20b_mm_support_sparse(struct gk20a *g) 53static bool gm20b_mm_support_sparse(struct gk20a *g)
49{ 54{
50 return true; 55 return true;
@@ -67,6 +72,7 @@ void gm20b_init_mm(struct gpu_ops *gops)
67 gops->mm.cbc_clean = gk20a_mm_cbc_clean; 72 gops->mm.cbc_clean = gk20a_mm_cbc_clean;
68 gops->mm.set_big_page_size = gm20b_mm_set_big_page_size; 73 gops->mm.set_big_page_size = gm20b_mm_set_big_page_size;
69 gops->mm.get_big_page_sizes = gm20b_mm_get_big_page_sizes; 74 gops->mm.get_big_page_sizes = gm20b_mm_get_big_page_sizes;
75 gops->mm.get_default_big_page_size = gm20b_mm_get_default_big_page_size;
70 gops->mm.get_iova_addr = gk20a_mm_iova_addr; 76 gops->mm.get_iova_addr = gk20a_mm_iova_addr;
71 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits; 77 gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
72 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels; 78 gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels;