OSDN Git Service

Merge branch 'modesetting-dirty-libdrm'
[android-x86/external-libdrm.git] / xf86drmMode.h
index 705369f..5a4ce63 100644 (file)
 
 #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;
@@ -185,6 +196,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 +306,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
  */