2 * Copyright (C) 2010 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_pmm_policy_alwayson.c
13 * Implementation of the power management module policy - always on
19 #include "mali_kernel_common.h"
22 #include "mali_pmm_system.h"
23 #include "mali_pmm_state.h"
24 #include "mali_pmm_policy_alwayson.h"
26 _mali_osk_errcode_t pmm_policy_init_always_on(void)
28 /* Nothing to set up */
32 void pmm_policy_term_always_on(void)
34 /* Nothing to tear down */
37 _mali_osk_errcode_t pmm_policy_process_always_on( _mali_pmm_internal_state_t *pmm, mali_pmm_message_t *event )
39 MALI_DEBUG_ASSERT_POINTER(pmm);
40 MALI_DEBUG_ASSERT_POINTER(event);
44 case MALI_PMM_EVENT_OS_POWER_DOWN:
45 /* We aren't going to do anything, but signal so we don't block the OS
46 * NOTE: This may adversely affect any jobs Mali is currently running
48 _mali_osk_pmm_power_down_done( event->data );
51 case MALI_PMM_EVENT_INTERNAL_POWER_UP_ACK:
52 case MALI_PMM_EVENT_INTERNAL_POWER_DOWN_ACK:
53 /* Not expected in this policy */
54 MALI_DEBUG_ASSERT( MALI_FALSE );
57 case MALI_PMM_EVENT_OS_POWER_UP:
59 _mali_osk_pmm_power_up_done( event->data );
62 case MALI_PMM_EVENT_JOB_SCHEDULED:
63 case MALI_PMM_EVENT_JOB_QUEUED:
64 case MALI_PMM_EVENT_JOB_FINISHED:
65 /* Nothing to do - we are always on */
68 case MALI_PMM_EVENT_TIMEOUT:
69 /* Not expected in this policy */
70 MALI_DEBUG_ASSERT( MALI_FALSE );
74 MALI_ERROR(_MALI_OSK_ERR_ITEM_NOT_FOUND);