Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37243
b: refs/heads/master
c: f80d0d2
h: refs/heads/master
i:
  37241: e7d5a94
  37239: 5bc37cb
v: v3
  • Loading branch information
Eric Hustvedt authored and Dave Airlie committed Jul 3, 2006
1 parent 607ccc4 commit cf0d16d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37bced38b3d09c3de7c871790eddde81a3ce57cb
refs/heads/master: f80d0d23f2010b7682e06449345e8199a2b2619c
2 changes: 2 additions & 0 deletions trunk/drivers/video/intelfb/intelfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ struct intelfb_heap_data {
struct intelfb_vsync {
wait_queue_head_t wait;
unsigned int count;
int pan_display;
u32 pan_offset;
};

struct intelfb_info {
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/intelfb/intelfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,8 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
init_waitqueue_head(&dinfo->vsync.wait);
spin_lock_init(&dinfo->int_lock);
dinfo->irq_flags = 0;
dinfo->vsync.pan_display = 0;
dinfo->vsync.pan_offset = 0;

return 0;

Expand Down
16 changes: 15 additions & 1 deletion trunk/drivers/video/intelfb/intelfbhw.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,13 @@ intelfbhw_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)

offset += dinfo->fb.offset << 12;

OUTREG(DSPABASE, offset);
dinfo->vsync.pan_offset = offset;
if ((var->activate & FB_ACTIVATE_VBL) && !intelfbhw_enable_irq(dinfo, 0)) {
dinfo->vsync.pan_display = 1;
} else {
dinfo->vsync.pan_display = 0;
OUTREG(DSPABASE, offset);
}

return 0;
}
Expand Down Expand Up @@ -1965,6 +1971,10 @@ intelfbhw_irq(int irq, void *dev_id, struct pt_regs *fp) {

if (tmp & VSYNC_PIPE_A_INTERRUPT) {
dinfo->vsync.count++;
if (dinfo->vsync.pan_display) {
dinfo->vsync.pan_display = 0;
OUTREG(DSPABASE, dinfo->vsync.pan_offset);
}
wake_up_interruptible(&dinfo->vsync.wait);
handled = 1;
}
Expand Down Expand Up @@ -2007,6 +2017,10 @@ intelfbhw_disable_irq(struct intelfb_info *dinfo) {
u16 tmp;

if (test_and_clear_bit(0, &dinfo->irq_flags)) {
if (dinfo->vsync.pan_display) {
dinfo->vsync.pan_display = 0;
OUTREG(DSPABASE, dinfo->vsync.pan_offset);
}
spin_lock_irq(&dinfo->int_lock);
OUTREG16(HWSTAM, 0xffff);
OUTREG16(IMR, 0xffff);
Expand Down

0 comments on commit cf0d16d

Please sign in to comment.