diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-07-03 06:24:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-07 10:05:38 -0400 |
commit | 6c643bdb5f58446e120370d8eb41c083f8935dd2 (patch) | |
tree | 4f6476e93630402472d7df1bbdfb08ef7f7779c5 /drivers | |
parent | 583704620db88e391f6b14acc57af859a70127de (diff) |
gpu: nvgpu: remove coherence support from gp10b
We do not support coherence for gp10b, hence clean up related code
Remove API gp10b_mm_phys_addr_translate() and use physical address
instead
Also, since now gp10b_mm_iova_addr() becomes equivalent to
gk20a_mm_iova_addr(), remove gp10b_mm_iova_addr() altogether
We first set gk20a_mm_iova_addr() to get_iova_addr() pointer anyways
so we continue using gk20a version of the API
Jira GPUT19X-17
Bug 1651331
Bug 200283998
Change-Id: Ic1ca198fcde7ddbcd23516bff8a2e65c9eae32b1
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master/r/1512598
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/mm_gp10b.c | 27 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/mm_gp10b.h | 2 |
2 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c index 2ff199c6..590dd960 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c | |||
@@ -124,32 +124,6 @@ static int gb10b_init_bar2_mm_hw_setup(struct gk20a *g) | |||
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | static u64 gp10b_mm_phys_addr_translate(struct gk20a *g, u64 phys_addr, | ||
128 | u32 flags) | ||
129 | { | ||
130 | if (!device_is_iommuable(dev_from_gk20a(g))) | ||
131 | if (flags & NVGPU_AS_MAP_BUFFER_FLAGS_IO_COHERENT) | ||
132 | return phys_addr | | ||
133 | 1ULL << NVGPU_MM_GET_IO_COHERENCE_BIT; | ||
134 | |||
135 | return phys_addr; | ||
136 | } | ||
137 | |||
138 | static u64 gp10b_mm_iova_addr(struct gk20a *g, struct scatterlist *sgl, | ||
139 | u32 flags) | ||
140 | { | ||
141 | if (!device_is_iommuable(dev_from_gk20a(g))) | ||
142 | return gp10b_mm_phys_addr_translate(g, sg_phys(sgl), flags); | ||
143 | |||
144 | if (sg_dma_address(sgl) == 0) | ||
145 | return gp10b_mm_phys_addr_translate(g, sg_phys(sgl), flags); | ||
146 | |||
147 | if (sg_dma_address(sgl) == DMA_ERROR_CODE) | ||
148 | return 0; | ||
149 | |||
150 | return gk20a_mm_smmu_vaddr_translate(g, sg_dma_address(sgl)); | ||
151 | } | ||
152 | |||
153 | static void update_gmmu_pde3_locked(struct vm_gk20a *vm, | 127 | static void update_gmmu_pde3_locked(struct vm_gk20a *vm, |
154 | const struct gk20a_mmu_level *l, | 128 | const struct gk20a_mmu_level *l, |
155 | struct nvgpu_gmmu_pd *pd, | 129 | struct nvgpu_gmmu_pd *pd, |
@@ -401,7 +375,6 @@ void gp10b_init_mm(struct gpu_ops *gops) | |||
401 | gops->mm.init_mm_setup_hw = gp10b_init_mm_setup_hw; | 375 | gops->mm.init_mm_setup_hw = gp10b_init_mm_setup_hw; |
402 | gops->mm.init_bar2_vm = gb10b_init_bar2_vm; | 376 | gops->mm.init_bar2_vm = gb10b_init_bar2_vm; |
403 | gops->mm.init_bar2_mm_hw_setup = gb10b_init_bar2_mm_hw_setup; | 377 | gops->mm.init_bar2_mm_hw_setup = gb10b_init_bar2_mm_hw_setup; |
404 | gops->mm.get_iova_addr = gp10b_mm_iova_addr; | ||
405 | gops->mm.get_mmu_levels = gp10b_mm_get_mmu_levels; | 378 | gops->mm.get_mmu_levels = gp10b_mm_get_mmu_levels; |
406 | gops->mm.init_pdb = gp10b_mm_init_pdb; | 379 | gops->mm.init_pdb = gp10b_mm_init_pdb; |
407 | gops->mm.remove_bar2_vm = gp10b_remove_bar2_vm; | 380 | gops->mm.remove_bar2_vm = gp10b_remove_bar2_vm; |
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h index 034944e0..4cc71ea6 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.h | |||
@@ -14,8 +14,6 @@ | |||
14 | #ifndef MM_GP10B_H | 14 | #ifndef MM_GP10B_H |
15 | #define MM_GP10B_H | 15 | #define MM_GP10B_H |
16 | 16 | ||
17 | #define NVGPU_MM_GET_IO_COHERENCE_BIT 35 | ||
18 | |||
19 | struct gpu_ops; | 17 | struct gpu_ops; |
20 | 18 | ||
21 | void gp10b_init_mm(struct gpu_ops *gops); | 19 | void gp10b_init_mm(struct gpu_ops *gops); |