diff options
author | Eric Hustvedt <ehustvedt@cecropia.com> | 2006-06-20 14:36:41 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-07-03 04:59:46 -0400 |
commit | 7649757bd900bc900adcd95ab08903cdc28342fa (patch) | |
tree | 4c710d9e458ff3c6731180aca738123886f7adec /drivers/video/intelfb/intelfb.h | |
parent | 9a5f019b1a9ea6a75ba36d7c312ff069006ed479 (diff) |
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>
Diffstat (limited to 'drivers/video/intelfb/intelfb.h')
-rw-r--r-- | drivers/video/intelfb/intelfb.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index cb016fe4d488..dab1f2d764d2 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h | |||
@@ -208,6 +208,11 @@ struct intelfb_heap_data { | |||
208 | u32 size; // in bytes | 208 | u32 size; // in bytes |
209 | }; | 209 | }; |
210 | 210 | ||
211 | struct intelfb_vsync { | ||
212 | wait_queue_head_t wait; | ||
213 | unsigned int count; | ||
214 | }; | ||
215 | |||
211 | struct intelfb_info { | 216 | struct intelfb_info { |
212 | struct fb_info *info; | 217 | struct fb_info *info; |
213 | struct fb_ops *fbops; | 218 | struct fb_ops *fbops; |
@@ -271,6 +276,12 @@ struct intelfb_info { | |||
271 | int fixed_mode; | 276 | int fixed_mode; |
272 | int ring_active; | 277 | int ring_active; |
273 | int flag; | 278 | int flag; |
279 | unsigned long irq_flags; | ||
280 | int open; | ||
281 | |||
282 | /* vsync */ | ||
283 | struct intelfb_vsync vsync; | ||
284 | spinlock_t int_lock; | ||
274 | 285 | ||
275 | /* hw cursor */ | 286 | /* hw cursor */ |
276 | int cursor_on; | 287 | int cursor_on; |