From: Petr Vandrovec <vandrove@vc.cvut.cz>

This small change does:

(1) Properly document 'outputs' option.

(2) Properly use accelerated characters drawing.  fbcon used depth == 0
    for character painting long ago, but it is fixed for several months.

(3) Provide correct hints for fbcon about matroxfb/matroxfb_crtc2
    hardware capabilities.

Signed-off-by: Petr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/Documentation/fb/matroxfb.txt         |    7 +++++++
 25-akpm/drivers/video/matrox/matroxfb_accel.c |    2 +-
 25-akpm/drivers/video/matrox/matroxfb_base.c  |    6 ++++++
 25-akpm/drivers/video/matrox/matroxfb_crtc2.c |    2 ++
 4 files changed, 16 insertions(+), 1 deletion(-)

diff -puN Documentation/fb/matroxfb.txt~assorted-matroxfb-fixes Documentation/fb/matroxfb.txt
--- 25/Documentation/fb/matroxfb.txt~assorted-matroxfb-fixes	2004-09-26 13:11:55.492204808 -0700
+++ 25-akpm/Documentation/fb/matroxfb.txt	2004-09-26 13:11:55.501203440 -0700
@@ -223,6 +223,13 @@ dfp:X    - use settings X for digital fl
 	   selects who is source of display clocks, whether G400, or panel.
 	   Default value is now read back from hardware - so you should specify
 	   this value only if you are also using `init' parameter.
+outputs:XYZ - set mapping between CRTC and outputs. Each letter can have value
+           of 0 (for no CRTC), 1 (CRTC1) or 2 (CRTC2), and first letter corresponds
+	   to primary analog output, second letter to the secondary analog output
+	   and third letter to the DVI output. Default setting is 100 for
+	   cards below G400 or G400 without DFP, 101 for G400 with DFP, and
+	   111 for G450 and G550. You can set mapping only on first card,
+	   use matroxset for setting up other devices.
 vesa:X   - selects startup videomode. X is number from 0 to 0x1FF, see table
            above for detailed explanation. Default is 640x480x8bpp if driver
 	   has 8bpp support. Otherwise first available of 640x350x4bpp,
diff -puN drivers/video/matrox/matroxfb_accel.c~assorted-matroxfb-fixes drivers/video/matrox/matroxfb_accel.c
--- 25/drivers/video/matrox/matroxfb_accel.c~assorted-matroxfb-fixes	2004-09-26 13:11:55.493204656 -0700
+++ 25-akpm/drivers/video/matrox/matroxfb_accel.c	2004-09-26 13:11:55.502203288 -0700
@@ -470,7 +470,7 @@ static void matroxfb_imageblit(struct fb
 
 	DBG_HEAVY(__FUNCTION__);
 
-	if (image->depth == 0) {
+	if (image->depth == 1) {
 		u_int32_t fgx, bgx;
 
 		fgx = ((u_int32_t*)info->pseudo_palette)[image->fg_color];
diff -puN drivers/video/matrox/matroxfb_base.c~assorted-matroxfb-fixes drivers/video/matrox/matroxfb_base.c
--- 25/drivers/video/matrox/matroxfb_base.c~assorted-matroxfb-fixes	2004-09-26 13:11:55.496204200 -0700
+++ 25-akpm/drivers/video/matrox/matroxfb_base.c	2004-09-26 13:11:55.504202984 -0700
@@ -1750,6 +1750,12 @@ static int initMatrox2(WPMINFO struct bo
 	ACCESS_FBINFO(fbcon.pseudo_palette) = ACCESS_FBINFO(cmap);
 	/* after __init time we are like module... no logo */
 	ACCESS_FBINFO(fbcon.flags) = hotplug ? FBINFO_FLAG_MODULE : FBINFO_FLAG_DEFAULT;
+	ACCESS_FBINFO(fbcon.flags) |= FBINFO_PARTIAL_PAN_OK | 	 /* Prefer panning for scroll under MC viewer/edit */
+				      FBINFO_HWACCEL_COPYAREA |  /* We have hw-assisted bmove */
+				      FBINFO_HWACCEL_FILLRECT |  /* And fillrect */
+				      FBINFO_HWACCEL_IMAGEBLIT | /* And imageblit */
+				      FBINFO_HWACCEL_XPAN |      /* And we support both horizontal */
+				      FBINFO_HWACCEL_YPAN;       /* And vertical panning */
 	ACCESS_FBINFO(video.len_usable) &= PAGE_MASK;
 	fb_alloc_cmap(&ACCESS_FBINFO(fbcon.cmap), 256, 1);
 
diff -puN drivers/video/matrox/matroxfb_crtc2.c~assorted-matroxfb-fixes drivers/video/matrox/matroxfb_crtc2.c
--- 25/drivers/video/matrox/matroxfb_crtc2.c~assorted-matroxfb-fixes	2004-09-26 13:11:55.497204048 -0700
+++ 25-akpm/drivers/video/matrox/matroxfb_crtc2.c	2004-09-26 13:11:55.505202832 -0700
@@ -603,6 +603,8 @@ static int matroxfb_dh_regit(CPMINFO str
 
 	m2info->fbcon.fbops = &matroxfb_dh_ops;
 	m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
+	m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN |
+			       FBINFO_HWACCEL_YPAN;
 	m2info->fbcon.currcon = -1;
 	m2info->fbcon.pseudo_palette = m2info->cmap;
 	fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
_