Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci/voyager glyphcache_init() works best with its pa...



details:   https://anonhg.NetBSD.org/src/rev/26d2257cadb5
branches:  trunk
changeset: 778894:26d2257cadb5
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Apr 19 09:03:01 2012 +0000

description:
glyphcache_init() works best with its parameters in the right order. Doh.
While there request an RGB devcmap.

diffstat:

 sys/dev/pci/voyager/voyagerfb.c |  17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diffs (49 lines):

diff -r b5307d3912b9 -r 26d2257cadb5 sys/dev/pci/voyager/voyagerfb.c
--- a/sys/dev/pci/voyager/voyagerfb.c   Thu Apr 19 08:59:42 2012 +0000
+++ b/sys/dev/pci/voyager/voyagerfb.c   Thu Apr 19 09:03:01 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.19 2012/03/20 14:59:36 macallan Exp $  */
+/*     $NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $  */
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.19 2012/03/20 14:59:36 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -297,8 +297,8 @@
                (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
        }
        glyphcache_init(&sc->sc_gc, sc->sc_height,
+                       (sc->sc_fbsize / sc->sc_stride) - sc->sc_height,
                        sc->sc_width,
-                       (sc->sc_fbsize / sc->sc_stride) - sc->sc_height,
                        ri->ri_font->fontwidth,
                        ri->ri_font->fontheight,
                        defattr);
@@ -548,10 +548,19 @@
        if (existing) {
                ri->ri_flg |= RI_CLEAR;
        }
+
+       if (sc->sc_depth == 32) {
 #ifdef VOYAGERFB_ANTIALIAS
-       if (sc->sc_depth == 32)
                ri->ri_flg |= RI_ENABLE_ALPHA;
 #endif
+               /* we always run in RGB */
+               ri->ri_rnum = 8;
+               ri->ri_gnum = 8;
+               ri->ri_bnum = 8;
+               ri->ri_rpos = 16;
+               ri->ri_gpos = 8;
+               ri->ri_bpos = 0;
+       }
 
        rasops_init(ri, 0, 0);
        ri->ri_caps = WSSCREEN_WSCOLORS;



Home | Main Index | Thread Index | Old Index