[PATCH] libdrm: (revised) vblank wait on crtc > 1

Ilija Hadzic ihadzic at research.bell-labs.com
Thu Mar 24 10:24:28 PDT 2011


Hi Alex, 

Enclosed is a revised version of the patch sent on Mar 18, against
the master branch of the drm userspace (i.e. libdrm). Details 
summarised in this thread: 
http://lists.freedesktop.org/archives/dri-devel/2011-March/009499.html

This patch reconciles libdrm with the the kernel change that Dave 
pushed this morning. It *supersedes* the previously sent patch (i.e. 
apply it to the master branch as it exists at the time of this writing, 
not as an incremental patch to the one sent previously).

Regards, 

Ilija

Signed-off-by: Ilija Hadzic <ihadzic at research.bell-labs.com>
---
 include/drm/drm.h |    1 +
 xf86drm.h         |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/drm/drm.h b/include/drm/drm.h
index 416673a..5fd24fc 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -755,6 +755,7 @@ struct drm_event_vblank {
 };
 
 #define DRM_CAP_DUMB_BUFFER 0x1
+#define DRM_CAP_VBLANK_HIGH_CRTC   0x2
 
 /* typedef area */
 typedef struct drm_clip_rect drm_clip_rect_t;
diff --git a/xf86drm.h b/xf86drm.h
index bf0d5df..20f4c78 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -296,12 +296,15 @@ typedef struct _drmTextureRegion {
 typedef enum {
     DRM_VBLANK_ABSOLUTE = 0x0,	/**< Wait for specific vblank sequence number */
     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_FLIP = 0x8000000,	/**< Scheduled buffer swap should flip */
     DRM_VBLANK_NEXTONMISS = 0x10000000,	/**< If missed, wait for next vblank */
     DRM_VBLANK_SECONDARY = 0x20000000,	/**< Secondary display controller */
     DRM_VBLANK_SIGNAL   = 0x40000000	/* Send signal instead of blocking */
 } drmVBlankSeqType;
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 1
 
 typedef struct _drmVBlankReq {
 	drmVBlankSeqType type;
-- 
1.7.4.1



More information about the dri-devel mailing list