History log of /openbsd-current/sys/dev/wscons/wsconsio.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.101 19-Jan-2024 kettenis

Rename WSDISPLAY_TYPE_RKDRM to WSDISPLAY_TYPE_KMS such that we can use it
for other generic KMS drivers.

ok jsg@, matthieu@


Revision tags: OPENBSD_7_4_BASE
# 1.100 02-Jul-2023 bru

Add button mappings for two- and three-finger clicks on clickpads.

Based on a proposal of tobhe@.

ok tobhe@


# 1.99 20-Apr-2023 jcs

add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.98 15-Jul-2022 kettenis

Implement support for framebuffers that don't start on a page boundary.
This happens on the new 14" and 16" Macbook Pro where we deliberately use
a framebuffer that skips the first few lines to avoid "the notch".
The offset of the first pixel is added to struct wsdisplay_fbinfo. The
stride is added as well, mirroring the value returned by the
WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the
future. A compat ioctl is implemented to help the transition. The compat
code will be removed after OpenBSD 7.3 has been released.

ok miod@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.97 12-Mar-2021 kettenis

Add WSDISPLAYIO_DEPTH_30 in order to support 30-bit color support.

ok jsg@


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.100 02-Jul-2023 bru

Add button mappings for two- and three-finger clicks on clickpads.

Based on a proposal of tobhe@.

ok tobhe@


# 1.99 20-Apr-2023 jcs

add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.98 15-Jul-2022 kettenis

Implement support for framebuffers that don't start on a page boundary.
This happens on the new 14" and 16" Macbook Pro where we deliberately use
a framebuffer that skips the first few lines to avoid "the notch".
The offset of the first pixel is added to struct wsdisplay_fbinfo. The
stride is added as well, mirroring the value returned by the
WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the
future. A compat ioctl is implemented to help the transition. The compat
code will be removed after OpenBSD 7.3 has been released.

ok miod@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.97 12-Mar-2021 kettenis

Add WSDISPLAYIO_DEPTH_30 in order to support 30-bit color support.

ok jsg@


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.99 20-Apr-2023 jcs

add viogpu, a VirtIO GPU driver

works enough to get a console on qemu with more work to come from
others

feedback from miod
ok patrick


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.98 15-Jul-2022 kettenis

Implement support for framebuffers that don't start on a page boundary.
This happens on the new 14" and 16" Macbook Pro where we deliberately use
a framebuffer that skips the first few lines to avoid "the notch".
The offset of the first pixel is added to struct wsdisplay_fbinfo. The
stride is added as well, mirroring the value returned by the
WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the
future. A compat ioctl is implemented to help the transition. The compat
code will be removed after OpenBSD 7.3 has been released.

ok miod@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.97 12-Mar-2021 kettenis

Add WSDISPLAYIO_DEPTH_30 in order to support 30-bit color support.

ok jsg@


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.98 15-Jul-2022 kettenis

Implement support for framebuffers that don't start on a page boundary.
This happens on the new 14" and 16" Macbook Pro where we deliberately use
a framebuffer that skips the first few lines to avoid "the notch".
The offset of the first pixel is added to struct wsdisplay_fbinfo. The
stride is added as well, mirroring the value returned by the
WSDISPLAYIO_LINEBYTES ioctl, such that we can retire that one in the
future. A compat ioctl is implemented to help the transition. The compat
code will be removed after OpenBSD 7.3 has been released.

ok miod@


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.97 12-Mar-2021 kettenis

Add WSDISPLAYIO_DEPTH_30 in order to support 30-bit color support.

ok jsg@


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.97 12-Mar-2021 kettenis

Add WSDISPLAYIO_DEPTH_30 in order to support 30-bit color support.

ok jsg@


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.96 03-Mar-2021 bru

Add a configurable button mapping for tap gestures on touchpads.

Thanks to RJ Johnson for this work!

ok mpi@


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.95 01-Oct-2020 kettenis

Add astfb(4), a driver for the framebuffer of the Aspeed BMC found on
many POWER8 and POWER9 systems.


Revision tags: OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.94 22-Mar-2020 anton

zap trailing whitespace


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.93 03-Mar-2020 kettenis

Add WSDISPLAY_TYPE_RKDRM

ok patrick@, jsg@


Revision tags: OPENBSD_6_6_BASE
# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.92 19-Aug-2019 bru

Add a configuration option for reverse scrolling.

ok patrick@


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


Revision tags: OPENBSD_6_5_BASE
# 1.91 24-Mar-2019 bru

Add new event types for precision scrolling.


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.90 10-Nov-2018 bru

Remove the strong hysteresis filter.

It seems that the filter is obsolete, the default method is sufficient.
Simplify and clean up some related code in wsmouse.

ok mpi@


Revision tags: OPENBSD_6_4_BASE
# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.89 30-Jul-2018 jcs

define WSMOUSE_TYPE_TOUCHPAD so non-elantech drivers can stop
claiming to be elantech devices


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.88 07-May-2018 bru

Add logging options to wsmouse. Input and event logging for debug
purposes can be enabled and disabled by WSMOUSEIO_SETPARAMS
requests.


Revision tags: OPENBSD_6_3_BASE
# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster


# 1.87 15-Nov-2017 anton

Remove unused compat macros.

ok kettenis@ mpi@


# 1.86 24-Oct-2017 jsg

remove defines for ioctls the kernel doesn't recognise
ok mpi@


Revision tags: OPENBSD_6_2_BASE
# 1.85 18-Aug-2017 deraadt

Backout because it breaks ramdisks. Anyone making changes in the kernel
is required to consider or test ramdisks before commit.


# 1.84 18-Aug-2017 fcambus

Add compressed fonts support in the kernel.

The wsdisplay_font structure has been modified to add two new members
(zdata and zdata_len) to store compressed font data and its size. We
define compressed fonts by setting the data field to NULL and populating
the zdata and zdata_len fields.

In wsfont_lock(), we check if the selected font needs to be inflated,
and we call the newly introduced wsfont_inflate() if required.

OK kettenis@


# 1.83 15-Jun-2017 fcambus

We do not support iso7 nor pcvt encoding, so remove macro definitions
and commented entries.

OK mlarkin@


# 1.82 13-Jun-2017 fcambus

Increase WSFONT_NAME_SIZE size, this will allow storing longer font
names in wsdisplay_font structures.

OK deraadt@


# 1.81 06-Jun-2017 bru

Add support for tap gestures.


# 1.80 08-May-2017 bru

improved coordinate filters

ok mpi@


Revision tags: OPENBSD_6_1_BASE
# 1.79 16-Mar-2017 mpi

Simplify wstpad option handling:

- Remove unnecessary abstraction
- Make it possible to support new features/options without ABI break
- Remove some complexity and hard limits
- Simplify & keep documentation close to options

ok bru@


# 1.78 27-Feb-2017 bru

Handle touchpad input in wsmouse.

The wstpad file contains the core of a touchpad-input driver that
is coupled with wsmouse. It is active in compat-mode if wsmouse has
been configured for it.

ok @matthieu @stsp @mpi


# 1.77 23-Oct-2016 bru

Improved parameter handling in wsmouse and new ioctls for reading and
setting parameter values.

ok matthieu@


# 1.76 30-Sep-2016 kettenis

Add a WSKBDIO_GETENCODINGS ioctl that returns the supported keyboard
encodings.

ok deraadt@, jca@


# 1.75 14-Sep-2016 jcs

limit the number of fonts that can be loaded

ok millert mlarkin deraadt


Revision tags: OPENBSD_6_0_BASE
# 1.74 30-Mar-2016 bru

branches: 1.74.2;
Add support for multitouch input to wsmouse.

This change adds new input-processing functions to wsmouse and
adapts the touchpad drivers.

ok mpi@, shadchin@


Revision tags: OPENBSD_5_9_BASE
# 1.73 12-Dec-2015 jung

branches: 1.73.2;
add new ioctls to control keyboard backlights

tested by Bryan Vyhmeister, krw, tb, and myself

ok jcs krw tb


# 1.72 30-Aug-2015 yasuoka

Modify kernel to prepare boot from UEFI.

- Add new boot arg "bios_efi_info_t" to pass the paramters from UEFI
- Make bios(4) and acpi(4) be able to probe with the parameters from
UEFI
- Add efifb(8). It uses the framebuffer from UEFI and it will work as
a backend of wsdisplay(4) and wsfb (X11 video driver). Disabled by
the kernel config for this moment

input and ok kettenis


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.71 15-Jan-2015 jsg

Define a new wscons mouse type for Synaptics clickpad devices that lack
physical buttons. This will be used if the acpi pnpid for the mouse
matches a list provided by Synaptics found in Linux.

Combined with the xenocara changes this will remove the need for an xorg
config file for the x240/t440/t540 generation of thinkpads.

ok matthieu@ shadchin@ kettenis@


# 1.70 21-Dec-2014 shadchin

WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@


Revision tags: OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.69 17-Nov-2013 kettenis

Distinguish between inteldrm and radeondrm.

ok jsg@, miod@


# 1.68 20-Oct-2013 miod

WSDISPLAYIO_GTYPE ioctl support for KMS drivers. ok jsg@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.67 29-Oct-2012 stsp

Add support for Elantech touchpads to pms(4). This allows the X synaptics(4)
input driver to configure these touchpads properly, e.g. toggle tap-to-click,
two-finger scrolling, edge-scrolling, etc. So far these pads were working
only in PS/2 mouse compatibility mode.

Support for up to hardware version 3 has been implemented. But only version 3
has been tested so versions 1 and 2 remain disabled via #ifdef notyet until
someone tests (bugs in this code could seriously mess up the mouse and I
don't want to end up shipping such bugs in 5.3).

help and ok mpi@ shadchin@


Revision tags: OPENBSD_5_2_BASE
# 1.66 22-Jul-2012 shadchin

Fix for ClickPad. On issue pointed gilles@ and matthieu@

ok gilles@, matthieu@, mpi@, miod@, deraadt@


# 1.65 17-Apr-2012 miod

Add type numbers for upcoming sgi work, forgotten during newport(4) import.


Revision tags: OPENBSD_5_1_BASE
# 1.64 20-Sep-2011 shadchin

Prepare to add support ALPS touchpads

no objections mpi@ and matthieu@


Revision tags: OPENBSD_5_0_BASE
# 1.63 05-May-2011 shadchin

synaptics touchpad keep the current (pms) behaviour until WSMOUSEIO_SETMODE
ioctl is issued to switch to synaptics mode.

WSMOUSE_COMPAT - behavior conventional mouse (relative mode) (default)
WSMOUSE_NATIVE - full power synaptics

ok miod@


# 1.62 07-Apr-2011 shadchin

Prepare to add support Synaptics touchpads

ok miod@


Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
# 1.61 01-Jul-2010 maja

Make it possible to get the screen types and emulations for a wsdisplay.
Information needed for wsconscfg. feedback and ok miod@. -moj


Revision tags: OPENBSD_4_7_BASE
# 1.60 07-Mar-2010 miod

Minimalistic driver for the ImpactSR (Mardigras) video option found on older
Octane systems, as well as some Onyxes. With special permission to change a
systemwide .h file and add a manpage from deraadt@
Magic numbers and operation sequencing borrowed from Linux; tested on
Octane + ESI.
ok deraadt@


# 1.59 04-Mar-2010 jsing

Add wsdisplay type for SGI VPro (aka Odyssey)

ok miod@


# 1.58 28-Feb-2010 miod

Minimal frame buffer driver for the SiS 315 found on Lemote Fuloong systems.
Currently unable to change video modes or provide any form of acceleration,
so you are stuck in a 640x400x8 mode, but at least people scared of serial
consoles will get a chance to use their Fuloongs now.

Tested by otto@ (early developments) and jasper@ (final version)


# 1.57 25-Dec-2009 miod

A couple more device types.


# 1.56 21-Sep-2009 mglocker

Document a private ioctl range for wscons drivers (from Miod). Therefore
change the UDLIO_DAMAGE ioctl from 0 to 128 and move the ioctl part from
udl.h to udlio.h so we can include it in userland applications.

Suggested and OK miod@


Revision tags: OPENBSD_4_6_BASE
# 1.55 03-Jul-2009 kettenis

Add a wsdisplay type for an upcoming driver for the Sun XVR-100 framebuffer.

ok deraadt@


# 1.54 03-Jun-2009 kettenis

Define a wsdisplay type for gfxp(4).


# 1.53 02-Jun-2009 kettenis

Define a proper wsdisplay type for machfb(4).

requested by miod@


# 1.52 20-May-2009 miod

Add code to attach sun mice on sparc and sparc64 as wsmouse devices. Since
not all Sun mice run at the canonical 1200 bps, hop between 1200, 4800 and
9600 bps by paying attention to breaks on the line.

Attachement and engine code written 7 years ago for OpenBSD/sparc, except for
sparc64 com(4) attachment. Speed hop idea borrowed from Opensolaris.

This allows sparc and sparc64 users to run X11 without needing a configuration
file anymore, as it was in the XFree86 3.x days. Multihead configurations
will still need a minimal configuration file, though.


# 1.51 09-May-2009 mglocker

Initial console device driver for USB displays based on the DisplayLink
DL-120 / DL-160 graphic chips, using the wsdisplay(4) layer. Based on
the reversed engineered specifications of Florian Echtler. The driver
is disabled in GENERIC for now.

Thanks to claudio@ for donating me a device and to oga@ and miod@ for
giving me hints in the graphic and wsdisplay area.

OK deraadt


# 1.50 12-Mar-2009 kettenis

Define a proper wsdisplay type for raptor(4).

ok miod@


Revision tags: OPENBSD_4_5_BASE
# 1.49 29-Dec-2008 miod

Give ifb its own display type (be sure to make includes before rebuilding
wsconsctl)


# 1.48 24-Aug-2008 miod

Define a proper wsdisplay type for legss(4).


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE
# 1.47 27-Nov-2007 jsing

Add display type for SGI GBE.

ok miod@


# 1.46 01-Sep-2007 xsa

- Add bthidev(4), from NetBSD.
- Make btms(4) and btkbd(4) compile.
- Removed remaining proplib NetBSD'sim

Prodded a while ago by gwk@. Eyeballed by miod@.


Revision tags: OPENBSD_4_2_BASE
# 1.45 08-May-2007 robert

add swapxy, resx and resy to struct wsmouse_calibcoords,
so we can store these values here; ok miod@


# 1.44 10-Apr-2007 miod

Add support for a fourth axis on wsmouse devices, e.g. on the Apple Might
Mouse. Currently limited to USB mice.

Adapted from a diff from Gareth <garf@loveandnature.co.za> on tech@


Revision tags: OPENBSD_4_1_BASE
# 1.43 27-Nov-2006 gwk

commit vesabios for matthieu@
ok deraadt, "slap it in" miod@


Revision tags: OPENBSD_4_0_BASE
# 1.42 06-Aug-2006 miod

Convert the Sony wsfonts to ISO-Latin1 encoding, and drop the Sony encoding
conversion tables; from NetBSD.


# 1.41 24-Jul-2006 miod

Driver for the VS4000/90 frame buffer, adapted from NetBSD (ragge) and
Blaz Antonic's work, no acceleration yet, untested due to the lack of
hardware, but enough sacrifices were made to the RAMDAC Gods.


# 1.40 16-Apr-2006 miod

Preliminary driver for the Colorgraphic VoyagerVGA pcmcia frame buffer;
more like a proof of concept than anything useful, due to the slowness of the
beast, but deraadt@ insists this gets in the tree.

Written with matthieu@'s help.


# 1.39 14-Apr-2006 miod

Minimal support for the HP98705 ``Tigershark'' TurboVRX frame buffer
(using an overlay plane only for now). Bootblocks, text console and X11
are supported.


Revision tags: OPENBSD_3_9_BASE
# 1.38 14-Feb-2006 miod

Define a wsdisplay type for the Sun ZX/Leo frame buffer.


# 1.37 09-Jan-2006 miod

Introduce a wsdisplay type for mac68k frame buffers; we might need to become
less generic in the future, though.


Revision tags: OPENBSD_3_8_BASE
# 1.36 15-May-2005 miod

Partial sync to the NetBSD wscons code, bringing a better wsmux behaviour
and bugfixes (the kqueue code, /dev/wsmuxctl and screen border color changes
have not been picked), keeping local changes.

Tested by many on alpha/cats/hp300/i386/macppc/sparc/sparc64/zaurus if not more.


# 1.35 22-Apr-2005 miod

Driver for the Apollo Domain keyboard and mouse, for the HP 9000/4xx series.

Claims the console keyboard if a keyboard is detected at boot time,
otherwise HIL is preferred (but due to wsmux both can be used simultaneously).


Revision tags: OPENBSD_3_7_BASE
# 1.34 17-Jan-2005 drahn

Display driver for zaurus, PXALCD requested and ok miod@


# 1.33 14-Jan-2005 miod

Switch OpenBSD/hp300 to wscons, still using on-board ROM fonts for now.

Main features:
- MI hil drivers, allowing live plug/unplug of devices, and the keyboard
does not need to be at id 1 anymore.
- SGC bus support on 4xx models. SGC frame buffers are supported too, but
not as console, though you can use them as a regular glass terminal if
you run a getty on ttyC0. Currently not compiled-in, awaiting for an sti(4)
fix to be commited.
- HP-UX compatibility interfaces are removed. grfinfo and hilinfo are removed.

X11 support is currently broken by these changes; X.org X11R6 support will
be available very soon.

Tested on hyperion and 4 different flavours of catseye/topcat/kathmandu; other,
older frame buffers (davinci, gatorbox and renaissance) could not been tested
but should work; please report any regression.


# 1.32 14-Jan-2005 drahn

Add type for zaurus, ok miod@


Revision tags: OPENBSD_3_6_BASE SMP_SYNC_A SMP_SYNC_B
# 1.31 24-Apr-2004 miod

Define wscons device ids for the Luna devices.


Revision tags: OPENBSD_3_5_BASE
# 1.30 01-Mar-2004 miod

Define a wsdisplay type for rfx; ok deraadt@


Revision tags: OPENBSD_3_4_BASE
# 1.29 17-Jun-2003 miod

New driver and wsdisplay type for the Weitek Power9000 and Brooktree Bt445
combination, found on the Tadpole SPARCbook 3 only (later model use the
Power9100 and are already supported).

Untested for lack of hardware and volunteers, but carefully crafted; if it
does not work out of the box, this should be a good starting point.

"worth having in the tree" millert@


Revision tags: UBC_SYNC_A
# 1.28 14-May-2003 miod

The ramdac's hater club is proud to present new yet another SBus frame
bufer driver, this time for the Southland Media Systems (now Quantum 3D)
MGX and MGXPlus cards.

Not complete, but a good start.


# 1.27 28-Mar-2003 jason

add a whole bunch of display types (will be used by the accelerated X
stuff coming soon to a tree near you).


Revision tags: OPENBSD_3_3_BASE
# 1.26 16-Feb-2003 miod

Provide a wskbd type for gsc keyboards, make gsckbd use it, and take advantage
of it in kbd(8) to work correctly with such a keyboard.
Reminded by maja some time ago.


# 1.25 12-Feb-2003 miod

Define a wsmouse type for HIL mice.


# 1.24 11-Feb-2003 miod

Define an HIL wscons keyboard type.


# 1.23 05-Feb-2003 mickey

wsdisplay type for sti


Revision tags: OPENBSD_3_2_BASE UBC_SYNC_B
# 1.22 25-Jul-2002 miod

Rename the WSDISPLAY_TYPE_SUNFFB display type into a more generic name,
..._SUN24, since this only means 24 bit framebuffers with BGR encoding.
Also add a WSDISPLAY_TYPE_SUNBW for Sun monochrome framebuffers, to be used
by Xwsfb shortly.


# 1.21 11-Jun-2002 jason

Fix, s/pci_sel/pcisel


# 1.20 11-Jun-2002 matthieu

add a new ioctl to wscons (currently implemented only on sparc64)
`that returns the bus:dev:func PCI id of the device.
ok jason@.


# 1.19 07-Jun-2002 drahn

Add wsconsctl recognition support for adb keyboard.


# 1.18 29-May-2002 maja

Add a new wskbd type for Sun type 5 keyboards (WSKBD_TYPE_SUN5).
This is needed since eg Swedish type 4 and 5 keyboard has keycodes
with different keycodes. eg AltGr and Compose are switched in type 5
compared with type 4.

This change will need a new Xserver to allow sun type 5 keyboards.
-moj ok miod@


# 1.17 22-May-2002 jason

add WSDISPLAY_TYPE_SUNFFB


Revision tags: OPENBSD_3_1_BASE
# 1.16 31-Mar-2002 jason

add a new mode to wsdisplay, WSDISPLAYIO_MODE_DUMBFB. This mode is
functionally equivalent what used to be WSDISPLAYIO_MODE_MAPPED, which now
means a "native" mapping.
vgafb_mmap() returns pci relative mappings in WSDISPLAYIO_MODE_MAPPED and
linear framebuffer mappings in WSDISPLAYIO_MODE_DUMBFB


# 1.15 27-Mar-2002 jbm

Add X-Window support to wsmoused(8). This allows running wsmoused(8) and
X-Window at the same time, removing the need to kill wsmoused(8) before
starting X-Window.


# 1.14 16-Jan-2002 jason

Add a sun keyboard type


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.13 16-Sep-2001 millert

branches: 1.13.4;
Add some missing lengths checks when passing data from userland to
kernel. From based on NetBSD patches.


# 1.12 29-Aug-2001 mickey

make set/get screen work now


# 1.11 29-Jun-2001 mickey

implement get/set screen ioctls to fetch configured screen list
and switch focus out of comand line utility (to come soon).
also, fix duplicated ioctl numbers, so rebuild the ws* utils.


# 1.10 08-May-2001 mickey

branches: 1.10.2;
inplement screen burner in screenblank(1) style (no program though).
disabled by default, also supports vsync blanking, disabled by default.
aaron@ looked at it a while back and i fixed problems he had indicated.


Revision tags: OPENBSD_2_9_BASE
# 1.9 14-Apr-2001 aaron

branches: 1.9.2;
Kernel support for console mouse functionality which will be controlled by
the wsmoused daemon (replacement for moused which was used with PCVT). Adds
a "getchar" method to the display drivers which returns the value of the
character currently under the cursor (e.g., so it may be inversed). From jbm@.

Still needs a bit of cleanup and improvement, especially X cohabitation
features. The pointer moves to fast as well. These sorts of issues will be
corrected in-tree.


# 1.8 14-Mar-2001 mickey

allow listing and soon deleting fonts; aaron@ ok


# 1.7 03-Mar-2001 maja

complete wscons support for abd keyboard. -moj ok @deraadt


# 1.6 28-Feb-2001 drahn

Add ability to get display width in bytes for display memory, this
may be the same as visual width or larger.
This is seen on iMacDV systems running at 640x480 or 800x600 with a linebytes
of 1024.


# 1.5 10-Feb-2001 mickey

sync w/ netbsd; aaron@ ok


# 1.4 05-Feb-2001 matthieu

WSMOUSEIO_SRES, WSMOUSEIO_SSCALE and WSMOUSEIO_SRATE are _IOW(), not _IOR()


Revision tags: OPENBSD_2_8_BASE
# 1.3 01-Aug-2000 mickey

branches: 1.3.2;
update wscons, nothing serious, mostly api fixes for us; from netbsd through aaron@


# 1.2 30-Jun-2000 mickey

some more display types; from nbsd


# 1.1 16-May-2000 mickey

import newer wscons source from netbsd.
art@ said it will make his life easier in alpha
rhands@ said it is not used in powerpc for now
bjc@ said that it would make vax port easier
mickey@ said other platforms can use it, and it's faster