aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/intelfb/intelfb.h2
-rw-r--r--drivers/video/intelfb/intelfbdrv.c12
-rw-r--r--drivers/video/intelfb/intelfbhw.c10
3 files changed, 17 insertions, 7 deletions
diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h
index fb2739fb746a..de9875c0c08f 100644
--- a/drivers/video/intelfb/intelfb.h
+++ b/drivers/video/intelfb/intelfb.h
@@ -284,6 +284,8 @@ struct intelfb_info {
284 int pll_index; 284 int pll_index;
285}; 285};
286 286
287#define IS_I9xx(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G))
288
287/*** function prototypes ***/ 289/*** function prototypes ***/
288 290
289extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var); 291extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
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");
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index 0bfa668bec21..92bdde8f9b23 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -1742,7 +1742,7 @@ intelfbhw_cursor_init(struct intelfb_info *dinfo)
1742 DBG_MSG("intelfbhw_cursor_init\n"); 1742 DBG_MSG("intelfbhw_cursor_init\n");
1743#endif 1743#endif
1744 1744
1745 if (dinfo->mobile) { 1745 if (dinfo->mobile || IS_I9xx(dinfo)) {
1746 if (!dinfo->cursor.physical) 1746 if (!dinfo->cursor.physical)
1747 return; 1747 return;
1748 tmp = INREG(CURSOR_A_CONTROL); 1748 tmp = INREG(CURSOR_A_CONTROL);
@@ -1775,7 +1775,7 @@ intelfbhw_cursor_hide(struct intelfb_info *dinfo)
1775#endif 1775#endif
1776 1776
1777 dinfo->cursor_on = 0; 1777 dinfo->cursor_on = 0;
1778 if (dinfo->mobile) { 1778 if (dinfo->mobile || IS_I9xx(dinfo)) {
1779 if (!dinfo->cursor.physical) 1779 if (!dinfo->cursor.physical)
1780 return; 1780 return;
1781 tmp = INREG(CURSOR_A_CONTROL); 1781 tmp = INREG(CURSOR_A_CONTROL);
@@ -1805,7 +1805,7 @@ intelfbhw_cursor_show(struct intelfb_info *dinfo)
1805 if (dinfo->cursor_blanked) 1805 if (dinfo->cursor_blanked)
1806 return; 1806 return;
1807 1807
1808 if (dinfo->mobile) { 1808 if (dinfo->mobile || IS_I9xx(dinfo)) {
1809 if (!dinfo->cursor.physical) 1809 if (!dinfo->cursor.physical)
1810 return; 1810 return;
1811 tmp = INREG(CURSOR_A_CONTROL); 1811 tmp = INREG(CURSOR_A_CONTROL);
@@ -1839,6 +1839,10 @@ intelfbhw_cursor_setpos(struct intelfb_info *dinfo, int x, int y)
1839 tmp = ((x & CURSOR_POS_MASK) << CURSOR_X_SHIFT) | 1839 tmp = ((x & CURSOR_POS_MASK) << CURSOR_X_SHIFT) |
1840 ((y & CURSOR_POS_MASK) << CURSOR_Y_SHIFT); 1840 ((y & CURSOR_POS_MASK) << CURSOR_Y_SHIFT);
1841 OUTREG(CURSOR_A_POSITION, tmp); 1841 OUTREG(CURSOR_A_POSITION, tmp);
1842
1843 if (IS_I9xx(dinfo)) {
1844 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical);
1845 }
1842} 1846}
1843 1847
1844void 1848void