2 * Copyright (C) ARM Limited 2013-2015. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
10 #ifndef __MALI_MJOLLNIR_PROFILING_GATOR_API_H__
11 #define __MALI_MJOLLNIR_PROFILING_GATOR_API_H__
20 * The number of processor cores. Update to suit your hardware implementation.
22 #define MAX_NUM_FP_CORES (4)
23 #define MAX_NUM_VP_CORES (1)
24 #define MAX_NUM_L2_CACHE_CORES (1)
27 /* Timeline activity */
34 /* L2 cache counters */
38 /* Vertex processor counters */
42 /* Fragment processor counters */
52 /* EGL Software Counters */
53 COUNTER_EGL_BLIT_TIME,
55 /* GLES Software Counters */
56 COUNTER_GLES_DRAW_ELEMENTS_CALLS,
57 COUNTER_GLES_DRAW_ELEMENTS_NUM_INDICES,
58 COUNTER_GLES_DRAW_ELEMENTS_NUM_TRANSFORMED,
59 COUNTER_GLES_DRAW_ARRAYS_CALLS,
60 COUNTER_GLES_DRAW_ARRAYS_NUM_TRANSFORMED,
61 COUNTER_GLES_DRAW_POINTS,
62 COUNTER_GLES_DRAW_LINES,
63 COUNTER_GLES_DRAW_LINE_LOOP,
64 COUNTER_GLES_DRAW_LINE_STRIP,
65 COUNTER_GLES_DRAW_TRIANGLES,
66 COUNTER_GLES_DRAW_TRIANGLE_STRIP,
67 COUNTER_GLES_DRAW_TRIANGLE_FAN,
68 COUNTER_GLES_NON_VBO_DATA_COPY_TIME,
69 COUNTER_GLES_UNIFORM_BYTES_COPIED_TO_MALI,
70 COUNTER_GLES_UPLOAD_TEXTURE_TIME,
71 COUNTER_GLES_UPLOAD_VBO_TIME,
72 COUNTER_GLES_NUM_FLUSHES,
73 COUNTER_GLES_NUM_VSHADERS_GENERATED,
74 COUNTER_GLES_NUM_FSHADERS_GENERATED,
75 COUNTER_GLES_VSHADER_GEN_TIME,
76 COUNTER_GLES_FSHADER_GEN_TIME,
77 COUNTER_GLES_INPUT_TRIANGLES,
78 COUNTER_GLES_VXCACHE_HIT,
79 COUNTER_GLES_VXCACHE_MISS,
80 COUNTER_GLES_VXCACHE_COLLISION,
81 COUNTER_GLES_CULLED_TRIANGLES,
82 COUNTER_GLES_CULLED_LINES,
83 COUNTER_GLES_BACKFACE_TRIANGLES,
84 COUNTER_GLES_GBCLIP_TRIANGLES,
85 COUNTER_GLES_GBCLIP_LINES,
86 COUNTER_GLES_TRIANGLES_DRAWN,
87 COUNTER_GLES_DRAWCALL_TIME,
88 COUNTER_GLES_TRIANGLES_COUNT,
89 COUNTER_GLES_INDEPENDENT_TRIANGLES_COUNT,
90 COUNTER_GLES_STRIP_TRIANGLES_COUNT,
91 COUNTER_GLES_FAN_TRIANGLES_COUNT,
92 COUNTER_GLES_LINES_COUNT,
93 COUNTER_GLES_INDEPENDENT_LINES_COUNT,
94 COUNTER_GLES_STRIP_LINES_COUNT,
95 COUNTER_GLES_LOOP_LINES_COUNT,
104 #define FIRST_ACTIVITY_EVENT ACTIVITY_VP_0
105 #define LAST_ACTIVITY_EVENT ACTIVITY_FP_3
107 #define FIRST_HW_COUNTER COUNTER_L2_0_C0
108 #define LAST_HW_COUNTER COUNTER_FP_3_C1
110 #define FIRST_SW_COUNTER COUNTER_EGL_BLIT_TIME
111 #define LAST_SW_COUNTER COUNTER_GLES_LOOP_LINES_COUNT
113 /* Signifies that the system is able to report voltage and frequency numbers. */
114 #define DVFS_REPORTED_BY_DDK 1
117 * Structure to pass performance counter data of a Mali core
119 struct _mali_profiling_core_counters {
127 * For compatibility with utgard.
129 struct _mali_profiling_l2_counter_values {
130 struct _mali_profiling_core_counters cores[MAX_NUM_L2_CACHE_CORES];
133 struct _mali_profiling_mali_version {
135 u32 mali_version_major;
136 u32 mali_version_minor;
142 extern void _mali_profiling_get_mali_version(struct _mali_profiling_mali_version *values);
143 extern u32 _mali_profiling_get_l2_counters(struct _mali_profiling_l2_counter_values *values);
146 * List of possible actions allowing DDK to be controlled by Streamline.
147 * The following numbers are used by DDK to control the frame buffer dumping.
149 #define FBDUMP_CONTROL_ENABLE (1)
150 #define FBDUMP_CONTROL_RATE (2)
151 #define SW_COUNTER_ENABLE (3)
152 #define FBDUMP_CONTROL_RESIZE_FACTOR (4)
159 #endif /* __MALI_MJOLLNIR_PROFILING_GATOR_API_H__ */