Respect video console colour designation by configration file.
This commit is contained in:
parent
80c0893a8b
commit
2eb68c00d2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cfb.c,v 1.18 2000/03/14 06:25:21 nisimura Exp $ */
|
||||
/* $NetBSD: cfb.c,v 1.19 2000/03/14 08:04:06 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.18 2000/03/14 06:25:21 nisimura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.19 2000/03/14 08:04:06 nisimura Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -335,7 +335,6 @@ cfbattach(parent, self, aux)
|
||||
struct cfb_softc *sc = (struct cfb_softc *)self;
|
||||
struct tc_attach_args *ta = aux;
|
||||
struct wsemuldisplaydev_attach_args waa;
|
||||
struct hwcmap256 *cm;
|
||||
int console;
|
||||
|
||||
console = (ta->ta_addr == cfb_consaddr);
|
||||
@ -351,9 +350,7 @@ cfbattach(parent, self, aux)
|
||||
printf(": %d x %d, %dbpp\n", sc->sc_dc->dc_wid, sc->sc_dc->dc_ht,
|
||||
sc->sc_dc->dc_depth);
|
||||
|
||||
cm = &sc->sc_cmap;
|
||||
memset(cm, 255, sizeof(struct hwcmap256)); /* XXX */
|
||||
cm->r[0] = cm->g[0] = cm->b[0] = 0; /* XXX */
|
||||
memcpy(&sc->sc_cmap, rasops_cmap, sizeof(struct hwcmap256));
|
||||
|
||||
sc->sc_cursor.cc_magic.x = CX_MAGIC_X;
|
||||
sc->sc_cursor.cc_magic.y = CX_MAGIC_Y;
|
||||
@ -632,13 +629,13 @@ cfbinit(dc)
|
||||
|
||||
/* build sane colormap */
|
||||
SELECT(vdac, 0);
|
||||
REG(vdac, bt_cmap) = 0; tc_wmb();
|
||||
REG(vdac, bt_cmap) = 0; tc_wmb();
|
||||
REG(vdac, bt_cmap) = 0; tc_wmb();
|
||||
for (i = 1; i < CMAP_SIZE; i++) {
|
||||
REG(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
REG(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
REG(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
for (i = 0; i < CMAP_SIZE; i++) {
|
||||
REG(vdac, bt_cmap) = rasops_cmap[3 * i + 0];
|
||||
tc_wmb();
|
||||
REG(vdac, bt_cmap) = rasops_cmap[3 * i + 1];
|
||||
tc_wmb();
|
||||
REG(vdac, bt_cmap) = rasops_cmap[3 * i + 2];
|
||||
tc_wmb();
|
||||
}
|
||||
|
||||
/* clear out cursor image */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tfb.c,v 1.22 2000/03/14 06:25:21 nisimura Exp $ */
|
||||
/* $NetBSD: tfb.c,v 1.23 2000/03/14 08:04:06 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.22 2000/03/14 06:25:21 nisimura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.23 2000/03/14 08:04:06 nisimura Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -386,7 +386,6 @@ tfbattach(parent, self, aux)
|
||||
struct tfb_softc *sc = (struct tfb_softc *)self;
|
||||
struct tc_attach_args *ta = aux;
|
||||
struct wsemuldisplaydev_attach_args waa;
|
||||
struct hwcmap256 *cm;
|
||||
int console;
|
||||
|
||||
console = (ta->ta_addr == tfb_consaddr);
|
||||
@ -401,9 +400,7 @@ tfbattach(parent, self, aux)
|
||||
}
|
||||
printf(": %d x %d, 8,24bpp\n", sc->sc_dc->dc_wid, sc->sc_dc->dc_ht);
|
||||
|
||||
cm = &sc->sc_cmap;
|
||||
memset(cm, 255, sizeof(struct hwcmap256)); /* XXX */
|
||||
cm->r[0] = cm->g[0] = cm->b[0] = 0; /* XXX */
|
||||
memcpy(&sc->sc_cmap, rasops_cmap, sizeof(struct hwcmap256));
|
||||
|
||||
sc->sc_cursor.cc_magic.x = TX_MAGIC_X;
|
||||
sc->sc_cursor.cc_magic.y = TX_MAGIC_Y;
|
||||
@ -699,13 +696,13 @@ tfbinit(dc)
|
||||
#endif
|
||||
|
||||
SELECT463(vdac, BT463_IREG_CPALETTE_RAM);
|
||||
BYTE(vdac, bt_cmap) = 0; tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = 0; tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = 0; tc_wmb();
|
||||
for (i = 1; i < 256; i++) {
|
||||
BYTE(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = 0xff; tc_wmb();
|
||||
for (i = 0; i < 256; i++) {
|
||||
BYTE(vdac, bt_cmap) = rasops_cmap[3 * i + 0];
|
||||
tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = rasops_cmap[3 * i + 1];
|
||||
tc_wmb();
|
||||
BYTE(vdac, bt_cmap) = rasops_cmap[3 * i + 2];
|
||||
tc_wmb();
|
||||
}
|
||||
|
||||
/* !? Eeeh !? */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xcfb.c,v 1.15 2000/03/14 06:25:21 nisimura Exp $ */
|
||||
/* $NetBSD: xcfb.c,v 1.16 2000/03/14 08:04:06 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.15 2000/03/14 06:25:21 nisimura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.16 2000/03/14 08:04:06 nisimura Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -292,7 +292,6 @@ xcfbattach(parent, self, aux)
|
||||
struct xcfb_softc *sc = (struct xcfb_softc *)self;
|
||||
struct tc_attach_args *ta = aux;
|
||||
struct wsemuldisplaydev_attach_args waa;
|
||||
struct hwcmap256 *cm;
|
||||
int console;
|
||||
|
||||
console = (ta->ta_addr == xcfb_consaddr);
|
||||
@ -308,9 +307,7 @@ xcfbattach(parent, self, aux)
|
||||
printf(": %d x %d, %dbpp\n", sc->sc_dc->dc_wid, sc->sc_dc->dc_ht,
|
||||
sc->sc_dc->dc_depth);
|
||||
|
||||
cm = &sc->sc_cmap;
|
||||
memset(cm, 255, sizeof(struct hwcmap256)); /* XXX */
|
||||
cm->r[0] = cm->g[0] = cm->b[0] = 0; /* XXX */
|
||||
memcpy(&sc->sc_cmap, rasops_cmap, sizeof(struct hwcmap256));
|
||||
|
||||
sc->sc_csr = IMS332_BPP_8 | IMS332_CSR_A_VTG_ENABLE;
|
||||
|
||||
@ -373,9 +370,14 @@ xcfbinit(dc)
|
||||
IMS332_BPP_8|IMS332_CSR_A_VTG_ENABLE);
|
||||
|
||||
/* build sane colormap */
|
||||
ims332_write_reg(IMS332_REG_LUT_BASE, 0);
|
||||
for (i = 1; i < CMAP_SIZE; i++)
|
||||
ims332_write_reg(IMS332_REG_LUT_BASE + i, 0xffffff);
|
||||
for (i = 0; i < CMAP_SIZE; i++) {
|
||||
const u_int8_t *p;
|
||||
u_int32_t bgr;
|
||||
|
||||
p = &rasops_cmap[3 * i];
|
||||
bgr = p[2] << 16 | p[1] << 8 | p[0];
|
||||
ims332_write_reg(IMS332_REG_LUT_BASE + i, bgr);
|
||||
}
|
||||
|
||||
/* clear out cursor image */
|
||||
for (i = 0; i < 512; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user