summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/as_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/as_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/as_gk20a.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/as_gk20a.h b/drivers/gpu/nvgpu/gk20a/as_gk20a.h
new file mode 100644
index 00000000..be0e9707
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/as_gk20a.h
@@ -0,0 +1,50 @@
1/*
2 * drivers/video/tegra/host/gk20a/as_gk20a.h
3 *
4 * GK20A Address Space
5 *
6 * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License,
10 * version 2, as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 */
17#ifndef __GK20A_AS_H
18#define __GK20A_AS_H
19
20#include <linux/atomic.h>
21#include <linux/cdev.h>
22#include <linux/fs.h>
23
24#include <linux/nvhost_as_ioctl.h>
25
26struct gk20a_as;
27struct gk20a_as_share;
28struct vm_gk20a;
29
30struct gk20a_as_share {
31 struct gk20a_as *as;
32 atomic_t ref_cnt;
33 int id;
34 struct vm_gk20a *vm;
35};
36
37struct gk20a_as {
38 int last_share_id; /* dummy allocator for now */
39 struct cdev cdev;
40 struct device *node;
41};
42
43int gk20a_as_release_share(struct gk20a_as_share *as_share);
44
45/* struct file_operations driver interface */
46int gk20a_as_dev_open(struct inode *inode, struct file *filp);
47int gk20a_as_dev_release(struct inode *inode, struct file *filp);
48long gk20a_as_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
49
50#endif