aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/power.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/pvr/power.h')
-rw-r--r--drivers/gpu/pvr/power.h120
1 files changed, 120 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/power.h b/drivers/gpu/pvr/power.h
new file mode 100644
index 00000000000..079f2128659
--- /dev/null
+++ b/drivers/gpu/pvr/power.h
@@ -0,0 +1,120 @@
1/**********************************************************************
2 *
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
20 *
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
24 *
25 ******************************************************************************/
26
27#ifndef POWER_H
28#define POWER_H
29
30#if defined(__cplusplus)
31extern "C" {
32#endif
33
34
35
36typedef struct _PVRSRV_POWER_DEV_TAG_
37{
38 PFN_PRE_POWER pfnPrePower;
39 PFN_POST_POWER pfnPostPower;
40 PFN_PRE_CLOCKSPEED_CHANGE pfnPreClockSpeedChange;
41 PFN_POST_CLOCKSPEED_CHANGE pfnPostClockSpeedChange;
42 IMG_HANDLE hDevCookie;
43 IMG_UINT32 ui32DeviceIndex;
44 PVRSRV_DEV_POWER_STATE eDefaultPowerState;
45 PVRSRV_DEV_POWER_STATE eCurrentPowerState;
46 struct _PVRSRV_POWER_DEV_TAG_ *psNext;
47 struct _PVRSRV_POWER_DEV_TAG_ **ppsThis;
48
49} PVRSRV_POWER_DEV;
50
51typedef enum _PVRSRV_INIT_SERVER_STATE_
52{
53 PVRSRV_INIT_SERVER_Unspecified = -1,
54 PVRSRV_INIT_SERVER_RUNNING = 0,
55 PVRSRV_INIT_SERVER_RAN = 1,
56 PVRSRV_INIT_SERVER_SUCCESSFUL = 2,
57 PVRSRV_INIT_SERVER_NUM = 3,
58 PVRSRV_INIT_SERVER_FORCE_I32 = 0x7fffffff
59
60} PVRSRV_INIT_SERVER_STATE, *PPVRSRV_INIT_SERVER_STATE;
61
62IMG_IMPORT
63IMG_BOOL PVRSRVGetInitServerState(PVRSRV_INIT_SERVER_STATE eInitServerState);
64
65IMG_IMPORT
66PVRSRV_ERROR PVRSRVSetInitServerState(PVRSRV_INIT_SERVER_STATE eInitServerState, IMG_BOOL bState);
67
68
69
70IMG_IMPORT
71PVRSRV_ERROR PVRSRVPowerLock(IMG_UINT32 ui32CallerID,
72 IMG_BOOL bSystemPowerEvent);
73IMG_IMPORT
74IMG_VOID PVRSRVPowerUnlock(IMG_UINT32 ui32CallerID);
75
76IMG_IMPORT
77PVRSRV_ERROR PVRSRVSetDevicePowerStateKM(IMG_UINT32 ui32DeviceIndex,
78 PVRSRV_DEV_POWER_STATE eNewPowerState,
79 IMG_UINT32 ui32CallerID,
80 IMG_BOOL bRetainMutex);
81
82IMG_IMPORT
83PVRSRV_ERROR PVRSRVSystemPrePowerStateKM(PVRSRV_SYS_POWER_STATE eNewPowerState);
84IMG_IMPORT
85PVRSRV_ERROR PVRSRVSystemPostPowerStateKM(PVRSRV_SYS_POWER_STATE eNewPowerState);
86
87IMG_IMPORT
88PVRSRV_ERROR PVRSRVSetPowerStateKM (PVRSRV_SYS_POWER_STATE ePVRState);
89
90IMG_IMPORT
91PVRSRV_ERROR PVRSRVRegisterPowerDevice(IMG_UINT32 ui32DeviceIndex,
92 PFN_PRE_POWER pfnPrePower,
93 PFN_POST_POWER pfnPostPower,
94 PFN_PRE_CLOCKSPEED_CHANGE pfnPreClockSpeedChange,
95 PFN_POST_CLOCKSPEED_CHANGE pfnPostClockSpeedChange,
96 IMG_HANDLE hDevCookie,
97 PVRSRV_DEV_POWER_STATE eCurrentPowerState,
98 PVRSRV_DEV_POWER_STATE eDefaultPowerState);
99
100IMG_IMPORT
101PVRSRV_ERROR PVRSRVRemovePowerDevice (IMG_UINT32 ui32DeviceIndex);
102
103IMG_IMPORT
104IMG_BOOL PVRSRVIsDevicePowered(IMG_UINT32 ui32DeviceIndex);
105
106IMG_IMPORT
107PVRSRV_ERROR PVRSRVDevicePreClockSpeedChange(IMG_UINT32 ui32DeviceIndex,
108 IMG_BOOL bIdleDevice,
109 IMG_VOID *pvInfo);
110
111IMG_IMPORT
112IMG_VOID PVRSRVDevicePostClockSpeedChange(IMG_UINT32 ui32DeviceIndex,
113 IMG_BOOL bIdleDevice,
114 IMG_VOID *pvInfo);
115
116#if defined (__cplusplus)
117}
118#endif
119#endif
120