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/include | |
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/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/dma.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/dma.h b/drivers/gpu/nvgpu/include/nvgpu/dma.h index d4fad584..43cff215 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/dma.h +++ b/drivers/gpu/nvgpu/include/nvgpu/dma.h | |||
@@ -24,7 +24,7 @@ struct vm_gk20a; | |||
24 | struct nvgpu_mem; | 24 | struct nvgpu_mem; |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Flags for the below gk20a_gmmu_{alloc,alloc_map}_flags* | 27 | * Flags for the below nvgpu_dma_{alloc,alloc_map}_flags* |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | 30 | /* |
@@ -45,7 +45,7 @@ struct nvgpu_mem; | |||
45 | #define NVGPU_DMA_READ_ONLY (1 << 2) | 45 | #define NVGPU_DMA_READ_ONLY (1 << 2) |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * gk20a_gmmu_alloc - Allocate DMA memory | 48 | * nvgpu_dma_alloc - Allocate DMA memory |
49 | * | 49 | * |
50 | * @g - The GPU. | 50 | * @g - The GPU. |
51 | * @size - Size of the allocation in bytes. | 51 | * @size - Size of the allocation in bytes. |
@@ -56,10 +56,10 @@ struct nvgpu_mem; | |||
56 | * memory can be either placed in VIDMEM or SYSMEM, which ever is more | 56 | * memory can be either placed in VIDMEM or SYSMEM, which ever is more |
57 | * convenient for the driver. | 57 | * convenient for the driver. |
58 | */ | 58 | */ |
59 | int gk20a_gmmu_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | 59 | int nvgpu_dma_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * gk20a_gmmu_alloc_flags - Allocate DMA memory | 62 | * nvgpu_dma_alloc_flags - Allocate DMA memory |
63 | * | 63 | * |
64 | * @g - The GPU. | 64 | * @g - The GPU. |
65 | * @flags - Flags modifying the operation of the DMA allocation. | 65 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -77,11 +77,11 @@ int gk20a_gmmu_alloc(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | |||
77 | * %NVGPU_DMA_FORCE_CONTIGUOUS | 77 | * %NVGPU_DMA_FORCE_CONTIGUOUS |
78 | * %NVGPU_DMA_READ_ONLY | 78 | * %NVGPU_DMA_READ_ONLY |
79 | */ | 79 | */ |
80 | int gk20a_gmmu_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, | 80 | int nvgpu_dma_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, |
81 | struct nvgpu_mem *mem); | 81 | struct nvgpu_mem *mem); |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * gk20a_gmmu_alloc_sys - Allocate DMA memory | 84 | * nvgpu_dma_alloc_sys - Allocate DMA memory |
85 | * | 85 | * |
86 | * @g - The GPU. | 86 | * @g - The GPU. |
87 | * @size - Size of the allocation in bytes. | 87 | * @size - Size of the allocation in bytes. |
@@ -91,10 +91,10 @@ int gk20a_gmmu_alloc_flags(struct gk20a *g, unsigned long flags, size_t size, | |||
91 | * Returns 0 on success and a suitable error code when there's an error. This | 91 | * Returns 0 on success and a suitable error code when there's an error. This |
92 | * allocates memory specifically in SYSMEM. | 92 | * allocates memory specifically in SYSMEM. |
93 | */ | 93 | */ |
94 | int gk20a_gmmu_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | 94 | int nvgpu_dma_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem); |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * gk20a_gmmu_alloc_flags_sys - Allocate DMA memory | 97 | * nvgpu_dma_alloc_flags_sys - Allocate DMA memory |
98 | * | 98 | * |
99 | * @g - The GPU. | 99 | * @g - The GPU. |
100 | * @flags - Flags modifying the operation of the DMA allocation. | 100 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -111,11 +111,11 @@ int gk20a_gmmu_alloc_sys(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | |||
111 | * %NVGPU_DMA_FORCE_CONTIGUOUS | 111 | * %NVGPU_DMA_FORCE_CONTIGUOUS |
112 | * %NVGPU_DMA_READ_ONLY | 112 | * %NVGPU_DMA_READ_ONLY |
113 | */ | 113 | */ |
114 | int gk20a_gmmu_alloc_flags_sys(struct gk20a *g, unsigned long flags, | 114 | int nvgpu_dma_alloc_flags_sys(struct gk20a *g, unsigned long flags, |
115 | size_t size, struct nvgpu_mem *mem); | 115 | size_t size, struct nvgpu_mem *mem); |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * gk20a_gmmu_alloc_vid - Allocate DMA memory | 118 | * nvgpu_dma_alloc_vid - Allocate DMA memory |
119 | * | 119 | * |
120 | * @g - The GPU. | 120 | * @g - The GPU. |
121 | * @size - Size of the allocation in bytes. | 121 | * @size - Size of the allocation in bytes. |
@@ -125,10 +125,10 @@ int gk20a_gmmu_alloc_flags_sys(struct gk20a *g, unsigned long flags, | |||
125 | * Returns 0 on success and a suitable error code when there's an error. This | 125 | * Returns 0 on success and a suitable error code when there's an error. This |
126 | * allocates memory specifically in VIDMEM. | 126 | * allocates memory specifically in VIDMEM. |
127 | */ | 127 | */ |
128 | int gk20a_gmmu_alloc_vid(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | 128 | int nvgpu_dma_alloc_vid(struct gk20a *g, size_t size, struct nvgpu_mem *mem); |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * gk20a_gmmu_alloc_flags_vid - Allocate DMA memory | 131 | * nvgpu_dma_alloc_flags_vid - Allocate DMA memory |
132 | * | 132 | * |
133 | * @g - The GPU. | 133 | * @g - The GPU. |
134 | * @flags - Flags modifying the operation of the DMA allocation. | 134 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -144,11 +144,11 @@ int gk20a_gmmu_alloc_vid(struct gk20a *g, size_t size, struct nvgpu_mem *mem); | |||
144 | * %NVGPU_DMA_NO_KERNEL_MAPPING | 144 | * %NVGPU_DMA_NO_KERNEL_MAPPING |
145 | * | 145 | * |
146 | */ | 146 | */ |
147 | int gk20a_gmmu_alloc_flags_vid(struct gk20a *g, unsigned long flags, | 147 | int nvgpu_dma_alloc_flags_vid(struct gk20a *g, unsigned long flags, |
148 | size_t size, struct nvgpu_mem *mem); | 148 | size_t size, struct nvgpu_mem *mem); |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * gk20a_gmmu_alloc_flags_vid_at - Allocate DMA memory | 151 | * nvgpu_dma_alloc_flags_vid_at - Allocate DMA memory |
152 | * | 152 | * |
153 | * @g - The GPU. | 153 | * @g - The GPU. |
154 | * @flags - Flags modifying the operation of the DMA allocation. | 154 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -165,29 +165,29 @@ int gk20a_gmmu_alloc_flags_vid(struct gk20a *g, unsigned long flags, | |||
165 | * | 165 | * |
166 | * %NVGPU_DMA_NO_KERNEL_MAPPING | 166 | * %NVGPU_DMA_NO_KERNEL_MAPPING |
167 | */ | 167 | */ |
168 | int gk20a_gmmu_alloc_flags_vid_at(struct gk20a *g, unsigned long flags, | 168 | int nvgpu_dma_alloc_flags_vid_at(struct gk20a *g, unsigned long flags, |
169 | size_t size, struct nvgpu_mem *mem, dma_addr_t at); | 169 | size_t size, struct nvgpu_mem *mem, dma_addr_t at); |
170 | 170 | ||
171 | /** | 171 | /** |
172 | * gk20a_gmmu_free - Free a DMA allocation | 172 | * nvgpu_dma_free - Free a DMA allocation |
173 | * | 173 | * |
174 | * @g - The GPU. | 174 | * @g - The GPU. |
175 | * @mem - An allocation to free. | 175 | * @mem - An allocation to free. |
176 | * | 176 | * |
177 | * Free memory created with any of: | 177 | * Free memory created with any of: |
178 | * | 178 | * |
179 | * gk20a_gmmu_alloc() | 179 | * nvgpu_dma_alloc() |
180 | * gk20a_gmmu_alloc_flags() | 180 | * nvgpu_dma_alloc_flags() |
181 | * gk20a_gmmu_alloc_sys() | 181 | * nvgpu_dma_alloc_sys() |
182 | * gk20a_gmmu_alloc_flags_sys() | 182 | * nvgpu_dma_alloc_flags_sys() |
183 | * gk20a_gmmu_alloc_vid() | 183 | * nvgpu_dma_alloc_vid() |
184 | * gk20a_gmmu_alloc_flags_vid() | 184 | * nvgpu_dma_alloc_flags_vid() |
185 | * gk20a_gmmu_alloc_flags_vid_at() | 185 | * nvgpu_dma_alloc_flags_vid_at() |
186 | */ | 186 | */ |
187 | void gk20a_gmmu_free(struct gk20a *g, struct nvgpu_mem *mem); | 187 | void nvgpu_dma_free(struct gk20a *g, struct nvgpu_mem *mem); |
188 | 188 | ||
189 | /** | 189 | /** |
190 | * gk20a_gmmu_alloc_map - Allocate DMA memory and map into GMMU. | 190 | * nvgpu_dma_alloc_map - Allocate DMA memory and map into GMMU. |
191 | * | 191 | * |
192 | * @vm - VM context for GMMU mapping. | 192 | * @vm - VM context for GMMU mapping. |
193 | * @size - Size of the allocation in bytes. | 193 | * @size - Size of the allocation in bytes. |
@@ -198,11 +198,11 @@ void gk20a_gmmu_free(struct gk20a *g, struct nvgpu_mem *mem); | |||
198 | * either placed in VIDMEM or SYSMEM, which ever is more convenient for the | 198 | * either placed in VIDMEM or SYSMEM, which ever is more convenient for the |
199 | * driver. | 199 | * driver. |
200 | */ | 200 | */ |
201 | int gk20a_gmmu_alloc_map(struct vm_gk20a *vm, size_t size, | 201 | int nvgpu_dma_alloc_map(struct vm_gk20a *vm, size_t size, |
202 | struct nvgpu_mem *mem); | 202 | struct nvgpu_mem *mem); |
203 | 203 | ||
204 | /** | 204 | /** |
205 | * gk20a_gmmu_alloc_map_flags - Allocate DMA memory and map into GMMU. | 205 | * nvgpu_dma_alloc_map_flags - Allocate DMA memory and map into GMMU. |
206 | * | 206 | * |
207 | * @vm - VM context for GMMU mapping. | 207 | * @vm - VM context for GMMU mapping. |
208 | * @flags - Flags modifying the operation of the DMA allocation. | 208 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -221,11 +221,11 @@ int gk20a_gmmu_alloc_map(struct vm_gk20a *vm, size_t size, | |||
221 | * %NVGPU_DMA_FORCE_CONTIGUOUS | 221 | * %NVGPU_DMA_FORCE_CONTIGUOUS |
222 | * %NVGPU_DMA_READ_ONLY | 222 | * %NVGPU_DMA_READ_ONLY |
223 | */ | 223 | */ |
224 | int gk20a_gmmu_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags, | 224 | int nvgpu_dma_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags, |
225 | size_t size, struct nvgpu_mem *mem); | 225 | size_t size, struct nvgpu_mem *mem); |
226 | 226 | ||
227 | /** | 227 | /** |
228 | * gk20a_gmmu_alloc_map_sys - Allocate DMA memory and map into GMMU. | 228 | * nvgpu_dma_alloc_map_sys - Allocate DMA memory and map into GMMU. |
229 | * | 229 | * |
230 | * @vm - VM context for GMMU mapping. | 230 | * @vm - VM context for GMMU mapping. |
231 | * @size - Size of the allocation in bytes. | 231 | * @size - Size of the allocation in bytes. |
@@ -234,11 +234,11 @@ int gk20a_gmmu_alloc_map_flags(struct vm_gk20a *vm, unsigned long flags, | |||
234 | * Allocate memory suitable for doing DMA and map that memory into the GMMU. | 234 | * Allocate memory suitable for doing DMA and map that memory into the GMMU. |
235 | * This memory will be placed in SYSMEM. | 235 | * This memory will be placed in SYSMEM. |
236 | */ | 236 | */ |
237 | int gk20a_gmmu_alloc_map_sys(struct vm_gk20a *vm, size_t size, | 237 | int nvgpu_dma_alloc_map_sys(struct vm_gk20a *vm, size_t size, |
238 | struct nvgpu_mem *mem); | 238 | struct nvgpu_mem *mem); |
239 | 239 | ||
240 | /** | 240 | /** |
241 | * gk20a_gmmu_alloc_map_flags_sys - Allocate DMA memory and map into GMMU. | 241 | * nvgpu_dma_alloc_map_flags_sys - Allocate DMA memory and map into GMMU. |
242 | * | 242 | * |
243 | * @vm - VM context for GMMU mapping. | 243 | * @vm - VM context for GMMU mapping. |
244 | * @flags - Flags modifying the operation of the DMA allocation. | 244 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -255,11 +255,11 @@ int gk20a_gmmu_alloc_map_sys(struct vm_gk20a *vm, size_t size, | |||
255 | * %NVGPU_DMA_FORCE_CONTIGUOUS | 255 | * %NVGPU_DMA_FORCE_CONTIGUOUS |
256 | * %NVGPU_DMA_READ_ONLY | 256 | * %NVGPU_DMA_READ_ONLY |
257 | */ | 257 | */ |
258 | int gk20a_gmmu_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags, | 258 | int nvgpu_dma_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags, |
259 | size_t size, struct nvgpu_mem *mem); | 259 | size_t size, struct nvgpu_mem *mem); |
260 | 260 | ||
261 | /** | 261 | /** |
262 | * gk20a_gmmu_alloc_map_vid - Allocate DMA memory and map into GMMU. | 262 | * nvgpu_dma_alloc_map_vid - Allocate DMA memory and map into GMMU. |
263 | * | 263 | * |
264 | * @vm - VM context for GMMU mapping. | 264 | * @vm - VM context for GMMU mapping. |
265 | * @size - Size of the allocation in bytes. | 265 | * @size - Size of the allocation in bytes. |
@@ -268,11 +268,11 @@ int gk20a_gmmu_alloc_map_flags_sys(struct vm_gk20a *vm, unsigned long flags, | |||
268 | * Allocate memory suitable for doing DMA and map that memory into the GMMU. | 268 | * Allocate memory suitable for doing DMA and map that memory into the GMMU. |
269 | * This memory will be placed in VIDMEM. | 269 | * This memory will be placed in VIDMEM. |
270 | */ | 270 | */ |
271 | int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, size_t size, | 271 | int nvgpu_dma_alloc_map_vid(struct vm_gk20a *vm, size_t size, |
272 | struct nvgpu_mem *mem); | 272 | struct nvgpu_mem *mem); |
273 | 273 | ||
274 | /** | 274 | /** |
275 | * gk20a_gmmu_alloc_map_flags_vid - Allocate DMA memory and map into GMMU. | 275 | * nvgpu_dma_alloc_map_flags_vid - Allocate DMA memory and map into GMMU. |
276 | * | 276 | * |
277 | * @vm - VM context for GMMU mapping. | 277 | * @vm - VM context for GMMU mapping. |
278 | * @flags - Flags modifying the operation of the DMA allocation. | 278 | * @flags - Flags modifying the operation of the DMA allocation. |
@@ -289,24 +289,24 @@ int gk20a_gmmu_alloc_map_vid(struct vm_gk20a *vm, size_t size, | |||
289 | * %NVGPU_DMA_FORCE_CONTIGUOUS | 289 | * %NVGPU_DMA_FORCE_CONTIGUOUS |
290 | * %NVGPU_DMA_READ_ONLY | 290 | * %NVGPU_DMA_READ_ONLY |
291 | */ | 291 | */ |
292 | int gk20a_gmmu_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags, | 292 | int nvgpu_dma_alloc_map_flags_vid(struct vm_gk20a *vm, unsigned long flags, |
293 | size_t size, struct nvgpu_mem *mem); | 293 | size_t size, struct nvgpu_mem *mem); |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * gk20a_gmmu_unmap_free - Free a DMA allocation | 296 | * nvgpu_dma_unmap_free - Free a DMA allocation |
297 | * | 297 | * |
298 | * @g - The GPU. | 298 | * @g - The GPU. |
299 | * @mem - An allocation to free. | 299 | * @mem - An allocation to free. |
300 | * | 300 | * |
301 | * Free memory created with any of: | 301 | * Free memory created with any of: |
302 | * | 302 | * |
303 | * gk20a_gmmu_alloc_map() | 303 | * nvgpu_dma_alloc_map() |
304 | * gk20a_gmmu_alloc_map_flags() | 304 | * nvgpu_dma_alloc_map_flags() |
305 | * gk20a_gmmu_alloc_map_sys() | 305 | * nvgpu_dma_alloc_map_sys() |
306 | * gk20a_gmmu_alloc_map_flags_sys() | 306 | * nvgpu_dma_alloc_map_flags_sys() |
307 | * gk20a_gmmu_alloc_map_vid() | 307 | * nvgpu_dma_alloc_map_vid() |
308 | * gk20a_gmmu_alloc_map_flags_vid() | 308 | * nvgpu_dma_alloc_map_flags_vid() |
309 | */ | 309 | */ |
310 | void gk20a_gmmu_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem); | 310 | void nvgpu_dma_unmap_free(struct vm_gk20a *vm, struct nvgpu_mem *mem); |
311 | 311 | ||
312 | #endif | 312 | #endif |