aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-24 14:48:35 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-24 14:48:35 -0700
commitb464f5794619bbe98a92e1bc4180986e39615ac4 (patch)
tree50f6df06a582b1c6b563af7ffd736a365a7941dd /drivers
parentb9d8be7828e974f076717f0da608d052440fe192 (diff)
parent0fe6e2d2928e089d16ec5ed7ba634c1d60916020 (diff)
Merge branch 'intelfb-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/intelfb-2.6
* 'intelfb-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/intelfb-2.6: intelfb delousing
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/intelfb/intelfb.h2
-rw-r--r--drivers/video/intelfb/intelfbdrv.c18
-rw-r--r--drivers/video/intelfb/intelfbhw.c24
3 files changed, 20 insertions, 24 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index 469b06c2918..e290d7460e1 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -237,7 +237,7 @@ struct intelfb_info {
u32 fb_start;
/* ring buffer */
- u8 __iomem *ring_head;
+ u32 ring_head;
u32 ring_tail;
u32 ring_tail_mask;
u32 ring_space;
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 076fa56be19..0a0a8b199ec 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -707,7 +707,7 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
+ (dinfo->ring.offset << 12);
dinfo->ring.virtual = dinfo->aperture.virtual
+ (dinfo->ring.offset << 12);
- dinfo->ring_head = dinfo->ring.virtual;
+ dinfo->ring_head = 0;
}
if (dinfo->hwcursor) {
agp_memtype = dinfo->mobile ? AGP_PHYSICAL_MEMORY
@@ -766,18 +766,18 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
if (mtrr)
set_mtrr(dinfo);
- DBG_MSG("fb: 0x%x(+ 0x%x)/0x%x (0x%x)\n",
+ DBG_MSG("fb: 0x%x(+ 0x%x)/0x%x (0x%p)\n",
dinfo->fb.physical, dinfo->fb.offset, dinfo->fb.size,
- (u32 __iomem ) dinfo->fb.virtual);
- DBG_MSG("MMIO: 0x%x/0x%x (0x%x)\n",
+ dinfo->fb.virtual);
+ DBG_MSG("MMIO: 0x%x/0x%x (0x%p)\n",
dinfo->mmio_base_phys, INTEL_REG_SIZE,
- (u32 __iomem) dinfo->mmio_base);
- DBG_MSG("ring buffer: 0x%x/0x%x (0x%x)\n",
+ dinfo->mmio_base);
+ DBG_MSG("ring buffer: 0x%x/0x%x (0x%p)\n",
dinfo->ring.physical, dinfo->ring.size,
- (u32 __iomem ) dinfo->ring.virtual);
- DBG_MSG("HW cursor: 0x%x/0x%x (0x%x) (offset 0x%x) (phys 0x%x)\n",
+ dinfo->ring.virtual);
+ DBG_MSG("HW cursor: 0x%x/0x%x (0x%p) (offset 0x%x) (phys 0x%x)\n",
dinfo->cursor.physical, dinfo->cursor.size,
- (u32 __iomem ) dinfo->cursor.virtual, dinfo->cursor.offset,
+ dinfo->cursor.virtual, dinfo->cursor.offset,
dinfo->cursor.physical);
DBG_MSG("options: vram = %d, accel = %d, hwcursor = %d, fixed = %d, "
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index 426b7430b12..7533b3dd08a 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -1423,19 +1423,17 @@ wait_ring(struct intelfb_info *dinfo, int n)
end = jiffies + (HZ * 3);
while (dinfo->ring_space < n) {
- dinfo->ring_head = (u8 __iomem *)(INREG(PRI_RING_HEAD) &
- RING_HEAD_MASK);
- if (dinfo->ring_tail + RING_MIN_FREE <
- (u32 __iomem) dinfo->ring_head)
- dinfo->ring_space = (u32 __iomem) dinfo->ring_head
+ dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK;
+ if (dinfo->ring_tail + RING_MIN_FREE < dinfo->ring_head)
+ dinfo->ring_space = dinfo->ring_head
- (dinfo->ring_tail + RING_MIN_FREE);
else
dinfo->ring_space = (dinfo->ring.size +
- (u32 __iomem) dinfo->ring_head)
+ dinfo->ring_head)
- (dinfo->ring_tail + RING_MIN_FREE);
- if ((u32 __iomem) dinfo->ring_head != last_head) {
+ if (dinfo->ring_head != last_head) {
end = jiffies + (HZ * 3);
- last_head = (u32 __iomem) dinfo->ring_head;
+ last_head = dinfo->ring_head;
}
i++;
if (time_before(end, jiffies)) {
@@ -1495,15 +1493,13 @@ refresh_ring(struct intelfb_info *dinfo)
DBG_MSG("refresh_ring\n");
#endif
- dinfo->ring_head = (u8 __iomem *) (INREG(PRI_RING_HEAD) &
- RING_HEAD_MASK);
+ dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK;
dinfo->ring_tail = INREG(PRI_RING_TAIL) & RING_TAIL_MASK;
- if (dinfo->ring_tail + RING_MIN_FREE < (u32 __iomem)dinfo->ring_head)
- dinfo->ring_space = (u32 __iomem) dinfo->ring_head
+ if (dinfo->ring_tail + RING_MIN_FREE < dinfo->ring_head)
+ dinfo->ring_space = dinfo->ring_head
- (dinfo->ring_tail + RING_MIN_FREE);
else
- dinfo->ring_space = (dinfo->ring.size +
- (u32 __iomem) dinfo->ring_head)
+ dinfo->ring_space = (dinfo->ring.size + dinfo->ring_head)
- (dinfo->ring_tail + RING_MIN_FREE);
}