tizen 2.4 release
[kernel/linux-3.0.git] / drivers / gpu / arm / mali400 / r4p0_rel0 / linux / mali_device_pause_resume.c
1 /*
2  * Copyright (C) 2010-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 /**
12  * @file mali_device_pause_resume.c
13  * Implementation of the Mali pause/resume functionality
14  */
15
16 #include <linux/module.h>
17 #include <linux/mali/mali_utgard.h>
18 #include "mali_gp_scheduler.h"
19 #include "mali_pp_scheduler.h"
20
21 void mali_dev_pause(void)
22 {
23         mali_gp_scheduler_suspend();
24         mali_pp_scheduler_suspend();
25         mali_group_power_off(MALI_FALSE);
26         mali_l2_cache_pause_all(MALI_TRUE);
27 }
28
29 EXPORT_SYMBOL(mali_dev_pause);
30
31 void mali_dev_resume(void)
32 {
33         mali_l2_cache_pause_all(MALI_FALSE);
34         mali_gp_scheduler_resume();
35         mali_pp_scheduler_resume();
36 }
37
38 EXPORT_SYMBOL(mali_dev_resume);