2 * Copyright (C) 2011-2012 ARM Limited. All rights reserved.
4 * This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 * as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
7 * A copy of the licence is included with the program, and can also be obtained from Free Software
8 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11 #ifndef __MALI_KERNEL_UTILIZATION_H__
12 #define __MALI_KERNEL_UTILIZATION_H__
16 extern void (*mali_utilization_callback)(unsigned int);
19 * Initialize/start the Mali GPU utilization metrics reporting.
21 * @return _MALI_OSK_ERR_OK on success, otherwise failure.
23 _mali_osk_errcode_t mali_utilization_init(void);
26 * Terminate the Mali GPU utilization metrics reporting
28 void mali_utilization_term(void);
31 * Check if Mali utilization is enabled
33 MALI_STATIC_INLINE mali_bool mali_utilization_enabled(void)
35 return (NULL != mali_utilization_callback);
39 * Should be called when a job is about to execute a job
41 void mali_utilization_core_start(u64 time_now);
44 * Should be called to stop the utilization timer during system suspend
46 void mali_utilization_suspend(void);
49 * Should be called when a job has completed executing a job
51 void mali_utilization_core_end(u64 time_now);
53 #endif /* __MALI_KERNEL_UTILIZATION_H__ */