Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sbus fix off by one error in zx_fillrect()



details:   https://anonhg.NetBSD.org/src/rev/6ac3e662e99e
branches:  trunk
changeset: 750532:6ac3e662e99e
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Jan 05 04:17:49 2010 +0000

description:
fix off by one error in zx_fillrect()
while there, use vcons_replay_msgbuf()

diffstat:

 sys/dev/sbus/zx.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 5dffe4e7ccaa -r 6ac3e662e99e sys/dev/sbus/zx.c
--- a/sys/dev/sbus/zx.c Mon Jan 04 23:06:34 2010 +0000
+++ b/sys/dev/sbus/zx.c Tue Jan 05 04:17:49 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zx.c,v 1.33 2009/09/19 11:55:09 tsutsui Exp $  */
+/*     $NetBSD: zx.c,v 1.34 2010/01/05 04:17:49 macallan Exp $ */
 
 /*
  *  Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.33 2009/09/19 11:55:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zx.c,v 1.34 2010/01/05 04:17:49 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -325,7 +325,8 @@
                zx_defaultscreen.ncols = ri->ri_cols;
                zx_fillrect(sc, 0, 0, width, height,
                     ri->ri_devcmap[defattr >> 16], ZX_STD_ROP);
-               wsdisplay_cnattach(&zx_defaultscreen, ri, 0, 0, defattr);       
+               wsdisplay_cnattach(&zx_defaultscreen, ri, 0, 0, defattr);
+               vcons_replay_msgbuf(&zx_console_screen);
        } else {
                /* 
                 * we're not the console so we just clear the screen and don't 
@@ -849,7 +850,8 @@
 
        bus_space_write_4(sc->sc_bt, sc->sc_bhzdss0, zd_rop, rop);
        bus_space_write_4(sc->sc_bt, sc->sc_bhzdss0, zd_fg, bg);
-       bus_space_write_4(sc->sc_bt, sc->sc_bhzc, zc_extent, w | (h << 11));
+       bus_space_write_4(sc->sc_bt, sc->sc_bhzc, zc_extent,
+           (w - 1) | ((h - 1) << 11));
        bus_space_write_4(sc->sc_bt, sc->sc_bhzc, zc_fill,
            x | (y << 11) | 0x80000000);
 }
@@ -1084,6 +1086,7 @@
                                        sc->sc_mode = new_mode;
                                        if(new_mode == WSDISPLAYIO_MODE_EMUL)
                                        {
+                                               zx_reset(sc);
                                                vcons_redraw_screen(ms);
                                        }
                                }



Home | Main Index | Thread Index | Old Index