Skip to contentSkip to conversation

libdrm: vblank wait on crtc > 1

PATCH In review Ilija Hadzic 2 participants 3 messages Mar 18, 2011 – Mar 20, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libdrm: vblank wait on crtc > 1

Hi Alex,

Below is a patch against the master branch of libdrm that adds support for waits for vblank events on CRTCs that are greater than 1 (and thus cannot be represented using current primary/secondary flags interface). The patch adds a new DRM_CAP so that the application can check whether the new vblank interface is supported and also adds the new DRM_VBLANK mask and shift value so that the application can construct vblank_wait ioctls that refer to crtc > 1

The issue was discussed on the dri-devel list in these two threads

http://lists.freedesktop.org/archives/dri-devel/2011-March/009009.html
http://lists.freedesktop.org/archives/dri-devel/2011-March/009025.html

Regards,

Ilija

Reviewed-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Acked-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
include/drm/drm.h +1 -0
index 416673a..10afaf1 100644
@@ -755,6 +755,7 @@ struct drm_event_vblank {
 };
 
 #define DRM_CAP_DUMB_BUFFER 0x1
+#define DRM_CAP_HIGH_CRTC   0x2
 
 /* typedef area */
 typedef struct drm_clip_rect drm_clip_rect_t;
xf86drm.h +2 -0
index bf0d5df..e2bea06 100644
@@ -302,6 +302,8 @@ typedef enum {
     DRM_VBLANK_SECONDARY = 0x20000000,	/**< Secondary display controller */
     DRM_VBLANK_SIGNAL   = 0x40000000	/* Send signal instead of blocking */
 } drmVBlankSeqType;
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 16
+#define DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000
 
 typedef struct _drmVBlankReq {
 	drmVBlankSeqType type;
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Ilija Hadzic

Hi Alex,

Below is a patch against the master branch of libdrm that adds support for waits for vblank events on CRTCs that are greater than 1 (and thus cannot be represented using current primary/secondary flags interface). The patch adds a new DRM_CAP so that the application can check whether the new vblank interface is supported and also adds the new DRM_VBLANK mask and shift value so that the application can construct vblank_wait ioctls that refer to crtc

Quoted 1 line

1

The issue was discussed on the dri-devel list in these two threads

http://lists.freedesktop.org/archives/dri-devel/2011-March/009009.html
http://lists.freedesktop.org/archives/dri-devel/2011-March/009025.html

Quoted 6 lines

Regards,

Ilija

Reviewed-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Acked-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Quoted 28 lines
include/drm/drm.h +1 -0
index 416673a..10afaf1 100644
@@ -755,6 +755,7 @@ struct drm_event_vblank {
  };
 
  #define DRM_CAP_DUMB_BUFFER 0x1
+#define DRM_CAP_HIGH_CRTC   0x2
 
  /* typedef area */
  typedef struct drm_clip_rect drm_clip_rect_t;
xf86drm.h +0 -0
index bf0d5df..e2bea06 100644
@@ -302,6 +302,8 @@ typedef enum {

    DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ DRM_VBLANK_SIGNAL   = 0x40000000   /* Send signal instead of blocking */ } drmVBlankSeqType;

xf86drm.h +2 -0
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 16
+#define DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000

 typedef struct _drmVBlankReq {
       drmVBlankSeqType type;

#2 lore raw
Quoted 20 lines · Alex Deucher
Quoted 18 lines · Ilija Hadzic

Hi Alex,

Below is a patch against the master branch of libdrm that adds support for waits for vblank events on CRTCs that are greater than 1 (and thus cannot be represented using current primary/secondary flags interface). The patch adds a new DRM_CAP so that the application can check whether the new vblank interface is supported and also adds the new DRM_VBLANK mask and shift value so that the application can construct vblank_wait ioctls that refer to crtc

Quoted 1 line

1

The issue was discussed on the dri-devel list in these two threads

http://lists.freedesktop.org/archives/dri-devel/2011-March/009009.html
http://lists.freedesktop.org/archives/dri-devel/2011-March/009025.html

Regards,

Quoted 8 lines
Quoted 4 lines

Ilija

Reviewed-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Acked-by Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
Quoted 25 lines
Quoted 25 lines
include/drm/drm.h +1 -0
index 416673a..10afaf1 100644
@@ -755,6 +755,7 @@ struct drm_event_vblank {
  };
 
  #define DRM_CAP_DUMB_BUFFER 0x1
+#define DRM_CAP_HIGH_CRTC   0x2
 
  /* typedef area */
  typedef struct drm_clip_rect drm_clip_rect_t;
xf86drm.h +0 -0
index bf0d5df..e2bea06 100644
@@ -302,6 +302,8 @@ typedef enum {

    DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ DRM_VBLANK_SIGNAL   = 0x40000000   /* Send signal instead of blocking */ } drmVBlankSeqType;

xf86drm.h +2 -0
+#define DRM_VBLANK_HIGH_CRTC_SHIFT 16
+#define DRM_VBLANK_HIGH_CRTC_MASK 0x001F0000
Quoted 4 lines
Quoted 3 lines

 typedef struct _drmVBlankReq {
       drmVBlankSeqType type;

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel