diff options
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
| -rw-r--r-- | drivers/video/nvidia/nvidia.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index 30f80c23f934..3620de0f252e 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) | |||
| 658 | { | 658 | { |
| 659 | struct nvidia_par *par = info->par; | 659 | struct nvidia_par *par = info->par; |
| 660 | struct _riva_hw_state *state = &par->ModeReg; | 660 | struct _riva_hw_state *state = &par->ModeReg; |
| 661 | int i, depth = fb_get_color_depth(&info->var); | 661 | int i, depth = fb_get_color_depth(&info->var, &info->fix); |
| 662 | int h_display = info->var.xres / 8 - 1; | 662 | int h_display = info->var.xres / 8 - 1; |
| 663 | int h_start = (info->var.xres + info->var.right_margin) / 8 - 1; | 663 | int h_start = (info->var.xres + info->var.right_margin) / 8 - 1; |
| 664 | int h_end = (info->var.xres + info->var.right_margin + | 664 | 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) | |||
| 893 | int i, set = cursor->set; | 893 | int i, set = cursor->set; |
| 894 | u16 fg, bg; | 894 | u16 fg, bg; |
| 895 | 895 | ||
| 896 | if (cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) | 896 | if (!hwcur || cursor->image.width > MAX_CURS || cursor->image.height > MAX_CURS) |
| 897 | return -ENXIO; | 897 | return -ENXIO; |
| 898 | 898 | ||
| 899 | NVShowHideCursor(par, 0); | 899 | NVShowHideCursor(par, 0); |
| @@ -978,6 +978,9 @@ static int nvidiafb_set_par(struct fb_info *info) | |||
| 978 | !par->twoHeads) | 978 | !par->twoHeads) |
| 979 | par->FPDither = 0; | 979 | par->FPDither = 0; |
| 980 | 980 | ||
| 981 | info->fix.visual = (info->var.bits_per_pixel == 8) ? | ||
| 982 | FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR; | ||
| 983 | |||
| 981 | nvidia_init_vga(info); | 984 | nvidia_init_vga(info); |
| 982 | nvidia_calc_regs(info); | 985 | nvidia_calc_regs(info); |
| 983 | nvidia_write_regs(par); | 986 | nvidia_write_regs(par); |
| @@ -992,9 +995,6 @@ static int nvidiafb_set_par(struct fb_info *info) | |||
| 992 | NVWriteCrtc(par, 0x11, 0x00); | 995 | NVWriteCrtc(par, 0x11, 0x00); |
| 993 | info->fix.line_length = (info->var.xres_virtual * | 996 | info->fix.line_length = (info->var.xres_virtual * |
| 994 | info->var.bits_per_pixel) >> 3; | 997 | info->var.bits_per_pixel) >> 3; |
| 995 | info->fix.visual = (info->var.bits_per_pixel == 8) ? | ||
| 996 | FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR; | ||
| 997 | |||
| 998 | if (info->var.accel_flags) { | 998 | if (info->var.accel_flags) { |
| 999 | info->fbops->fb_imageblit = nvidiafb_imageblit; | 999 | info->fbops->fb_imageblit = nvidiafb_imageblit; |
| 1000 | info->fbops->fb_fillrect = nvidiafb_fillrect; | 1000 | info->fbops->fb_fillrect = nvidiafb_fillrect; |
| @@ -1328,7 +1328,7 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info) | |||
| 1328 | char buf[16]; | 1328 | char buf[16]; |
| 1329 | 1329 | ||
| 1330 | memset(buf, 0, 16); | 1330 | memset(buf, 0, 16); |
| 1331 | snprintf(buf, 15, "%dx%d", par->fpWidth, par->fpHeight); | 1331 | snprintf(buf, 15, "%dx%dMR", par->fpWidth, par->fpHeight); |
| 1332 | fb_find_mode(&nvidiafb_default_var, info, buf, specs->modedb, | 1332 | fb_find_mode(&nvidiafb_default_var, info, buf, specs->modedb, |
| 1333 | specs->modedb_len, &modedb, 8); | 1333 | specs->modedb_len, &modedb, 8); |
| 1334 | } | 1334 | } |
| @@ -1356,8 +1356,6 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info) | |||
| 1356 | info->pixmap.size = 8 * 1024; | 1356 | info->pixmap.size = 8 * 1024; |
| 1357 | info->pixmap.flags = FB_PIXMAP_SYSTEM; | 1357 | info->pixmap.flags = FB_PIXMAP_SYSTEM; |
| 1358 | 1358 | ||
| 1359 | if (!hwcur) | ||
| 1360 | info->fbops->fb_cursor = soft_cursor; | ||
| 1361 | info->var.accel_flags = (!noaccel); | 1359 | info->var.accel_flags = (!noaccel); |
| 1362 | 1360 | ||
| 1363 | switch (par->Architecture) { | 1361 | switch (par->Architecture) { |
