Module Name: src Committed By: macallan Date: Wed Aug 22 21:17:58 UTC 2012
Modified Files: src/sys/dev/ic: ct65550.c Log Message: - use R3G3B2 palette - don't muck around in config registers that don't really concern us To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/ct65550.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/ct65550.c diff -u src/sys/dev/ic/ct65550.c:1.5 src/sys/dev/ic/ct65550.c:1.6 --- src/sys/dev/ic/ct65550.c:1.5 Wed May 23 18:39:30 2012 +++ src/sys/dev/ic/ct65550.c Wed Aug 22 21:17:58 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: ct65550.c,v 1.5 2012/05/23 18:39:30 macallan Exp $ */ +/* $NetBSD: ct65550.c,v 1.6 2012/08/22 21:17:58 macallan Exp $ */ /* * Copyright (c) 2006 Michael Lorenz @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.5 2012/05/23 18:39:30 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ct65550.c,v 1.6 2012/08/22 21:17:58 macallan Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -195,6 +195,7 @@ chipsfb_do_attach(struct chipsfb_softc * bool console = false; int width, height, i, j; uint32_t bg, fg, ul; + uint8_t cmap[768]; dict = device_properties(sc->sc_dev); sc->sc_mode = WSDISPLAYIO_MODE_EMUL; @@ -276,12 +277,12 @@ chipsfb_do_attach(struct chipsfb_softc * #endif j = 0; + rasops_get_cmap(ri, cmap, sizeof(cmap)); for (i = 0; i < 256; i++) { - chipsfb_putpalreg(sc, i, rasops_cmap[j], rasops_cmap[j + 1], - rasops_cmap[j + 2]); + chipsfb_putpalreg(sc, i, cmap[j], cmap[j + 1], cmap[j + 2]); j += 3; } - + aa.console = console; aa.scrdata = &chipsfb_screenlist; aa.accessops = &chipsfb_accessops; @@ -811,7 +812,7 @@ chipsfb_init_screen(void *cookie, struct ri->ri_width = sc->width; ri->ri_height = sc->height; ri->ri_stride = sc->width; - ri->ri_flg = RI_CENTER | RI_FULLCLEAR; + ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_8BIT_IS_RGB; ri->ri_bits = bus_space_vaddr(sc->sc_memt, sc->sc_fbh); @@ -852,11 +853,6 @@ chipsfb_init(struct chipsfb_softc *sc) chipsfb_wait_idle(sc); - chipsfb_write_indexed(sc, CT_CONF_INDEX, XR_IO_CONTROL, - ENABLE_CRTC_EXT | ENABLE_ATTR_EXT); - chipsfb_write_indexed(sc, CT_CONF_INDEX, XR_ADDR_MAPPING, - ENABLE_LINEAR); - /* setup the blitter */ }