Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/dev - don't mess with more than 256 colour ...
details: https://anonhg.NetBSD.org/src/rev/7af2fa79c098
branches: trunk
changeset: 778755:7af2fa79c098
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Apr 12 19:11:49 2012 +0000
description:
- don't mess with more than 256 colour map entries
- don't assume that wscons assumes BGR
- while there enable alpha
diffstat:
sys/arch/sparc64/dev/gfb.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diffs (51 lines):
diff -r e75bcb546689 -r 7af2fa79c098 sys/arch/sparc64/dev/gfb.c
--- a/sys/arch/sparc64/dev/gfb.c Thu Apr 12 19:09:18 2012 +0000
+++ b/sys/arch/sparc64/dev/gfb.c Thu Apr 12 19:11:49 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gfb.c,v 1.6 2012/03/13 18:40:29 elad Exp $ */
+/* $NetBSD: gfb.c,v 1.7 2012/04/12 19:11:49 macallan Exp $ */
/*
* Copyright (c) 2009 Michael Lorenz
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.6 2012/03/13 18:40:29 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.7 2012/04/12 19:11:49 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -189,7 +189,7 @@
ri = &sc->sc_console_screen.scr_ri;
j = 0;
- for (i = 0; i < (1 << sc->sc_depth); i++) {
+ for (i = 0; i < 256; i++) {
sc->sc_cmap_red[i] = rasops_cmap[j];
sc->sc_cmap_green[i] = rasops_cmap[j + 1];
@@ -348,7 +348,7 @@
ri->ri_width = sc->sc_width;
ri->ri_height = sc->sc_height;
ri->ri_stride = sc->sc_stride;
- ri->ri_flg = RI_CENTER | RI_FULLCLEAR;
+ ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_ENABLE_ALPHA;
ri->ri_bits = (char *)sc->sc_fbaddr;
scr->scr_flags |= VCONS_DONT_READ;
@@ -357,6 +357,14 @@
ri->ri_flg |= RI_CLEAR;
}
+ /* explicitly request BGR in case the default changes */
+ ri->ri_rnum = 8;
+ ri->ri_gnum = 8;
+ ri->ri_bnum = 8;
+ ri->ri_rpos = 0;
+ ri->ri_gpos = 8;
+ ri->ri_bpos = 16;
+
rasops_init(ri, 0, 0);
ri->ri_caps = WSSCREEN_WSCOLORS;
Home |
Main Index |
Thread Index |
Old Index