summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb/vga.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2005-09-28 14:54:07 +0000
committermarius <marius@FreeBSD.org>2005-09-28 14:54:07 +0000
commitfe0a34c8f15fa82e0fec35f34ee9c6efe4abdcc4 (patch)
treebb4b1851d014027e2b948702d0726e8539fa0e12 /sys/dev/fb/vga.c
parent2d942f188d24ea6077fd2e56a8676851b448c161 (diff)
downloadFreeBSD-src-fe0a34c8f15fa82e0fec35f34ee9c6efe4abdcc4.zip
FreeBSD-src-fe0a34c8f15fa82e0fec35f34ee9c6efe4abdcc4.tar.gz
Add a font width argument to vi_load_font_t, vi_save_font_t and vi_putm_t
and do some preparations for handling 12x22 fonts (currently lots of code implies and/or hardcodes a font width of 8 pixels). This will be required on sparc64 which uses a default font size of 12x22 in order to add font loading and saving support as well as to use a syscons(4)-supplied mouse pointer image. This API breakage is committed now so it can be MFC'ed in time for 6.0 and later on upcoming framebuffer drivers destined for use on sparc64 and which are expected to rely on using font loading internally and on a syscons(4)-supplied mouse pointer image can be easily MFC'ed to RELENG_6 rather than requiring a backport. Tested on: i386, sparc64, make universe MFC after: 1 week
Diffstat (limited to 'sys/dev/fb/vga.c')
-rw-r--r--sys/dev/fb/vga.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/fb/vga.c b/sys/dev/fb/vga.c
index b32625f..62ba235 100644
--- a/sys/dev/fb/vga.c
+++ b/sys/dev/fb/vga.c
@@ -1787,8 +1787,8 @@ set_normal_mode(video_adapter_t *adp, u_char *buf)
* EGA/VGA
*/
static int
-vga_save_font(video_adapter_t *adp, int page, int fontsize, u_char *data,
- int ch, int count)
+vga_save_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
{
#ifndef VGA_NO_FONT_LOADING
u_char buf[PARAM_BUFSIZE];
@@ -1814,7 +1814,7 @@ vga_save_font(video_adapter_t *adp, int page, int fontsize, u_char *data,
fontsize = 14;
}
- if (page < 0 || page >= 8)
+ if (page < 0 || page >= 8 || fontwidth != 8)
return EINVAL;
segment = FONT_BUF + 0x4000*page;
if (page > 3)
@@ -1867,8 +1867,8 @@ vga_save_font(video_adapter_t *adp, int page, int fontsize, u_char *data,
* EGA/VGA
*/
static int
-vga_load_font(video_adapter_t *adp, int page, int fontsize, u_char *data,
- int ch, int count)
+vga_load_font(video_adapter_t *adp, int page, int fontsize, int fontwidth,
+ u_char *data, int ch, int count)
{
#ifndef VGA_NO_FONT_LOADING
u_char buf[PARAM_BUFSIZE];
@@ -1894,7 +1894,7 @@ vga_load_font(video_adapter_t *adp, int page, int fontsize, u_char *data,
fontsize = 14;
}
- if (page < 0 || page >= 8)
+ if (page < 0 || page >= 8 || fontwidth != 8)
return EINVAL;
segment = FONT_BUF + 0x4000*page;
if (page > 3)
OpenPOWER on IntegriCloud