summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-08-22 09:50:12 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-08-22 09:50:12 +0000
commit01e4364a8fec6cb2c11de4e5cb7def10b58348ae (patch)
tree09660f5b05f5c2a0835f2f8cc3ecee9ae69d6644
parent54947504ac70e135a38f303420b7b66eed8c23a3 (diff)
remove i915_pm code as it causes too many issues with current software
suspend, and the DDX driver re-inits the board successfully anyway.
-rw-r--r--linux-core/Makefile.kernel2
-rw-r--r--linux-core/drmP.h6
-rw-r--r--linux-core/i915_drv.c2
-rw-r--r--linux-core/i915_pm.c167
-rw-r--r--shared-core/i915_drv.h5
5 files changed, 1 insertions, 181 deletions
diff --git a/linux-core/Makefile.kernel b/linux-core/Makefile.kernel
index 1700c0a9..b483a86a 100644
--- a/linux-core/Makefile.kernel
+++ b/linux-core/Makefile.kernel
@@ -17,7 +17,7 @@ r128-objs := r128_drv.o r128_cce.o r128_state.o r128_irq.o
mga-objs := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
i810-objs := i810_drv.o i810_dma.o
i830-objs := i830_drv.o i830_dma.o i830_irq.o
-i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_pm.o
+i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o
radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o r300_cmdbuf.o
sis-objs := sis_drv.o sis_ds.o sis_mm.o
ffb-objs := ffb_drv.o ffb_context.o
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 4f677471..d170693e 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -897,12 +897,6 @@ extern unsigned long drm_get_resource_start(drm_device_t *dev,
extern unsigned long drm_get_resource_len(drm_device_t *dev,
unsigned int resource);
- /* Power Management (drm_pm.h) */
-extern int drm_pm_setup(drm_device_t *dev);
-extern void drm_pm_takedown(drm_device_t *dev);
-extern int drm_pm_init(void);
-extern void drm_pm_exit(void);
-
/* DMA support (drm_dma.h) */
extern int drm_dma_setup(drm_device_t * dev);
extern void drm_dma_takedown(drm_device_t * dev);
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index 4e3e59b6..a5f24806 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -71,8 +71,6 @@ static struct drm_driver driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
.probe = probe,
- /* .resume = i915_resume, - need BIOS to re-init */
- .suspend = i915_suspend,
.remove = __devexit_p(drm_cleanup_pci),
},
diff --git a/linux-core/i915_pm.c b/linux-core/i915_pm.c
deleted file mode 100644
index e4bda0ce..00000000
--- a/linux-core/i915_pm.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/* i915_pm.c -- Power management support for the i915 -*- linux-c -*-
- */
-/**************************************************************************
- *
- * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation the rights to use, copy, modify, merge, publish,
- * distribute, sub license, and/or sell copies of the Software, and to
- * permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial portions
- * of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
- * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
- * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
- * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- *
- **************************************************************************/
-
-#define __NO_VERSION__
-#include "drmP.h"
-#include "drm.h"
-#include "i915_drm.h"
-#include "i915_drv.h"
-
-
-/**
- * Set DPMS mode.
- */
-static int i915_set_dpms(drm_device_t *dev, int mode)
-{
- drm_i915_private_t *dev_priv =
- (drm_i915_private_t *)dev->dev_private;
- unsigned sr01, adpa, ppcr, dvob, dvoc, lvds;
-
- DRM_DEBUG("%s mode=%d\n", __FUNCTION__, mode);
-
- if (!dev_priv) return 0;
-
- I915_WRITE( SRX_INDEX, SR01 );
- sr01 = I915_READ( SRX_DATA );
-
- adpa = I915_READ( ADPA );
- ppcr = I915_READ( PPCR );
- dvoc = I915_READ( DVOC );
- dvob = I915_READ( DVOB );
- lvds = I915_READ( LVDS );
-
- switch(mode) {
- case 0:
- /* On */
- sr01 = dev_priv->sr01;
- adpa = dev_priv->adpa;
-#if 0
- I915_WRITE( LVDS, lvds | LVDS_ON ); /* Power on LVDS */
-#endif
- I915_WRITE( PPCR, dev_priv->ppcr ); /* Power up panel */
- I915_WRITE( DVOC, dev_priv->dvoc );
- I915_WRITE( DVOB, dev_priv->dvob );
- break;
-
- case 1:
- /* Standby */
- sr01 |= SR01_SCREEN_OFF;
- adpa = (adpa & ADPA_DPMS_MASK) | ADPA_DPMS_STANDBY;
- I915_WRITE( PPCR, ppcr & ~PPCR_ON ); /* Power off panel*/
-#if 0
- I915_WRITE( LVDS, lvds & ~LVDS_ON ); /* Power off LVDS */
-#endif
- I915_WRITE( DVOC, dvoc & ~DVOC_ON );
- I915_WRITE( DVOB, dvob & ~DVOB_ON );
- break;
-
- case 2:
- /* Suspend */
- sr01 |= SR01_SCREEN_OFF;
- adpa = (adpa & ADPA_DPMS_MASK) | ADPA_DPMS_SUSPEND;
- I915_WRITE( PPCR, ppcr & ~PPCR_ON ); /* Power off panel*/
-#if 0
- I915_WRITE( LVDS, lvds & ~LVDS_ON ); /* Power off LVDS */
-#endif
- I915_WRITE( DVOC, dvoc & ~DVOC_ON );
- I915_WRITE( DVOB, dvob & ~DVOB_ON );
- break;
-
- case 3:
- /* Off */
- sr01 |= SR01_SCREEN_OFF;
- adpa = (adpa & ADPA_DPMS_MASK) | ADPA_DPMS_OFF;
- I915_WRITE( PPCR, ppcr & ~PPCR_ON ); /* Power off panel*/
-#if 0
- I915_WRITE( LVDS, lvds & ~LVDS_ON ); /* Power off LVDS */
-#endif
- I915_WRITE( DVOC, dvoc & ~DVOC_ON );
- I915_WRITE( DVOB, dvob & ~DVOB_ON );
- break;
- }
-
- I915_WRITE( SRX_DATA, sr01 );
-
- I915_WRITE( ADPA, adpa );
-
- return 0;
-}
-
-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;
-
- DRM_DEBUG("%s state=%d\n", __FUNCTION__, state);
-
- if (!dev_priv) return 0;
-
- /* Save state for power up later */
- if (state != 0) {
- I915_WRITE( SRX_INDEX, SR01 );
- dev_priv->sr01 = I915_READ( SRX_DATA );
- dev_priv->dvoc = I915_READ( DVOC );
- dev_priv->dvob = I915_READ( DVOB );
- dev_priv->lvds = I915_READ( LVDS );
- dev_priv->adpa = I915_READ( ADPA );
- dev_priv->ppcr = I915_READ( PPCR );
- }
-
- switch(state) {
- case 0:
- /* D0: set DPMS mode on */
- i915_set_dpms(dev, 0);
- break;
- case 1:
- /* D1: set DPMS mode standby */
- i915_set_dpms(dev, 1);
- break;
- case 2:
- /* D2: set DPMS mode suspend */
- i915_set_dpms(dev, 2);
- break;
- case 3:
- /* D3: set DPMS mode off */
- i915_set_dpms(dev, 3);
- break;
- }
-
- return 0;
-}
-
-int i915_resume( struct pci_dev *pdev )
-{
- drm_device_t *dev = (drm_device_t *)pci_get_drvdata(pdev);
-
- /* D0: set DPMS mode on */
- i915_set_dpms(dev, 0);
-
- return 0;
-}
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index dbef27f5..f7dbfd29 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -112,11 +112,6 @@ extern void i915_driver_irq_preinstall(drm_device_t * dev);
extern void i915_driver_irq_postinstall(drm_device_t * dev);
extern void i915_driver_irq_uninstall(drm_device_t * dev);
-/* i915_pm.c */
-extern int i915_suspend(struct pci_dev *pdev, u32 state);
-extern int i915_resume(struct pci_dev *pdev);
-extern int i915_power(drm_device_t *dev, unsigned int state);
-
/* i915_mem.c */
extern int i915_mem_alloc(DRM_IOCTL_ARGS);
extern int i915_mem_free(DRM_IOCTL_ARGS);