Reverse the pm_message_t patch for now, it appears that the 2.6.12 release
didn't have it.main
parent
1a6780348c
commit
e2d76b0642
|
@ -36,24 +36,15 @@
|
|||
#include <linux/sysdev.h>
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,11)
|
||||
static int drm_suspend(struct sys_device *sysdev, u32 state)
|
||||
#else
|
||||
static int drm_suspend(struct sys_device *sysdev, pm_message_t state)
|
||||
#endif
|
||||
{
|
||||
struct drm_device *dev =
|
||||
container_of(sysdev, struct drm_device, sysdev);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
int event = state.event;
|
||||
#else
|
||||
int event = state;
|
||||
#endif
|
||||
|
||||
DRM_DEBUG("event=%d\n", event);
|
||||
DRM_DEBUG("state=%d\n", state);
|
||||
|
||||
if (dev->driver->power)
|
||||
return dev->driver->power(dev, event);
|
||||
return dev->driver->power(dev, state);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -113,27 +113,18 @@ static int i915_set_dpms(drm_device_t *dev, int mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
int i915_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
#else
|
||||
int i915_suspend(struct pci_dev *pdev, u32 state)
|
||||
#endif
|
||||
int i915_suspend( struct pci_dev *pdev, unsigned state )
|
||||
{
|
||||
drm_device_t *dev = (drm_device_t *)pci_get_drvdata(pdev);
|
||||
drm_i915_private_t *dev_priv =
|
||||
(drm_i915_private_t *)dev->dev_private;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
int event = state.event;
|
||||
#else
|
||||
int event = state;
|
||||
#endif
|
||||
|
||||
DRM_DEBUG("%s event=%d\n", __FUNCTION__, event);
|
||||
DRM_DEBUG("%s state=%d\n", __FUNCTION__, state);
|
||||
|
||||
if (!dev_priv) return 0;
|
||||
|
||||
/* Save state for power up later */
|
||||
if (event != 0) {
|
||||
if (state != 0) {
|
||||
I915_WRITE( SRX_INDEX, SR01 );
|
||||
dev_priv->sr01 = I915_READ( SRX_DATA );
|
||||
dev_priv->dvoc = I915_READ( DVOC );
|
||||
|
@ -143,7 +134,7 @@ int i915_suspend(struct pci_dev *pdev, u32 state)
|
|||
dev_priv->ppcr = I915_READ( PPCR );
|
||||
}
|
||||
|
||||
switch(event) {
|
||||
switch(state) {
|
||||
case 0:
|
||||
/* D0: set DPMS mode on */
|
||||
i915_set_dpms(dev, 0);
|
||||
|
@ -175,26 +166,17 @@ int i915_resume( struct pci_dev *pdev )
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
int i915_power( drm_device_t *dev, pm_message_t state)
|
||||
#else
|
||||
int i915_power( drm_device_t *dev, u32 state)
|
||||
#endif
|
||||
int i915_power( drm_device_t *dev, unsigned int state )
|
||||
{
|
||||
drm_i915_private_t *dev_priv =
|
||||
(drm_i915_private_t *)dev->dev_private;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
|
||||
int event = state.event;
|
||||
#else
|
||||
int event = state;
|
||||
#endif
|
||||
|
||||
DRM_DEBUG("%s event=%d\n", __FUNCTION__, event);
|
||||
DRM_DEBUG("%s state=%d\n", __FUNCTION__, state);
|
||||
|
||||
if (!dev_priv) return 0;
|
||||
|
||||
/* Save state for power up later */
|
||||
if (event != 0) {
|
||||
if (state != 0) {
|
||||
I915_WRITE( SRX_INDEX, SR01 );
|
||||
dev_priv->sr01 = I915_READ( SRX_DATA );
|
||||
dev_priv->dvoc = I915_READ( DVOC );
|
||||
|
@ -205,7 +187,7 @@ int i915_power( drm_device_t *dev, u32 state)
|
|||
}
|
||||
|
||||
/* D0: set DPMS mode on */
|
||||
i915_set_dpms(dev, event);
|
||||
i915_set_dpms(dev, state);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue