Bug 2168

Summary: [Matrox/MGA] Graphics corruption on Matrox Mystique (mga1064sg)
Product: xorg Reporter: Ondrej Zary <linux>
Component: Driver/mgaAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: high CC: dberkholz, felash
Version: 6.8.2Keywords: patch
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Matrox Mystique mga1064 graphics corruption patch none

Description Ondrej Zary 2004-12-28 09:44:53 UTC
There are still problems with graphics corruption on my Mystique card which were
introduced in XFree86 4.4 - see http://bugs.xfree86.org/show_bug.cgi?id=1313

My card is rev. 2:
00:14.0 VGA compatible controller: Matrox Graphics, Inc. MGA 1064SG [Mystique]
(rev 02) (prog-if 00 [VGA])
        Subsystem: Matrox Graphics, Inc. MGA-1084SG Mystique
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping+ SERR- FastB2B-
        Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
        Latency: 64
        Interrupt: pin A routed to IRQ 11
        Region 0: Memory at e0000000 (32-bit, non-prefetchable) [size=16K]
        Region 1: Memory at e1000000 (32-bit, prefetchable) [size=8M]
        Region 2: Memory at e2000000 (32-bit, non-prefetchable) [size=8M]
        Expansion ROM at <unassigned> [disabled] [size=64K]


This fixes the problems:
--- xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c~     2004-12-28 18:2
+++ xc/programs/Xserver/hw/xfree86/drivers/mga/mga_storm.c      2004-12-28 18:2
@@ -1077,7 +1077,7 @@
     CHECK_DMA_QUIESCENT(pMga, pScrn);

     /* MGAISBUSY() reportedly causes a freeze for Mystique revision 2 and olde
-    if (!(pMga->Chipset == PCI_CHIP_MGA1064 && (pMga->ChipRev >= 0 && pMga->Ch
+    if (!(pMga->Chipset == PCI_CHIP_MGA1064 && (pMga->ChipRev >= 0 && pMga->Ch
        while(MGAISBUSY());
     /* flush cache before a read (mga-1064g 5.1.6) */
     OUTREG8(MGAREG_CRTC_INDEX, 0);
Comment 1 Ondrej Zary 2004-12-28 09:47:39 UTC
Created attachment 1600 [details] [review]
Matrox Mystique mga1064 graphics corruption patch

Sorry, I've damaged the patch while pasting. Here's the non-damaged patch.
Comment 2 Julien Wajsberg 2005-04-22 08:43:00 UTC
This patch works for me. (with Xorg 6.8.2, built from Ubuntu's source.)

Please commit it in the CVS :)
Comment 3 Ondrej Zary 2005-07-20 19:22:38 UTC
See http://bugs.xfree86.org/show_bug.cgi?id=1313
That seems to be the proper solution.
Comment 4 Ondrej Zary 2006-01-16 07:18:08 UTC
I've upgraded to 6.9 and this bug is still there. And more, I can't use the
driver that I compiled some time ago. So I downgraded back to 6.8.2.
I still don't understand why this bug was not fixed when there _is_ a
_clear_solution_ available.
Comment 5 Tilman Sauerbeck 2006-11-19 12:05:01 UTC
I committed that patch in be88d58968c604624617f40820dc9a50a92661be.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.