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/arm/xscale | |
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/arm/xscale')
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_lcd.c | 26 | ||||
-rw-r--r-- | sys/arch/arm/xscale/pxa2x0_lcd.h | 5 |
2 files changed, 29 insertions, 2 deletions
diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.c b/sys/arch/arm/xscale/pxa2x0_lcd.c index d465256341c..ab17e2b69f9 100644 --- a/sys/arch/arm/xscale/pxa2x0_lcd.c +++ b/sys/arch/arm/xscale/pxa2x0_lcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_lcd.c,v 1.24 2010/08/30 21:35:55 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_lcd.c,v 1.25 2013/10/21 10:36:09 miod Exp $ */ /* $NetBSD: pxa2x0_lcd.c,v 1.8 2003/10/03 07:24:05 bsh Exp $ */ /* @@ -822,6 +822,30 @@ pxa2x0_lcd_mmap(void *v, off_t offset, int prot) offset, prot, BUS_DMA_WAITOK | BUS_DMA_COHERENT)); } +int +pxa2x0_lcd_load_font(void *v, void *emulcookie, struct wsdisplay_font *font) +{ + struct pxa2x0_lcd_softc *sc = v; + struct pxa2x0_lcd_screen *screen = sc->active; + + if (screen == NULL) + return ENXIO; + + return rasops_load_font(&screen->rinfo, emulcookie, font); +} + +int +pxa2x0_lcd_list_font(void *v, struct wsdisplay_font *font) +{ + struct pxa2x0_lcd_softc *sc = v; + struct pxa2x0_lcd_screen *screen = sc->active; + + if (screen == NULL) + return ENXIO; + + return rasops_list_font(&screen->rinfo, font); +} + void pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *sc) { diff --git a/sys/arch/arm/xscale/pxa2x0_lcd.h b/sys/arch/arm/xscale/pxa2x0_lcd.h index 84b7a51ecaf..a9823521b7e 100644 --- a/sys/arch/arm/xscale/pxa2x0_lcd.h +++ b/sys/arch/arm/xscale/pxa2x0_lcd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_lcd.h,v 1.11 2005/12/22 18:45:46 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_lcd.h,v 1.12 2013/10/21 10:36:10 miod Exp $ */ /* $NetBSD: pxa2x0_lcd.h,v 1.2 2003/06/17 09:43:14 bsh Exp $ */ /* * Copyright (c) 2002 Genetec Corporation. All rights reserved. @@ -138,9 +138,12 @@ int pxa2x0_lcd_alloc_screen(void *, const struct wsscreen_descr *, void **, int *, int *, long *); void pxa2x0_lcd_free_screen(void *, void *); int pxa2x0_lcd_ioctl(void *, u_long, caddr_t, int, struct proc *); +int pxa2x0_lcd_load_font(void *, void *, struct wsdisplay_font *); +int pxa2x0_lcd_list_font(void *, struct wsdisplay_font *); paddr_t pxa2x0_lcd_mmap(void *, off_t, int); int pxa2x0_lcd_show_screen(void *, void *, int, void (*)(void *, int, int), void *); + void pxa2x0_lcd_power(int, void *); void pxa2x0_lcd_suspend(struct pxa2x0_lcd_softc *); void pxa2x0_lcd_resume(struct pxa2x0_lcd_softc *); |