aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/arm/t6xx/kbase/src/platform/arndale/mali_linux_dvfs_trace.h
blob: eba94a35f1df4c096da9a9b3bc06dbc7170a3826 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 *
 * (C) COPYRIGHT 2011-2012 ARM Limited. All rights reserved.
 *
 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
 *
 * A copy of the licence is included with the program, and can also be obtained from Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 */

#if !defined(_TRACE_MALI_DVFS_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_MALI_DVFS_H

#undef TRACE_SYSTEM
#define TRACE_SYSTEM mali_dvfs

#include <linux/tracepoint.h>

TRACE_EVENT(mali_dvfs_event,
	    TP_PROTO(unsigned int util, int avg),
	    TP_ARGS(util, avg),
	    TP_STRUCT__entry(
		    __field(unsigned int, utilization)
		    __field(int, avg_utilization)
	    ),
	    TP_fast_assign(
		    __entry->utilization = util;
		    __entry->avg_utilization = avg;
	    ),
	    TP_printk("utilization=%u avg=%d",
			__entry->utilization, __entry->avg_utilization)
);

TRACE_EVENT(mali_dvfs_set_voltage,
	    TP_PROTO(unsigned int vol),
	    TP_ARGS(vol),
	    TP_STRUCT__entry(
		    __field(unsigned int, voltage)
	    ),
	    TP_fast_assign(
		    __entry->voltage = vol;
	    ),
	    TP_printk("voltage=%u", __entry->voltage)
);

TRACE_EVENT(mali_dvfs_set_clock,
	    TP_PROTO(int freq),
	    TP_ARGS(freq),
	    TP_STRUCT__entry(
		    __field(int, frequency)
	    ),
	    TP_fast_assign(
		    __entry->frequency = freq;
	    ),
	    TP_printk("frequency=%d", __entry->frequency)
);

#endif /* _TRACE_MALI_DVFS_H */

#undef TRACE_INCLUDE_PATH
#undef linux
#define TRACE_INCLUDE_PATH MALI_KBASE_THIRDPARTY_PATH
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE mali_linux_dvfs_trace

/* This part must be outside protection */
#include <trace/define_trace.h>