History log of /netbsd-current/sys/dev/wscons/wsdisplayvar.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.57 01-Mar-2023 riastradh

nouveau: Kick out genfb on firmware framebuffer before initializing.

PR kern/53126


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
# 1.56 29-Jan-2022 uwe

Default WSDISPLAY_BORDER_COLOR to WS_DEFAULT_BG.
Avoids black overscan area when WS_DEFAULT_BG is set.


Revision tags: netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.55 30-Jan-2019 jmcneill

Suspend multicons output to the old console device while replaying
the vcons msgbuf.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.54 04-Dec-2018 mlelstv

rasops reused wscons attribute bits for internal control.
- make upper 4 attribute bits available for such use
- use wscons flag names instead of literal constants.


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
# 1.53 26-Sep-2018 bouyer

Introduce wsdisplay_isconsole(struct wsdisplay_softc *), which
returns sc->sc_isconsole


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base
# 1.52 19-May-2017 macallan

branches: 1.52.8; 1.52.10;
add support for loading fonts in vcons and subsequently resizing screens
- drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE
- each vcons screen can now have its own font and geometry
- while there, add support for xterm's ESC[18t to report the text buffer's
size

With this tou can:
wsfontload -N foo /usr/share/wscons/fonts/flori.816
wsconsctl -dw font=foo
currently this is limited to drivers that don't use the glyph cache, like genfb


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.51 21-Jan-2014 mlelstv

branches: 1.51.6;
add function to detach wscons from a console. This allows to
switch the console to a different driver.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
# 1.50 31-Jan-2013 macallan

branches: 1.50.2;
add ioctl(WSDISPLAYIO_GET_FBINFO)


Revision tags: netbsd-6-0-6-RELEASE yamt-pagecache-tag8 netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.49 29-Jun-2011 macallan

branches: 1.49.2; 1.49.8; 1.49.12;
declare wsdisplayio_get_edid()


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base
# 1.48 02-Feb-2010 drochner

give up some silly macros which were only used ~once, and reduce
dependency on "locators.h"
makes the code more LKM frienly


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 mjf-devfs2-base
# 1.47 25-Mar-2008 cube

branches: 1.47.4;
Split device_t and softc for wskbd(4), wsmouse(4) and that creepy wsmux(4).


Revision tags: yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.46 20-Feb-2008 drochner

branches: 1.46.6;
-Don't detach/attach the X server in the pmf suspend/resume functions
which are called somewhere in the middle of system suspend. Since the
X server accesses hardware directly it is outside our control whether
the devices it accesses are already/still suspended or not, so the only
way is to detach it before any device suspends and re-attach after
everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
server is not detached on suspend is to return an error which should
abort the suspend process. pmf doesn't yet handle errors of device
suspend handlers, so as a temporary measure try to suspend anyway,
to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
which tracks whether the X server is really active.


Revision tags: vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base
# 1.45 13-Dec-2007 joerg

Switch to console on suspend and shutdown, switch back to where the
system was before on resume. This is the second attempt and got more
complicated due to the async nature of VT_ACTIVE. After the initial
switch, check that we ended up on the first screen and if not, wait for
the switch to happen.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.44 19-Oct-2007 dogcow

branches: 1.44.4; 1.44.8;
If you're going to use device_t, may as well include sys/device.h; unb0rks
the build for sparc{,64}.


# 1.43 18-Oct-2007 joerg

Use aprint API for output and convert to device_t/softc separation.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.42 04-Mar-2007 christos

branches: 1.42.2; 1.42.14; 1.42.16; 1.42.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.41 06-Nov-2006 macallan

branches: 1.41.4;
add wsdisplay_preattach() to attach an early console that can be overridden
by wsdisplay_cnattach() for instance when a hardware-specific display driver
attaches.
as discussed on tech-kern


Revision tags: yamt-splraiseipl-base2
# 1.40 09-Oct-2006 peter

KNF: No variable names in the prototype.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.39 15-Apr-2006 jmmv

branches: 1.39.8; 1.39.10;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.


# 1.38 12-Apr-2006 jmmv

Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.


Revision tags: yamt-pdpolicy-base4
# 1.37 07-Apr-2006 drochner

don't include opt_wsdisplay_border.h here, to limit dependencies


# 1.36 05-Apr-2006 drochner

Use the existing ioctl path to call WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER
instead of a separate accessops entry. There is no need to introduce bloat
for the majority of drivers which don't implement this feature.
This should also resolve PR kern/33186 by Valeriy E. Ushakov.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.35 19-Feb-2006 jmcneill

branches: 1.35.2; 1.35.4; 1.35.6;
Multiple inclusion protection.


# 1.34 11-Dec-2005 christos

branches: 1.34.2; 1.34.4; 1.34.6;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.33 29-May-2005 christos

branches: 1.33.2;
- sprinkle const.
- avoid variable shadowing.


# 1.32 23-May-2005 martin

Rename REALWHITE to SNOWWHITE.
While there, add LIGHT versions of the other predefined colours as well.


# 1.31 22-May-2005 martin

Define a real white color - since WSCOL_WHITE is ANSI-emulation specific
defined as grey (which can't be fixed w/o breaking user config files).
Fixes PR kern/30064.


Revision tags: yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 kent-audio2-base
# 1.30 04-Feb-2005 perry

branches: 1.30.4;
de-__P


Revision tags: yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.29 29-Jul-2004 jmmv

branches: 1.29.4; 1.29.6;
Implement border color customization in wscons(4), only available for vga(4)
at the moment.

This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively. Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).

It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.

Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others). The later is always commented out, leaving the usual black
border as a default.

wsconsctl is modified to allow accessing this value easily. For example,
'wsconsctl -d -w border=blue'.


# 1.28 28-Jul-2004 jmmv

Implement support to dynamically change wscons console and kernel colors.

Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it. This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
change the colors dynamically from userland. This is enabled by default
in the GENERIC kernel (as well as others) but disabled on all INSTALL*
kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
which specify the default colors for the console at boot time. These have
the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.


# 1.27 28-May-2004 christos

move scroll function definition last.


# 1.26 28-May-2004 christos

PR/19925: David Ferlier: Add scrolling support to wscons.


Revision tags: netbsd-2-0-base
# 1.25 29-Jun-2003 fvdl

branches: 1.25.2; 1.25.4;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.


# 1.24 28-Jun-2003 darrenr

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.23 15-Oct-2002 junyoung

Add modecookie to struct wsscreen_descr, which is used to point to video
mode specific information.


Revision tags: gehenna-devsw-base kqueue-base
# 1.22 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


# 1.21 26-Jun-2002 christos

PR/17402: Add wsmoused support by providing get/set char and events.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base
# 1.20 13-Oct-2001 augustss

branches: 1.20.10;
ANSIfy.


# 1.19 13-Oct-2001 augustss

Two changes to the wsmux code:
* Allow the wsmux used by wsdisplay for the keyboard(s) to be explicitely
specified with the kbdmux locator.
* Allow keyboards and mice that have a mux to be opened in the regular way.
These changes should be totally backwards compatible.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.18 30-Dec-2000 sato

branches: 1.18.2; 1.18.4;
notify console polling mode or not to lower level framebuffer driver.
notify EMUL mode or not to lower level framebuffer driver.
these may use framebuffer level hardware acceleration/software optimization.


# 1.17 10-Sep-2000 lukem

* rename vga_stdscreen* -> vga_25lscreen*
* in vga_init(), set the screen type to WSCONS_DEFAULT_TYPE, which defaults
to "80x25".
XXX: the code currently makes no attempt to ensure that a font
with the appropriate width & height is available, effectively
limiting this default to either "80x25" or "80x24" at this
time.
* make wsdisplay_screentype_pick() non static, so that vga_init() can use it


# 1.16 10-Sep-2000 takemura

Introduce WSDISPLAY_NULLSCREEN to allow low level device to detach control
process. Hpcmips frame buffer driver(hpcfb) call wsdisplay_switch with
WSDISPLAY_NULLSCREEN to notify user process of suspend/resume event.


# 1.15 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

branches: 1.14.4;
-allow the "show_screen" call to the display driver to complete
asynchronously, in the same style like the process attach/detach functions
-intercept the "cnpollc" call which originally went directly to the
keyboard driver and keep track whether the console is in "polling" state
(DDB!)
-pass a NULL callback to the screen switcher and the process attach/detach
functions if the console is "polling", to tell them that asynchronous
completion is forbidden


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.13 19-Oct-1999 mycroft

branches: 1.13.2;
Split wsdisplay_usl_ioctl() into two functions -- one which is screen-dependent
and one which isn't. The latter is now used for ttyEcfg, enabling the
VT-switching ioctls to work on it. (This allows Linux X servers to work when
/emul/linux/dev/tty0 is linked to /dev/ttyEcfg.)


# 1.12 12-Oct-1999 jdolecek

branches: 1.12.2;
add wsdisplay_switchtoconsole() to allow other parts of kernel to force
the wscons to switch to console; code taken from wsdisplay_shutdownhook(),
which is now just a wrapper around wsdisplay_switchtoconsole()


Revision tags: kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.11 12-Feb-1999 drochner

branches: 1.11.2; 1.11.8;
change the "mapchar" interface to return a "quality" or "match level"
arguments which allows to find approximations for characters which are
not present in a font


# 1.10 26-Jan-1999 drochner

improve error handling in 2 cases:
1. If the current screen becomes invalid (ie no focus anymore), always
set the keyboard to translating mode. Otherwise, we could get stuck
because the command keystokes don't come through.
2. Catch errors in attaching to a process (X server) - For this,
implement a callback mechanism similar to the detach case. Add an
argument to report an errno via callback.


# 1.9 13-Jan-1999 drochner

change the way fonts are handled: now we have a display-global ioctl
to download fonts and a per-screen call to select a font
allows easier sharing of ressources in the display driver
change the parameters to the load_font driver vector to pass all
available font information


# 1.8 09-Jan-1999 drochner

add ioctl()s for screen allocation/deallocation


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.7 13-Aug-1998 eeh

Merge paddr_t changes into the main branch.


Revision tags: eeh-paddr_t-base
# 1.6 28-Jul-1998 augustss

branches: 1.6.2;
Do locator related defines using defines from locators.h rather
than literal constants.


# 1.5 26-Jun-1998 drochner

define a "mapping" function which can be used by the emulation module
to display non-ASCII characters


# 1.4 20-Jun-1998 drochner

Change the calling interface for text output (to the graphics driver)
to take a single character at a time, where the character is an "int" now.
The old interface (took a string) was never called with more than 1
char to print, and the "int" allows us to handle charsets cleanly.


# 1.3 11-Jun-1998 drochner

Implement the VT access and keyboard control ioctl()s needed for
compatibility to PCVT, syscons and the Linux console.


# 1.2 14-May-1998 drochner

Simple screen attribute handling for wscons.
The graphics device driver passes a "default attribute" for normal text
output to the wscons framework. If the emulation module needs more
attributes (for different "renditions") it can allocate them via a
callback.
For now, only the "sun" emulation makes use of it.


# 1.1 22-Mar-1998 drochner

Initial import of cgd's new wscons code.


# 1.56 29-Jan-2022 uwe

Default WSDISPLAY_BORDER_COLOR to WS_DEFAULT_BG.
Avoids black overscan area when WS_DEFAULT_BG is set.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
# 1.55 30-Jan-2019 jmcneill

Suspend multicons output to the old console device while replaying
the vcons msgbuf.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.54 04-Dec-2018 mlelstv

rasops reused wscons attribute bits for internal control.
- make upper 4 attribute bits available for such use
- use wscons flag names instead of literal constants.


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
# 1.53 26-Sep-2018 bouyer

Introduce wsdisplay_isconsole(struct wsdisplay_softc *), which
returns sc->sc_isconsole


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base
# 1.52 19-May-2017 macallan

branches: 1.52.8; 1.52.10;
add support for loading fonts in vcons and subsequently resizing screens
- drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE
- each vcons screen can now have its own font and geometry
- while there, add support for xterm's ESC[18t to report the text buffer's
size

With this tou can:
wsfontload -N foo /usr/share/wscons/fonts/flori.816
wsconsctl -dw font=foo
currently this is limited to drivers that don't use the glyph cache, like genfb


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.51 21-Jan-2014 mlelstv

branches: 1.51.6;
add function to detach wscons from a console. This allows to
switch the console to a different driver.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
# 1.50 31-Jan-2013 macallan

branches: 1.50.2;
add ioctl(WSDISPLAYIO_GET_FBINFO)


Revision tags: netbsd-6-0-6-RELEASE yamt-pagecache-tag8 netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.49 29-Jun-2011 macallan

branches: 1.49.2; 1.49.8; 1.49.12;
declare wsdisplayio_get_edid()


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base
# 1.48 02-Feb-2010 drochner

give up some silly macros which were only used ~once, and reduce
dependency on "locators.h"
makes the code more LKM frienly


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 mjf-devfs2-base
# 1.47 25-Mar-2008 cube

branches: 1.47.4;
Split device_t and softc for wskbd(4), wsmouse(4) and that creepy wsmux(4).


Revision tags: yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.46 20-Feb-2008 drochner

branches: 1.46.6;
-Don't detach/attach the X server in the pmf suspend/resume functions
which are called somewhere in the middle of system suspend. Since the
X server accesses hardware directly it is outside our control whether
the devices it accesses are already/still suspended or not, so the only
way is to detach it before any device suspends and re-attach after
everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
server is not detached on suspend is to return an error which should
abort the suspend process. pmf doesn't yet handle errors of device
suspend handlers, so as a temporary measure try to suspend anyway,
to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
which tracks whether the X server is really active.


Revision tags: vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base
# 1.45 13-Dec-2007 joerg

Switch to console on suspend and shutdown, switch back to where the
system was before on resume. This is the second attempt and got more
complicated due to the async nature of VT_ACTIVE. After the initial
switch, check that we ended up on the first screen and if not, wait for
the switch to happen.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.44 19-Oct-2007 dogcow

branches: 1.44.4; 1.44.8;
If you're going to use device_t, may as well include sys/device.h; unb0rks
the build for sparc{,64}.


# 1.43 18-Oct-2007 joerg

Use aprint API for output and convert to device_t/softc separation.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.42 04-Mar-2007 christos

branches: 1.42.2; 1.42.14; 1.42.16; 1.42.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.41 06-Nov-2006 macallan

branches: 1.41.4;
add wsdisplay_preattach() to attach an early console that can be overridden
by wsdisplay_cnattach() for instance when a hardware-specific display driver
attaches.
as discussed on tech-kern


Revision tags: yamt-splraiseipl-base2
# 1.40 09-Oct-2006 peter

KNF: No variable names in the prototype.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.39 15-Apr-2006 jmmv

branches: 1.39.8; 1.39.10;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.


# 1.38 12-Apr-2006 jmmv

Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.


Revision tags: yamt-pdpolicy-base4
# 1.37 07-Apr-2006 drochner

don't include opt_wsdisplay_border.h here, to limit dependencies


# 1.36 05-Apr-2006 drochner

Use the existing ioctl path to call WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER
instead of a separate accessops entry. There is no need to introduce bloat
for the majority of drivers which don't implement this feature.
This should also resolve PR kern/33186 by Valeriy E. Ushakov.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.35 19-Feb-2006 jmcneill

branches: 1.35.2; 1.35.4; 1.35.6;
Multiple inclusion protection.


# 1.34 11-Dec-2005 christos

branches: 1.34.2; 1.34.4; 1.34.6;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.33 29-May-2005 christos

branches: 1.33.2;
- sprinkle const.
- avoid variable shadowing.


# 1.32 23-May-2005 martin

Rename REALWHITE to SNOWWHITE.
While there, add LIGHT versions of the other predefined colours as well.


# 1.31 22-May-2005 martin

Define a real white color - since WSCOL_WHITE is ANSI-emulation specific
defined as grey (which can't be fixed w/o breaking user config files).
Fixes PR kern/30064.


Revision tags: yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 kent-audio2-base
# 1.30 04-Feb-2005 perry

branches: 1.30.4;
de-__P


Revision tags: yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.29 29-Jul-2004 jmmv

branches: 1.29.4; 1.29.6;
Implement border color customization in wscons(4), only available for vga(4)
at the moment.

This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively. Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).

It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.

Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others). The later is always commented out, leaving the usual black
border as a default.

wsconsctl is modified to allow accessing this value easily. For example,
'wsconsctl -d -w border=blue'.


# 1.28 28-Jul-2004 jmmv

Implement support to dynamically change wscons console and kernel colors.

Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it. This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
change the colors dynamically from userland. This is enabled by default
in the GENERIC kernel (as well as others) but disabled on all INSTALL*
kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
which specify the default colors for the console at boot time. These have
the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.


# 1.27 28-May-2004 christos

move scroll function definition last.


# 1.26 28-May-2004 christos

PR/19925: David Ferlier: Add scrolling support to wscons.


Revision tags: netbsd-2-0-base
# 1.25 29-Jun-2003 fvdl

branches: 1.25.2; 1.25.4;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.


# 1.24 28-Jun-2003 darrenr

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.23 15-Oct-2002 junyoung

Add modecookie to struct wsscreen_descr, which is used to point to video
mode specific information.


Revision tags: gehenna-devsw-base kqueue-base
# 1.22 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


# 1.21 26-Jun-2002 christos

PR/17402: Add wsmoused support by providing get/set char and events.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base
# 1.20 13-Oct-2001 augustss

branches: 1.20.10;
ANSIfy.


# 1.19 13-Oct-2001 augustss

Two changes to the wsmux code:
* Allow the wsmux used by wsdisplay for the keyboard(s) to be explicitely
specified with the kbdmux locator.
* Allow keyboards and mice that have a mux to be opened in the regular way.
These changes should be totally backwards compatible.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.18 30-Dec-2000 sato

branches: 1.18.2; 1.18.4;
notify console polling mode or not to lower level framebuffer driver.
notify EMUL mode or not to lower level framebuffer driver.
these may use framebuffer level hardware acceleration/software optimization.


# 1.17 10-Sep-2000 lukem

* rename vga_stdscreen* -> vga_25lscreen*
* in vga_init(), set the screen type to WSCONS_DEFAULT_TYPE, which defaults
to "80x25".
XXX: the code currently makes no attempt to ensure that a font
with the appropriate width & height is available, effectively
limiting this default to either "80x25" or "80x24" at this
time.
* make wsdisplay_screentype_pick() non static, so that vga_init() can use it


# 1.16 10-Sep-2000 takemura

Introduce WSDISPLAY_NULLSCREEN to allow low level device to detach control
process. Hpcmips frame buffer driver(hpcfb) call wsdisplay_switch with
WSDISPLAY_NULLSCREEN to notify user process of suspend/resume event.


# 1.15 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

branches: 1.14.4;
-allow the "show_screen" call to the display driver to complete
asynchronously, in the same style like the process attach/detach functions
-intercept the "cnpollc" call which originally went directly to the
keyboard driver and keep track whether the console is in "polling" state
(DDB!)
-pass a NULL callback to the screen switcher and the process attach/detach
functions if the console is "polling", to tell them that asynchronous
completion is forbidden


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.13 19-Oct-1999 mycroft

branches: 1.13.2;
Split wsdisplay_usl_ioctl() into two functions -- one which is screen-dependent
and one which isn't. The latter is now used for ttyEcfg, enabling the
VT-switching ioctls to work on it. (This allows Linux X servers to work when
/emul/linux/dev/tty0 is linked to /dev/ttyEcfg.)


# 1.12 12-Oct-1999 jdolecek

branches: 1.12.2;
add wsdisplay_switchtoconsole() to allow other parts of kernel to force
the wscons to switch to console; code taken from wsdisplay_shutdownhook(),
which is now just a wrapper around wsdisplay_switchtoconsole()


Revision tags: kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.11 12-Feb-1999 drochner

branches: 1.11.2; 1.11.8;
change the "mapchar" interface to return a "quality" or "match level"
arguments which allows to find approximations for characters which are
not present in a font


# 1.10 26-Jan-1999 drochner

improve error handling in 2 cases:
1. If the current screen becomes invalid (ie no focus anymore), always
set the keyboard to translating mode. Otherwise, we could get stuck
because the command keystokes don't come through.
2. Catch errors in attaching to a process (X server) - For this,
implement a callback mechanism similar to the detach case. Add an
argument to report an errno via callback.


# 1.9 13-Jan-1999 drochner

change the way fonts are handled: now we have a display-global ioctl
to download fonts and a per-screen call to select a font
allows easier sharing of ressources in the display driver
change the parameters to the load_font driver vector to pass all
available font information


# 1.8 09-Jan-1999 drochner

add ioctl()s for screen allocation/deallocation


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.7 13-Aug-1998 eeh

Merge paddr_t changes into the main branch.


Revision tags: eeh-paddr_t-base
# 1.6 28-Jul-1998 augustss

branches: 1.6.2;
Do locator related defines using defines from locators.h rather
than literal constants.


# 1.5 26-Jun-1998 drochner

define a "mapping" function which can be used by the emulation module
to display non-ASCII characters


# 1.4 20-Jun-1998 drochner

Change the calling interface for text output (to the graphics driver)
to take a single character at a time, where the character is an "int" now.
The old interface (took a string) was never called with more than 1
char to print, and the "int" allows us to handle charsets cleanly.


# 1.3 11-Jun-1998 drochner

Implement the VT access and keyboard control ioctl()s needed for
compatibility to PCVT, syscons and the Linux console.


# 1.2 14-May-1998 drochner

Simple screen attribute handling for wscons.
The graphics device driver passes a "default attribute" for normal text
output to the wscons framework. If the emulation module needs more
attributes (for different "renditions") it can allocate them via a
callback.
For now, only the "sun" emulation makes use of it.


# 1.1 22-Mar-1998 drochner

Initial import of cgd's new wscons code.


Revision tags: isaki-audio2-base
# 1.55 30-Jan-2019 jmcneill

Suspend multicons output to the old console device while replaying
the vcons msgbuf.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226
# 1.54 04-Dec-2018 mlelstv

rasops reused wscons attribute bits for internal control.
- make upper 4 attribute bits available for such use
- use wscons flag names instead of literal constants.


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
# 1.53 26-Sep-2018 bouyer

Introduce wsdisplay_isconsole(struct wsdisplay_softc *), which
returns sc->sc_isconsole


Revision tags: pgoyette-compat-0906 jdolecek-ncqfixes-base pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base
# 1.52 19-May-2017 macallan

branches: 1.52.8;
add support for loading fonts in vcons and subsequently resizing screens
- drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE
- each vcons screen can now have its own font and geometry
- while there, add support for xterm's ESC[18t to report the text buffer's
size

With this tou can:
wsfontload -N foo /usr/share/wscons/fonts/flori.816
wsconsctl -dw font=foo
currently this is limited to drivers that don't use the glyph cache, like genfb


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 rmind-smpnet-nbase rmind-smpnet-base tls-maxphys-base
# 1.51 21-Jan-2014 mlelstv

branches: 1.51.6;
add function to detach wscons from a console. This allows to
switch the console to a different driver.


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base
# 1.50 31-Jan-2013 macallan

branches: 1.50.2;
add ioctl(WSDISPLAYIO_GET_FBINFO)


Revision tags: netbsd-6-0-6-RELEASE yamt-pagecache-tag8 netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 jmcneill-usbmp-base10 yamt-pagecache-base5 jmcneill-usbmp-base9 yamt-pagecache-base4 jmcneill-usbmp-base8 jmcneill-usbmp-base7 jmcneill-usbmp-base6 jmcneill-usbmp-base5 jmcneill-usbmp-base4 jmcneill-usbmp-base3 jmcneill-usbmp-pre-base2 jmcneill-usbmp-base2 netbsd-6-base jmcneill-usbmp-base jmcneill-audiomp3-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
# 1.49 29-Jun-2011 macallan

branches: 1.49.2; 1.49.8; 1.49.12;
declare wsdisplayio_get_edid()


Revision tags: rmind-uvmplock-nbase cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base jruoho-x86intr-base matt-mips64-premerge-20101231 uebayasi-xip-base4 uebayasi-xip-base3 yamt-nfs-mp-base11 uebayasi-xip-base2 yamt-nfs-mp-base10 uebayasi-xip-base1 rmind-uvmplock-base yamt-nfs-mp-base9 uebayasi-xip-base
# 1.48 02-Feb-2010 drochner

give up some silly macros which were only used ~once, and reduce
dependency on "locators.h"
makes the code more LKM frienly


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 yamt-nfs-mp-base8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 yamt-nfs-mp-base7 netbsd-5-0-1-RELEASE jymxensuspend-base yamt-nfs-mp-base6 yamt-nfs-mp-base5 yamt-nfs-mp-base4 jym-xensuspend-nbase yamt-nfs-mp-base3 nick-hppapmap-base4 nick-hppapmap-base3 netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 nick-hppapmap-base2 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 haad-dm-base2 haad-nbase2 ad-audiomp2-base netbsd-5-base nick-hppapmap-base matt-mips64-base2 haad-dm-base1 wrstuden-revivesa-base-4 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 haad-dm-base wrstuden-revivesa-base-1 simonb-wapbl-nbase yamt-pf42-base4 simonb-wapbl-base yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 yamt-nfs-mp-base2 wrstuden-revivesa-base yamt-nfs-mp-base yamt-pf42-base ad-socklock-base1 mjf-devfs2-base
# 1.47 25-Mar-2008 cube

branches: 1.47.4;
Split device_t and softc for wskbd(4), wsmouse(4) and that creepy wsmux(4).


Revision tags: yamt-lazymbuf-base15 yamt-lazymbuf-base14 keiichi-mipv6-nbase nick-net80211-sync-base keiichi-mipv6-base matt-armv6-nbase hpcarm-cleanup-base
# 1.46 20-Feb-2008 drochner

branches: 1.46.6;
-Don't detach/attach the X server in the pmf suspend/resume functions
which are called somewhere in the middle of system suspend. Since the
X server accesses hardware directly it is outside our control whether
the devices it accesses are already/still suspended or not, so the only
way is to detach it before any device suspends and re-attach after
everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
server is not detached on suspend is to return an error which should
abort the suspend process. pmf doesn't yet handle errors of device
suspend handlers, so as a temporary measure try to suspend anyway,
to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
which tracks whether the X server is really active.


Revision tags: vmlocking2-base3 bouyer-xeni386-nbase bouyer-xeni386-base mjf-devfs-base matt-armv6-base
# 1.45 13-Dec-2007 joerg

Switch to console on suspend and shutdown, switch back to where the
system was before on resume. This is the second attempt and got more
complicated due to the async nature of VT_ACTIVE. After the initial
switch, check that we ended up on the first screen and if not, wait for
the switch to happen.


Revision tags: yamt-kmem-base3 cube-autoconf-base yamt-kmem-base2 yamt-kmem-base vmlocking2-base2 reinoud-bufcleanup-nbase vmlocking2-base1 jmcneill-base bouyer-xenamd64-base2 vmlocking-nbase bouyer-xenamd64-base jmcneill-pm-base reinoud-bufcleanup-base
# 1.44 19-Oct-2007 dogcow

branches: 1.44.4; 1.44.8;
If you're going to use device_t, may as well include sys/device.h; unb0rks
the build for sparc{,64}.


# 1.43 18-Oct-2007 joerg

Use aprint API for output and convert to device_t/softc separation.


Revision tags: nick-csl-alignment-base5 yamt-x86pmap-base4 yamt-x86pmap-base3 yamt-x86pmap-base2 yamt-x86pmap-base matt-mips64-base nick-csl-alignment-base yamt-idlelwp-base8 thorpej-atomic-base mjf-ufs-trans-base vmlocking-base
# 1.42 04-Mar-2007 christos

branches: 1.42.2; 1.42.14; 1.42.16; 1.42.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 matt-nb4-arm-base netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base ad-audiomp-base post-newlock2-merge newlock2-nbase yamt-splraiseipl-base5 yamt-splraiseipl-base4 yamt-splraiseipl-base3 newlock2-base netbsd-4-base
# 1.41 06-Nov-2006 macallan

branches: 1.41.4;
add wsdisplay_preattach() to attach an early console that can be overridden
by wsdisplay_cnattach() for instance when a hardware-specific display driver
attaches.
as discussed on tech-kern


Revision tags: yamt-splraiseipl-base2
# 1.40 09-Oct-2006 peter

KNF: No variable names in the prototype.


Revision tags: abandoned-netbsd-4-base yamt-splraiseipl-base yamt-pdpolicy-base9 yamt-pdpolicy-base8 yamt-pdpolicy-base7 yamt-pdpolicy-base6 chap-midi-nbase gdamore-uart-base yamt-pdpolicy-base5 chap-midi-base elad-kernelauth-base simonb-timecounters-base rpaulo-netinet-merge-pcb-base
# 1.39 15-Apr-2006 jmmv

branches: 1.39.8; 1.39.10;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@. These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@. No objections in tech-kern@.


# 1.38 12-Apr-2006 jmmv

Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.


Revision tags: yamt-pdpolicy-base4
# 1.37 07-Apr-2006 drochner

don't include opt_wsdisplay_border.h here, to limit dependencies


# 1.36 05-Apr-2006 drochner

Use the existing ioctl path to call WSDISPLAYIO_GBORDER/WSDISPLAYIO_SBORDER
instead of a separate accessops entry. There is no need to introduce bloat
for the majority of drivers which don't implement this feature.
This should also resolve PR kern/33186 by Valeriy E. Ushakov.


Revision tags: yamt-pdpolicy-base3 peter-altq-base yamt-pdpolicy-base2 yamt-pdpolicy-base yamt-uio_vmspace-base5
# 1.35 19-Feb-2006 jmcneill

branches: 1.35.2; 1.35.4; 1.35.6;
Multiple inclusion protection.


# 1.34 11-Dec-2005 christos

branches: 1.34.2; 1.34.4; 1.34.6;
merge ktrace-lwp.


Revision tags: yamt-readahead-base3 yamt-readahead-base2 yamt-readahead-pervnode yamt-readahead-perfile yamt-readahead-base yamt-vop-base3 yamt-vop-base2 thorpej-vnode-attr-base yamt-vop-base ktrace-lwp-base
# 1.33 29-May-2005 christos

branches: 1.33.2;
- sprinkle const.
- avoid variable shadowing.


# 1.32 23-May-2005 martin

Rename REALWHITE to SNOWWHITE.
While there, add LIGHT versions of the other predefined colours as well.


# 1.31 22-May-2005 martin

Define a real white color - since WSCOL_WHITE is ANSI-emulation specific
defined as grey (which can't be fixed w/o breaking user config files).
Fixes PR kern/30064.


Revision tags: yamt-km-base4 yamt-km-base3 netbsd-3-base yamt-km-base2 kent-audio2-base
# 1.30 04-Feb-2005 perry

branches: 1.30.4;
de-__P


Revision tags: yamt-km-base kent-audio1-beforemerge kent-audio1-base
# 1.29 29-Jul-2004 jmmv

branches: 1.29.4; 1.29.6;
Implement border color customization in wscons(4), only available for vga(4)
at the moment.

This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively. Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).

It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.

Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others). The later is always commented out, leaving the usual black
border as a default.

wsconsctl is modified to allow accessing this value easily. For example,
'wsconsctl -d -w border=blue'.


# 1.28 28-Jul-2004 jmmv

Implement support to dynamically change wscons console and kernel colors.

Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it. This is optional, which means that this also works with other drivers
that don't have this new operation.

Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
change the colors dynamically from userland. This is enabled by default
in the GENERIC kernel (as well as others) but disabled on all INSTALL*
kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
which specify the default colors for the console at boot time. These have
the same meaning as the (already existing) WS_KERNEL_* variables.

wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.


# 1.27 28-May-2004 christos

move scroll function definition last.


# 1.26 28-May-2004 christos

PR/19925: David Ferlier: Add scrolling support to wscons.


Revision tags: netbsd-2-0-base
# 1.25 29-Jun-2003 fvdl

branches: 1.25.2; 1.25.4;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.


# 1.24 28-Jun-2003 darrenr

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V


Revision tags: nathanw_sa_before_merge fvdl_fs64_base gmcgarry_ctxsw_base gmcgarry_ucred_base nathanw_sa_base kqueue-aftermerge kqueue-beforemerge
# 1.23 15-Oct-2002 junyoung

Add modecookie to struct wsscreen_descr, which is used to point to video
mode specific information.


Revision tags: gehenna-devsw-base kqueue-base
# 1.22 04-Jul-2002 junyoung

alloc_attr -> allocattr

Approved by Matthias Drochner.


# 1.21 26-Jun-2002 christos

PR/17402: Add wsmoused support by providing get/set char and events.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base eeh-devprop-base newlock-base ifpoll-base thorpej-mips-cache-base
# 1.20 13-Oct-2001 augustss

branches: 1.20.10;
ANSIfy.


# 1.19 13-Oct-2001 augustss

Two changes to the wsmux code:
* Allow the wsmux used by wsdisplay for the keyboard(s) to be explicitely
specified with the kbdmux locator.
* Allow keyboards and mice that have a mux to be opened in the regular way.
These changes should be totally backwards compatible.


Revision tags: thorpej-devvp-base3 thorpej-devvp-base2 post-chs-ubcperf pre-chs-ubcperf thorpej-devvp-base thorpej_scsipi_beforemerge thorpej_scsipi_nbase thorpej_scsipi_base
# 1.18 30-Dec-2000 sato

branches: 1.18.2; 1.18.4;
notify console polling mode or not to lower level framebuffer driver.
notify EMUL mode or not to lower level framebuffer driver.
these may use framebuffer level hardware acceleration/software optimization.


# 1.17 10-Sep-2000 lukem

* rename vga_stdscreen* -> vga_25lscreen*
* in vga_init(), set the screen type to WSCONS_DEFAULT_TYPE, which defaults
to "80x25".
XXX: the code currently makes no attempt to ensure that a font
with the appropriate width & height is available, effectively
limiting this default to either "80x25" or "80x24" at this
time.
* make wsdisplay_screentype_pick() non static, so that vga_init() can use it


# 1.16 10-Sep-2000 takemura

Introduce WSDISPLAY_NULLSCREEN to allow low level device to detach control
process. Hpcmips frame buffer driver(hpcfb) call wsdisplay_switch with
WSDISPLAY_NULLSCREEN to notify user process of suspend/resume event.


# 1.15 26-Jun-2000 simonb

Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes. Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.


Revision tags: netbsd-1-5-base minoura-xpg4dl-base chs-ubc2-newbase wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.14 06-Dec-1999 drochner

branches: 1.14.4;
-allow the "show_screen" call to the display driver to complete
asynchronously, in the same style like the process attach/detach functions
-intercept the "cnpollc" call which originally went directly to the
keyboard driver and keep track whether the console is in "polling" state
(DDB!)
-pass a NULL callback to the screen switcher and the process attach/detach
functions if the console is "polling", to tell them that asynchronous
completion is forbidden


Revision tags: comdex-fall-1999-base fvdl-softdep-base
# 1.13 19-Oct-1999 mycroft

branches: 1.13.2;
Split wsdisplay_usl_ioctl() into two functions -- one which is screen-dependent
and one which isn't. The latter is now used for ttyEcfg, enabling the
VT-switching ioctls to work on it. (This allows Linux X servers to work when
/emul/linux/dev/tty0 is linked to /dev/ttyEcfg.)


# 1.12 12-Oct-1999 jdolecek

branches: 1.12.2;
add wsdisplay_switchtoconsole() to allow other parts of kernel to force
the wscons to switch to console; code taken from wsdisplay_shutdownhook(),
which is now just a wrapper around wsdisplay_switchtoconsole()


Revision tags: kame_141_19991130 netbsd-1-4-PATCH001 kame_14_19990705 kame_14_19990628 chs-ubc2-base netbsd-1-4-RELEASE netbsd-1-4-base
# 1.11 12-Feb-1999 drochner

branches: 1.11.2; 1.11.8;
change the "mapchar" interface to return a "quality" or "match level"
arguments which allows to find approximations for characters which are
not present in a font


# 1.10 26-Jan-1999 drochner

improve error handling in 2 cases:
1. If the current screen becomes invalid (ie no focus anymore), always
set the keyboard to translating mode. Otherwise, we could get stuck
because the command keystokes don't come through.
2. Catch errors in attaching to a process (X server) - For this,
implement a callback mechanism similar to the detach case. Add an
argument to report an errno via callback.


# 1.9 13-Jan-1999 drochner

change the way fonts are handled: now we have a display-global ioctl
to download fonts and a per-screen call to select a font
allows easier sharing of ressources in the display driver
change the parameters to the load_font driver vector to pass all
available font information


# 1.8 09-Jan-1999 drochner

add ioctl()s for screen allocation/deallocation


Revision tags: kenh-if-detach-base chs-ubc-base
# 1.7 13-Aug-1998 eeh

Merge paddr_t changes into the main branch.


Revision tags: eeh-paddr_t-base
# 1.6 28-Jul-1998 augustss

branches: 1.6.2;
Do locator related defines using defines from locators.h rather
than literal constants.


# 1.5 26-Jun-1998 drochner

define a "mapping" function which can be used by the emulation module
to display non-ASCII characters


# 1.4 20-Jun-1998 drochner

Change the calling interface for text output (to the graphics driver)
to take a single character at a time, where the character is an "int" now.
The old interface (took a string) was never called with more than 1
char to print, and the "int" allows us to handle charsets cleanly.


# 1.3 11-Jun-1998 drochner

Implement the VT access and keyboard control ioctl()s needed for
compatibility to PCVT, syscons and the Linux console.


# 1.2 14-May-1998 drochner

Simple screen attribute handling for wscons.
The graphics device driver passes a "default attribute" for normal text
output to the wscons framework. If the emulation module needs more
attributes (for different "renditions") it can allocate them via a
callback.
For now, only the "sun" emulation makes use of it.


# 1.1 22-Mar-1998 drochner

Initial import of cgd's new wscons code.