James, can you apply this? Code logic is retained, it just simplifies
the calculations, removed unnecessary conditionals, and used
info->var.yres instead of var.yres.
Tony
diff -Naur linux-2.5.64-fbdev/drivers/video/console/fbcon.c linux-2.5.64/drivers/video/console/fbcon.c
--- linux-2.5.64-fbdev/drivers/video/console/fbcon.c 2003-03-08 21:33:25.000000000 +0000
+++ linux-2.5.64/drivers/video/console/fbcon.c 2003-03-08 21:47:26.000000000 +0000
@@ -1044,9 +1044,7 @@
vc->vc_rows = nr_rows;
}
p->vrows = info->var.yres_virtual / vc->vc_font.height;
- if(info->var.yres > (vc->vc_font.height * (vc->vc_rows + 1))) {
- p->vrows -= (info->var.yres - (vc->vc_font.height * vc->vc_rows)) / vc->vc_font.height;
- }
+ p->vrows -= info->var.yres/vc->vc_font.height - vc->vc_rows;
if ((info->var.yres % vc->vc_font.height) &&
(info->var.yres_virtual % vc->vc_font.height <
info->var.yres % vc->vc_font.height))
@@ -1825,9 +1823,8 @@
var.activate = FB_ACTIVATE_NOW;
fb_set_var(&var, info);
}
- p->vrows = var.yres_virtual/fh;
- if(var.yres > (fh * (height + 1)))
- p->vrows -= (var.yres - (fh * height)) / fh;
+ p->vrows = info->var.yres_virtual/fh;
+ p->vrows -= (info->var.yres + (fh - 1))/fh - height;
return 0;
}
@@ -2099,11 +2096,7 @@
/* reset wrap/pan */
info->var.xoffset = info->var.yoffset = p->yscroll = 0;
p->vrows = info->var.yres_virtual / h;
-
-#if 0 /* INCOMPLETE - let the console gurus handle this */
- if(info->var.yres > (h * (vc->vc_rows + 1))
- p->vrows -= (info->var.yres - (h * vc->vc_rows)) / h;
-#endif
+ p->vrows -= info->var.yres/h - vc->vc_rows;
if ((info->var.yres % h)
&& (info->var.yres_virtual % h < info->var.yres % h))
p->vrows--;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/