Commit 51eab416 authored by Dave Airlie's avatar Dave Airlie

drm/vblank: update recently added vbl interface to be more future proof.

This makes the interface a bit cleaner by leaving a single gap in the
vblank bit space instead of creating two gaps.

Suggestions from Michel on mailing list/irc.
Reviewed-by: default avatarMichel Dänzer <michel@daenzer.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 1783e4bf
...@@ -280,7 +280,7 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) ...@@ -280,7 +280,7 @@ int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (dev->driver->dumb_create) if (dev->driver->dumb_create)
req->value = 1; req->value = 1;
break; break;
case DRM_CAP_HIGH_CRTC: case DRM_CAP_VBLANK_HIGH_CRTC:
req->value = 1; req->value = 1;
break; break;
default: default:
......
...@@ -463,14 +463,15 @@ struct drm_irq_busid { ...@@ -463,14 +463,15 @@ struct drm_irq_busid {
enum drm_vblank_seq_type { enum drm_vblank_seq_type {
_DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
/* bits 1-6 are reserved for high crtcs */
_DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
_DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */ _DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
_DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
_DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
}; };
#define _DRM_VBLANK_HIGH_CRTC_SHIFT 16 #define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
#define _DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000
#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) #define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \ #define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
...@@ -755,7 +756,7 @@ struct drm_event_vblank { ...@@ -755,7 +756,7 @@ struct drm_event_vblank {
}; };
#define DRM_CAP_DUMB_BUFFER 0x1 #define DRM_CAP_DUMB_BUFFER 0x1
#define DRM_CAP_HIGH_CRTC 0x2 #define DRM_CAP_VBLANK_HIGH_CRTC 0x2
/* typedef area */ /* typedef area */
#ifndef __KERNEL__ #ifndef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment