]> err.no Git - linux-2.6/blobdiff - drivers/video/nvidia/nvidia.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
[linux-2.6] / drivers / video / nvidia / nvidia.c
index 30f80c23f934bb0a76719232f492153fc7cca00a..3620de0f252e6100c3da6a895de1cf7f3297dc14 100644 (file)
@@ -658,7 +658,7 @@ static int nvidia_calc_regs(struct fb_info *info)
 {
        struct nvidia_par *par = info->par;
        struct _riva_hw_state *state = &par->ModeReg;
-       int i, depth = fb_get_color_depth(&info->var);
+       int i, depth = fb_get_color_depth(&info->var, &info->fix);
        int h_display = info->var.xres / 8 - 1;
        int h_start = (info->var.xres + info->var.right_margin) / 8 - 1;
        int h_end = (info->var.xres + info->var.right_margin +
@@ -893,7 +893,7 @@ static int nvidiafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
        int i, set = cursor->set;
        u16 fg, bg;
 
-       if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
+       if (!hwcur || cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS)
                return -ENXIO;
 
        NVShowHideCursor(par, 0);
@@ -978,6 +978,9 @@ static int nvidiafb_set_par(struct fb_info *info)
            !par->twoHeads)
                par->FPDither = 0;
 
+       info->fix.visual = (info->var.bits_per_pixel == 8) ?
+           FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
+
        nvidia_init_vga(info);
        nvidia_calc_regs(info);
        nvidia_write_regs(par);
@@ -992,9 +995,6 @@ static int nvidiafb_set_par(struct fb_info *info)
        NVWriteCrtc(par, 0x11, 0x00);
        info->fix.line_length = (info->var.xres_virtual *
                                 info->var.bits_per_pixel) >> 3;
-       info->fix.visual = (info->var.bits_per_pixel == 8) ?
-           FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
-
        if (info->var.accel_flags) {
                info->fbops->fb_imageblit = nvidiafb_imageblit;
                info->fbops->fb_fillrect = nvidiafb_fillrect;
@@ -1328,7 +1328,7 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info)
                char buf[16];
 
                memset(buf, 0, 16);
-               snprintf(buf, 15, "%dx%d", par->fpWidth, par->fpHeight);
+               snprintf(buf, 15, "%dx%dMR", par->fpWidth, par->fpHeight);
                fb_find_mode(&nvidiafb_default_var, info, buf, specs->modedb,
                             specs->modedb_len, &modedb, 8);
        }
@@ -1356,8 +1356,6 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info)
        info->pixmap.size = 8 * 1024;
        info->pixmap.flags = FB_PIXMAP_SYSTEM;
 
-       if (!hwcur)
-               info->fbops->fb_cursor = soft_cursor;
        info->var.accel_flags = (!noaccel);
 
        switch (par->Architecture) {