tizen 2.4 release
[kernel/linux-3.0.git] / drivers / gpu / arm / mali400 / mali / common / mali_pp_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_PP_SCHEDULER_H__
12 #define __MALI_PP_SCHEDULER_H__
13
14 #include "mali_osk.h"
15 #include "mali_pp_job.h"
16 #include "mali_group.h"
17
18 _mali_osk_errcode_t mali_pp_scheduler_initialize(void);
19 void mali_pp_scheduler_terminate(void);
20
21 void mali_pp_scheduler_job_done(struct mali_group *group, struct mali_pp_job *job, u32 sub_job, mali_bool success);
22
23 void mali_pp_scheduler_suspend(void);
24 void mali_pp_scheduler_resume(void);
25
26 /** @brief Abort all PP jobs from session running or queued
27  *
28  * This functions aborts all PP jobs from the specified session. Queued jobs are removed from the queue and jobs
29  * currently running on a core will be aborted.
30  *
31  * @param session Pointer to session whose jobs should be aborted
32  */
33 void mali_pp_scheduler_abort_session(struct mali_session_data *session);
34
35 /**
36  * @brief Reset all groups
37  *
38  * This function resets all groups known by the PP scheuduler. This must be
39  * called after the Mali HW has been powered on in order to reset the HW.
40  *
41  * This function is intended for power on reset of all cores.
42  * No locking is done, which can only be safe if the scheduler is paused and
43  * all cores idle. That is always the case on init and power on.
44  */
45 void mali_pp_scheduler_reset_all_groups(void);
46
47 /**
48  * @brief Zap TLB on all groups with \a session active
49  *
50  * The scheculer will zap the session on all groups it owns.
51  */
52 void mali_pp_scheduler_zap_all_active(struct mali_session_data *session);
53
54 int mali_pp_scheduler_get_queue_depth(void);
55 u32 mali_pp_scheduler_dump_state(char *buf, u32 size);
56
57 #endif /* __MALI_PP_SCHEDULER_H__ */