From 88d5f6b4154d6803ecf3b0dee7208f9f1f10a793 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 17 Aug 2017 14:33:46 -0700 Subject: gpu: nvgpu: Rename vidmem APIs Rename the VIDMEM APIs to be prefixed by nvgpu_ to ensure consistency and that all the non-static vidmem functions are properly namespaced. JIRA NVGPU-30 JIRA NVGPU-138 Change-Id: I9986ee8f2c8f95a4b7c5e2b9607bc1e77933ccfc Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1540707 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/vidmem.h | 52 ++++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'drivers/gpu/nvgpu/include') diff --git a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h index a5d0ae11..1b250f90 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h @@ -34,7 +34,7 @@ struct gk20a; struct mm_gk20a; struct nvgpu_mem; -struct gk20a_vidmem_buf { +struct nvgpu_vidmem_buf { struct gk20a *g; struct nvgpu_mem *mem; struct dma_buf *dmabuf; @@ -44,26 +44,26 @@ struct gk20a_vidmem_buf { #if defined(CONFIG_GK20A_VIDMEM) -struct nvgpu_page_alloc *get_vidmem_page_alloc(struct scatterlist *sgl); -void set_vidmem_page_alloc(struct scatterlist *sgl, u64 addr); -bool is_vidmem_page_alloc(u64 addr); -int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes); -int gk20a_vidmem_get_space(struct gk20a *g, u64 *space); +struct nvgpu_page_alloc *nvgpu_vidmem_get_page_alloc(struct scatterlist *sgl); +void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl, u64 addr); +bool nvgpu_addr_is_vidmem_page_alloc(u64 addr); +int nvgpu_vidmem_buf_alloc(struct gk20a *g, size_t bytes); +int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space); -struct nvgpu_mem *get_pending_mem_desc(struct mm_gk20a *mm); +struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm); -void gk20a_vidmem_destroy(struct gk20a *g); -int gk20a_init_vidmem(struct mm_gk20a *mm); -int gk20a_vidmem_clear_all(struct gk20a *g); +void nvgpu_vidmem_destroy(struct gk20a *g); +int nvgpu_vidmem_init(struct mm_gk20a *mm); +int nvgpu_vidmem_clear_all(struct gk20a *g); -void gk20a_vidmem_clear_mem_worker(struct work_struct *work); -int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, struct nvgpu_mem *mem); +void nvgpu_vidmem_clear_mem_worker(struct work_struct *work); +int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem); /* * Will need to be moved later on once we have the Linux vidmem.h file. */ -struct gk20a *gk20a_vidmem_buf_owner(struct dma_buf *dmabuf); -int gk20a_vidbuf_access_memory(struct gk20a *g, struct dma_buf *dmabuf, +struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf); +int nvgpu_vidmem_buf_access_memory(struct gk20a *g, struct dma_buf *dmabuf, void *buffer, u64 offset, u64 size, u32 cmd); #else /* !defined(CONFIG_GK20A_VIDMEM) */ @@ -73,60 +73,60 @@ int gk20a_vidbuf_access_memory(struct gk20a *g, struct dma_buf *dmabuf, */ static inline struct nvgpu_page_alloc * -get_vidmem_page_alloc(struct scatterlist *sgl) +nvgpu_vidmem_get_page_alloc(struct scatterlist *sgl) { return NULL; } -static inline void set_vidmem_page_alloc(struct scatterlist *sgl, u64 addr) +static inline void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl, u64 addr) { } -static inline bool is_vidmem_page_alloc(u64 addr) +static inline bool nvgpu_addr_is_vidmem_page_alloc(u64 addr) { return false; } -static inline int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes) +static inline int nvgpu_vidmem_buf_alloc(struct gk20a *g, size_t bytes) { return -ENOSYS; } -static inline int gk20a_vidmem_get_space(struct gk20a *g, u64 *space) +static inline int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space) { return -ENOSYS; } -static inline struct nvgpu_mem *get_pending_mem_desc(struct mm_gk20a *mm) +static inline struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm) { return NULL; } -static inline void gk20a_vidmem_destroy(struct gk20a *g) +static inline void nvgpu_vidmem_destroy(struct gk20a *g) { } -static inline int gk20a_init_vidmem(struct mm_gk20a *mm) +static inline int nvgpu_vidmem_init(struct mm_gk20a *mm) { return 0; } -static inline int gk20a_vidmem_clear_all(struct gk20a *g) +static inline int nvgpu_vidmem_clear_all(struct gk20a *g) { return -ENOSYS; } -static inline int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, +static inline int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem) { return -ENOSYS; } -static inline struct gk20a *gk20a_vidmem_buf_owner(struct dma_buf *dmabuf) +static inline struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf) { return NULL; } -static inline int gk20a_vidbuf_access_memory(struct gk20a *g, +static inline int nvgpu_vidmem_buf_access_memory(struct gk20a *g, struct dma_buf *dmabuf, void *buffer, u64 offset, u64 size, u32 cmd) -- cgit v1.2.2