Commit Graph

396 Commits

Author SHA1 Message Date
macallan 31038cb7db Add support for virtual consoles to igsfb.
Works fine on a Krups, needs testing on other ports.
2006-02-23 08:01:59 +00:00
jmcneill 117a143dac Multiple inclusion protection. 2006-02-19 15:09:58 +00:00
macallan 23d4731713 add a flag to completely disable drawing on a screen 2006-02-19 03:51:03 +00:00
jmcneill 4baf344378 Bunch of changes to wscons in preparation for splash screen support:
* Add WSDISPLAY_TYPE_VESA for vesafb. While here, fix a typo in a comment.
 * Add WSDISPLAYIO_SSPLASH and WSDISPLAYIO_SPROGRESS ioctls. The former
   toggles the splash screen on and off, and the latter updates the progress
   animation.
 * Prevent more than one hw driver from claiming to be the console.
 * In vcons, keep two pointers to the screen's vcons_data. This lets us
   override the original (ie with null emulops during boot), and restore
   them later on.
2006-02-18 18:56:05 +00:00
macallan b16c42a99d bzero() -> memset() 2006-02-14 16:02:00 +00:00
macallan e594a4142f do some extra initialization and zeroing, fixes odd problems on x86 2006-02-14 14:15:59 +00:00
macallan 569533352e framework for generic virtual consoles 2006-02-12 20:55:35 +00:00
christos 2038078d40 fix compilation problems. 2006-02-10 20:38:54 +00:00
christos 0fa6ea2f2c PR/32794: Paul Shupak: Panic in wsmouse code.
Checking the number of events after you've trashed the stack is not very
useful. Instead, break out of the loop if we ran out, printing a message.
Also don't try to inject 0 events; reset our state instead. Maybe having
0 events should be a diagnostic printf at this point? Anyway it is not
nice having the kernel die because the mouse code got confused. Finally,
explain why the array of events is sized funny.
2006-02-10 17:33:01 +00:00
jmmv ddaa1b349e wsevent cleanup:
- Add a wsevent_inject function that atomically adds a set of events to an
  event queue and change all code that directly messed with a queue to use it.
- Replace the WSEVENT_WAKEUP macro with a regular function.
- Make WSEVENT_QSIZE, PWSEVENT and splwsevent private definitions to
  wsevent.c, instead of exposing them in the header file.
- Make the wsevent_init function take a process to attach to the queue,
  instead of leaving this task to the caller (which always did it).

Reviewed in tech-kern@.
2006-02-07 09:13:02 +00:00
jmmv 8b589aee17 Add support to automatically repeat mouse button events in wsmouse(4) and
change wsconsctl(4) so that this is configurable.

This is specially useful for mice that provide page up/down buttons instead
of a real wheel and that do not send events repeatedly from the hardware.
(E.g.: Logitech Marble Mouse.)

No objections in tech-kern@.
2006-02-05 17:38:33 +00:00
tsutsui 4d4ef38433 Add WSKBD_TYPE_EWS4800 for EWS4800 machines. 2005-12-29 15:24:51 +00:00
chs 0545b6e0cb changes for making DIAGNOSTIC not change the kernel ABI:
- for structure fields that are conditionally present,
   make those fields always present.
 - for functions which are conditionally inline, make them never inline.
 - remove some other functions which are conditionally defined but
   don't actually do anything anymore.
 - make a lock-debugging function conditional on only LOCKDEBUG.

as discussed on tech-kern some time back.
2005-12-27 04:06:45 +00:00
jmmv 39d0d77704 Let this build when WSMUX_DEBUG is set after the merge of ktrace-lwp. 2005-12-25 17:23:42 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
macallan eecff0f52d back out the changes to KD* ioctl()s for now, seem to break more than they
do good.
2005-12-05 18:27:59 +00:00
macallan 91d47a92df - remove a leftover debug printf()
- fix the other cases of _IO() type ioctl() abuse ( mainly keyboard related
  stuff )
2005-12-05 11:46:19 +00:00
macallan 826e1b36bc Make the VT_* ioctl()s work in LP64/big endian platforms, like sparc64.
The problem is that these ioctl()s are declared as _IO() and expect to pass an
integer as argument, instead of a pointer. When dereferencing the argument
pointer in the ioctl() handler as an int we get the upper 32bit of the value so
we simply dereference it as long. Other _IO() ioctl()s may need similar fixes.

Tested on sparc64, sparc and macppc.
2005-12-04 14:03:42 +00:00
augustss 5b71c2bf99 Some devices provide more than three (X, Y, and Z) "directions". So add
a W "coordinate" that can be used for these.
This changes the type of wsmouse_input().  To avoid changing a lot of drivers
a compatibilty #define is provided.  Maybe changing all drivers would have
been better?
2005-11-23 09:38:02 +00:00
simonb a21c456e2e Call nanotime() directly, instead of doing the
microtime()/TIMEVAL_TO_TIMESPEC() dance.
2005-11-11 07:07:42 +00:00
kleink aece7a90fd Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges.  Noted by David Holland in PR kern/31126.
2005-09-06 21:40:37 +00:00
tsutsui ee0931f86c TAB/space cosmetics. 2005-08-28 13:08:16 +00:00
ws 9d78e0cf36 PR-30566: Poll must not return <sys/errno.h> values.
Start with those places I can easily test.
2005-06-21 14:01:11 +00:00
martin b8aea19a7a Add a key symbol for the "Power" key. 2005-06-08 09:11:09 +00:00
uwe 5442d49e77 Constify. Drivers pass const default calibration data to
WSMOUSEIO_SCALIBCOORDS using __UNCONST, so make sure we don't try to
modify it.
2005-06-01 00:02:17 +00:00
uwe 7d69499bba Fix misleading indentation. 2005-05-31 23:37:47 +00:00
christos d4268da6a0 add const. 2005-05-30 22:16:27 +00:00
martin c12108712c Adapt to recent constification. 2005-05-30 09:36:50 +00:00
christos f90bcf3a23 - sprinkle const.
- avoid variable shadowing.
2005-05-29 21:56:35 +00:00
martin 228158ce8c If the driver supports reverse, try that first - even on color displays.
This removes a XXX and makes us independent of the users default colors.
2005-05-25 06:46:07 +00:00
martin b7de61b9b3 Rename REALWHITE to SNOWWHITE.
While there, add LIGHT versions of the other predefined colours as well.
2005-05-23 09:44:57 +00:00
martin e5c6528779 Define a real white color - since WSCOL_WHITE is ANSI-emulation specific
defined as grey (which can't be fixed w/o breaking user config files).
Fixes PR kern/30064.
2005-05-22 20:16:08 +00:00
he 4f4c9a7624 Enclose some code dependent on wsdisplay in #if NWSDISPLAY > 0 / #endif;
fixes build problem for news68k.

Reviewed by augustss
2005-05-08 17:16:34 +00:00
augustss 1710458cee Make auto repeat of events a compile time option, and have it off by default.
Turn on by WSKBD_EVENT_AUTOREPEAT.
2005-05-04 01:52:16 +00:00
augustss 09661ed83a Change the logic for generating auto repeat from the keyboard. Previously
auto repeat was only available in translated mode, but not in event mode.
Now both modes have auto repeat.  There are actually a few users of
the event mode, and they deserve auto repeat too. :)

Also make it possible to turn off auto repeat by setting repeat.del1=0.
2005-05-03 13:13:07 +00:00
augustss 949688eeaf Remember what keyboard layout is set in the mux, that way new keyboards
can be given the same layout.  Fixes kern/19153.
2005-04-30 03:47:12 +00:00
martin 05308d1b95 Make it possible for a console driver to deliver raw ASCII characters
to wskbd. This is for special cases only, and may even be considered a
hack, but it is cheap and very local.
2005-04-28 07:15:44 +00:00
martti d927f0a6a7 s/Finish/Finnish/ 2005-04-04 09:08:54 +00:00
dsl e3f3e5cc51 Change the wa ythe KB_xxx and KB_ENCTAB are defined so we have all the
data for a single keyboard on one line - including the long name and
default modifiers that sysinst needs.
2005-03-08 08:06:26 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
joff 5cc20bed82 Support wsdisplay(4) attachments of hd44780 LCD controllers 2005-02-04 05:58:44 +00:00
perry 18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
joff 5c5c7c1047 Add new wskbd type MATRIXKP 2005-01-31 06:07:32 +00:00
martin 9eba7eabba PR kern/28837: fix undef typo. 2005-01-02 15:43:49 +00:00
hubertf b73330c814 Try to document keymap names - this really a trip into the obscure.
XXX someone please review!
2004-12-02 19:59:31 +00:00
jkunz 1035c6af08 Import STI wscons(4) driver from OpenBSD and add new driver for PS/2
keyboard / mouse pots of LASI.
2004-08-26 16:48:06 +00:00
he 8c0706bddd Remove include of "opt_wsmsgattrs.h" here, since that's already done
by wsdisplayvar.h.  Fixes build problem for sparc.
2004-08-03 11:16:30 +00:00
jmmv 2a08d54a9a Implement border color customization in wscons(4), only available for vga(4)
at the moment.

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

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

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

wsconsctl is modified to allow accessing this value easily.  For example,
'wsconsctl -d -w border=blue'.
2004-07-29 22:29:35 +00:00
jmmv bc47208cb0 Forgot to define WSDISPLAY_CUSTOM_OUTPUT here. 2004-07-28 15:12:07 +00:00
jmmv 92f81ea7d3 Implement support to dynamically change wscons console and kernel colors.
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").

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

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

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

Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
2004-07-28 12:34:02 +00:00