summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2014-03-19 03:38:25 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:08:53 -0400
commita9785995d5f22aaeb659285f8aeb64d8b56982e0 (patch)
treecc75f75bcf43db316a002a7a240b81f299bf6d7f /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h
parent61efaf843c22b85424036ec98015121c08f5f16c (diff)
gpu: nvgpu: Add NVIDIA GPU Driver
This patch moves the NVIDIA GPU driver to a new location. Bug 1482562 Change-Id: I24293810b9d0f1504fd9be00135e21dad656ccb6 Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/383722 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h
new file mode 100644
index 00000000..49827608
--- /dev/null
+++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h
@@ -0,0 +1,83 @@
1/*
2 * Tegra GK20A GPU Debugger Driver
3 *
4 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18#ifndef __DBG_GPU_GK20A_H_
19#define __DBG_GPU_GK20A_H_
20#include <linux/poll.h>
21
22/* module debug driver interface */
23int gk20a_dbg_gpu_dev_release(struct inode *inode, struct file *filp);
24int gk20a_dbg_gpu_dev_open(struct inode *inode, struct file *filp);
25long gk20a_dbg_gpu_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
26unsigned int gk20a_dbg_gpu_dev_poll(struct file *filep, poll_table *wait);
27
28/* used by profiler driver interface */
29int gk20a_prof_gpu_dev_open(struct inode *inode, struct file *filp);
30
31/* used by the interrupt handler to post events */
32void gk20a_dbg_gpu_post_events(struct channel_gk20a *fault_ch);
33
34struct dbg_gpu_session_ops {
35 int (*exec_reg_ops)(struct dbg_session_gk20a *dbg_s,
36 struct nvhost_dbg_gpu_reg_op *ops,
37 u64 num_ops);
38};
39
40struct dbg_gpu_session_events {
41 wait_queue_head_t wait_queue;
42 bool events_enabled;
43 int num_pending_events;
44};
45
46struct dbg_session_gk20a {
47 /* dbg session id used for trace/prints */
48 int id;
49
50 /* profiler session, if any */
51 bool is_profiler;
52
53 /* power enabled or disabled */
54 bool is_pg_disabled;
55
56 /*
57 * There can be different versions of the whitelists
58 * between both global and per-context sets; as well
59 * as between debugger and profiler interfaces.
60 */
61 struct regops_whitelist *global;
62 struct regops_whitelist *per_context;
63
64 /* gpu module vagaries */
65 struct device *dev;
66 struct platform_device *pdev;
67 struct gk20a *g;
68
69 /* bound channel, if any */
70 struct file *ch_f;
71 struct channel_gk20a *ch;
72
73 /* session operations */
74 struct dbg_gpu_session_ops *ops;
75
76 /* event support */
77 struct dbg_gpu_session_events dbg_events;
78 struct list_head dbg_s_list_node;
79};
80
81extern struct dbg_gpu_session_ops dbg_gpu_session_ops_gk20a;
82
83#endif /* __DBG_GPU_GK20A_H_ */