Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sun Only write to the framebuffer memory 32 bits at ...
details: https://anonhg.NetBSD.org/src/rev/ede1f26681b1
branches: trunk
changeset: 325062:ede1f26681b1
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Dec 02 15:54:06 2013 +0000
description:
Only write to the framebuffer memory 32 bits at a time. If we try to write
larger amounts, we will generate SER_WRITE|SER_SZERR with P4 framebuffers.
(Writing 64 bits at a time is the default with memset().)
Also, set the default attributes to zero to avoid vertical stripes from
uninitialised defattr.
XXX; screen is still not cleared of old text.
diffstat:
sys/dev/sun/bwtwo.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (52 lines):
diff -r 6c6c5579e0fd -r ede1f26681b1 sys/dev/sun/bwtwo.c
--- a/sys/dev/sun/bwtwo.c Mon Dec 02 14:05:51 2013 +0000
+++ b/sys/dev/sun/bwtwo.c Mon Dec 02 15:54:06 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bwtwo.c,v 1.30 2012/01/11 16:10:13 macallan Exp $ */
+/* $NetBSD: bwtwo.c,v 1.31 2013/12/02 15:54:06 jdc Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.30 2012/01/11 16:10:13 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bwtwo.c,v 1.31 2013/12/02 15:54:06 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -197,7 +197,7 @@
#if NWSDISPLAY > 0
struct wsemuldisplaydev_attach_args aa;
struct rasops_info *ri = &bw2_console_screen.scr_ri;
- unsigned long defattr;
+ unsigned long defattr = 0;
#endif
/* Fill in the remaining fbdevice values */
@@ -442,6 +442,7 @@
{
struct bwtwo_softc *sc = cookie;
struct rasops_info *ri = &scr->scr_ri;
+ char *bits;
ri->ri_depth = 1;
ri->ri_width = sc->sc_width;
@@ -451,8 +452,14 @@
ri->ri_bits = sc->sc_fb.fb_pixels;
- memset(sc->sc_fb.fb_pixels, (*defattr >> 16) & 0xff,
- sc->sc_stride * sc->sc_height);
+ /*
+ * Make sure that we set a maximum of 32 bits at a time,
+ * otherwise we'll see VME write errors if this is a P4 BW2.
+ */
+ for (bits = (char *) ri->ri_bits;
+ bits < (char *) ri->ri_bits + ri->ri_stride * ri->ri_height;
+ bits += 4);
+ memset(bits, (*defattr >> 16) & 0xff, 4);
rasops_init(ri, 0, 0);
ri->ri_caps = 0;
rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
Home |
Main Index |
Thread Index |
Old Index