]> err.no Git - linux-2.6/commitdiff
intelfb: add vsync interrupt support
authorEric Hustvedt <ehustvedt@cecropia.com>
Tue, 20 Jun 2006 18:36:41 +0000 (14:36 -0400)
committerDave Airlie <airlied@linux.ie>
Mon, 3 Jul 2006 08:59:46 +0000 (18:59 +1000)
[02/05] intelfb: Add interrupt related register definitions

Add constants for accessing HWSTAM, IER, IIR, and IMR registers.
Add constants for interrupt types supported by the 8xx and 9xx chipsets.
The registers are also stored in the hwstate struct and dumped in the debug routine.

Signed-off-by: Eric Hustvedt <ehustvedt@cecropia.com>
drivers/video/intelfb/intelfb.h
drivers/video/intelfb/intelfbhw.c
drivers/video/intelfb/intelfbhw.h

index e290d7460e1bee1840487b5cc84194e9fa1db51e..cb016fe4d48896bf8fc9d010fc5cfda936866630 100644 (file)
@@ -195,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 {
index 7533b3dd08ac96b247579dc77f5ec1fe15f8a0d0..05aded669cdb134b1469a66db89a87318191149d 100644 (file)
@@ -587,6 +587,11 @@ intelfbhw_read_hw_state(struct intelfb_info *dinfo, struct intelfb_hwstate *hw,
        hw->fw_blc_0 = INREG(FW_BLC_0);
        hw->fw_blc_1 = INREG(FW_BLC_1);
 
+       hw->hwstam = INREG16(HWSTAM);
+       hw->ier = INREG16(IER);
+       hw->iir = INREG16(IIR);
+       hw->imr = INREG16(IMR);
+
        return 0;
 }
 
@@ -796,6 +801,10 @@ intelfbhw_print_hw_state(struct intelfb_info *dinfo, struct intelfb_hwstate *hw)
        printk("        FW_BLC_0                0x%08x\n", hw->fw_blc_0);
        printk("        FW_BLC_1                0x%08x\n", hw->fw_blc_1);
 
+       printk("        HWSTAM                  0x%04x\n", hw->hwstam);
+       printk("        IER                     0x%04x\n", hw->ier);
+       printk("        IIR                     0x%04x\n", hw->iir);
+       printk("        IMR                     0x%04x\n", hw->imr);
        printk("hw state dump end\n");
 #endif
 }
index 258235149913760ad880438359d477f42f111db0..8d2e36972fc813205645dddedec89b4b27f96dad 100644 (file)
 #define INSTDONE               0x2090
 #define PRI_RING_EMPTY                 1
 
+#define HWSTAM                 0x2098
+#define IER                    0x20A0
+#define IIR                    0x20A4
+#define IMR                    0x20A8
+#define VSYNC_PIPE_A_INTERRUPT         (1 << 7)
+#define PIPE_A_EVENT_INTERRUPT         (1 << 4)
+#define VSYNC_PIPE_B_INTERRUPT         (1 << 5)
+#define PIPE_B_EVENT_INTERRUPT         (1 << 4)
+#define HOST_PORT_EVENT_INTERRUPT      (1 << 3)
+#define CAPTURE_EVENT_INTERRUPT                (1 << 2)
+#define USER_DEFINED_INTERRUPT         (1 << 1)
+#define BREAKPOINT_INTERRUPT           1
+
 #define INSTPM                 0x20c0
 #define SYNC_FLUSH_ENABLE              (1 << 5)