aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/intelfb/intelfbdrv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-03-22 21:06:32 -0500
committerDave Airlie <airlied@linux.ie>2006-04-02 21:43:28 -0400
commit8bb91f6a2d1db8031bfbb367df075f041d0cdfe2 (patch)
tree558db93f69096ede171d0b4e6c6c0330d8362e92 /drivers/video/intelfb/intelfbdrv.c
parent7679f4d69296de97a7f62458cc4d1c6c884dfcfb (diff)
intelfb: add hw cursor support for i9xx
This adds hw cursor support for the i9xx chipsets. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/video/intelfb/intelfbdrv.c')
-rw-r--r--drivers/video/intelfb/intelfbdrv.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index ce45a684bbea..b96001b5d947 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -6,6 +6,7 @@
6 * 6 *
7 * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org> 7 * Copyright © 2002, 2003 David Dawes <dawes@xfree86.org>
8 * 2004 Sylvain Meyer 8 * 2004 Sylvain Meyer
9 * 2006 David Airlie
9 * 10 *
10 * This driver consists of two parts. The first part (intelfbdrv.c) provides 11 * This driver consists of two parts. The first part (intelfbdrv.c) provides
11 * the basic fbdev interfaces, is derived in part from the radeonfb and 12 * the basic fbdev interfaces, is derived in part from the radeonfb and
@@ -551,8 +552,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
551 (ent->device == PCI_DEVICE_ID_INTEL_945G)) { 552 (ent->device == PCI_DEVICE_ID_INTEL_945G)) {
552 aperture_bar = 2; 553 aperture_bar = 2;
553 mmio_bar = 0; 554 mmio_bar = 0;
554 /* Disable HW cursor on 9x5G/M (not implemented yet) */
555 hwcursor = 0;
556 } 555 }
557 dinfo->aperture.physical = pci_resource_start(pdev, aperture_bar); 556 dinfo->aperture.physical = pci_resource_start(pdev, aperture_bar);
558 dinfo->aperture.size = pci_resource_len(pdev, aperture_bar); 557 dinfo->aperture.size = pci_resource_len(pdev, aperture_bar);
@@ -1468,7 +1467,7 @@ static int
1468intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor) 1467intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1469{ 1468{
1470 struct intelfb_info *dinfo = GET_DINFO(info); 1469 struct intelfb_info *dinfo = GET_DINFO(info);
1471 1470 int ret;
1472#if VERBOSE > 0 1471#if VERBOSE > 0
1473 DBG_MSG("intelfb_cursor\n"); 1472 DBG_MSG("intelfb_cursor\n");
1474#endif 1473#endif
@@ -1479,7 +1478,12 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
1479 intelfbhw_cursor_hide(dinfo); 1478 intelfbhw_cursor_hide(dinfo);
1480 1479
1481 /* If XFree killed the cursor - restore it */ 1480 /* If XFree killed the cursor - restore it */
1482 if (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12) { 1481 if (dinfo->mobile || IS_I9xx(dinfo))
1482 ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.physical);
1483 else
1484 ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12);
1485
1486 if (ret) {
1483 u32 fg, bg; 1487 u32 fg, bg;
1484 1488
1485 DBG_MSG("the cursor was killed - restore it !!\n"); 1489 DBG_MSG("the cursor was killed - restore it !!\n");