Subject: kern/13117: cursor off is not alway cursor off
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/05/2001 21:36:06
>Number:         13117
>Category:       kern
>Synopsis:       cursor off is not always cursor off
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 05 12:34:01 PDT 2001
>Originator:     Onno van der Linden
>Release:        <NetBSD-current source date> 21-May-2001
System: NetBSD sheep 1.5V NetBSD 1.5V (SHEEP) #6: Tue Jun 5 14:39:33 MEST 2001 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
Architecture: i386
Machine: i386
This bug only is visible in kernels *without* the PCDISPLAY_SOFTCURSOR option.
Although a userland program (e.g. mutt) sets the cursor to off, the normally
absent blinking cursor appears. Not always, see below why.

	repeat start mutt and quit. And after some time the cursor *will*
	cursor off is currently done by setting it to a non-visible position.
pcdisplay_subr.c line 118 says: pos = 0x1010.
*BUT*, instead of a fix 4K display window, scrolling upwards is done by
manipulating the start of display offset in the 6845 register. It's
therefore possible with the right display offset to have a display window
in which position 0x1010 is between the start and end of the display.
The appended diff fixes this, unless someone implements a 128x64 tty
screen mode. (Maybe it should really be fixed by setting curend to
a smaller value than curbegin and use cursortmp from the pcdisplayscreen
structure to store curstart and curend, but that requires some more

*** /sys/dev/ic/pcdisplay_subr.c.orig	Tue Jun  5 20:55:01 2001
--- /sys/dev/ic/pcdisplay_subr.c	Tue Jun  5 20:52:08 2001
*** 115,121 ****
  	if (scr->active) {
  		if (!on)
! 			pos = 0x1010;
  			pos = scr->dispoffset / 2
  				+ row * scr->type->ncols + col;
--- 115,121 ----
  	if (scr->active) {
  		if (!on)
! 			pos = 0x3fff;
  			pos = scr->dispoffset / 2
  				+ row * scr->type->ncols + col;