xref: /OK3568_Linux_fs/kernel/drivers/gpu/arm/mali400/mali/linux/mali_device_pause_resume.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /**
2  * Copyright (C) 2010-2014, 2016-2017 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_pm.h"
19 
mali_dev_pause(void)20 void mali_dev_pause(void)
21 {
22 	/*
23 	 * Deactive all groups to prevent hardware being touched
24 	 * during the period of mali device pausing
25 	 */
26 	mali_pm_os_suspend(MALI_FALSE);
27 }
28 
29 EXPORT_SYMBOL(mali_dev_pause);
30 
mali_dev_resume(void)31 void mali_dev_resume(void)
32 {
33 	mali_pm_os_resume();
34 }
35 
36 EXPORT_SYMBOL(mali_dev_resume);
37