Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/dev Use screen attributes passed to our hardw...



details:   https://anonhg.NetBSD.org/src/rev/e0795995625b
branches:  trunk
changeset: 485021:e0795995625b
user:      pk <pk%NetBSD.org@localhost>
date:      Sun Apr 16 22:17:03 2000 +0000

description:
Use screen attributes passed to our hardware rasops routines.

Move colormap initialization to cg6reset(), so this is also done
on last close of the framebuffer device (e.g. after X server shutdown).

diffstat:

 sys/arch/sparc/dev/cgsix.c |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 3f0decbefce7 -r e0795995625b sys/arch/sparc/dev/cgsix.c
--- a/sys/arch/sparc/dev/cgsix.c        Sun Apr 16 22:12:05 2000 +0000
+++ b/sys/arch/sparc/dev/cgsix.c        Sun Apr 16 22:17:03 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cgsix.c,v 1.49 2000/04/04 21:47:17 pk Exp $ */
+/*     $NetBSD: cgsix.c,v 1.50 2000/04/16 22:17:03 pk Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -356,7 +356,7 @@
        fbc->fbc_clipmaxx = ri->ri_width - 1;
        fbc->fbc_clipmaxy = ri->ri_height - 1;
        fbc->fbc_alu = CG6_ALU_FILL;
-       fbc->fbc_fg = ri->ri_devcmap[0/*(attr>>16)&15*/];
+       fbc->fbc_fg = ri->ri_devcmap[(attr >> 16) & 0xf];
        fbc->fbc_arecty = ri->ri_yorigin + row;
        fbc->fbc_arectx = ri->ri_xorigin + col;
        fbc->fbc_arecty = ri->ri_yorigin + row + ri->ri_font->fontheight - 1;
@@ -390,7 +390,7 @@
        fbc->fbc_clipmaxx = ri->ri_width - 1;
        fbc->fbc_clipmaxy = ri->ri_height - 1;
        fbc->fbc_alu = CG6_ALU_FILL;
-       fbc->fbc_fg = ri->ri_devcmap[0/*(attr>>16)&15*/];
+       fbc->fbc_fg = ri->ri_devcmap[(attr >> 16) & 0xf];
        if ((n == ri->ri_rows) && (ri->ri_flg & RI_FULLCLEAR)) {
                fbc->fbc_arecty = 0;
                fbc->fbc_arectx = 0;
@@ -467,10 +467,6 @@
        /* reset cursor & frame buffer controls */
        cg6_reset(sc);
 
-       /* initialize to the default color map */
-       bt_initcmap(&sc->sc_cmap, 256);
-       cg6_loadcmap(sc, 0, 256);
-
        /* enable video */
        sc->sc_thc->thc_misc |= THC_MISC_VIDEN;
 
@@ -516,6 +512,11 @@
        struct cgsix_softc *sc = cgsix_cd.cd_devs[minor(dev)];
 
        cg6_reset(sc);
+
+       /* (re-)initialize the default color map */
+       bt_initcmap(&sc->sc_cmap, 256);
+       cg6_loadcmap(sc, 0, 256);
+
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index