]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/atomisp_trace_event.h
staging/atomisp: Add support for the Intel IPU v2
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / atomisp_trace_event.h
1 /*
2 * Support Camera Imaging tracer core.
3 *
4 * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License version
8 * 2 as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301, USA.
19 *
20 */
21 #undef TRACE_SYSTEM
22 #define TRACE_SYSTEM atomisp
23
24 #if !defined(ATOMISP_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
25 #define ATOMISP_TRACE_EVENT_H
26
27 #include <linux/tracepoint.h>
28 #include <linux/string.h>
29 TRACE_EVENT(camera_meminfo,
30
31 TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
32 int sys_res_size, int cam_sys_use, int cam_dyc_use,
33 int cam_res_use),
34
35 TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
36 cam_dyc_use, cam_res_use),
37
38 TP_STRUCT__entry(
39 __array(char, name, 24)
40 __field(int, uptr_size)
41 __field(int, counter)
42 __field(int, sys_size)
43 __field(int, sys_res_size)
44 __field(int, cam_res_use)
45 __field(int, cam_dyc_use)
46 __field(int, cam_sys_use)
47 ),
48
49 TP_fast_assign(
50 strlcpy(__entry->name, name, 24);
51 __entry->uptr_size = uptr_size;
52 __entry->counter = counter;
53 __entry->sys_size = sys_size;
54 __entry->sys_res_size = sys_res_size;
55 __entry->cam_res_use = cam_res_use;
56 __entry->cam_dyc_use = cam_dyc_use;
57 __entry->cam_sys_use = cam_sys_use;
58 ),
59
60 TP_printk(
61 "<%s> User ptr memory:%d pages,\tISP private memory used:%d"
62 " pages:\tsysFP system size:%d,\treserved size:%d"
63 "\tcamFP sysUse:%d,\tdycUse:%d,\tresUse:%d.\n",
64 __entry->name, __entry->uptr_size, __entry->counter,
65 __entry->sys_size, __entry->sys_res_size, __entry->cam_sys_use,
66 __entry->cam_dyc_use, __entry->cam_res_use)
67 );
68
69 TRACE_EVENT(camera_debug,
70
71 TP_PROTO(const char *name, char *info, const int line),
72
73 TP_ARGS(name, info, line),
74
75 TP_STRUCT__entry(
76 __array(char, name, 24)
77 __array(char, info, 24)
78 __field(int, line)
79 ),
80
81 TP_fast_assign(
82 strlcpy(__entry->name, name, 24);
83 strlcpy(__entry->info, info, 24);
84 __entry->line = line;
85 ),
86
87 TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
88 __entry->info)
89 );
90
91 TRACE_EVENT(ipu_cstate,
92
93 TP_PROTO(int cstate),
94
95 TP_ARGS(cstate),
96
97 TP_STRUCT__entry(
98 __field(int, cstate)
99 ),
100
101 TP_fast_assign(
102 __entry->cstate = cstate;
103 ),
104
105 TP_printk("cstate=%d", __entry->cstate)
106 );
107
108 TRACE_EVENT(ipu_pstate,
109
110 TP_PROTO(int freq, int util),
111
112 TP_ARGS(freq, util),
113
114 TP_STRUCT__entry(
115 __field(int, freq)
116 __field(int, util)
117 ),
118
119 TP_fast_assign(
120 __entry->freq = freq;
121 __entry->util = util;
122 ),
123
124 TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
125 );
126 #endif
127
128 #undef TRACE_INCLUDE_PATH
129 #undef TRACE_INCLUDE_FILE
130 #define TRACE_INCLUDE_PATH .
131 #define TRACE_INCLUDE_FILE atomisp_trace_event
132 /* This part must be outside protection */
133 #include <trace/define_trace.h>