]> err.no Git - linux-2.6/blobdiff - drivers/video/atafb.c
tridentfb: improved register values on TGUI 9680
[linux-2.6] / drivers / video / atafb.c
index 5d4fbaa53a6cefd6fc69a9676987c77de7f5b732..fa55d356b5354202e8f6f8236c358593074e3077 100644 (file)
@@ -1270,7 +1270,7 @@ again:
 
        gstart = (prescale / 2 + plen * left_margin) / prescale;
        /* gend1 is for hde (gend-gstart multiple of align), shifter's xres */
-       gend1 = gstart + ((xres + align - 1) / align) * align * plen / prescale;
+       gend1 = gstart + roundup(xres, align) * plen / prescale;
        /* gend2 is for hbb, visible xres (rest to gend1 is cut off by hblank) */
        gend2 = gstart + xres * plen / prescale;
        par->HHT = plen * (left_margin + xres + right_margin) /
@@ -3110,7 +3110,7 @@ int __init atafb_init(void)
        printk("atafb_init: start\n");
 
        if (!MACH_IS_ATARI)
-               return -ENXIO;
+               return -ENODEV;
 
        do {
 #ifdef ATAFB_EXT
@@ -3230,6 +3230,9 @@ int __init atafb_init(void)
                return -EINVAL;
        }
 
+       fb_videomode_to_modelist(atafb_modedb, NUM_TOTAL_MODES,
+                                &fb_info.modelist);
+
        atafb_set_disp(&fb_info);
 
        fb_alloc_cmap(&(fb_info.cmap), 1 << fb_info.var.bits_per_pixel, 0);