fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
[safe/jmp/linux-2.6] / include / linux / fb.h
index dd68358..f3793eb 100644 (file)
@@ -37,7 +37,7 @@ struct dentry;
 #define FBIOGET_HWCINFO         0x4616
 #define FBIOPUT_MODEINFO        0x4617
 #define FBIOGET_DISPINFO        0x4618
-
+#define FBIO_WAITFORVSYNC      _IOW('F', 0x20, __u32)
 
 #define FB_TYPE_PACKED_PIXELS          0       /* Packed Pixels        */
 #define FB_TYPE_PLANES                 1       /* Non interleaved planes */
@@ -133,6 +133,7 @@ struct dentry;
 #define FB_ACCEL_NEOMAGIC_NM2230 96    /* NeoMagic NM2230              */
 #define FB_ACCEL_NEOMAGIC_NM2360 97    /* NeoMagic NM2360              */
 #define FB_ACCEL_NEOMAGIC_NM2380 98    /* NeoMagic NM2380              */
+#define FB_ACCEL_PXA3XX                 99     /* PXA3xx                       */
 
 #define FB_ACCEL_SAVAGE4        0x80   /* S3 Savage4                   */
 #define FB_ACCEL_SAVAGE3D       0x81   /* S3 Savage3D                  */
@@ -402,6 +403,7 @@ struct fb_cursor {
 #include <linux/notifier.h>
 #include <linux/list.h>
 #include <linux/backlight.h>
+#include <linux/slab.h>
 #include <asm/io.h>
 
 struct vm_area_struct;
@@ -542,6 +544,8 @@ struct fb_cursor_user {
 #define FB_EVENT_GET_REQ                0x0D
 /*      Unbind from the console if possible */
 #define FB_EVENT_FB_UNBIND              0x0E
+/*      CONSOLE-SPECIFIC: remap all consoles to new fb - for vga switcheroo */
+#define FB_EVENT_REMAP_ALL_CONSOLE      0x0F
 
 struct fb_event {
        struct fb_info *info;
@@ -668,12 +672,6 @@ struct fb_ops {
        /* perform fb specific mmap */
        int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
 
-       /* save current hardware state */
-       void (*fb_save_state)(struct fb_info *info);
-
-       /* restore saved state */
-       void (*fb_restore_state)(struct fb_info *info);
-
        /* get capability given var */
        void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps,
                            struct fb_var_screeninfo *var);
@@ -768,6 +766,7 @@ struct fb_tile_ops {
         *  takes over; acceleration engine should be in a quiescent state */
 
 /* hints */
+#define FBINFO_VIRTFB          0x0004 /* FB is System RAM, not device. */
 #define FBINFO_PARTIAL_PAN_OK  0x0040 /* otw use pan only for double-buffering */
 #define FBINFO_READS_FAST      0x0080 /* soft-copy faster than rendering */
 
@@ -819,6 +818,7 @@ struct fb_info {
        int node;
        int flags;
        struct mutex lock;              /* Lock for open/release/ioctl funcs */
+       struct mutex mm_lock;           /* Lock for fb_mmap and smem_* fields */
        struct fb_var_screeninfo var;   /* Current var */
        struct fb_fix_screeninfo fix;   /* Current fix */
        struct fb_monspecs monspecs;    /* Current Monitor specs */
@@ -863,10 +863,22 @@ struct fb_info {
        /* we need the PCI or similiar aperture base/size not
           smem_start/size as smem_start may just be an object
           allocated inside the aperture so may not actually overlap */
-       resource_size_t aperture_base;
-       resource_size_t aperture_size;
+       struct apertures_struct {
+               unsigned int count;
+               struct aperture {
+                       resource_size_t base;
+                       resource_size_t size;
+               } ranges[0];
+       } *apertures;
 };
 
+static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
+       struct apertures_struct *a = kzalloc(sizeof(struct apertures_struct)
+                       + max_num * sizeof(struct aperture), GFP_KERNEL);
+       a->count = max_num;
+       return a;
+}
+
 #ifdef MODULE
 #define FBINFO_DEFAULT FBINFO_MODULE
 #else
@@ -959,6 +971,8 @@ extern ssize_t fb_sys_write(struct fb_info *info, const char __user *buf,
 /* drivers/video/fbmem.c */
 extern int register_framebuffer(struct fb_info *fb_info);
 extern int unregister_framebuffer(struct fb_info *fb_info);
+extern void remove_conflicting_framebuffers(struct apertures_struct *a,
+                               const char *name, bool primary);
 extern int fb_prepare_logo(struct fb_info *fb_info, int rotate);
 extern int fb_show_logo(struct fb_info *fb_info, int rotate);
 extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size);