diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-08-23 04:58:28 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-09-01 12:11:53 -0400 |
commit | 44c5b5877b9b1520f644d8516f7ee19125a832d5 (patch) | |
tree | 46c73428a406ad41fa0c0c76f166956e50820a18 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | 93a436f581ced27efe2e600bb16b2e50b5696c12 (diff) |
gpu: nvgpu: add new API to get base address for sysmem/vidmem buffers
Add new API gk20a_mem_get_base_addr() which will return vidmem
base address in case of vidmem and IOVA address in case of
sysmem
Even though vidmem allocations are non-contiguous, this API
is useful (and should only be used) for allocations with one
chunk (e.g. page tables)
Also, since page tables could either reside in sysmem or vidmem,
use this API to get address of page tables
Jira DNVGPU-20
Change-Id: Ie04af9ca7bfccfec1a8a8e4be2c507cef5cef8e1
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1206403
(cherry picked from commit a8c74dc188878f2948fa1e0e47bf1837fba6c5e0)
Reviewed-on: http://git-master/r/1210957
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 32f8ce39..9002290e 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -548,6 +548,8 @@ void gk20a_free_sgtable(struct sg_table **sgt); | |||
548 | u64 gk20a_mm_iova_addr(struct gk20a *g, struct scatterlist *sgl, | 548 | u64 gk20a_mm_iova_addr(struct gk20a *g, struct scatterlist *sgl, |
549 | u32 flags); | 549 | u32 flags); |
550 | u64 gk20a_mm_smmu_vaddr_translate(struct gk20a *g, dma_addr_t iova); | 550 | u64 gk20a_mm_smmu_vaddr_translate(struct gk20a *g, dma_addr_t iova); |
551 | u64 gk20a_mem_get_base_addr(struct gk20a *g, struct mem_desc *mem, | ||
552 | u32 flags); | ||
551 | 553 | ||
552 | void gk20a_mm_ltc_isr(struct gk20a *g); | 554 | void gk20a_mm_ltc_isr(struct gk20a *g); |
553 | 555 | ||