Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / drivers / char / drm / drm.h
index 9da0ddb892b58fd3a0db271797ed80d378d27c6f..089198491f16757906bf3bb9235c798341034fdf 100644 (file)
@@ -38,7 +38,6 @@
 
 #if defined(__linux__)
 #if defined(__KERNEL__)
-#include <linux/config.h>
 #endif
 #include <asm/ioctl.h>         /* For _IO* macros */
 #define DRM_IOCTL_NR(n)                _IOC_NR(n)
@@ -117,6 +116,14 @@ typedef struct drm_clip_rect {
        unsigned short y2;
 } drm_clip_rect_t;
 
+/**
+ * Drawable information.
+ */
+typedef struct drm_drawable_info {
+       unsigned int num_rects;
+       drm_clip_rect_t *rects;
+} drm_drawable_info_t;
+
 /**
  * Texture region,
  */
@@ -349,7 +356,8 @@ typedef struct drm_buf_desc {
                _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */
                _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */
                _DRM_SG_BUFFER = 0x04,  /**< Scatter/gather memory buffer */
-               _DRM_FB_BUFFER = 0x08   /**< Buffer is in frame buffer */
+               _DRM_FB_BUFFER = 0x08,  /**< Buffer is in frame buffer */
+               _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */
        } flags;
        unsigned long agp_start; /**<
                                  * Start address of where the AGP buffers are
@@ -444,6 +452,20 @@ typedef struct drm_draw {
        drm_drawable_t handle;
 } drm_draw_t;
 
+/**
+ * DRM_IOCTL_UPDATE_DRAW ioctl argument type.
+ */
+typedef enum {
+       DRM_DRAWABLE_CLIPRECTS,
+} drm_drawable_info_type_t;
+
+typedef struct drm_update_draw {
+       drm_drawable_t handle;
+       unsigned int type;
+       unsigned int num;
+       unsigned long long data;
+} drm_update_draw_t;
+
 /**
  * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type.
  */
@@ -466,10 +488,14 @@ typedef struct drm_irq_busid {
 typedef enum {
        _DRM_VBLANK_ABSOLUTE = 0x0,     /**< Wait for specific vblank sequence number */
        _DRM_VBLANK_RELATIVE = 0x1,     /**< Wait for given number of vblanks */
+       _DRM_VBLANK_NEXTONMISS = 0x10000000,    /**< If missed, wait for next vblank */
+       _DRM_VBLANK_SECONDARY = 0x20000000,     /**< Secondary display controller */
        _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */
 } drm_vblank_seq_type_t;
 
-#define _DRM_VBLANK_FLAGS_MASK _DRM_VBLANK_SIGNAL
+#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
+#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \
+                               _DRM_VBLANK_NEXTONMISS)
 
 struct drm_wait_vblank_request {
        drm_vblank_seq_type_t type;
@@ -624,13 +650,17 @@ typedef struct drm_set_version {
 
 #define DRM_IOCTL_WAIT_VBLANK          DRM_IOWR(0x3a, drm_wait_vblank_t)
 
+#define DRM_IOCTL_UPDATE_DRAW          DRM_IOW(0x3f, drm_update_draw_t)
+
 /**
  * Device specific ioctls should only be in their respective headers
- * The device specific ioctl range is from 0x40 to 0x79.
+ * The device specific ioctl range is from 0x40 to 0x99.
+ * Generic IOCTLS restart at 0xA0.
  *
  * \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
  * drmCommandReadWrite().
  */
 #define DRM_COMMAND_BASE                0x40
+#define DRM_COMMAND_END                        0xA0
 
 #endif