aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-05-12 13:34:25 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-05-12 13:34:34 -0400
commit62731b84114e5dd3310b465921955db14278c256 (patch)
tree4f707d0f435367ccb494d8bb6a0f38fd0bd09355
parent07e7589d86624e9c1ca4c38d00cf6886e1445ae2 (diff)
Pull in new kernel headers
Changes struct drm_mode_crtc_page_flip to use __u32 instead of uint32_t, fixes https://bugs.freedesktop.org/show_bug.cgi?id=26994
-rw-r--r--include/drm/drm.h2
-rw-r--r--include/drm/drm_mode.h37
2 files changed, 32 insertions, 7 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 48221599..a0559eb0 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -699,8 +699,6 @@ struct drm_gem_open {
#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
-/*@}*/
-
/**
* Device specific ioctls should only be in their respective headers
* The device specific ioctl range is from 0x40 to 0x99.
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index dfc390ea..43009bc2 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -75,6 +75,11 @@
#define DRM_MODE_DITHERING_OFF 0
#define DRM_MODE_DITHERING_ON 1
+/* Dirty info options */
+#define DRM_MODE_DIRTY_OFF 0
+#define DRM_MODE_DIRTY_ON 1
+#define DRM_MODE_DIRTY_ANNOTATE 2
+
struct drm_mode_modeinfo {
__u32 clock;
__u16 hdisplay, hsync_start, hsync_end, htotal, hskew;
@@ -307,12 +312,34 @@ struct drm_mode_crtc_lut {
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
#define DRM_MODE_PAGE_FLIP_FLAGS DRM_MODE_PAGE_FLIP_EVENT
+/*
+ * Request a page flip on the specified crtc.
+ *
+ * This ioctl will ask KMS to schedule a page flip for the specified
+ * crtc. Once any pending rendering targeting the specified fb (as of
+ * ioctl time) has completed, the crtc will be reprogrammed to display
+ * that fb after the next vertical refresh. The ioctl returns
+ * immediately, but subsequent rendering to the current fb will block
+ * in the execbuffer ioctl until the page flip happens. If a page
+ * flip is already pending as the ioctl is called, EBUSY will be
+ * returned.
+ *
+ * The ioctl supports one flag, DRM_MODE_PAGE_FLIP_EVENT, which will
+ * request that drm sends back a vblank event (see drm.h: struct
+ * drm_event_vblank) when the page flip is done. The user_data field
+ * passed in with this ioctl will be returned as the user_data field
+ * in the vblank event struct.
+ *
+ * The reserved field must be zero until we figure out something
+ * clever to use it for.
+ */
+
struct drm_mode_crtc_page_flip {
- uint32_t crtc_id;
- uint32_t fb_id;
- uint32_t flags;
- uint32_t reserved;
- uint64_t user_data;
+ __u32 crtc_id;
+ __u32 fb_id;
+ __u32 flags;
+ __u32 reserved;
+ __u64 user_data;
};
#endif