Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci allow font loading etc.
details: https://anonhg.NetBSD.org/src/rev/2625eb61ede3
branches: trunk
changeset: 354560:2625eb61ede3
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Jun 21 21:40:36 2017 +0000
description:
allow font loading etc.
diffstat:
sys/dev/pci/r128fb.c | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 56ac143a4d1c -r 2625eb61ede3 sys/dev/pci/r128fb.c
--- a/sys/dev/pci/r128fb.c Wed Jun 21 14:27:30 2017 +0000
+++ b/sys/dev/pci/r128fb.c Wed Jun 21 21:40:36 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: r128fb.c,v 1.40 2017/01/20 12:25:07 maya Exp $ */
+/* $NetBSD: r128fb.c,v 1.41 2017/06/21 21:40:36 macallan Exp $ */
/*
* Copyright (c) 2007, 2012 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.40 2017/01/20 12:25:07 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.41 2017/06/21 21:40:36 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -262,7 +262,8 @@
0, 0,
NULL,
8, 16,
- WSSCREEN_WSCOLORS | WSSCREEN_HILIT,
+ WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE |
+ WSSCREEN_RESIZE,
NULL
};
sc->sc_screens[0] = &sc->sc_defaultscreen_descr;
@@ -273,6 +274,8 @@
vcons_init(&sc->vd, sc, &sc->sc_defaultscreen_descr,
&r128fb_accessops);
sc->vd.init_screen = r128fb_init_screen;
+ sc->vd.show_screen_cookie = &sc->sc_gc;
+ sc->vd.show_screen_cb = glyphcache_adapt;
/* init engine here */
r128fb_init(sc);
@@ -461,8 +464,10 @@
return wsdisplayio_get_edid(sc->sc_dev, d);
}
- case WSDISPLAYIO_GET_FBINFO: {
- struct wsdisplayio_fbinfo *fbi = data;
+ case WSDISPLAYIO_GET_FBINFO:
+ {
+ struct wsdisplayio_fbinfo *fbi = data;
+
return wsdisplayio_get_fbinfo(&ms->scr_ri, fbi);
}
}
@@ -540,13 +545,16 @@
ri->ri_stride = sc->sc_stride;
ri->ri_flg = RI_CENTER;
if (sc->sc_depth == 8)
- ri->ri_flg |= RI_8BIT_IS_RGB | RI_ENABLE_ALPHA;
+ ri->ri_flg |= RI_8BIT_IS_RGB | RI_ENABLE_ALPHA |
+ RI_PREFER_ALPHA;
rasops_init(ri, 0, 0);
- ri->ri_caps = WSSCREEN_WSCOLORS;
+ ri->ri_caps = WSSCREEN_WSCOLORS | WSSCREEN_HILIT | WSSCREEN_UNDERLINE |
+ WSSCREEN_RESIZE;
#ifdef VCONS_DRAW_INTR
scr->scr_flags |= VCONS_DONT_READ;
#endif
+ scr->scr_flags |= VCONS_LOADFONT;
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
sc->sc_width / ri->ri_font->fontwidth);
@@ -803,9 +811,9 @@
he = ri->ri_font->fontheight;
if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) {
- x = ri->ri_ccol * wi + ri->ri_xorigin;
- y = ri->ri_crow * he + ri->ri_yorigin;
if (ri->ri_flg & RI_CURSOR) {
+ x = ri->ri_ccol * wi + ri->ri_xorigin;
+ y = ri->ri_crow * he + ri->ri_yorigin;
r128fb_bitblt(sc, x, y, x, y, wi, he, R128_ROP3_Dn);
ri->ri_flg &= ~RI_CURSOR;
}
Home |
Main Index |
Thread Index |
Old Index