intelfb: add vsync interrupt support

[03/05] intelfb: Implement basic interrupt handling

Functions have been added to enable and disable interrupts using the MMIO registers. Currently only pipe A vsync interrupts are enabled.
A generalized vsync accounting struct is defined, with the intent that it can encapsulate per-pipe vsync related info in the future. Currently a single instance is hard-coded.
The interrupt service routine currently only looks for vsync interrupts on pipe A, and increments a counter and wakes up anyone waiting on it.

This implementation is heavily influenced by similar implementations in the atyfb and matroxfb drivers.

Signed-off-by: Eric Hustvedt <ehustvedt@cecropia.com>
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index cb016fe..dab1f2d 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -208,6 +208,11 @@
 	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;
@@ -271,6 +276,12 @@
 	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;