intelfb: add vsync interrupt support
[safe/jmp/linux-2.6] / drivers / video / intelfb / intelfb.h
index 631a3a9..65ac370 100644 (file)
@@ -59,6 +59,7 @@
 #define INTEL_REG_SIZE                 0x80000
 
 #define STRIDE_ALIGNMENT               16
+#define STRIDE_ALIGNMENT_I9XX          64
 
 #define PALETTE_8_ENTRIES              256
 
@@ -194,6 +195,10 @@ struct intelfb_hwstate {
        u32 mem_mode;
        u32 fw_blc_0;
        u32 fw_blc_1;
+       u16 hwstam;
+       u16 ier;
+       u16 iir;
+       u16 imr;
 };
 
 struct intelfb_heap_data {
@@ -203,6 +208,11 @@ struct intelfb_heap_data {
        u32 size;    // in bytes
 };
 
+struct intelfb_vsync {
+       wait_queue_head_t wait;
+       unsigned int count;
+};
+
 struct intelfb_info {
        struct fb_info *info;
        struct fb_ops  *fbops;
@@ -236,7 +246,7 @@ struct intelfb_info {
        u32 fb_start;
 
        /* ring buffer */
-       u8 __iomem *ring_head;
+       u32 ring_head;
        u32 ring_tail;
        u32 ring_tail_mask;
        u32 ring_space;
@@ -266,6 +276,12 @@ struct intelfb_info {
        int fixed_mode;
        int ring_active;
        int flag;
+       unsigned long irq_flags;
+       int open;
+
+       /* vsync */
+       struct intelfb_vsync vsync;
+       spinlock_t int_lock;
 
        /* hw cursor */
        int cursor_on;
@@ -288,6 +304,10 @@ struct intelfb_info {
 
 #define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G)||(dinfo->chipset==INTEL_945GM))
 
+#ifndef FBIO_WAITFORVSYNC
+#define FBIO_WAITFORVSYNC      _IOW('F', 0x20, __u32)
+#endif
+
 /*** function prototypes ***/
 
 extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);