From 1da69dd8b2c60a11e112844dd4e9636a913a99a0 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 7 Jun 2017 17:32:56 -0700 Subject: gpu: nvgpu: Remove mm.get_iova_addr Remove the mm.get_iova_addr() HAL and replace it with a new HAL called mm.gpu_phys_addr(). This new HAL provides the real phys address that should be passed to the GPU from a physical address obtained from a scatter list. It also provides a mechanism by which the HAL code can add extra bits to a GPU physical address based on the attributes passed in. This is necessary during GMMU page table programming. Also remove the flags argument from the various address functions. This flag was used for adding an IO coherence bit to the GPU physical address which is not supported. JIRA NVGPU-30 Change-Id: I69af5b1c6bd905c4077c26c098fac101c6b41a33 Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1530864 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h | 4 ++++ drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h index 9c52811e..e2d4d336 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/nvgpu_mem.h @@ -19,9 +19,11 @@ struct page; struct sg_table; +struct scatterlist; struct gk20a; struct nvgpu_mem; +struct nvgpu_gmmu_attrs; struct nvgpu_mem_priv { struct page **pages; @@ -29,6 +31,8 @@ struct nvgpu_mem_priv { unsigned long flags; }; +u64 nvgpu_mem_get_addr_sgl(struct gk20a *g, struct scatterlist *sgl); + /** * __nvgpu_mem_create_from_pages - Create an nvgpu_mem from physical pages. * diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h index 4259d40f..63439e6f 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h @@ -27,6 +27,7 @@ struct sg_table; struct gk20a; struct nvgpu_allocator; +struct nvgpu_gmmu_attrs; /* * Real location of a buffer - nvgpu_aperture_mask() will deduce what will be @@ -180,6 +181,8 @@ void nvgpu_mem_wr_n(struct gk20a *g, struct nvgpu_mem *mem, u32 offset, void nvgpu_memset(struct gk20a *g, struct nvgpu_mem *mem, u32 offset, u32 c, u32 size); +u64 nvgpu_mem_get_addr(struct gk20a *g, struct nvgpu_mem *mem); + u32 __nvgpu_aperture_mask(struct gk20a *g, enum nvgpu_aperture aperture, u32 sysmem_mask, u32 vidmem_mask); u32 nvgpu_aperture_mask(struct gk20a *g, struct nvgpu_mem *mem, -- cgit v1.2.2