Skip to contentSkip to conversation

Matrox G450 problems with 2.4.0 and xfree

DISCUSSION Petr Vandrovec 4 participants 4 messages Feb 6, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · Mike A. Harris
Quoted 2 lines · Petr Vandrovec
Quoted 2 lines

I don't have Windows installed on my machine, but I find that if I
cold boot to 2.2 (RH7) first and start up X (4.0.2 with Matrox driver

                                                             ^^^^^^^^^^^^^
Quoted 1 line
Quoted 1 line
Quoted 1 line

1.00.04 compiled in), I am then able to "shutdown -r now" and warm

     ^^^^^^^^^^^^^^^^^^^
Quoted 6 lines
Quoted 2 lines

Yes, they use same secret code... At least I think...

Are you refering to Windows or Red Hat Linux? I can assure you that Red Hat Linux's XFree package doesn't have any secret code in it with 110% certainty. Nor will it have in the future.

He is using XF4.0.2 with Matrox large-blob driver, not with XFree one. I'm 111% sure that this module contains code which is not freely available to mortals.

XFree4.0.2 mga driver does not work with G450 at all. I'm not sure whether you (or RedHat) applied G450 patches flying around. But it is still first head only, no digital LCD...
Best regards,
Petr Vandrovec [email protected]

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw
Quoted 8 lines · Petr Vandrovec
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

I don't have Windows installed on my machine, but I find that if I
cold boot to 2.2 (RH7) first and start up X (4.0.2 with Matrox driver

                                                            ^^^^^^^^^^^^^
Quoted 1 line
Quoted 1 line
Quoted 1 line

1.00.04 compiled in), I am then able to "shutdown -r now" and warm

    ^^^^^^^^^^^^^^^^^^^
Quoted 3 lines
Quoted 2 lines

Yes, they use same secret code... At least I think...

Quoted 7 lines
Quoted 3 lines

Are you refering to Windows or Red Hat Linux? I can assure you that Red Hat Linux's XFree package doesn't have any secret code in it with 110% certainty. Nor will it have in the future.

He is using XF4.0.2 with Matrox large-blob driver, not with XFree one. I'm 111% sure that this module contains code which is not freely available to mortals.

Well then it is NOT the one shipping with Red Hat Linux.

Quoted 3 lines

XFree4.0.2 mga driver does not work with G450 at all. I'm not sure whether you (or RedHat) applied G450 patches flying around. But it is still first head only, no digital LCD...

I have applied various g450 patches to 4.0.2 from both matrox and elsewhere, and nobody seems to get it to work correctly. The Matrox patches were not completely clean, so I might just pull them if no public patches appear soon. It is not our fault for broken drivers..

If anyone has open source g450 patches against stock 4.0.2 that get the thing to work at all, _please_ send me unified diffs, and I will put them into my next build. I've yet to have my g450 do anything but turn off my monitor, although a handful of people claim they get it working to various degrees... I don't have g450 specs either so..

No binary modules are in the Red Hat XFree86 RPMS though, nor will there be. Only 100% open source. If the open source drivers do not work, then the card will not function period, and will not be supported.

----------------------------------------------------------------------
Mike A. Harris - Linux advocate - Free Software advocate
This message is copyright 2001, all rights reserved.
Views expressed are my own, not necessarily shared by my employer.
----------------------------------------------------------------------
"Facts do not cease to exist because they are ignored."
- Aldous Huxley

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#2 lore raw
Quoted 7 lines · Mike A. Harris

If anyone has open source g450 patches against stock 4.0.2 that get the thing to work at all, _please_ send me unified diffs, and I will put them into my next build. I've yet to have my g450 do anything but turn off my monitor, although a handful of people claim they get it working to various degrees... I don't have g450 specs either so..

In my machine I have SuSE 7.0, XF86 4.0.2, a G450, and Matrox's monster mga driver for XF86 4.0.1. Miraculously, it works in dual head mode. But as has been mentioned before the sources for the HAL library are not available.

Signature · 5 lines
     Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#3 lore raw
In reply to Mike A. Harris
Quoted 6 lines · Mike A. Harris

If anyone has open source g450 patches against stock 4.0.2 that get the thing to work at all, _please_ send me unified diffs, and I will put them into my next build. I've yet to have my g450 do anything but turn off my monitor, although a handful of people claim they get it working to various degrees... I don't have g450 specs either so..

We're getting significantly off-topic for linux-kernel. But the patch below worked for me in my limited testing - starting the X server twice in different modes on a colleague's G450.

It's almost, but not quite, identical to the changes in the RH7.1 beta RPM. It's against (and was tested with) the current CVS, but applies cleanly to 4.0.2 as well. Almost _functionally_ identical, that is - some of their original offended me so much it just had to be cleaned up.

Imakefile +2 -2
diff -uNr mga-preg450/Imakefile mga/Imakefile
@@ -57,10 +57,10 @@
 
 MGASRCS = mga_driver.c mga_hwcurs.c /* mga_cmap.c */ mga_dac3026.c mga_dacG.c \
        mga_storm8.c mga_storm16.c mga_storm24.c mga_storm32.c mga_arc.c \
-       mga_dga.c mga_shadow.c mga_video.c  $(DRISRCS)
+       mga_dga.c mga_shadow.c mga_video.c mga_g450pll.c  $(DRISRCS)
 MGAOBJS = mga_driver.o mga_hwcurs.o /* mga_cmap.o */ mga_dac3026.o mga_dacG.o \
        mga_storm8.o mga_storm16.o mga_storm24.o mga_storm32.o mga_arc.o \
-       mga_dga.o mga_shadow.o mga_video.o  $(DRIOBJS)
+       mga_dga.o mga_shadow.o mga_video.o mga_g450pll.o  $(DRIOBJS)
 
 SRCS = $(MGASRCS) $(MGAHALSRCS)
 OBJS = $(MGAOBJS) $(MGAHALOBJS)
mga.h +1 -0
diff -uNr mga-preg450/mga.h mga/mga.h
@@ -414,4 +414,5 @@
 void MGAInitVideo(ScreenPtr pScreen);
 void MGAResetVideo(ScrnInfoPtr pScrn); 
 
+double G450SetPLLFreq(ScrnInfoPtr pScrn, long f_out);
 #endif
mga_dacG.c +27 -10
diff -uNr mga-preg450/mga_dacG.c mga/mga_dacG.c
@@ -237,6 +237,11 @@
 	/* The actual frequency output by the clock */
 	double f_pll;
 
+	if(MGAISG450(pMga)) {
+		G450SetPLLFreq(pScrn, f_out);
+		return;
+	}
+
 	/* Do the calculations for m, n, p and s */
 	f_pll = MGAGCalcClock( pScrn, f_out, &m, &n, &p, &s );
 
@@ -338,6 +343,9 @@
 #ifdef USEMGAHAL
 	       MGA_HAL(break;);
 #endif
+	       if (MGAISG450(pMga))
+		       break;
+
 	       if(pMga->Dac.maxPixelClock == 360000) {  /* G400 MAX */
 	           if(pMga->OverclockMem) {
 			/* 150/200  */
@@ -528,6 +536,10 @@
 	if (mode->Flags & V_DBLSCAN)
 		pVga->CRTC[9] |= 0x80;
 
+	if(MGAISG450(pMga)) {
+		OUTREG(MGAREG_ZORG, 0);
+	}
+
 	MGAGSetPCLK(pScrn, mode->Clock);
 	);	/* MGA_NOT_HAL */
 
@@ -656,7 +668,10 @@
 	    	(i == 0x1b) ||
 	    	(i == 0x1c) ||
 	       ((i >= 0x1f) && (i <= 0x29)) ||
-	       ((i >= 0x30) && (i <= 0x37)) )
+	       ((i >= 0x30) && (i <= 0x37)) ||
+	        (MGAISG450(pMga) &&
+			 ((i == 0x2c) || (i == 0x2d) || (i == 0x2e) ||
+			  (i == 0x4c) || (i == 0x4d) || (i == 0x4e))))
 	       		continue; 
 	    outMGAdac(i, mgaReg->DacRegs[i]);
 	}
@@ -665,15 +680,17 @@
 	   should be correct already */
 	optionMask = (pMga->Primary) ? OPTION1_MASK_PRIMARY : OPTION1_MASK; 
 
-	/* restore pci_option register */
-	pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, optionMask,
-		       mgaReg->Option);
-	if (pMga->Chipset != PCI_CHIP_MGA1064)
-		pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION2, OPTION2_MASK,
-			       mgaReg->Option2);
-	if (pMga->Chipset == PCI_CHIP_MGAG400)
-		pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION3, OPTION3_MASK,
-			       mgaReg->Option3);
+	if (!MGAISG450(pMga)) {
+		/* restore pci_option register */
+		pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, optionMask,
+			       mgaReg->Option);
+		if (pMga->Chipset != PCI_CHIP_MGA1064)
+			pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION2, OPTION2_MASK,
+				       mgaReg->Option2);
+		if (pMga->Chipset == PCI_CHIP_MGAG400)
+			pciSetBitsLong(pMga->PciTag, PCI_MGA_OPTION3, OPTION3_MASK,
+				       mgaReg->Option3);
+	}
 	);	/* MGA_NOT_HAL */
 
 	/* restore CRTCEXT regs */
mga_g450pll.c +444 -0

444 lines not on this page · raw message

mga_macros.h +2 -0
diff -uNr mga-preg450/mga_macros.h mga/mga_macros.h
@@ -107,4 +107,6 @@
 #define MGA_NOT_HAL(x) { x; }
 #endif
 
+#define MGAISG450(x) ( ((x)->Chipset == PCI_CHIP_MGAG400) && ((x)->ChipRev >= 0x80) )
+
 #endif /* _MGA_MACROS_H_ */
Signature · 7 lines
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/