diff options
author | Eric Hustvedt <ehustvedt@cecropia.com> | 2006-06-20 14:36:42 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-07-03 04:59:47 -0400 |
commit | f80d0d23f2010b7682e06449345e8199a2b2619c (patch) | |
tree | 4562504d7d10a87a9da62bdb0098850fd1fb13c9 /drivers/video/intelfb/intelfbhw.c | |
parent | 37bced38b3d09c3de7c871790eddde81a3ce57cb (diff) |
intelfb: add vsync interrupt support
[05/05] intelfb: Honor FB_ACTIVATE_VBL for display panning
Extends the intelfb_vsync struct to store panning offset. The interrupt service routine uses the stored panning offset if a pan is requested for the vsync. intelfbhw_disable_irq also pans the display if there is a pending request.
Signed-off-by: Eric Hustvedt <ehustvedt@cecropia.com>
Diffstat (limited to 'drivers/video/intelfb/intelfbhw.c')
-rw-r--r-- | drivers/video/intelfb/intelfbhw.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 0f9631c2ad33..8038f558611d 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -371,7 +371,13 @@ intelfbhw_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) | |||
371 | 371 | ||
372 | offset += dinfo->fb.offset << 12; | 372 | offset += dinfo->fb.offset << 12; |
373 | 373 | ||
374 | OUTREG(DSPABASE, offset); | 374 | dinfo->vsync.pan_offset = offset; |
375 | if ((var->activate & FB_ACTIVATE_VBL) && !intelfbhw_enable_irq(dinfo, 0)) { | ||
376 | dinfo->vsync.pan_display = 1; | ||
377 | } else { | ||
378 | dinfo->vsync.pan_display = 0; | ||
379 | OUTREG(DSPABASE, offset); | ||
380 | } | ||
375 | 381 | ||
376 | return 0; | 382 | return 0; |
377 | } | 383 | } |
@@ -1965,6 +1971,10 @@ intelfbhw_irq(int irq, void *dev_id, struct pt_regs *fp) { | |||
1965 | 1971 | ||
1966 | if (tmp & VSYNC_PIPE_A_INTERRUPT) { | 1972 | if (tmp & VSYNC_PIPE_A_INTERRUPT) { |
1967 | dinfo->vsync.count++; | 1973 | dinfo->vsync.count++; |
1974 | if (dinfo->vsync.pan_display) { | ||
1975 | dinfo->vsync.pan_display = 0; | ||
1976 | OUTREG(DSPABASE, dinfo->vsync.pan_offset); | ||
1977 | } | ||
1968 | wake_up_interruptible(&dinfo->vsync.wait); | 1978 | wake_up_interruptible(&dinfo->vsync.wait); |
1969 | handled = 1; | 1979 | handled = 1; |
1970 | } | 1980 | } |
@@ -2007,6 +2017,10 @@ intelfbhw_disable_irq(struct intelfb_info *dinfo) { | |||
2007 | u16 tmp; | 2017 | u16 tmp; |
2008 | 2018 | ||
2009 | if (test_and_clear_bit(0, &dinfo->irq_flags)) { | 2019 | if (test_and_clear_bit(0, &dinfo->irq_flags)) { |
2020 | if (dinfo->vsync.pan_display) { | ||
2021 | dinfo->vsync.pan_display = 0; | ||
2022 | OUTREG(DSPABASE, dinfo->vsync.pan_offset); | ||
2023 | } | ||
2010 | spin_lock_irq(&dinfo->int_lock); | 2024 | spin_lock_irq(&dinfo->int_lock); |
2011 | OUTREG16(HWSTAM, 0xffff); | 2025 | OUTREG16(HWSTAM, 0xffff); |
2012 | OUTREG16(IMR, 0xffff); | 2026 | OUTREG16(IMR, 0xffff); |