summaryrefslogtreecommitdiff
path: root/linux-core/drmP.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-06-12 10:44:21 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-06-12 10:44:21 -0700
commitdb689c7b95613237cec904c3f6ee27e8c2bf7ce0 (patch)
tree9e8b5377207f3d2a89759f189b1be611f6e85859 /linux-core/drmP.h
parent280083d4a2a12a1ff6dc1b068553a4ae8960200c (diff)
Initial checkin of vblank rework. Code attempts to reduce the number
of vblank interrupt in order to save power.
Diffstat (limited to 'linux-core/drmP.h')
-rw-r--r--linux-core/drmP.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index dd3a69df..c3f20311 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -627,8 +627,9 @@ struct drm_driver {
int (*kernel_context_switch) (struct drm_device * dev, int old,
int new);
void (*kernel_context_switch_unlock) (struct drm_device * dev);
- int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence);
- int (*vblank_wait2) (struct drm_device * dev, unsigned int *sequence);
+ u32 (*get_vblank_counter) (struct drm_device *dev, int crtc);
+ void (*enable_vblank) (struct drm_device *dev, int crtc);
+ void (*disable_vblank) (struct drm_device *dev, int crtc);
int (*dri_library_name) (struct drm_device * dev, char * buf);
/**
@@ -783,12 +784,13 @@ typedef struct drm_device {
/*@{ */
wait_queue_head_t vbl_queue; /**< VBLANK wait queue */
- atomic_t vbl_received;
- atomic_t vbl_received2; /**< number of secondary VBLANK interrupts */
+ atomic_t *vblank_count; /**< number of VBLANK interrupts (driver must alloc the right number of counters) */
spinlock_t vbl_lock;
struct list_head vbl_sigs; /**< signal list to send on VBLANK */
struct list_head vbl_sigs2; /**< signals to send on secondary VBLANK */
- unsigned int vbl_pending;
+ atomic_t *vbl_pending;
+ u32 *last_vblank; /* protected by dev->vbl_lock */
+ unsigned long max_vblank_count; /**< size of vblank counter register */
spinlock_t tasklet_lock; /**< For drm_locked_tasklet */
void (*locked_tasklet_func)(struct drm_device *dev);