From owner-svn-src-head@freebsd.org Sun Apr 9 10:32:45 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F52CD34FE9; Sun, 9 Apr 2017 10:32:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 682F6B6; Sun, 9 Apr 2017 10:32:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 7B4B21A092C; Sun, 9 Apr 2017 20:32:37 +1000 (AEST) Date: Sun, 9 Apr 2017 20:32:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Chernov cc: Bruce Evans , Bruce Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316642 - head/sys/dev/syscons In-Reply-To: <5d76f933-7d70-411f-9233-0f1e6b72023e@freebsd.org> Message-ID: <20170409195358.I2327@besplex.bde.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> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=lf6DMTtkoMZp8MRgiEkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Apr 2017 10:32:45 -0000 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