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.
12 * @file mali_device_pause_resume.c
13 * Implementation of the Mali pause/resume functionality
16 #include "mali_gp_scheduler.h"
17 #include "mali_pp_scheduler.h"
18 #include "mali_group.h"
20 void mali_dev_pause(mali_bool *power_is_on)
22 mali_bool power_is_on_tmp;
24 /* Locking the current power state - so it will not switch from being ON to OFF, but it might remain OFF */
25 power_is_on_tmp = _mali_osk_pm_dev_ref_add_no_power_on();
26 if (NULL != power_is_on)
28 *power_is_on = power_is_on_tmp;
31 mali_gp_scheduler_suspend();
32 mali_pp_scheduler_suspend();
35 void mali_dev_resume(void)
37 mali_gp_scheduler_resume();
38 mali_pp_scheduler_resume();
40 /* Release our PM reference, as it is now safe to turn of the GPU again */
41 _mali_osk_pm_dev_ref_dec_no_power_on();