device.h: audit and cleanup users in main include dir
[linux-2.6.git] / include / linux / fb.h
index 6a82748..9d50967 100644 (file)
@@ -45,6 +45,7 @@
 #define FB_TYPE_INTERLEAVED_PLANES     2       /* Interleaved planes   */
 #define FB_TYPE_TEXT                   3       /* Text/attributes      */
 #define FB_TYPE_VGA_PLANES             4       /* EGA/VGA planes       */
+#define FB_TYPE_FOURCC                 5       /* Type identified by a V4L2 FOURCC */
 
 #define FB_AUX_TEXT_MDA                0       /* Monochrome text */
 #define FB_AUX_TEXT_CGA                1       /* CGA/EGA/VGA Color text */
@@ -69,6 +70,7 @@
 #define FB_VISUAL_PSEUDOCOLOR          3       /* Pseudo color (like atari) */
 #define FB_VISUAL_DIRECTCOLOR          4       /* Direct color */
 #define FB_VISUAL_STATIC_PSEUDOCOLOR   5       /* Pseudo color readonly */
+#define FB_VISUAL_FOURCC               6       /* Visual identified by a V4L2 FOURCC */
 
 #define FB_ACCEL_NONE          0       /* no hardware accelerator      */
 #define FB_ACCEL_ATARIBLITT    1       /* Atari Blitter                */
 
 #define FB_ACCEL_PUV3_UNIGFX   0xa0    /* PKUnity-v3 Unigfx            */
 
+#define FB_CAP_FOURCC          1       /* Device supports FOURCC-based formats */
+
 struct fb_fix_screeninfo {
        char id[16];                    /* identification string eg "TT Builtin" */
        unsigned long smem_start;       /* Start of frame buffer mem */
@@ -171,7 +175,8 @@ struct fb_fix_screeninfo {
        __u32 mmio_len;                 /* Length of Memory Mapped I/O  */
        __u32 accel;                    /* Indicate to driver which     */
                                        /*  specific chip/card we have  */
-       __u16 reserved[3];              /* Reserved for future compatibility */
+       __u16 capabilities;             /* see FB_CAP_*                 */
+       __u16 reserved[2];              /* Reserved for future compatibility */
 };
 
 /* Interpretation of offset for color fields: All offsets are from the right,
@@ -246,8 +251,8 @@ struct fb_var_screeninfo {
        __u32 yoffset;                  /* resolution                   */
 
        __u32 bits_per_pixel;           /* guess what                   */
-       __u32 grayscale;                /* != 0 Graylevels instead of colors */
-
+       __u32 grayscale;                /* 0 = color, 1 = grayscale,    */
+                                       /* >1 = FOURCC                  */
        struct fb_bitfield red;         /* bitfield in fb mem if true color, */
        struct fb_bitfield green;       /* else only length is significant */
        struct fb_bitfield blue;
@@ -273,7 +278,8 @@ struct fb_var_screeninfo {
        __u32 sync;                     /* see FB_SYNC_*                */
        __u32 vmode;                    /* see FB_VMODE_*               */
        __u32 rotate;                   /* angle we rotate counter clockwise */
-       __u32 reserved[5];              /* Reserved for future compatibility */
+       __u32 colorspace;               /* colorspace for FOURCC-based modes */
+       __u32 reserved[4];              /* Reserved for future compatibility */
 };
 
 struct fb_cmap {
@@ -401,7 +407,6 @@ struct fb_cursor {
 
 #include <linux/fs.h>
 #include <linux/init.h>
-#include <linux/device.h>
 #include <linux/workqueue.h>
 #include <linux/notifier.h>
 #include <linux/list.h>
@@ -1043,7 +1048,8 @@ extern void fb_deferred_io_open(struct fb_info *info,
                                struct inode *inode,
                                struct file *file);
 extern void fb_deferred_io_cleanup(struct fb_info *info);
-extern int fb_deferred_io_fsync(struct file *file, int datasync);
+extern int fb_deferred_io_fsync(struct file *file, loff_t start,
+                               loff_t end, int datasync);
 
 static inline bool fb_be_math(struct fb_info *info)
 {