OSDN Git Service

intel: Use stdbool.h for dealing with boolean values.
[android-x86/external-libdrm.git] / xf86drmMode.h
index 705369f..1b1e3e2 100644 (file)
  *
  */
 
+#if defined(__cplusplus) || defined(c_plusplus)
+extern "C" {
+#endif
+
 #include <drm.h>
 
 /*
 #define DRM_MODE_CONNECTOR_DisplayPort  10
 #define DRM_MODE_CONNECTOR_HDMIA        11
 #define DRM_MODE_CONNECTOR_HDMIB        12
+#define DRM_MODE_CONNECTOR_TV          13
+#define DRM_MODE_CONNECTOR_eDP         14
 
 #define DRM_MODE_PROP_PENDING   (1<<0)
 #define DRM_MODE_PROP_RANGE     (1<<1)
 
 #endif /* _DRM_MODE_H */
 
+
+/*
+ * Feature defines
+ *
+ * Just because these are defined doesn't mean that the kernel
+ * can do that feature, its just for new code vs old libdrm.
+ */
+#define DRM_MODE_FEATURE_KMS           1
+#define DRM_MODE_FEATURE_DIRTYFB       1
+
+
 typedef struct _drmModeRes {
 
        int count_fbs;
@@ -168,7 +185,7 @@ typedef struct _drmModeModeInfo {
        uint16_t hdisplay, hsync_start, hsync_end, htotal, hskew;
        uint16_t vdisplay, vsync_start, vsync_end, vtotal, vscan;
 
-       uint32_t vrefresh; /* vertical refresh * 1000 */
+       uint32_t vrefresh;
 
        uint32_t flags;
        uint32_t type;
@@ -185,6 +202,8 @@ typedef struct _drmModeFB {
        uint32_t handle;
 } drmModeFB, *drmModeFBPtr;
 
+typedef struct drm_clip_rect drmModeClip, *drmModeClipPtr;
+
 typedef struct _drmModePropertyBlob {
        uint32_t id;
        uint32_t length;
@@ -293,6 +312,13 @@ extern int drmModeAddFB(int fd, uint32_t width, uint32_t height, uint8_t depth,
  */
 extern int drmModeRmFB(int fd, uint32_t bufferId);
 
+/**
+ * Mark a region of a framebuffer as dirty.
+ */
+extern int drmModeDirtyFB(int fd, uint32_t bufferId,
+                         drmModeClipPtr clips, uint32_t num_clips);
+
+
 /*
  * Crtc functions
  */
@@ -364,3 +390,7 @@ extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
                               uint16_t *red, uint16_t *green, uint16_t *blue);
 extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
                           uint32_t flags, void *user_data);
+
+#if defined(__cplusplus) || defined(c_plusplus)
+}
+#endif