aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm.h')
-rw-r--r--include/drm/drm.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 7cb50bdde46d..fa6d9155873d 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_EVENT = 0x4000000, /**< Send event instead of blocking */
457 _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ 458 _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
458 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ 459 _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
459 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ 460 _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
@@ -461,8 +462,8 @@ enum drm_vblank_seq_type {
461}; 462};
462 463
463#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) 464#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
464#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \ 465#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
465 _DRM_VBLANK_NEXTONMISS) 466 _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
466 467
467struct drm_wait_vblank_request { 468struct drm_wait_vblank_request {
468 enum drm_vblank_seq_type type; 469 enum drm_vblank_seq_type type;
@@ -698,6 +699,34 @@ struct drm_gem_open {
698#define DRM_COMMAND_BASE 0x40 699#define DRM_COMMAND_BASE 0x40
699#define DRM_COMMAND_END 0xA0 700#define DRM_COMMAND_END 0xA0
700 701
702/**
703 * Header for events written back to userspace on the drm fd. The
704 * type defines the type of event, the length specifies the total
705 * length of the event (including the header), and user_data is
706 * typically a 64 bit value passed with the ioctl that triggered the
707 * event. A read on the drm fd will always only return complete
708 * events, that is, if for example the read buffer is 100 bytes, and
709 * there are two 64 byte events pending, only one will be returned.
710 *
711 * Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and
712 * up are chipset specific.
713 */
714struct drm_event {
715 __u32 type;
716 __u32 length;
717};
718
719#define DRM_EVENT_VBLANK 0x01
720
721struct drm_event_vblank {
722 struct drm_event base;
723 __u64 user_data;
724 __u32 tv_sec;
725 __u32 tv_usec;
726 __u32 sequence;
727 __u32 reserved;
728};
729
701/* typedef area */ 730/* typedef area */
702#ifndef __KERNEL__ 731#ifndef __KERNEL__
703typedef struct drm_clip_rect drm_clip_rect_t; 732typedef struct drm_clip_rect drm_clip_rect_t;