diff options
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 52b16850a54..3620de0f252 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -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) { @@ -1473,10 +1471,6 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd, par->Chipset = (pd->vendor << 16) | pd->device; printk(KERN_INFO PFX "nVidia device/chipset %X\n", par->Chipset); -#ifdef CONFIG_PCI_NAMES - printk(KERN_INFO PFX "%s\n", pd->pretty_name); -#endif - if (par->Architecture == 0) { printk(KERN_ERR PFX "unknown NV_ARCH\n"); goto err_out_free_base0; |