aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric Hustvedt <ehustvedt@cecropia.com>2006-06-20 14:36:41 -0400
committerDave Airlie <airlied@linux.ie>2006-07-03 04:59:46 -0400
commit9a5f019b1a9ea6a75ba36d7c312ff069006ed479 (patch)
tree03fb6003c48a7d8bd0df2bc40678f8bc601015f1 /drivers
parent3ce6fb4358bce6aced489f798138795163ad3f7c (diff)
intelfb: add vsync interrupt support
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/intelfb/intelfb.h4
-rw-r--r--drivers/video/intelfb/intelfbhw.c9
-rw-r--r--drivers/video/intelfb/intelfbhw.h13
3 files changed, 26 insertions, 0 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index e290d7460e1b..cb016fe4d488 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -195,6 +195,10 @@ struct intelfb_hwstate {
195 u32 mem_mode; 195 u32 mem_mode;
196 u32 fw_blc_0; 196 u32 fw_blc_0;
197 u32 fw_blc_1; 197 u32 fw_blc_1;
198 u16 hwstam;
199 u16 ier;
200 u16 iir;
201 u16 imr;
198}; 202};
199 203
200struct intelfb_heap_data { 204struct intelfb_heap_data {
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index 7533b3dd08ac..05aded669cdb 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -587,6 +587,11 @@ intelfbhw_read_hw_state(struct intelfb_info *dinfo, struct intelfb_hwstate *hw,
587 hw->fw_blc_0 = INREG(FW_BLC_0); 587 hw->fw_blc_0 = INREG(FW_BLC_0);
588 hw->fw_blc_1 = INREG(FW_BLC_1); 588 hw->fw_blc_1 = INREG(FW_BLC_1);
589 589
590 hw->hwstam = INREG16(HWSTAM);
591 hw->ier = INREG16(IER);
592 hw->iir = INREG16(IIR);
593 hw->imr = INREG16(IMR);
594
590 return 0; 595 return 0;
591} 596}
592 597
@@ -796,6 +801,10 @@ intelfbhw_print_hw_state(struct intelfb_info *dinfo, struct intelfb_hwstate *hw)
796 printk(" FW_BLC_0 0x%08x\n", hw->fw_blc_0); 801 printk(" FW_BLC_0 0x%08x\n", hw->fw_blc_0);
797 printk(" FW_BLC_1 0x%08x\n", hw->fw_blc_1); 802 printk(" FW_BLC_1 0x%08x\n", hw->fw_blc_1);
798 803
804 printk(" HWSTAM 0x%04x\n", hw->hwstam);
805 printk(" IER 0x%04x\n", hw->ier);
806 printk(" IIR 0x%04x\n", hw->iir);
807 printk(" IMR 0x%04x\n", hw->imr);
799 printk("hw state dump end\n"); 808 printk("hw state dump end\n");
800#endif 809#endif
801} 810}
diff --git a/drivers/video/intelfb/intelfbhw.h b/drivers/video/intelfb/intelfbhw.h
index 258235149913..8d2e36972fc8 100644
--- a/drivers/video/intelfb/intelfbhw.h
+++ b/drivers/video/intelfb/intelfbhw.h
@@ -88,6 +88,19 @@
88#define INSTDONE 0x2090 88#define INSTDONE 0x2090
89#define PRI_RING_EMPTY 1 89#define PRI_RING_EMPTY 1
90 90
91#define HWSTAM 0x2098
92#define IER 0x20A0
93#define IIR 0x20A4
94#define IMR 0x20A8
95#define VSYNC_PIPE_A_INTERRUPT (1 << 7)
96#define PIPE_A_EVENT_INTERRUPT (1 << 4)
97#define VSYNC_PIPE_B_INTERRUPT (1 << 5)
98#define PIPE_B_EVENT_INTERRUPT (1 << 4)
99#define HOST_PORT_EVENT_INTERRUPT (1 << 3)
100#define CAPTURE_EVENT_INTERRUPT (1 << 2)
101#define USER_DEFINED_INTERRUPT (1 << 1)
102#define BREAKPOINT_INTERRUPT 1
103
91#define INSTPM 0x20c0 104#define INSTPM 0x20c0
92#define SYNC_FLUSH_ENABLE (1 << 5) 105#define SYNC_FLUSH_ENABLE (1 << 5)
93 106