diff options
author | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-05-28 00:00:08 +0000 |
---|---|---|
committer | Alan Hourihane <alanh@fairlite.demon.co.uk> | 2005-05-28 00:00:08 +0000 |
commit | 45f1db8db9d1280dff51cdfb680bff2754195483 (patch) | |
tree | a8ed0391f5efad8ddb8c057f23fc2cd79fa8f7ce /linux-core/drm_drv.c | |
parent | 4a84416c458027462ee6112a5fa442415597f6c2 (diff) |
Re-implement the power management.
There's two choices when fb is or isn't loaded as we treat ourselves as a
PCI driver in the latter case.
If we are a PCI driver, then register the suspend/resume functions
directly. If not, then we register as a sysdev and pick up the
suspend/resume actions and pump them down into a generic *power
function.
It'll be nice when this little mess is sorted out with regard to being a
real PCI driver ;-/
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r-- | linux-core/drm_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 069ecd3e..192b05cd 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -265,6 +265,8 @@ int drm_takedown(drm_device_t * dev) if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) drm_dma_takedown(dev); + drm_pm_takedown(dev); + if (dev->lock.hw_lock) { dev->sigdata.lock = dev->lock.hw_lock = NULL; /* SHM removed */ dev->lock.filp = NULL; @@ -310,6 +312,8 @@ int drm_init(struct drm_driver *driver, drm_mem_init(); + drm_pm_init(); + for (i = 0; (pciidlist[i].vendor != 0) && !drm_fb_loaded; i++) { pid = &pciidlist[i]; @@ -439,6 +443,8 @@ static void __exit drm_cleanup(drm_device_t * dev) if (dev->driver->postcleanup) dev->driver->postcleanup(dev); + drm_pm_cleanup(); + drm_put_head(&dev->primary); if (drm_put_dev(dev)) DRM_ERROR("Cannot unload module\n"); |