diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/mm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/mm.c b/drivers/gpu/nvgpu/common/mm/mm.c index 3c083ab8..c9b2b493 100644 --- a/drivers/gpu/nvgpu/common/mm/mm.c +++ b/drivers/gpu/nvgpu/common/mm/mm.c | |||
@@ -77,10 +77,13 @@ static enum gmmu_pgsz_gk20a __get_pte_size_split_addr(struct vm_gk20a *vm, | |||
77 | * - Attempt to find a reserved memory area and use the page size | 77 | * - Attempt to find a reserved memory area and use the page size |
78 | * based on that. | 78 | * based on that. |
79 | * - If no reserved page size is available, default to small pages. | 79 | * - If no reserved page size is available, default to small pages. |
80 | * o If the base is zero: | 80 | * o If the base is zero and we have an SMMU: |
81 | * - If the size is larger than or equal to the big page size, use big | 81 | * - If the size is larger than or equal to the big page size, use big |
82 | * pages. | 82 | * pages. |
83 | * - Otherwise use small pages. | 83 | * - Otherwise use small pages. |
84 | * o If there's no SMMU: | ||
85 | * - Regardless of buffer size use small pages since we have no | ||
86 | * - guarantee of contiguity. | ||
84 | */ | 87 | */ |
85 | enum gmmu_pgsz_gk20a __get_pte_size(struct vm_gk20a *vm, u64 base, u64 size) | 88 | enum gmmu_pgsz_gk20a __get_pte_size(struct vm_gk20a *vm, u64 base, u64 size) |
86 | { | 89 | { |
@@ -95,7 +98,8 @@ enum gmmu_pgsz_gk20a __get_pte_size(struct vm_gk20a *vm, u64 base, u64 size) | |||
95 | if (base) | 98 | if (base) |
96 | return __get_pte_size_fixed_map(vm, base, size); | 99 | return __get_pte_size_fixed_map(vm, base, size); |
97 | 100 | ||
98 | if (size >= vm->gmmu_page_sizes[gmmu_page_size_big]) | 101 | if (size >= vm->gmmu_page_sizes[gmmu_page_size_big] && |
102 | nvgpu_iommuable(g)) | ||
99 | return gmmu_page_size_big; | 103 | return gmmu_page_size_big; |
100 | return gmmu_page_size_small; | 104 | return gmmu_page_size_small; |
101 | } | 105 | } |