rk: refactor boot_mode code
[firefly-linux-kernel-4.4.55.git] / include / drm / drm_mode.h
index 0fc7397c8f1f4c3f6f9ab454c5f66343c6b3b949..53dfa1098b986cf17b2b9c4d0609462fd9c514ea 100644 (file)
@@ -233,6 +233,8 @@ struct drm_mode_fb_cmd {
 #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02
 #define DRM_MODE_FB_DIRTY_FLAGS         0x03
 
+#define DRM_MODE_FB_DIRTY_MAX_CLIPS     256
+
 /*
  * Mark a region of a framebuffer as dirty.
  *
@@ -277,7 +279,7 @@ struct drm_mode_mode_cmd {
 #define DRM_MODE_CURSOR_MOVE   (1<<1)
 
 /*
- * depending on the value in flags diffrent members are used.
+ * depending on the value in flags different members are used.
  *
  * CURSOR_BO uses
  *    crtc
@@ -344,4 +346,33 @@ struct drm_mode_crtc_page_flip {
        __u64 user_data;
 };
 
+/* create a dumb scanout buffer */
+struct drm_mode_create_dumb {
+       uint32_t height;
+       uint32_t width;
+       uint32_t bpp;
+       uint32_t flags;
+       /* handle, pitch, size will be returned */
+       uint32_t handle;
+       uint32_t pitch;
+       uint64_t size;
+};
+
+/* set up for mmap of a dumb scanout buffer */
+struct drm_mode_map_dumb {
+       /** Handle for the object being mapped. */
+       __u32 handle;
+       __u32 pad;
+       /**
+        * Fake offset to use for subsequent mmap call
+        *
+        * This is a fixed-size type for 32/64 compatibility.
+        */
+       __u64 offset;
+};
+
+struct drm_mode_destroy_dumb {
+       uint32_t handle;
+};
+
 #endif