diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-21 18:34:50 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-06 21:15:04 -0400 |
commit | 50667e097b2be567e3d2f95e23b046243bca2bf6 (patch) | |
tree | e8fc42261868c6d69844f2e92fce33f6169434d4 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |
parent | 8f2d4a3f4a0acc81bae6725d30506e92651a42b5 (diff) |
gpu: nvgpu: Rename nvgpu DMA APIs
Rename the nvgpu DMA APIs from gk20a_gmmu_alloc* to nvgpu_dma_alloc*.
This better reflects the purpose of the APIs (to allocate DMA suitable
memory) and avoids confusion with GMMU related code.
JIRA NVGPU-12
Change-Id: I673d607db56dd6e44f02008dc7b5293209ef67bf
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1325548
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.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 79654af3..cfe7745d 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -509,7 +509,7 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm) | |||
509 | 509 | ||
510 | static int gk20a_alloc_sysmem_flush(struct gk20a *g) | 510 | static int gk20a_alloc_sysmem_flush(struct gk20a *g) |
511 | { | 511 | { |
512 | return gk20a_gmmu_alloc_sys(g, SZ_4K, &g->mm.sysmem_flush); | 512 | return nvgpu_dma_alloc_sys(g, SZ_4K, &g->mm.sysmem_flush); |
513 | } | 513 | } |
514 | 514 | ||
515 | #if defined(CONFIG_GK20A_VIDMEM) | 515 | #if defined(CONFIG_GK20A_VIDMEM) |
@@ -897,9 +897,9 @@ static int alloc_gmmu_pages(struct vm_gk20a *vm, u32 order, | |||
897 | * default. | 897 | * default. |
898 | */ | 898 | */ |
899 | if (IS_ENABLED(CONFIG_ARM64)) | 899 | if (IS_ENABLED(CONFIG_ARM64)) |
900 | err = gk20a_gmmu_alloc(g, len, &entry->mem); | 900 | err = nvgpu_dma_alloc(g, len, &entry->mem); |
901 | else | 901 | else |
902 | err = gk20a_gmmu_alloc_flags(g, NVGPU_DMA_NO_KERNEL_MAPPING, | 902 | err = nvgpu_dma_alloc_flags(g, NVGPU_DMA_NO_KERNEL_MAPPING, |
903 | len, &entry->mem); | 903 | len, &entry->mem); |
904 | 904 | ||
905 | 905 | ||
@@ -929,7 +929,7 @@ void free_gmmu_pages(struct vm_gk20a *vm, | |||
929 | return; | 929 | return; |
930 | } | 930 | } |
931 | 931 | ||
932 | gk20a_gmmu_free(g, &entry->mem); | 932 | nvgpu_dma_free(g, &entry->mem); |
933 | } | 933 | } |
934 | 934 | ||
935 | int map_gmmu_pages(struct gk20a *g, struct gk20a_mm_entry *entry) | 935 | int map_gmmu_pages(struct gk20a *g, struct gk20a_mm_entry *entry) |
@@ -1756,7 +1756,7 @@ static void gk20a_vidbuf_release(struct dma_buf *dmabuf) | |||
1756 | if (buf->dmabuf_priv) | 1756 | if (buf->dmabuf_priv) |
1757 | buf->dmabuf_priv_delete(buf->dmabuf_priv); | 1757 | buf->dmabuf_priv_delete(buf->dmabuf_priv); |
1758 | 1758 | ||
1759 | gk20a_gmmu_free(buf->g, buf->mem); | 1759 | nvgpu_dma_free(buf->g, buf->mem); |
1760 | nvgpu_kfree(buf->g, buf); | 1760 | nvgpu_kfree(buf->g, buf); |
1761 | } | 1761 | } |
1762 | 1762 | ||
@@ -1873,7 +1873,7 @@ int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes) | |||
1873 | 1873 | ||
1874 | buf->mem->user_mem = true; | 1874 | buf->mem->user_mem = true; |
1875 | 1875 | ||
1876 | err = gk20a_gmmu_alloc_vid(g, bytes, buf->mem); | 1876 | err = nvgpu_dma_alloc_vid(g, bytes, buf->mem); |
1877 | if (err) | 1877 | if (err) |
1878 | goto err_memfree; | 1878 | goto err_memfree; |
1879 | 1879 | ||
@@ -1896,7 +1896,7 @@ int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes) | |||
1896 | return fd; | 1896 | return fd; |
1897 | 1897 | ||
1898 | err_bfree: | 1898 | err_bfree: |
1899 | gk20a_gmmu_free(g, buf->mem); | 1899 | nvgpu_dma_free(g, buf->mem); |
1900 | err_memfree: | 1900 | err_memfree: |
1901 | nvgpu_kfree(g, buf->mem); | 1901 | nvgpu_kfree(g, buf->mem); |
1902 | err_kfree: | 1902 | err_kfree: |
@@ -4199,7 +4199,7 @@ int gk20a_alloc_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block) | |||
4199 | 4199 | ||
4200 | gk20a_dbg_fn(""); | 4200 | gk20a_dbg_fn(""); |
4201 | 4201 | ||
4202 | err = gk20a_gmmu_alloc(g, ram_in_alloc_size_v(), inst_block); | 4202 | err = nvgpu_dma_alloc(g, ram_in_alloc_size_v(), inst_block); |
4203 | if (err) { | 4203 | if (err) { |
4204 | gk20a_err(dev, "%s: memory allocation failed\n", __func__); | 4204 | gk20a_err(dev, "%s: memory allocation failed\n", __func__); |
4205 | return err; | 4205 | return err; |
@@ -4212,7 +4212,7 @@ int gk20a_alloc_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block) | |||
4212 | void gk20a_free_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block) | 4212 | void gk20a_free_inst_block(struct gk20a *g, struct nvgpu_mem *inst_block) |
4213 | { | 4213 | { |
4214 | if (inst_block->size) | 4214 | if (inst_block->size) |
4215 | gk20a_gmmu_free(g, inst_block); | 4215 | nvgpu_dma_free(g, inst_block); |
4216 | } | 4216 | } |
4217 | 4217 | ||
4218 | u64 gk20a_mm_inst_block_addr(struct gk20a *g, struct nvgpu_mem *inst_block) | 4218 | u64 gk20a_mm_inst_block_addr(struct gk20a *g, struct nvgpu_mem *inst_block) |