tizen 2.4 release
[kernel/linux-3.0.git] / drivers / gpu / arm / mali400 / mali / common / mali_scheduler.h
1 /*
2  * Copyright (C) 2011-2012 ARM Limited. All rights reserved.
3  *
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.
6  *
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.
9  */
10
11 #ifndef __MALI_SCHEDULER_H__
12 #define __MALI_SCHEDULER_H__
13
14 #include "mali_osk.h"
15 #include "mali_gp_scheduler.h"
16 #include "mali_pp_scheduler.h"
17
18 _mali_osk_errcode_t mali_scheduler_initialize(void);
19 void mali_scheduler_terminate(void);
20
21 u32 mali_scheduler_get_new_id(void);
22
23 /**
24  * @brief Reset all groups
25  *
26  * This function resets all groups known by the both the PP and GP scheuduler.
27  * This must be called after the Mali HW has been powered on in order to reset
28  * the HW.
29  */
30 MALI_STATIC_INLINE void mali_scheduler_reset_all_groups(void)
31 {
32         mali_gp_scheduler_reset_all_groups();
33         mali_pp_scheduler_reset_all_groups();
34 }
35
36 /**
37  * @brief Zap TLB on all active groups running \a session
38  *
39  * @param session Pointer to the session to zap
40  */
41 MALI_STATIC_INLINE void mali_scheduler_zap_all_active(struct mali_session_data *session)
42 {
43         mali_gp_scheduler_zap_all_active(session);
44         mali_pp_scheduler_zap_all_active(session);
45 }
46
47 #endif /* __MALI_SCHEDULER_H__ */