diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-10-21 10:36:27 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-10-21 10:36:27 +0000 |
commit | 22a7a58bc34bd99e322e4e872add0cd82855128a (patch) | |
tree | 3571a1fe1f892c698c714629e9ccd90e1fc13156 /sys/arch/sgi | |
parent | ceead45789cad670a4e79b8e53502af204c5f1ad (diff) |
Add load_font and list_font accessops to all rasops-based wsdisplay drivers.
Trivial except for tga(4) and gpx(4/vax) which need a bit more care setting
up a new font.
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/dev/gbe.c | 23 | ||||
-rw-r--r-- | sys/arch/sgi/dev/impact.c | 26 | ||||
-rw-r--r-- | sys/arch/sgi/gio/grtwo.c | 24 | ||||
-rw-r--r-- | sys/arch/sgi/gio/newport.c | 26 | ||||
-rw-r--r-- | sys/arch/sgi/xbow/odyssey.c | 23 |
5 files changed, 107 insertions, 15 deletions
diff --git a/sys/arch/sgi/dev/gbe.c b/sys/arch/sgi/dev/gbe.c index 1ce185a10a4..fb862387e9c 100644 --- a/sys/arch/sgi/dev/gbe.c +++ b/sys/arch/sgi/dev/gbe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gbe.c,v 1.20 2013/10/20 20:07:24 miod Exp $ */ +/* $OpenBSD: gbe.c,v 1.21 2013/10/21 10:36:16 miod Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Joel Sing <jsing@openbsd.org> @@ -128,7 +128,8 @@ int gbe_alloc_screen(void *, const struct wsscreen_descr *, void **, void gbe_free_screen(void *, void *); int gbe_show_screen(void *, void *, int, void (*)(void *, int, int), void *); -void gbe_burner(void *, u_int, u_int); +int gbe_load_font(void *, void *, struct wsdisplay_font *); +int gbe_list_font(void *, struct wsdisplay_font *); /* * Hardware acceleration for rasops. @@ -156,7 +157,8 @@ struct wsdisplay_accessops gbe_accessops = { .alloc_screen = gbe_alloc_screen, .free_screen = gbe_free_screen, .show_screen = gbe_show_screen, - .burn_screen = gbe_burner + .load_font = gbe_load_font, + .list_font = gbe_list_font }; const struct wsscreen_descr *gbe_scrlist[] = { @@ -981,9 +983,20 @@ gbe_show_screen(void *v, void *cookie, int waitok, void (*cb)(void *, int, int), return (0); } -void -gbe_burner(void *v, u_int on, u_int flags) +int +gbe_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct gbe_screen *screen = (struct gbe_screen *)v; + + return rasops_load_font(&screen->ri, emulcookie, font); +} + +int +gbe_list_font(void *v, struct wsdisplay_font *font) { + struct gbe_screen *screen = (struct gbe_screen *)v; + + return rasops_list_font(&screen->ri, font); } /* diff --git a/sys/arch/sgi/dev/impact.c b/sys/arch/sgi/dev/impact.c index 748f117880a..58b0ffb73bf 100644 --- a/sys/arch/sgi/dev/impact.c +++ b/sys/arch/sgi/dev/impact.c @@ -1,4 +1,4 @@ -/* $OpenBSD: impact.c,v 1.4 2013/10/20 20:07:24 miod Exp $ */ +/* $OpenBSD: impact.c,v 1.5 2013/10/21 10:36:16 miod Exp $ */ /* * Copyright (c) 2010, 2012 Miodrag Vallat. @@ -118,6 +118,8 @@ int impact_alloc_screen(void *, const struct wsscreen_descr *, void **, void impact_free_screen(void *, void *); int impact_show_screen(void *, void *, int, void (*)(void *, int, int), void *); +int impact_load_font(void *, void *, struct wsdisplay_font *); +int impact_list_font(void *, struct wsdisplay_font *); static struct impact_screen impact_cons; @@ -126,7 +128,9 @@ struct wsdisplay_accessops impact_accessops = { .mmap = impact_mmap, .alloc_screen = impact_alloc_screen, .free_screen = impact_free_screen, - .show_screen = impact_show_screen + .show_screen = impact_show_screen, + .load_font = impact_load_font, + .list_font = impact_list_font }; int @@ -466,6 +470,24 @@ impact_show_screen(void *v, void *cookie, int waitok, return 0; } +int +impact_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct impact_screen *scr = (struct impact_screen *)v; + struct rasops_info *ri = &scr->ri; + + return rasops_load_font(ri, emulcookie, font); +} + +int +impact_list_font(void *v, struct wsdisplay_font *font) +{ + struct impact_screen *scr = (struct impact_screen *)v; + struct rasops_info *ri = &scr->ri; + + return rasops_list_font(ri, font); +} + /* * Hardware accelerated functions. */ diff --git a/sys/arch/sgi/gio/grtwo.c b/sys/arch/sgi/gio/grtwo.c index 34c890d1abb..74f59754099 100644 --- a/sys/arch/sgi/gio/grtwo.c +++ b/sys/arch/sgi/gio/grtwo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grtwo.c,v 1.6 2013/06/11 18:15:55 deraadt Exp $ */ +/* $OpenBSD: grtwo.c,v 1.7 2013/10/21 10:36:17 miod Exp $ */ /* $NetBSD: grtwo.c,v 1.11 2009/11/22 19:09:15 mbalmer Exp $ */ /* @@ -132,6 +132,8 @@ int grtwo_alloc_screen(void *, const struct wsscreen_descr *, void **, void grtwo_free_screen(void *, void *); int grtwo_show_screen(void *, void *, int, void (*)(void *, int, int), void *); +int grtwo_load_font(void *, void *, struct wsdisplay_font *); +int grtwo_list_font(void *, struct wsdisplay_font *); static struct wsdisplay_accessops grtwo_accessops = { .ioctl = grtwo_ioctl, @@ -139,6 +141,8 @@ static struct wsdisplay_accessops grtwo_accessops = { .alloc_screen = grtwo_alloc_screen, .free_screen = grtwo_free_screen, .show_screen = grtwo_show_screen, + .load_font = grtwo_load_font, + .list_font = grtwo_list_font }; int grtwo_cursor(void *, int, int, int); @@ -848,3 +852,21 @@ grtwo_mmap(void *v, off_t offset, int prot) { return -1; } + +int +grtwo_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct grtwo_devconfig *dc = v; + struct rasops_info *ri = &dc->dc_ri; + + return rasops_load_font(ri, emulcookie, font); +} + +int +grtwo_list_font(void *v, struct wsdisplay_font *font) +{ + struct grtwo_devconfig *dc = v; + struct rasops_info *ri = &dc->dc_ri; + + return rasops_list_font(ri, font); +} diff --git a/sys/arch/sgi/gio/newport.c b/sys/arch/sgi/gio/newport.c index 74d038bf191..ec39ce09223 100644 --- a/sys/arch/sgi/gio/newport.c +++ b/sys/arch/sgi/gio/newport.c @@ -1,4 +1,4 @@ -/* $OpenBSD: newport.c,v 1.7 2013/10/20 20:07:24 miod Exp $ */ +/* $OpenBSD: newport.c,v 1.8 2013/10/21 10:36:17 miod Exp $ */ /* $NetBSD: newport.c,v 1.15 2009/05/12 23:51:25 macallan Exp $ */ /* @@ -117,13 +117,17 @@ int newport_alloc_screen(void *, const struct wsscreen_descr *, void **, void newport_free_screen(void *, void *); int newport_show_screen(void *, void *, int, void (*)(void *, int, int), void *); +int newport_load_font(void *, void *, struct wsdisplay_font *); +int newport_list_font(void *, struct wsdisplay_font *); struct wsdisplay_accessops newport_accessops = { .ioctl = newport_ioctl, .mmap = newport_mmap, .alloc_screen = newport_alloc_screen, .free_screen = newport_free_screen, - .show_screen = newport_show_screen + .show_screen = newport_show_screen, + .load_font = newport_load_font, + .list_font = newport_list_font }; int newport_do_cursor(struct rasops_info *); @@ -887,3 +891,21 @@ newport_mmap(void *v, off_t offset, int prot) { return -1; } + +int +newport_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct newport_devconfig *dc = v; + struct rasops_info *ri = &dc->dc_ri; + + return rasops_load_font(ri, emulcookie, font); +} + +int +newport_list_font(void *v, struct wsdisplay_font *font) +{ + struct newport_devconfig *dc = v; + struct rasops_info *ri = &dc->dc_ri; + + return rasops_list_font(ri, font); +} diff --git a/sys/arch/sgi/xbow/odyssey.c b/sys/arch/sgi/xbow/odyssey.c index 1255f4269f0..5289b24fe7d 100644 --- a/sys/arch/sgi/xbow/odyssey.c +++ b/sys/arch/sgi/xbow/odyssey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: odyssey.c,v 1.8 2013/10/20 20:07:24 miod Exp $ */ +/* $OpenBSD: odyssey.c,v 1.9 2013/10/21 10:36:18 miod Exp $ */ /* * Copyright (c) 2009, 2010 Joel Sing <jsing@openbsd.org> * @@ -129,7 +129,8 @@ int odyssey_alloc_screen(void *, const struct wsscreen_descr *, void **, void odyssey_free_screen(void *, void *); int odyssey_show_screen(void *, void *, int, void (*)(void *, int, int), void *); -void odyssey_burner(void *, u_int, u_int); +int odyssey_load_font(void *, void *, struct wsdisplay_font *); +int odyssey_list_font(void *, struct wsdisplay_font *); static struct odyssey_screen odyssey_consdata; static struct odyssey_softc odyssey_cons_sc; @@ -144,7 +145,8 @@ struct wsdisplay_accessops odyssey_accessops = { .alloc_screen = odyssey_alloc_screen, .free_screen = odyssey_free_screen, .show_screen = odyssey_show_screen, - .burn_screen = odyssey_burner + .load_font = odyssey_load_font, + .list_font = odyssey_list_font }; const struct wsscreen_descr *odyssey_scrlist[] = { @@ -692,9 +694,20 @@ odyssey_show_screen(void *v, void *cookie, int waitok, return (0); } -void -odyssey_burner(void *v, u_int on, u_int flags) +int +odyssey_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct odyssey_screen *screen = (struct odyssey_screen *)v; + + return rasops_load_font(&screen->ri, emulcookie, font); +} + +int +odyssey_list_font(void *v, struct wsdisplay_font *font) { + struct odyssey_screen *screen = (struct odyssey_screen *)v; + + return rasops_list_font(&screen->ri, font); } /* |