summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-09-29 06:16:15 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:33 -0400
commit719923ad9fa7c6b2ca68a25d1ce4518aab844bc2 (patch)
treebcb3dfbbd2968bf4b863f8990c11f05bc61ed6df /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parent83bf2aa83d922080884a9fe547b656e24495e16e (diff)
gpu: nvgpu: rename gpu ioctls and structs to nvgpu
To help remove the nvhost dependency from nvgpu, rename ioctl defines and structures used by nvgpu such that nvhost is replaced by nvgpu. Duplicate some structures as needed. Update header guards and such accordingly. Change-Id: Ifc3a867713072bae70256502735583ab38381877 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/542620 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h33
1 files changed, 11 insertions, 22 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 89a2108b..6c46e113 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * drivers/video/tegra/host/gk20a/mm_gk20a.h
3 *
4 * GK20A memory management 2 * GK20A memory management
5 * 3 *
6 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
@@ -14,12 +12,11 @@
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details. 13 * more details.
16 * 14 *
17 * You should have received a copy of the GNU General Public License along with 15 * You should have received a copy of the GNU General Public License
18 * this program; if not, write to the Free Software Foundation, Inc., 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
20 */ 17 */
21#ifndef __MM_GK20A_H__ 18#ifndef MM_GK20A_H
22#define __MM_GK20A_H__ 19#define MM_GK20A_H
23 20
24#include <linux/scatterlist.h> 21#include <linux/scatterlist.h>
25#include <linux/dma-attrs.h> 22#include <linux/dma-attrs.h>
@@ -210,14 +207,6 @@ struct page_table_gk20a {
210 size_t size; 207 size_t size;
211}; 208};
212 209
213#ifndef _NVHOST_MEM_MGR_H
214enum gk20a_mem_rw_flag {
215 gk20a_mem_flag_none = 0,
216 gk20a_mem_flag_read_only = 1,
217 gk20a_mem_flag_write_only = 2,
218};
219#endif
220
221enum gmmu_pgsz_gk20a { 210enum gmmu_pgsz_gk20a {
222 gmmu_page_size_small = 0, 211 gmmu_page_size_small = 0,
223 gmmu_page_size_big = 1, 212 gmmu_page_size_big = 1,
@@ -476,7 +465,7 @@ void gk20a_mm_unpin(struct device *dev, struct dma_buf *dmabuf,
476u64 gk20a_vm_map(struct vm_gk20a *vm, 465u64 gk20a_vm_map(struct vm_gk20a *vm,
477 struct dma_buf *dmabuf, 466 struct dma_buf *dmabuf,
478 u64 offset_align, 467 u64 offset_align,
479 u32 flags /*NVHOST_AS_MAP_BUFFER_FLAGS_*/, 468 u32 flags /*NVGPU_AS_MAP_BUFFER_FLAGS_*/,
480 int kind, 469 int kind,
481 struct sg_table **sgt, 470 struct sg_table **sgt,
482 bool user_mapped, 471 bool user_mapped,
@@ -521,20 +510,20 @@ int gk20a_vm_free_va(struct vm_gk20a *vm,
521 enum gmmu_pgsz_gk20a pgsz_idx); 510 enum gmmu_pgsz_gk20a pgsz_idx);
522 511
523/* vm-as interface */ 512/* vm-as interface */
524struct nvhost_as_alloc_space_args; 513struct nvgpu_as_alloc_space_args;
525struct nvhost_as_free_space_args; 514struct nvgpu_as_free_space_args;
526int gk20a_vm_alloc_share(struct gk20a_as_share *as_share); 515int gk20a_vm_alloc_share(struct gk20a_as_share *as_share);
527int gk20a_vm_release_share(struct gk20a_as_share *as_share); 516int gk20a_vm_release_share(struct gk20a_as_share *as_share);
528int gk20a_vm_alloc_space(struct gk20a_as_share *as_share, 517int gk20a_vm_alloc_space(struct gk20a_as_share *as_share,
529 struct nvhost_as_alloc_space_args *args); 518 struct nvgpu_as_alloc_space_args *args);
530int gk20a_vm_free_space(struct gk20a_as_share *as_share, 519int gk20a_vm_free_space(struct gk20a_as_share *as_share,
531 struct nvhost_as_free_space_args *args); 520 struct nvgpu_as_free_space_args *args);
532int gk20a_vm_bind_channel(struct gk20a_as_share *as_share, 521int gk20a_vm_bind_channel(struct gk20a_as_share *as_share,
533 struct channel_gk20a *ch); 522 struct channel_gk20a *ch);
534int gk20a_vm_map_buffer(struct gk20a_as_share *as_share, 523int gk20a_vm_map_buffer(struct gk20a_as_share *as_share,
535 int dmabuf_fd, 524 int dmabuf_fd,
536 u64 *offset_align, 525 u64 *offset_align,
537 u32 flags, /*NVHOST_AS_MAP_BUFFER_FLAGS_*/ 526 u32 flags, /* NVGPU_AS_MAP_BUFFER_FLAGS_ */
538 int kind, 527 int kind,
539 u64 buffer_offset, 528 u64 buffer_offset,
540 u64 mapping_size); 529 u64 mapping_size);
@@ -570,4 +559,4 @@ void update_gmmu_pde_locked(struct vm_gk20a *vm, u32 i);
570 559
571struct gpu_ops; 560struct gpu_ops;
572void gk20a_init_mm(struct gpu_ops *gops); 561void gk20a_init_mm(struct gpu_ops *gops);
573#endif /*_MM_GK20A_H_ */ 562#endif /* MM_GK20A_H */