-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.
This commit is contained in:
drochner 2001-09-04 17:14:49 +00:00
parent f2fabb4c48
commit 03d3e7a8b4
1 changed files with 12 additions and 7 deletions

View File

@ -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 @@ pcdisplay_cursor_init(scr, existing)
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 @@ pcdisplay_cursor_init(scr, existing)
/*
* 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 @@ pcdisplay_cursor(id, on, row, col)
if (scr->active) {
if (!on)
pos = 0x1010;
pos = 0x3fff;
else
pos = scr->dispoffset / 2
+ row * scr->type->ncols + col;