From b44c7fdb114a63ab98fffc0f246776b56399ff64 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 14 Aug 2018 11:30:48 -0700 Subject: gpu: nvgpu: Move common DMA code to common/mm This migrates the common DMA code (os agnostic) to the common directory. This new unit will be the common DMA allocator that lets users allocate SYSMEM, VIDMEM, or either. Other units will be responsible for actually handling the mechanics of allocating VIDMEM or SYSMEM. Also update the names of the DMA related files so that tmake doesn't complain about duplicate C file names. To do this call the common DMA file dma.c and prepend the OS to the other DMA files. So now we have: common/mm/dma.c os/posix/posix-dma.c os/linux/linux-dma.c JIRA NVGPU-990 Change-Id: I22d2d41803ad89be7d9c28f87864ce4fedf10836 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1799807 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/dma.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/dma.h b/drivers/gpu/nvgpu/include/nvgpu/dma.h index d83346a3..f6f264cf 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/dma.h +++ b/drivers/gpu/nvgpu/include/nvgpu/dma.h @@ -352,4 +352,10 @@ int nvgpu_dma_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags, */ void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem); +/* + * Don't use these directly. Instead use nvgpu_dma_free(). + */ +void nvgpu_dma_free_sys(struct gk20a *g, struct nvgpu_mem *mem); +void nvgpu_dma_free_vid(struct gk20a *g, struct nvgpu_mem *mem); + #endif -- cgit v1.2.2