The MGA driver in XFree86 4.2.0 corrupts the hardware cursor when using the Matrox G550 card. The corrupted cursor usually appears as a pair of sets of vertical lines taking up a 64x64 area instead of the normal cursor contents. This makes XFree86 unusable for normal use. Fix: Workaround: Add option "hw cursor" "off" to the G550 Device section of the XF86Config file. This disables the hardware cursor. Fix: This has been fixed in XFree86 CVS, as part of the following patch: http://cvsweb.xfree86.org/cvsweb/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c.diff?r1=1.218&r2=1.219 (the specific XFree86 4.2.0 bug number is 98). As this patch covers a number of bugs, the relevant part of the patch to this specific bug is: --- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 2002/02/21 02:46:38 1.218 +++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c 2002/04/04 14:05:43 1.219 @@ -2794,7 +2794,8 @@ MGAModeInit(ScrnInfoPtr pScrn, DisplayMo case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: case PCI_CHIP_MGAG400: - if(pMga->SecondCrtc == FALSE && pMga->HWCursor == TRUE) { + case PCI_CHIP_MGAG550: + if(pMga->SecondCrtc == FALSE && pMga->HWCursor == TRUE) { outMGAdac(MGA1064_CURSOR_BASE_ADR_LOW, pMga->FbCursorOffset >> 10); outMGAdac(MGA1064_CURSOR_BASE_ADR_HI, CAUTION: There are additional complications of adding this patch from a Ports standpoint. The XFree86-4-Server port has an option WITH_MATROX_GXX_DRIVER that contains a patch to the mga_driver.c file that will be rejected if the above patch is applied first. The changes made by the WITH_MATROX_GXX_DRIVER patch are very minor: it adds an AGPSIZE option. I'm not sure how this sort of conditional patch conflict is handled in the ports system. How-To-Repeat: Run XFree86 4.2.0 on a Matrox G550 card with the HW cursor enabled.
Responsible Changed From-To: freebsd-ports->jmz Over to MAINTAINER.
Responsible Changed From-To: jmz->anholt Switch maintainer.
State Changed From-To: open->closed Committed, thanks!
The patch in the ports tree doesn't apply if WITH_MATROX_GXX_DRIVER is enabled, and it needs to be. Notably, the patch needs to target a slightly different location in the source: --- programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c.orig Wed Jan 23 08:47:32 2002 +++ programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c Mon Oct 7 10:55:45 2002 @@ -2823,6 +2823,7 @@ case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: case PCI_CHIP_MGAG400: + case PCI_CHIP_MGAG550: if(pMga->SecondCrtc == FALSE && pMga->HWCursor == TRUE) { outMGAdac(MGA1064_CURSOR_BASE_ADR_LOW, pMga->FbCursorOffset >> 10); Also, on a related issue, there's a mga_driver.c.rej file created when using the WITH_MATROX_GXX_DRIVER option, with a couple of rejected patches: *************** *** 211,216 **** OPTION_CRTC2RAM, OPTION_INT10, OPTION_AGP_MODE, OPTION_DIGITAL, OPTION_TV, OPTION_TVSTANDARD, --- 211,217 ---- OPTION_CRTC2RAM, OPTION_INT10, OPTION_AGP_MODE, + OPTION_AGP_SIZE, OPTION_DIGITAL, OPTION_TV, OPTION_TVSTANDARD, *************** *** 242,247 **** { OPTION_CRTC2RAM, "Crtc2Ram", OPTV_INTEGER, {0}, FALSE }, { OPTION_INT10, "Int10", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE }, { OPTION_DIGITAL, "DigitalScreen",OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TV, "TV", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TVSTANDARD, "TVStandard", OPTV_ANYSTR, {0}, FALSE }, --- 243,249 ---- { OPTION_CRTC2RAM, "Crtc2Ram", OPTV_INTEGER, {0}, FALSE }, { OPTION_INT10, "Int10", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE }, + { OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE }, { OPTION_DIGITAL, "DigitalScreen",OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TV, "TV", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TVSTANDARD, "TVStandard", OPTV_ANYSTR, {0}, FALSE }, This patch fails because OPTION_DIGITAL has split into OPTION_DIGITAL1 and OPTION_DIGITAL2. An updated patch including both the mouse cursor fix and a fix for the above failed patch follows. --- programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c.orig Wed Jan 23 08:47:32 2002 +++ programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c Mon Oct 7 11:00:22 2002 @@ -218,6 +218,7 @@ OPTION_CRTC2RAM, OPTION_INT10, OPTION_AGP_MODE, + OPTION_AGP_SIZE, OPTION_DIGITAL1, OPTION_DIGITAL2, OPTION_TV, @@ -256,6 +257,7 @@ { OPTION_CRTC2RAM, "Crtc2Ram", OPTV_INTEGER, {0}, FALSE }, { OPTION_INT10, "Int10", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE }, + { OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE }, { OPTION_DIGITAL1, "DigitalScreen1",OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DIGITAL2, "DigitalScreen2",OPTV_BOOLEAN, {0}, FALSE }, { OPTION_TV, "TV", OPTV_BOOLEAN, {0}, FALSE }, @@ -2823,6 +2825,7 @@ case PCI_CHIP_MGAG200: case PCI_CHIP_MGAG200_PCI: case PCI_CHIP_MGAG400: + case PCI_CHIP_MGAG550: if(pMga->SecondCrtc == FALSE && pMga->HWCursor == TRUE) { outMGAdac(MGA1064_CURSOR_BASE_ADR_LOW, pMga->FbCursorOffset >> 10); It looks like the proper way to include this in the ports build would be a .else in the .if ${HaveMatroxHal} == NO line that enables the above patch. -- Peter Johnson