summaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2005-05-28 00:00:08 +0000
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2005-05-28 00:00:08 +0000
commit45f1db8db9d1280dff51cdfb680bff2754195483 (patch)
treea8ed0391f5efad8ddb8c057f23fc2cd79fa8f7ce /linux-core/drmP.h
parent4a84416c458027462ee6112a5fa442415597f6c2 (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/drmP.h')
-rw-r--r--linux-core/drmP.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 24d8a23b..d7a19a2a 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -80,6 +80,7 @@
#endif
#include <linux/poll.h>
#include <asm/pgalloc.h>
+#include <linux/sysdev.h>
#include "drm.h"
#define __OS_HAS_AGP (defined(CONFIG_AGP) || (defined(CONFIG_AGP_MODULE) && defined(MODULE)))
@@ -541,6 +542,7 @@ struct drm_driver {
int new);
int (*kernel_context_switch_unlock) (struct drm_device * dev);
int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence);
+ int (*power) (struct drm_device * dev, unsigned int state);
/**
* Called by \c drm_device_is_agp. Typically used to determine if a
@@ -720,6 +722,9 @@ typedef struct drm_device {
struct drm_driver *driver;
drm_local_map_t *agp_buffer_map;
drm_head_t primary; /**< primary screen head */
+
+ struct sys_device sysdev; /**< Power Management device structure */
+ int sysdev_registered; /**< Whether the device has been registered */
} drm_device_t;
static __inline__ int drm_core_check_feature(struct drm_device *dev,
@@ -896,6 +901,12 @@ 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_cleanup(void);
+
/* DMA support (drm_dma.h) */
extern int drm_dma_setup(drm_device_t * dev);
extern void drm_dma_takedown(drm_device_t * dev);