]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Assorted matroxfb fixes
authorPetr Vandrovec <vandrove@vc.cvut.cz>
Tue, 19 Oct 2004 01:09:05 +0000 (18:09 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 19 Oct 2004 01:09:05 +0000 (18:09 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Documentation/fb/matroxfb.txt
drivers/video/matrox/matroxfb_accel.c
drivers/video/matrox/matroxfb_base.c
drivers/video/matrox/matroxfb_crtc2.c

index 621e3b3e40df3bb14c6b011735b2040cd6da1442..ad7a67707d622b36d4dad79c76ae27fd0406a607 100644 (file)
@@ -223,6 +223,13 @@ dfp:X    - use settings X for digital flat panel interface. X is number from
           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,
index d4cbaa4afa179cdd9ee4ae6da1e8badaf7c322c9..8f14c9b300c2864f2f1dc4b6f8a9fb9dbdfb172b 100644 (file)
@@ -470,7 +470,7 @@ static void matroxfb_imageblit(struct fb_info* info, const struct fb_image* imag
 
        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];
index 820868cb8efc3888352a1c565af00b01f4e4b638..84eea6057cbc47e62c6c66189983988db0e9681f 100644 (file)
@@ -1750,6 +1750,12 @@ static int initMatrox2(WPMINFO struct board* b){
        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);
 
index 75d19696ffe49e8182d7f3cdd9872a82ee0caedf..c5230bbe1da41675ac32ba32b8f4fae442d08170 100644 (file)
@@ -603,6 +603,8 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) {
 
        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);