Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vsa Don't map the framebuffer again when attach...



details:   https://anonhg.NetBSD.org/src/rev/78d23822a8a7
branches:  trunk
changeset: 559532:78d23822a8a7
user:      mhitch <mhitch%NetBSD.org@localhost>
date:      Fri Mar 19 20:12:07 2004 +0000

description:
Don't map the framebuffer again when attaching the lcspx driver if it was
already mapped in the early console startup.

The software cursor isn't going to blink if we don't start it - set up the
callout when attaching.

Now that the cursor blink routine is actually called, blink the entire cursor
line rather than just the first pixel.

Don't try to clear the current cursor if the pointer to it hasn't been
initialized.  This seems to happen when using the display as console, but
not when using a serial console.

On early console startup, use the framebuffer sizes, not the character cell
size to compute how much to clear.

The lcspx display will now initialize when booting with the display console,
but the dz device is not detected and the keyboard will not work yet.  I
haven't tracked down why the dz device isn't found (it works fine when
using a serial console).

diffstat:

 sys/arch/vax/vsa/lcspx.c |  22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diffs (72 lines):

diff -r 88e52e3d0b6e -r 78d23822a8a7 sys/arch/vax/vsa/lcspx.c
--- a/sys/arch/vax/vsa/lcspx.c  Fri Mar 19 19:30:23 2004 +0000
+++ b/sys/arch/vax/vsa/lcspx.c  Fri Mar 19 20:12:07 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lcspx.c,v 1.1 2003/10/19 15:02:17 ragge Exp $ */
+/*     $NetBSD: lcspx.c,v 1.2 2004/03/19 20:12:07 mhitch Exp $ */
 /*
  * Copyright (c) 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lcspx.c,v 1.1 2003/10/19 15:02:17 ragge Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lcspx.c,v 1.2 2004/03/19 20:12:07 mhitch Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -196,7 +196,8 @@
 
        printf("\n");
        aa.console = lcspxaddr != NULL;
-       lcspxaddr = (caddr_t)vax_map_physmem(va->va_paddr, (SPXSIZE/VAX_NBPG));
+       if (lcspxaddr == 0)
+               lcspxaddr = (caddr_t)vax_map_physmem(va->va_paddr, (SPXSIZE/VAX_NBPG));
        if (lcspxaddr == 0) {
                printf("%s: Couldn't alloc graphics memory.\n", self->dv_xname);
                return;
@@ -207,6 +208,9 @@
        aa.accessops = &lcspx_accessops;
        qf = qvss8x15.data;
 
+       /* enable software cursor */
+       callout_reset(&lcspx_cursor_ch, hz / 2, lcspx_crsr_blink, NULL);
+
        config_found(self, &aa, wsemuldisplaydevprint);
 }
 
@@ -216,8 +220,11 @@
 static void
 lcspx_crsr_blink(void *arg)
 {
+       int i;
+
        if (cur_on)
-               *cursor ^= 255;
+               for (i = 0; i < 8; ++i)
+                       cursor[i] ^= 255;
        callout_reset(&lcspx_cursor_ch, hz / 2, lcspx_crsr_blink, NULL);
 }
 
@@ -230,8 +237,9 @@
        if (ss == curscr) {
                char ch = QFONT(ss->ss_image[ss->ss_cury][ss->ss_curx], 14);
 
-               for (i = 0; i < 8; i++)
-                       cursor[i] = (ch >> i) & 1;
+               if (cursor != NULL)
+                       for (i = 0; i < 8; i++)
+                               cursor[i] = (ch >> i) & 1;
                cursor = &SPX_ADDR(row, col, 14, 0);
                if ((cur_on = on))
                        for (i = 0; i < 8; i++)
@@ -452,7 +460,7 @@
 lcspxcninit(struct consdev *cndev)
 {
        /* Clear screen */
-       memset(lcspxaddr, 0, SPX_CHEIGHT * SPX_CWIDTH);
+       memset(lcspxaddr, 0, SPX_XWIDTH * SPX_YWIDTH);
 
        curscr = &lcspx_conscreen;
        wsdisplay_cnattach(&lcspx_stdscreen, &lcspx_conscreen, 0, 0, 0);



Home | Main Index | Thread Index | Old Index