summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/vidmem.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-08-17 17:33:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 18:19:23 -0400
commit88d5f6b4154d6803ecf3b0dee7208f9f1f10a793 (patch)
tree207e9ad3de18918aa2cdfbab4d80139a0a30d565 /drivers/gpu/nvgpu/include/nvgpu/vidmem.h
parenta9ce91f910ca730a3abadb9e7491e3504af30d86 (diff)
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 <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1540707 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/vidmem.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/vidmem.h52
1 files changed, 26 insertions, 26 deletions
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;
34struct mm_gk20a; 34struct mm_gk20a;
35struct nvgpu_mem; 35struct nvgpu_mem;
36 36
37struct gk20a_vidmem_buf { 37struct nvgpu_vidmem_buf {
38 struct gk20a *g; 38 struct gk20a *g;
39 struct nvgpu_mem *mem; 39 struct nvgpu_mem *mem;
40 struct dma_buf *dmabuf; 40 struct dma_buf *dmabuf;
@@ -44,26 +44,26 @@ struct gk20a_vidmem_buf {
44 44
45#if defined(CONFIG_GK20A_VIDMEM) 45#if defined(CONFIG_GK20A_VIDMEM)
46 46
47struct nvgpu_page_alloc *get_vidmem_page_alloc(struct scatterlist *sgl); 47struct nvgpu_page_alloc *nvgpu_vidmem_get_page_alloc(struct scatterlist *sgl);
48void set_vidmem_page_alloc(struct scatterlist *sgl, u64 addr); 48void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl, u64 addr);
49bool is_vidmem_page_alloc(u64 addr); 49bool nvgpu_addr_is_vidmem_page_alloc(u64 addr);
50int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes); 50int nvgpu_vidmem_buf_alloc(struct gk20a *g, size_t bytes);
51int gk20a_vidmem_get_space(struct gk20a *g, u64 *space); 51int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space);
52 52
53struct nvgpu_mem *get_pending_mem_desc(struct mm_gk20a *mm); 53struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm);
54 54
55void gk20a_vidmem_destroy(struct gk20a *g); 55void nvgpu_vidmem_destroy(struct gk20a *g);
56int gk20a_init_vidmem(struct mm_gk20a *mm); 56int nvgpu_vidmem_init(struct mm_gk20a *mm);
57int gk20a_vidmem_clear_all(struct gk20a *g); 57int nvgpu_vidmem_clear_all(struct gk20a *g);
58 58
59void gk20a_vidmem_clear_mem_worker(struct work_struct *work); 59void nvgpu_vidmem_clear_mem_worker(struct work_struct *work);
60int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, struct nvgpu_mem *mem); 60int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem);
61 61
62/* 62/*
63 * Will need to be moved later on once we have the Linux vidmem.h file. 63 * Will need to be moved later on once we have the Linux vidmem.h file.
64 */ 64 */
65struct gk20a *gk20a_vidmem_buf_owner(struct dma_buf *dmabuf); 65struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf);
66int gk20a_vidbuf_access_memory(struct gk20a *g, struct dma_buf *dmabuf, 66int nvgpu_vidmem_buf_access_memory(struct gk20a *g, struct dma_buf *dmabuf,
67 void *buffer, u64 offset, u64 size, u32 cmd); 67 void *buffer, u64 offset, u64 size, u32 cmd);
68 68
69#else /* !defined(CONFIG_GK20A_VIDMEM) */ 69#else /* !defined(CONFIG_GK20A_VIDMEM) */
@@ -73,60 +73,60 @@ int gk20a_vidbuf_access_memory(struct gk20a *g, struct dma_buf *dmabuf,
73 */ 73 */
74 74
75static inline struct nvgpu_page_alloc * 75static inline struct nvgpu_page_alloc *
76get_vidmem_page_alloc(struct scatterlist *sgl) 76nvgpu_vidmem_get_page_alloc(struct scatterlist *sgl)
77{ 77{
78 return NULL; 78 return NULL;
79} 79}
80 80
81static inline void set_vidmem_page_alloc(struct scatterlist *sgl, u64 addr) 81static inline void nvgpu_vidmem_set_page_alloc(struct scatterlist *sgl, u64 addr)
82{ 82{
83} 83}
84 84
85static inline bool is_vidmem_page_alloc(u64 addr) 85static inline bool nvgpu_addr_is_vidmem_page_alloc(u64 addr)
86{ 86{
87 return false; 87 return false;
88} 88}
89 89
90static inline int gk20a_vidmem_buf_alloc(struct gk20a *g, size_t bytes) 90static inline int nvgpu_vidmem_buf_alloc(struct gk20a *g, size_t bytes)
91{ 91{
92 return -ENOSYS; 92 return -ENOSYS;
93} 93}
94static inline int gk20a_vidmem_get_space(struct gk20a *g, u64 *space) 94static inline int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space)
95{ 95{
96 return -ENOSYS; 96 return -ENOSYS;
97} 97}
98 98
99static inline struct nvgpu_mem *get_pending_mem_desc(struct mm_gk20a *mm) 99static inline struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm)
100{ 100{
101 return NULL; 101 return NULL;
102} 102}
103 103
104static inline void gk20a_vidmem_destroy(struct gk20a *g) 104static inline void nvgpu_vidmem_destroy(struct gk20a *g)
105{ 105{
106} 106}
107 107
108static inline int gk20a_init_vidmem(struct mm_gk20a *mm) 108static inline int nvgpu_vidmem_init(struct mm_gk20a *mm)
109{ 109{
110 return 0; 110 return 0;
111} 111}
112 112
113static inline int gk20a_vidmem_clear_all(struct gk20a *g) 113static inline int nvgpu_vidmem_clear_all(struct gk20a *g)
114{ 114{
115 return -ENOSYS; 115 return -ENOSYS;
116} 116}
117 117
118static inline int gk20a_gmmu_clear_vidmem_mem(struct gk20a *g, 118static inline int nvgpu_vidmem_clear(struct gk20a *g,
119 struct nvgpu_mem *mem) 119 struct nvgpu_mem *mem)
120{ 120{
121 return -ENOSYS; 121 return -ENOSYS;
122} 122}
123 123
124static inline struct gk20a *gk20a_vidmem_buf_owner(struct dma_buf *dmabuf) 124static inline struct gk20a *nvgpu_vidmem_buf_owner(struct dma_buf *dmabuf)
125{ 125{
126 return NULL; 126 return NULL;
127} 127}
128 128
129static inline int gk20a_vidbuf_access_memory(struct gk20a *g, 129static inline int nvgpu_vidmem_buf_access_memory(struct gk20a *g,
130 struct dma_buf *dmabuf, 130 struct dma_buf *dmabuf,
131 void *buffer, u64 offset, 131 void *buffer, u64 offset,
132 u64 size, u32 cmd) 132 u64 size, u32 cmd)