$XFree86: xc/programs/Xserver/hw/xfree86/drivers/mga/README,v 1.6 1999/11/19 13:54:39 hohndel Exp $

MGA Millennium (MGA2064W) with TVP3026 RAMDAC Driver v1.3
=========================================================
MGA Mystique (MGA1064W) with integrated RAMDAC Driver v1.3
=========================================================
MGA Millennium II (MGA2164W) with TVP3026 RAMDAC Driver v1.3 

NOTE: This driver is fairly new, and not everything works like you expect
it to. It shouldn't crash your machine, and there are problems with 24 bpp,
but it should work pretty well. Please report any and all problems to
XFree86@Xfree86.org using the appropriate bug report sheet. 

Features:
---------

* Supports the Matrox Millennium, Mystique and Millennium II adapters
* Can only use a linear frame buffer
* It should be possible to reach resolutions up to 1920x1024 or 1600x1200
* It should be possible to use pixel depths of:
   -  8 bits per pixel (256 pseudo colour)
   - 16 bits per pixel (high colour)
   - 24 bits per pixel (packed true colour) **
   - 32 bits per pixel (true colour)

There are some 24 bpp mode problems - tiling doesn't work properly, so for some 
programs, notably Netscape, gimp, xsetroot, etc, you may see corrupted images.

Planned Features
----------------

In order from highest to lowest priority:

* More accurate rendering at all speeds
* More reliability, especially in autodetection
* 3D acceleration

Technical Notes:
----------------

Hardware Supported:
-------------------

Matrox Millennium I 	rev 1 and 2 
- with TVP3026 RAMDAC at 175, 220, 250 MHz 
Matrox Millennium II 	rev 1
- with TVP3026 RAMDAC at 220 MHz
Matrox Mystique		rev 1 
- with internal RAMDAC at 135 (rare), 170, and 220 MHz

The driver autodetects the amount of video memory availble (for both SGRAM
and WRAM models), so it is unnecessary to specify the VideoMem option. 

Support for other Matrox cards is planned, pending the receipt of documentation
from Matrox.

Configuration:
--------------

The driver auto-detects all device info included memory size, so use the following device
section in your XF86Config file:

- for Millenium board:
----------------------
	Section "Device"
		Identifier	"Matrox Millennium"
		VendorName	"Matrox"
		BoardName	"Millennium"
	EndSection

- for Mystique board:
- - - - - - - - - - -
	Section "Device"
    		Identifier  "Mystique"
    		VendorName  "Matrox"
    		BoardName   "mga1064sg"
	EndSection

or let xf86config or XF86Setup do this for you.

But if you have problems with auto-detection, you can specify:

    VideoRam  - in kilobytes
    DacSpeed  - in MHz
    MemBase   - physical address of the linear framebuffer 
    IoBase    - physical address of the memory mapped IO registers
    BiosBase  - physical address of BIOS


Driver Options:
---------------

"noaccel"	- turns off Drawing Engine (mandatory for Mystique)
"sw_cursor"     - turns hardware cursor off
"xaa_benchmark" - do some benchmarks during startup

- for Mystique board:
- - - - - - - - - - -
Interleaved features are not available
 
Memory Clock Hack
-----------------

- for Millenium and Millennium II adapter:
- - - - - - - - - - - 

It seems some Millenniums have a BIOS that defines the memory clock
for 2 MB and 4 MB cards to be 50 MHz, while others define it to be
60 MHz. Using the faster clock speeds up drawing operations a good
amount, so a hack has been put in place to set MCLK from XF86Config.

In the file mga_dac3026.c, simply change the following line:
   #define MCLK_FROM_XCONFIG 0
to this:
   #define MCLK_FROM_XCONFIG 1

and specify in XF86Config:

    Set_Mclk  - in MHz

USE THIS HACK ENTIRELY AT YOUR OWN RISK!!!!!!!!!!!!

Using memory clocks from 40 to 50 MHz should be completely safe. Setting
the memory clock higher than 50 MHz, up to 65 MHz has been tested, and
seems to work. DO NOT EXCEED 65 MHz, or the video memory contents will
become corrupted and you may damage the card!

The Millennium II is automatically set to 60 MHz, so this hack is of limited
use. It also has the ability to tune itself for 4, 8, 12 and 16 MB of WRAM
installed. We recommend against using this option on the Millennium II at
this time. 

- for Mystique board:
- - - - - - - - - - -
MCLK_FROM_XCONFIG flag has no effect.

Main author:
------------

Radoslaw Kapitan, Tarnow, Poland
kapitan@student.uci.agh.edu.pl

Code, Additions and Testing:
----------------------------

Andrew E. Mileski, Ottawa, Canada
aem@ott.hookup.net

Andrew van der Stock, Melbourne, Australia
Andrew.van.der.Stock@member.sage-au.org.au

Angsar Hockmann
Ansgar.Hockmann@hrz.uni-dortmund.de

A Joseph Koshy, Tester
koshy@india.hp.com

Leonard N. Zubkoff
lnz@dandelion.com

Mark Vojkovich
mvojkovi@sdcc10.ucsd.edu

Michael Will
zxmgv07@student.uni-tuebingen.de

Guy DESBIEF
g.desbief@aix.pacwan.net

XAA
---

Harm Hanemaayer
mailto:H.Hanemaayer@inter.nl.net

Various hacks, features and patcher
-----------------------------------

Dirk Hohndel
hohndel@XFree86.Org

 
