blob: 0a6b4719a876e7c55b5641f20ebb7de15a5f9ee6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
/*
* Copyright (C) 2010 ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
*
* A copy of the licence is included with the program, and can also be obtained from Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
* @file mali_pmm_policy_alwayson.c
* Implementation of the power management module policy - always on
*/
#if USING_MALI_PMM
#include "mali_ukk.h"
#include "mali_kernel_common.h"
#include "mali_pmm.h"
#include "mali_pmm_system.h"
#include "mali_pmm_state.h"
#include "mali_pmm_policy_alwayson.h"
_mali_osk_errcode_t pmm_policy_init_always_on(void)
{
/* Nothing to set up */
MALI_SUCCESS;
}
void pmm_policy_term_always_on(void)
{
/* Nothing to tear down */
}
_mali_osk_errcode_t pmm_policy_process_always_on( _mali_pmm_internal_state_t *pmm, mali_pmm_message_t *event )
{
MALI_DEBUG_ASSERT_POINTER(pmm);
MALI_DEBUG_ASSERT_POINTER(event);
switch( event->id )
{
case MALI_PMM_EVENT_OS_POWER_DOWN:
/* We aren't going to do anything, but signal so we don't block the OS
* NOTE: This may adversely affect any jobs Mali is currently running
*/
_mali_osk_pmm_power_down_done( event->data );
break;
case MALI_PMM_EVENT_INTERNAL_POWER_UP_ACK:
case MALI_PMM_EVENT_INTERNAL_POWER_DOWN_ACK:
/* Not expected in this policy */
MALI_DEBUG_ASSERT( MALI_FALSE );
break;
case MALI_PMM_EVENT_OS_POWER_UP:
/* Nothing to do */
_mali_osk_pmm_power_up_done( event->data );
break;
case MALI_PMM_EVENT_JOB_SCHEDULED:
case MALI_PMM_EVENT_JOB_QUEUED:
case MALI_PMM_EVENT_JOB_FINISHED:
/* Nothing to do - we are always on */
break;
case MALI_PMM_EVENT_TIMEOUT:
/* Not expected in this policy */
MALI_DEBUG_ASSERT( MALI_FALSE );
break;
default:
MALI_ERROR(_MALI_OSK_ERR_ITEM_NOT_FOUND);
}
MALI_SUCCESS;
}
#endif
|