aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/host/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/host/debug.h')
-rw-r--r--drivers/video/tegra/host/debug.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/video/tegra/host/debug.h b/drivers/video/tegra/host/debug.h
new file mode 100644
index 00000000000..3dc156ab474
--- /dev/null
+++ b/drivers/video/tegra/host/debug.h
@@ -0,0 +1,50 @@
1/*
2 * drivers/video/tegra/host/debug.h
3 *
4 * Tegra Graphics Host Debug
5 *
6 * Copyright (c) 2011-2012 NVIDIA Corporation.
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 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20#ifndef __NVHOST_DEBUG_H
21#define __NVHOST_DEBUG_H
22
23#include <linux/debugfs.h>
24#include <linux/seq_file.h>
25
26struct output {
27 void (*fn)(void *ctx, const char* str, size_t len);
28 void *ctx;
29 char buf[256];
30};
31
32static inline void write_to_seqfile(void *ctx, const char* str, size_t len)
33{
34 seq_write((struct seq_file *)ctx, str, len);
35}
36
37static inline void write_to_printk(void *ctx, const char* str, size_t len)
38{
39 printk(KERN_INFO "%s", str);
40}
41
42void nvhost_debug_output(struct output *o, const char* fmt, ...);
43
44extern pid_t nvhost_debug_null_kickoff_pid;
45extern pid_t nvhost_debug_force_timeout_pid;
46extern u32 nvhost_debug_force_timeout_val;
47extern u32 nvhost_debug_force_timeout_channel;
48extern unsigned int nvhost_debug_trace_cmdbuf;
49
50#endif /*__NVHOST_DEBUG_H */