summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/os_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/os_linux.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/os_linux.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/os_linux.h b/drivers/gpu/nvgpu/common/linux/os_linux.h
new file mode 100644
index 00000000..f23926b3
--- /dev/null
+++ b/drivers/gpu/nvgpu/common/linux/os_linux.h
@@ -0,0 +1,76 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#ifndef NVGPU_OS_LINUX_H
17#define NVGPU_OS_LINUX_H
18
19#include <linux/cdev.h>
20
21#include "gk20a/gk20a.h"
22
23struct nvgpu_os_linux {
24 struct gk20a g;
25
26 struct {
27 struct cdev cdev;
28 struct device *node;
29 } channel;
30
31 struct {
32 struct cdev cdev;
33 struct device *node;
34 } ctrl;
35
36 struct {
37 struct cdev cdev;
38 struct device *node;
39 } as_dev;
40
41 struct {
42 struct cdev cdev;
43 struct device *node;
44 } dbg;
45
46 struct {
47 struct cdev cdev;
48 struct device *node;
49 } prof;
50
51 struct {
52 struct cdev cdev;
53 struct device *node;
54 } tsg;
55
56 struct {
57 struct cdev cdev;
58 struct device *node;
59 } ctxsw;
60
61 struct {
62 struct cdev cdev;
63 struct device *node;
64 } sched;
65
66 dev_t cdev_region;
67};
68
69static inline struct nvgpu_os_linux *nvgpu_os_linux_from_gk20a(struct gk20a *g)
70{
71 return container_of(g, struct nvgpu_os_linux, g);
72}
73
74#define INTERFACE_NAME "nvhost%s-gpu"
75
76#endif