diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-03-03 01:42:58 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 22:02:17 -0400 |
commit | 38fc3a48a0c2fbdda4f2e69dc7c4c619a534e468 (patch) | |
tree | 580db3c38b292245184e0a8b119cdb0eeeb63369 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | 87ccc6a02f9133805c58ad7b1791baf4f33249f7 (diff) |
gpu: nvgpu: add platform specific get_iova_addr()
Add platform specific API pointer (*get_iova_addr)()
which can be used to get iova/physical address from
given scatterlist and flags
Use this API with g->ops.mm.get_iova_addr() instead
of calling API gk20a_mm_iova_addr() which makes it
platform specific
Bug 1605653
Change-Id: I798763db1501bd0b16e84daab68f6093a83caac2
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/713089
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index ea3a2052..b510b472 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -223,7 +223,7 @@ struct gk20a_mmu_level { | |||
223 | u64 iova, | 223 | u64 iova, |
224 | u32 kind_v, u32 *ctag, | 224 | u32 kind_v, u32 *ctag, |
225 | bool cacheable, bool unmapped_pte, | 225 | bool cacheable, bool unmapped_pte, |
226 | int rw_flag, bool sparse); | 226 | int rw_flag, bool sparse, u32 flags); |
227 | size_t entry_size; | 227 | size_t entry_size; |
228 | }; | 228 | }; |
229 | 229 | ||
@@ -375,7 +375,8 @@ int gk20a_get_sgtable_from_pages(struct device *d, struct sg_table **sgt, | |||
375 | 375 | ||
376 | void gk20a_free_sgtable(struct sg_table **sgt); | 376 | void gk20a_free_sgtable(struct sg_table **sgt); |
377 | 377 | ||
378 | u64 gk20a_mm_iova_addr(struct gk20a *g, struct scatterlist *sgl); | 378 | u64 gk20a_mm_iova_addr(struct gk20a *g, struct scatterlist *sgl, |
379 | u32 flags); | ||
379 | u64 gk20a_mm_smmu_vaddr_translate(struct gk20a *g, dma_addr_t iova); | 380 | u64 gk20a_mm_smmu_vaddr_translate(struct gk20a *g, dma_addr_t iova); |
380 | 381 | ||
381 | void gk20a_mm_ltc_isr(struct gk20a *g); | 382 | void gk20a_mm_ltc_isr(struct gk20a *g); |