vserver 1.9.5.x5
[linux-2.6.git] / drivers / video / matrox / matroxfb_crtc2.c
index 75d1969..429047a 100644 (file)
@@ -21,7 +21,7 @@
 
 static int mem = 8192;
 
-MODULE_PARM(mem, "i");
+module_param(mem, int, 0);
 MODULE_PARM_DESC(mem, "Memory size reserved for dualhead (default=8MB)");
 
 /* **************************************************** */
@@ -387,6 +387,7 @@ static int matroxfb_dh_set_par(struct fb_info* info) {
                up_read(&ACCESS_FBINFO(altout).lock);
                matroxfb_dh_cfbX_init(m2info);
        }
+       m2info->initialized = 1;
        return 0;
 #undef m2info
 }
@@ -603,7 +604,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.currcon = -1;
+       m2info->fbcon.flags |= FBINFO_HWACCEL_XPAN |
+                              FBINFO_HWACCEL_YPAN;
        m2info->fbcon.pseudo_palette = m2info->cmap;
        fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
 
@@ -632,9 +634,8 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) {
        if (register_framebuffer(&m2info->fbcon)) {
                return -ENXIO;
        }
-       if (m2info->fbcon.currcon < 0) {
+       if (!m2info->initialized)
                fb_set_var(&m2info->fbcon, &matroxfb_dh_defined);
-       }
        down_write(&ACCESS_FBINFO(crtc2.lock));
        oldcrtc2 = ACCESS_FBINFO(crtc2.info);
        ACCESS_FBINFO(crtc2.info) = m2info;