2 * Copyright (C) ARM Limited 2013. 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)
28 /* Timeline activity */
35 /* L2 cache counters */
39 /* Vertex processor counters */
43 /* Fragment processor counters */
53 /* EGL Software Counters */
54 COUNTER_EGL_BLIT_TIME,
56 /* GLES Software Counters */
57 COUNTER_GLES_DRAW_ELEMENTS_CALLS,
58 COUNTER_GLES_DRAW_ELEMENTS_NUM_INDICES,
59 COUNTER_GLES_DRAW_ELEMENTS_NUM_TRANSFORMED,
60 COUNTER_GLES_DRAW_ARRAYS_CALLS,
61 COUNTER_GLES_DRAW_ARRAYS_NUM_TRANSFORMED,
62 COUNTER_GLES_DRAW_POINTS,
63 COUNTER_GLES_DRAW_LINES,
64 COUNTER_GLES_DRAW_LINE_LOOP,
65 COUNTER_GLES_DRAW_LINE_STRIP,
66 COUNTER_GLES_DRAW_TRIANGLES,
67 COUNTER_GLES_DRAW_TRIANGLE_STRIP,
68 COUNTER_GLES_DRAW_TRIANGLE_FAN,
69 COUNTER_GLES_NON_VBO_DATA_COPY_TIME,
70 COUNTER_GLES_UNIFORM_BYTES_COPIED_TO_MALI,
71 COUNTER_GLES_UPLOAD_TEXTURE_TIME,
72 COUNTER_GLES_UPLOAD_VBO_TIME,
73 COUNTER_GLES_NUM_FLUSHES,
74 COUNTER_GLES_NUM_VSHADERS_GENERATED,
75 COUNTER_GLES_NUM_FSHADERS_GENERATED,
76 COUNTER_GLES_VSHADER_GEN_TIME,
77 COUNTER_GLES_FSHADER_GEN_TIME,
78 COUNTER_GLES_INPUT_TRIANGLES,
79 COUNTER_GLES_VXCACHE_HIT,
80 COUNTER_GLES_VXCACHE_MISS,
81 COUNTER_GLES_VXCACHE_COLLISION,
82 COUNTER_GLES_CULLED_TRIANGLES,
83 COUNTER_GLES_CULLED_LINES,
84 COUNTER_GLES_BACKFACE_TRIANGLES,
85 COUNTER_GLES_GBCLIP_TRIANGLES,
86 COUNTER_GLES_GBCLIP_LINES,
87 COUNTER_GLES_TRIANGLES_DRAWN,
88 COUNTER_GLES_DRAWCALL_TIME,
89 COUNTER_GLES_TRIANGLES_COUNT,
90 COUNTER_GLES_INDEPENDENT_TRIANGLES_COUNT,
91 COUNTER_GLES_STRIP_TRIANGLES_COUNT,
92 COUNTER_GLES_FAN_TRIANGLES_COUNT,
93 COUNTER_GLES_LINES_COUNT,
94 COUNTER_GLES_INDEPENDENT_LINES_COUNT,
95 COUNTER_GLES_STRIP_LINES_COUNT,
96 COUNTER_GLES_LOOP_LINES_COUNT,
105 #define FIRST_ACTIVITY_EVENT ACTIVITY_VP_0
106 #define LAST_ACTIVITY_EVENT ACTIVITY_FP_3
108 #define FIRST_HW_COUNTER COUNTER_L2_0_C0
109 #define LAST_HW_COUNTER COUNTER_FP_3_C1
111 #define FIRST_SW_COUNTER COUNTER_EGL_BLIT_TIME
112 #define LAST_SW_COUNTER COUNTER_GLES_LOOP_LINES_COUNT
114 /* Signifies that the system is able to report voltage and frequency numbers. */
115 #define DVFS_REPORTED_BY_DDK 1
118 * Structure to pass performance counter data of a Mali core
120 typedef struct _mali_profiling_core_counters
126 } _mali_profiling_core_counters;
129 * For compatibility with utgard.
131 typedef struct _mali_profiling_l2_counter_values
133 struct _mali_profiling_core_counters cores[MAX_NUM_L2_CACHE_CORES];
134 } _mali_profiling_l2_counter_values;
136 typedef struct _mali_profiling_mali_version
139 u32 mali_version_major;
140 u32 mali_version_minor;
144 } _mali_profiling_mali_version;
146 extern void _mali_profiling_get_mali_version(struct _mali_profiling_mali_version *values);
147 extern u32 _mali_profiling_get_l2_counters(_mali_profiling_l2_counter_values *values);
150 * List of possible actions allowing DDK to be controlled by Streamline.
151 * The following numbers are used by DDK to control the frame buffer dumping.
153 #define FBDUMP_CONTROL_ENABLE (1)
154 #define FBDUMP_CONTROL_RATE (2)
155 #define SW_COUNTER_ENABLE (3)
156 #define FBDUMP_CONTROL_RESIZE_FACTOR (4)
163 #endif /* __MALI_MJOLLNIR_PROFILING_GATOR_API_H__ */