vgabios: Unify page size calculations; remove page size from vgamode_s.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 7 Jan 2012 23:27:19 +0000 (18:27 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 14 Jan 2012 22:19:20 +0000 (17:19 -0500)
commit83047be58ee787b2f3651f6b40e08d54371ecd3a
tree25d6a61ad6e09a82c0821a70f0835815d5370307
parentbb17d8446807d6fa5d03d42c9e60bff8c185469b
vgabios: Unify page size calculations; remove page size from vgamode_s.

The previous code could obtain the page size in different ways - from
vmode_g->sslength, from SCREEN_MEM_START, or by manually multiplying
cols and rows.  Add a new func (calc_page_size) and use that in areas
that need to calculate the page size.

Convert readers of the page size to read it from the "video_pagesize"
entry in the BDA instead of recalculating it.

Remove the page size from struct vgamode_s (slength) as it is now
calculated dynamically.  The new calculated versions are different
from the existing values exported in video_param_table.  However, the
existing values (for CGA) did not look correct - I compared the values
to those exported by two other VGA BIOS manufacturers and used the
values that look more standard.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
vgasrc/stdvga.h
vgasrc/vgabios.c
vgasrc/vgabios.h
vgasrc/vgafb.c
vgasrc/vgatables.c