Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Apr 2017 20:32:36 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Andrey Chernov <ache@freebsd.org>
Cc:        Bruce Evans <brde@optusnet.com.au>, Bruce Evans <bde@freebsd.org>,  src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r316642 - head/sys/dev/syscons
Message-ID:  <20170409195358.I2327@besplex.bde.org>
In-Reply-To: <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org>
References:  <201704081000.v38A0dBU078784@repo.freebsd.org> <4a498d83-3b64-18ac-bb0f-890a0c2893fc@freebsd.org> <20170409150512.B1318@besplex.bde.org> <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 9 Apr 2017, Andrey Chernov wrote:

> On 09.04.2017 9:46, Bruce Evans wrote:
>>> Please don't forget that this 5 cells range (0xd0-0xd4, last one becomes
>>> SC_CURSOR_CHAR) can be redefined with "vidcontrol -M", it is needed for
>>> the case they overlap valid characters region for some code tables.
>>
>> I didn't forget it, but these cells are only used in text mode and there
>> are only 4 of them AFAIK (-M goes up to 252, which leaves space for only
>> 4 cells 252-255).  Text mode is is one case that has no renderer support
>> for the mouse cursor.
>
> Here is 5th one (depends of SC_MOUSE_CHAR which can be set in the kernel
> config):
>
> #if SC_MOUSE_CHAR <= SC_CURSOR_CHAR && SC_CURSOR_CHAR < (SC_MOUSE_CHAR + 4)
> #undef SC_CURSOR_CHAR
> #define SC_CURSOR_CHAR  (SC_MOUSE_CHAR + 4)
> #endif
>
>> NOTES gives the example of setting it to 0x3.  Then if the configured
>> SC_CURSOR_CHAR is inside the 4-char range for the mouse cursor, then
>
> AFAIK SC_CURSOR_CHAR kernel config or vidcontrol is not supported.
>
>> There is no way to reconfigure the cursor char AFAIK.  In fact, it
>> doesn't even seem to be configured -- SC_CURSOR_CHAR is never used,
>
> I remember times it was used but not remember how, log history needs to
> be browsed.

The initializations are well hidden in MD code: {arm,mips,powerpc,sparc64}
/.../sc_machdep.c and isa/syscons_isa.c.  This is sort of backwards.  The
MI initializations of sc->cursor_char are in MD files, while the more MD
default value of SC_CURSOR_CHAR is in an MI file.  Then sc->cursor_char
is only used by the vga renderer for text mode.  This is closely associated
with isa, so the initializations are mostly irrelevant since their result
is not used.

How do you initialize actual use of sc->cursor_char?  It is only used
when SC_NO_FONT_LOADING is not defined.  Configuring SC_PIXEL_MODE
forces SC_NO_FONT_LOADING to be undefined.  Except to test sc->cursor_char,
I removed the #undef for this.  Next, sc->cursor_char is only used if
scp->curs.attr_flags & CONS_CHAR_CURSOR.  vidcontrol only supports this
with blinking too, and I know I don't want that.  Anyway, font loading
is almost always defined.  Apparently the char cursor is turned off with
loadable fonts since it would mess up special fonts more than the default
font.  But not as much as the mouse cursor.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170409195358.I2327>