diff -Naur linux-2.5.50-js/drivers/video/riva/fbdev.c linux/drivers/video/riva/fbdev.c --- linux-2.5.50-js/drivers/video/riva/fbdev.c 2002-12-07 09:50:22.000000000 +0000 +++ linux/drivers/video/riva/fbdev.c 2002-12-07 09:53:45.000000000 +0000 @@ -214,31 +214,6 @@ }; MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl); - - -/* ------------------------------------------------------------------------- * - * - * framebuffer related structures - * - * ------------------------------------------------------------------------- */ - -extern struct display_switch fbcon_riva8; -extern struct display_switch fbcon_riva16; -extern struct display_switch fbcon_riva32; - -struct riva_cursor { - int enable; - int on; - int vbl_cnt; - int last_move_delay; - int blink_rate; - struct { - u16 x, y; - } pos, size; - unsigned short image[MAX_CURS*MAX_CURS]; - struct timer_list *timer; -}; - /* ------------------------------------------------------------------------- * * * global variables @@ -1167,7 +1142,7 @@ if (!cnt) { memset(&par->state, 0, sizeof(struct fb_vgastate)); - par->state.flags = VGA_SAVE_MODE | VGA_SAVE_FONTS; + par->state.flags = VGA_SAVE_MODE | VGA_SAVE_FONT0; /* save the DAC for Riva128 */ if (par->riva.Architecture == NV_ARCH_03) par->state.flags |= VGA_SAVE_CMAP; @@ -1189,11 +1164,10 @@ if (!cnt) return -EINVAL; if (cnt == 1) { - par->riva.LockUnlock(&par->riva, 0); - par->riva.LoadStateExt(&par->riva, &par->initial_state.ext); + riva_load_state(par, &par->initial_state); + par->riva.LockUnlock(&par->riva, 1); fb_restore_vga(&par->state); - par->riva.LockUnlock(&par->riva, 1); } atomic_dec(&par->ref_count); @@ -1566,6 +1540,16 @@ fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 8); #endif + + info->var.yres_virtual = -1; + info->var.xres_virtual = info->var.xres; + if (rivafb_check_var(&info->var, info)) + return 1; + + 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; + return 0; } @@ -1883,10 +1867,8 @@ while ((this_opt = strsep(&options, ",")) != NULL) { if (!*this_opt) continue; - if (!strncmp(this_opt, "nomove", 6)) { - nomove = 1; #ifdef CONFIG_MTRR - } else if (!strncmp(this_opt, "nomtrr", 6)) { + if (!strncmp(this_opt, "nomtrr", 6)) { nomtrr = 1; #endif } else @@ -1935,8 +1917,6 @@ MODULE_PARM_DESC(font, "Specifies one of the compiled-in fonts (default=none)"); MODULE_PARM(noaccel, "i"); MODULE_PARM_DESC(noaccel, "Disables hardware acceleration (0 or 1=disabled) (default=0)"); -MODULE_PARM(nomove, "i"); -MODULE_PARM_DESC(nomove, "Enables YSCROLL_NOMOVE (0 or 1=enabled) (default=0)"); #ifdef CONFIG_MTRR MODULE_PARM(nomtrr, "i"); MODULE_PARM_DESC(nomtrr, "Disables MTRR support (0 or 1=disabled) (default=0)");