Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27468
b: refs/heads/master
c: 8bb91f6
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Apr 3, 2006
1 parent 01044b5 commit dda7db0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 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: 7679f4d69296de97a7f62458cc4d1c6c884dfcfb
refs/heads/master: 8bb91f6a2d1db8031bfbb367df075f041d0cdfe2
2 changes: 2 additions & 0 deletions trunk/drivers/video/intelfb/intelfb.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ struct intelfb_info {
int pll_index;
};

#define IS_I9xx(dinfo) (((dinfo)->chipset == INTEL_915G)||(dinfo->chipset == INTEL_915GM)||((dinfo)->chipset == INTEL_945G))

/*** function prototypes ***/

extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/video/intelfb/intelfbdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*
* Copyright © 2002, 2003 David Dawes <dawes@xfree86.org>
* 2004 Sylvain Meyer
* 2006 David Airlie
*
* This driver consists of two parts. The first part (intelfbdrv.c) provides
* the basic fbdev interfaces, is derived in part from the radeonfb and
Expand Down Expand Up @@ -551,8 +552,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
(ent->device == PCI_DEVICE_ID_INTEL_945G)) {
aperture_bar = 2;
mmio_bar = 0;
/* Disable HW cursor on 9x5G/M (not implemented yet) */
hwcursor = 0;
}
dinfo->aperture.physical = pci_resource_start(pdev, aperture_bar);
dinfo->aperture.size = pci_resource_len(pdev, aperture_bar);
Expand Down Expand Up @@ -1468,7 +1467,7 @@ static int
intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
struct intelfb_info *dinfo = GET_DINFO(info);

int ret;
#if VERBOSE > 0
DBG_MSG("intelfb_cursor\n");
#endif
Expand All @@ -1479,7 +1478,12 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
intelfbhw_cursor_hide(dinfo);

/* If XFree killed the cursor - restore it */
if (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12) {
if (dinfo->mobile || IS_I9xx(dinfo))
ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.physical);
else
ret = (INREG(CURSOR_A_BASEADDR) != dinfo->cursor.offset << 12);

if (ret) {
u32 fg, bg;

DBG_MSG("the cursor was killed - restore it !!\n");
Expand Down
10 changes: 7 additions & 3 deletions trunk/drivers/video/intelfb/intelfbhw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ intelfbhw_cursor_init(struct intelfb_info *dinfo)
DBG_MSG("intelfbhw_cursor_init\n");
#endif

if (dinfo->mobile) {
if (dinfo->mobile || IS_I9xx(dinfo)) {
if (!dinfo->cursor.physical)
return;
tmp = INREG(CURSOR_A_CONTROL);
Expand Down Expand Up @@ -1775,7 +1775,7 @@ intelfbhw_cursor_hide(struct intelfb_info *dinfo)
#endif

dinfo->cursor_on = 0;
if (dinfo->mobile) {
if (dinfo->mobile || IS_I9xx(dinfo)) {
if (!dinfo->cursor.physical)
return;
tmp = INREG(CURSOR_A_CONTROL);
Expand Down Expand Up @@ -1805,7 +1805,7 @@ intelfbhw_cursor_show(struct intelfb_info *dinfo)
if (dinfo->cursor_blanked)
return;

if (dinfo->mobile) {
if (dinfo->mobile || IS_I9xx(dinfo)) {
if (!dinfo->cursor.physical)
return;
tmp = INREG(CURSOR_A_CONTROL);
Expand Down Expand Up @@ -1839,6 +1839,10 @@ intelfbhw_cursor_setpos(struct intelfb_info *dinfo, int x, int y)
tmp = ((x & CURSOR_POS_MASK) << CURSOR_X_SHIFT) |
((y & CURSOR_POS_MASK) << CURSOR_Y_SHIFT);
OUTREG(CURSOR_A_POSITION, tmp);

if (IS_I9xx(dinfo)) {
OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical);
}
}

void
Expand Down

0 comments on commit dda7db0

Please sign in to comment.