aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia/nvidia.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/nvidia/nvidia.c')
-rw-r--r--drivers/video/nvidia/nvidia.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index af99ea96012e..32952204ce33 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 +
@@ -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;