aboutsummaryrefslogtreecommitdiffstats
path: root/include/nvgpu/debug.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/nvgpu/debug.h')
-rw-r--r--include/nvgpu/debug.h63
1 files changed, 0 insertions, 63 deletions
diff --git a/include/nvgpu/debug.h b/include/nvgpu/debug.h
deleted file mode 100644
index 33bf621..0000000
--- a/include/nvgpu/debug.h
+++ /dev/null
@@ -1,63 +0,0 @@
1/*
2 * GK20A Debug functionality
3 *
4 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef NVGPU_DEBUG_H
26#define NVGPU_DEBUG_H
27
28#include <nvgpu/types.h>
29
30struct gk20a;
31struct gpu_ops;
32
33struct gk20a_debug_output {
34 void (*fn)(void *ctx, const char *str, size_t len);
35 void *ctx;
36 char buf[256];
37};
38
39#ifdef CONFIG_DEBUG_FS
40extern unsigned int gk20a_debug_trace_cmdbuf;
41
42void gk20a_debug_output(struct gk20a_debug_output *o,
43 const char *fmt, ...);
44
45void gk20a_debug_dump(struct gk20a *g);
46void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o);
47int gk20a_gr_debug_dump(struct gk20a *g);
48void gk20a_init_debug_ops(struct gpu_ops *gops);
49
50void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink);
51void gk20a_debug_deinit(struct gk20a *g);
52#else
53static inline void gk20a_debug_output(struct gk20a_debug_output *o,
54 const char *fmt, ...) {}
55
56static inline void gk20a_debug_dump(struct gk20a *g) {}
57static inline void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o) {}
58static inline int gk20a_gr_debug_dump(struct gk20a *g) { return 0;}
59static inline void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink) {}
60static inline void gk20a_debug_deinit(struct gk20a *g) {}
61#endif
62
63#endif /* NVGPU_DEBUG_H */