Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic -update a comment wrt the "active screen" flag



details:   https://anonhg.NetBSD.org/src/rev/198b77f4a330
branches:  trunk
changeset: 514534:198b77f4a330
user:      drochner <drochner%NetBSD.org@localhost>
date:      Tue Sep 04 17:14:49 2001 +0000

description:
-update a comment wrt the "active screen" flag
-apply the patch from PR kern/13117 (Onno van der Linden) to make the
 hardware cursor disappear more thoroughly
-deal with PR kern/13573: hardware cursor too big, but differently:
 we have to obey the font size actually used. At this point, fix the
 problem that the cursor got messed up by the initialization of
 unrelated screens.

diffstat:

 sys/dev/ic/pcdisplay_subr.c |  19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diffs (48 lines):

diff -r f7b1c2d3f329 -r 198b77f4a330 sys/dev/ic/pcdisplay_subr.c
--- a/sys/dev/ic/pcdisplay_subr.c       Tue Sep 04 17:06:54 2001 +0000
+++ b/sys/dev/ic/pcdisplay_subr.c       Tue Sep 04 17:14:49 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcdisplay_subr.c,v 1.18 2001/07/07 15:53:20 thorpej Exp $ */
+/* $NetBSD: pcdisplay_subr.c,v 1.19 2001/09/04 17:14:49 drochner Exp $ */
 
 /*
  * Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -52,9 +52,9 @@
        
        if (existing) {
                /*
-                * This is the first screen. At this point, scr->active is
-                * false and scr->mem is NULL (no backing store), so we
-                * can't use pcdisplay_cursor() to do this.
+                * This is the first screen. At this point, scr->mem is NULL
+                * (no backing store), so we can't use pcdisplay_cursor() to
+                * do this.
                 */
                memt = scr->hdl->ph_memt;
                memh = scr->hdl->ph_memh;
@@ -69,9 +69,14 @@
        /*
         * Firmware might not have initialized the cursor shape.  Make
         * sure there's something we can see.
+        * Don't touch the hardware if this is not the first screen.
         */
-       pcdisplay_6845_write(scr->hdl, curstart, 0x0b);
-       pcdisplay_6845_write(scr->hdl, curend, 0x10);
+       if (existing) {
+               pcdisplay_6845_write(scr->hdl, curstart,
+                                    scr->type->fontheight - 2);
+               pcdisplay_6845_write(scr->hdl, curend,
+                                    scr->type->fontheight - 1);
+       }
 #endif
        scr->cursoron = 1;
 }
@@ -122,7 +127,7 @@
 
        if (scr->active) {
                if (!on)
-                       pos = 0x1010;
+                       pos = 0x3fff;
                else
                        pos = scr->dispoffset / 2
                                + row * scr->type->ncols + col;



Home | Main Index | Thread Index | Old Index