aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2008-09-30 15:14:26 -0400
committerDave Airlie <airlied@linux.ie>2008-10-17 17:10:11 -0400
commit0a3e67a4caac273a3bfc4ced3da364830b1ab241 (patch)
tree02a2e5e76d9dffcb556d09b0eee4d34ebe5d81cb /include/drm/drm.h
parent2df68b439fcb97a4c55f81516206ef4ee325e28d (diff)
drm: Rework vblank-wait handling to allow interrupt reduction.
Previously, drivers supporting vblank interrupt waits would run the interrupt all the time, or all the time that any 3d client was running, preventing the CPU from sleeping for long when the system was otherwise idle. Now, interrupts are disabled any time that no client is waiting on a vblank event. The new method uses vblank counters on the chipsets when the interrupts are turned off, rather than counting interrupts, so that we can continue to present accurate vblank numbers. Co-author: Michel Dänzer <michel@tungstengraphics.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drm.h')
-rw-r--r--include/drm/drm.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 0864c6920941..15e55039b7f1 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -454,6 +454,7 @@ struct drm_irq_busid {
454enum drm_vblank_seq_type { 454enum drm_vblank_seq_type {
455 _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ 455 _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
456 _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ 456 _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
457 _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
457 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ 458 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
458 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ 459 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
459 _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ 460 _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */
@@ -486,6 +487,19 @@ union drm_wait_vblank {
486 struct drm_wait_vblank_reply reply; 487 struct drm_wait_vblank_reply reply;
487}; 488};
488 489
490#define _DRM_PRE_MODESET 1
491#define _DRM_POST_MODESET 2
492
493/**
494 * DRM_IOCTL_MODESET_CTL ioctl argument type
495 *
496 * \sa drmModesetCtl().
497 */
498struct drm_modeset_ctl {
499 uint32_t crtc;
500 uint32_t cmd;
501};
502
489/** 503/**
490 * DRM_IOCTL_AGP_ENABLE ioctl argument type. 504 * DRM_IOCTL_AGP_ENABLE ioctl argument type.
491 * 505 *
@@ -570,6 +584,7 @@ struct drm_set_version {
570#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) 584#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
571#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats) 585#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
572#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) 586#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
587#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
573 588
574#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique) 589#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
575#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth) 590#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)