Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic - use R3G3B2 palette
details: https://anonhg.NetBSD.org/src/rev/c5ddb1d920d5
branches: trunk
changeset: 781145:c5ddb1d920d5
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Aug 22 21:17:58 2012 +0000
description:
- use R3G3B2 palette
- don't muck around in config registers that don't really concern us
diffstat:
sys/dev/ic/ct65550.c | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diffs (63 lines):
diff -r ed21e3f21e28 -r c5ddb1d920d5 sys/dev/ic/ct65550.c
--- a/sys/dev/ic/ct65550.c Wed Aug 22 21:15:17 2012 +0000
+++ b/sys/dev/ic/ct65550.c Wed Aug 22 21:17:58 2012 +0000
@@ -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 @@
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 @@
#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 @@
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_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 */
}
Home |
Main Index |
Thread Index |
Old Index