~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/staging/gma500/psb_powermgmt.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**************************************************************************
 
2
 * Copyright (c) 2009, Intel Corporation.
 
3
 * All Rights Reserved.
 
4
 
 
5
 * Permission is hereby granted, free of charge, to any person obtaining a
 
6
 * copy of this software and associated documentation files (the "Software"),
 
7
 * to deal in the Software without restriction, including without limitation
 
8
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
9
 * and/or sell copies of the Software, and to permit persons to whom the
 
10
 * Software is furnished to do so, subject to the following conditions:
 
11
 *
 
12
 * The above copyright notice and this permission notice (including the next
 
13
 * paragraph) shall be included in all copies or substantial portions of the
 
14
 * Software.
 
15
 *
 
16
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
17
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
18
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 
19
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
20
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
21
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 
22
 * SOFTWARE.
 
23
 *
 
24
 * Authors:
 
25
 *    Benjamin Defnet <benjamin.r.defnet@intel.com>
 
26
 *    Rajesh Poornachandran <rajesh.poornachandran@intel.com>
 
27
 *
 
28
 */
 
29
#ifndef _PSB_POWERMGMT_H_
 
30
#define _PSB_POWERMGMT_H_
 
31
 
 
32
#include <linux/pci.h>
 
33
#include <drm/drmP.h>
 
34
 
 
35
#define OSPM_GRAPHICS_ISLAND    0x1
 
36
#define OSPM_VIDEO_ENC_ISLAND   0x2
 
37
#define OSPM_VIDEO_DEC_ISLAND   0x4
 
38
#define OSPM_DISPLAY_ISLAND     0x8
 
39
#define OSPM_GL3_CACHE_ISLAND   0x10
 
40
#define OSPM_ALL_ISLANDS        0x1f
 
41
 
 
42
/* IPC message and command defines used to enable/disable mipi panel voltages */
 
43
#define IPC_MSG_PANEL_ON_OFF    0xE9
 
44
#define IPC_CMD_PANEL_ON        1
 
45
#define IPC_CMD_PANEL_OFF       0
 
46
 
 
47
typedef enum _UHBUsage
 
48
{
 
49
    OSPM_UHB_ONLY_IF_ON = 0,
 
50
    OSPM_UHB_FORCE_POWER_ON,
 
51
} UHBUsage;
 
52
 
 
53
/* Use these functions to power down video HW for D0i3 purpose  */
 
54
 
 
55
void ospm_power_init(struct drm_device *dev);
 
56
void ospm_power_uninit(void);
 
57
 
 
58
 
 
59
/*
 
60
 * OSPM will call these functions
 
61
 */
 
62
int ospm_power_suspend(struct pci_dev *pdev, pm_message_t state);
 
63
int ospm_power_resume(struct pci_dev *pdev);
 
64
 
 
65
/*
 
66
 * These are the functions the driver should use to wrap all hw access
 
67
 * (i.e. register reads and writes)
 
68
 */
 
69
bool ospm_power_using_hw_begin(int hw_island, UHBUsage usage);
 
70
void ospm_power_using_hw_end(int hw_island);
 
71
 
 
72
/*
 
73
 * Use this function to do an instantaneous check for if the hw is on.
 
74
 * Only use this in cases where you know the g_state_change_mutex
 
75
 * is already held such as in irq install/uninstall and you need to
 
76
 * prevent a deadlock situation.  Otherwise use ospm_power_using_hw_begin().
 
77
 */
 
78
bool ospm_power_is_hw_on(int hw_islands);
 
79
 
 
80
/*
 
81
 * Power up/down different hw component rails/islands
 
82
 */
 
83
void ospm_power_island_down(int hw_islands);
 
84
void ospm_power_island_up(int hw_islands);
 
85
void ospm_suspend_graphics(void);
 
86
/*
 
87
 * GFX-Runtime PM callbacks
 
88
 */
 
89
int psb_runtime_suspend(struct device *dev);
 
90
int psb_runtime_resume(struct device *dev);
 
91
int psb_runtime_idle(struct device *dev);
 
92
int ospm_runtime_pm_allow(struct drm_device * dev);
 
93
void ospm_runtime_pm_forbid(struct drm_device * dev);
 
94
 
 
95
 
 
96
#endif /*_PSB_POWERMGMT_H_*/