From b10827af3e24cd3c71ca74f41942c9f7aff3945c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 25 Jul 2002 19:04:47 +0000 Subject: Adapt the framebuffer code to the WSDISPLAY_TYPE constant changes, and add the necessary magic for wsemul_sun color handling. Initially based on a patch from jason@, then some tinkering by me. --- sys/arch/sparc64/dev/creator.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'sys/arch/sparc64') diff --git a/sys/arch/sparc64/dev/creator.c b/sys/arch/sparc64/dev/creator.c index c7e30a9659c..01f4872afd1 100644 --- a/sys/arch/sparc64/dev/creator.c +++ b/sys/arch/sparc64/dev/creator.c @@ -1,4 +1,4 @@ -/* $OpenBSD: creator.c,v 1.12 2002/06/11 06:53:03 fgsch Exp $ */ +/* $OpenBSD: creator.c,v 1.13 2002/07/25 19:04:43 miod Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -97,7 +97,6 @@ void creator_attach(struct creator_softc *sc) { struct wsemuldisplaydev_attach_args waa; - long defattr; char *model; int btype; @@ -140,10 +139,10 @@ creator_attach(struct creator_softc *sc) creator_stdscreen.nrows = sc->sc_rasops.ri_rows; creator_stdscreen.ncols = sc->sc_rasops.ri_cols; creator_stdscreen.textops = &sc->sc_rasops.ri_ops; - sc->sc_rasops.ri_ops.alloc_attr(&sc->sc_rasops, 0, 0, 0, &defattr); if (sc->sc_console) { int *ccolp, *crowp; + long defattr; if (romgetcursoraddr(&crowp, &ccolp)) ccolp = crowp = NULL; @@ -152,6 +151,14 @@ creator_attach(struct creator_softc *sc) if (crowp != NULL) sc->sc_rasops.ri_crow = *crowp; + /* fix color choice */ + wscol_white = 0; + wscol_black = 255; + wskernel_bg = 0; + wskernel_fg = 255; + + sc->sc_rasops.ri_ops.alloc_attr(&sc->sc_rasops, + 0, 0, 0, &defattr); wsdisplay_cnattach(&creator_stdscreen, &sc->sc_rasops, sc->sc_rasops.ri_ccol, sc->sc_rasops.ri_crow, defattr); } @@ -176,7 +183,7 @@ creator_ioctl(v, cmd, data, flags, p) switch (cmd) { case WSDISPLAYIO_GTYPE: - *(u_int *)data = WSDISPLAY_TYPE_SUNFFB; + *(u_int *)data = WSDISPLAY_TYPE_SUN24; break; case WSDISPLAYIO_SMODE: sc->sc_mode = *(u_int *)data; -- cgit v1.2.3