Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / video / matrox / matroxfb_accel.c
index 8f14c9b..a5c825d 100644 (file)
@@ -122,7 +122,7 @@ void matrox_cfbX_init(WPMINFO2) {
        ACCESS_FBINFO(fbops).fb_copyarea = cfb_copyarea;
        ACCESS_FBINFO(fbops).fb_fillrect = cfb_fillrect;
        ACCESS_FBINFO(fbops).fb_imageblit = cfb_imageblit;
-       ACCESS_FBINFO(fbops).fb_cursor = soft_cursor;
+       ACCESS_FBINFO(fbops).fb_cursor = NULL;
 
        accel = (ACCESS_FBINFO(fbcon).var.accel_flags & FB_ACCELF_TEXT) == FB_ACCELF_TEXT;
 
@@ -438,13 +438,21 @@ static void matroxfb_1bpp_imageblit(WPMINFO u_int32_t fgx, u_int32_t bgx,
                } else if (step == 1) {
                        /* Special case for 1..8bit widths */
                        while (height--) {
-                               mga_writel(mmio, 0, *chardata);
+#if defined(__BIG_ENDIAN)
+                               fb_writel((*chardata) << 24, mmio.vaddr);
+#else
+                               fb_writel(*chardata, mmio.vaddr);
+#endif
                                chardata++;
                        }
                } else if (step == 2) {
                        /* Special case for 9..15bit widths */
                        while (height--) {
-                               mga_writel(mmio, 0, *(u_int16_t*)chardata);
+#if defined(__BIG_ENDIAN)
+                               fb_writel((*(u_int16_t*)chardata) << 16, mmio.vaddr);
+#else
+                               fb_writel(*(u_int16_t*)chardata, mmio.vaddr);
+#endif
                                chardata += 2;
                        }
                } else {
@@ -454,7 +462,7 @@ static void matroxfb_1bpp_imageblit(WPMINFO u_int32_t fgx, u_int32_t bgx,
                                
                                for (i = 0; i < step; i += 4) {
                                        /* Hope that there are at least three readable bytes beyond the end of bitmap */
-                                       mga_writel(mmio, 0, get_unaligned((u_int32_t*)(chardata + i)));
+                                       fb_writel(get_unaligned((u_int32_t*)(chardata + i)),mmio.vaddr);
                                }
                                chardata += step;
                        }