Clocking G400 correctly in XFree86 3.3.[56]
What is this about?
The Matrox G400 BIOS initialises the card with a clock speed of 166MHz for the memory clock and 88MHz for the drawing/setup engine clocks. XFree 3.3.5 leaves these because they are similar to the values given by Matrox in the documentation. However in Matrox's Windows driver the clocks are set up faster than this! I have modified the X source to set the drawing/setup engine clocks at 126MHz as Windows does. There is also a patch for the G400MAX, because this should be clocked at 200MHz and 150MHz. With the GLX 3D driver this can give a few extra of those all important frames/s when playing Q3:)
Patches and Binaries
If posting a binary without the source breaks the license agreement then I will remove it. I do not have space to mirror the whole source here.
To install binary
- bunzip2 XF86_SVGA.bz2
- cp XF86_SVGA /usr/X11R6/bin (of course keeping a copy of the old one, just in case!)
To patch X yourself - the hard way!
The file to patch is xc/programs/Xserver/hw/xfree86/vga256/drivers/mga/mga_dacG200.c, just use patch -p0 to patch it.
example:
- gunzip ($APATH)/G400*patch.gz
- cd ($XSOURCE)/xc/programs/Xserver/hw/xfree86/vga256/drivers/mga/
- cat ($APATH)/G400*patch |patch -p0 mga_dacG200.c
- recompile and reinstall X (only XF86_SVGA needed)
Updates
- XFree 3.3.6 has recently been released, but unfortunately the clocks are still not set. Fortunately the current patch works fine, because there are no real changes to the driver.
- I have been looking into the BIOS (for card initialisation on the BeOS) and there will be a version that autodetects G400/MAX correctly soon. Exams ATM though so it will be a week or two.
- Exams have finished - yeah! I am busy with the BeOS driver ATM though.
- A year has passed - doesn't time fly! Anyway one of the BeOS driver users (Hi Chris!) just got himself a G450 and wanted it to work on XF86 3.3.6. So here is a quick patch for him. If you want to use it then feel free -> almost totally untested -> I ran an xterm on it! A binary of it can be found here. Enjoy...