Commit Graph

537 Commits

Author SHA1 Message Date
jmcneill a1001814e2 add vcons_hard_switch, for switching w/o callouts (eg. entering ddb) 2011-02-18 13:56:11 +00:00
jmcneill f24dfbb13c add vcons_{enable,disable}_polling and genfb_{enable,disable}_polling
functions, to switch between intr and polling modes when VCONS_DRAW_INTR
is defined
2011-02-09 13:19:18 +00:00
jmcneill 3f11f2aa84 VCONS_DRAW_INTR changes:
- use softint instead of workqueue for drawing
- track scr_dirty with atomic_ops
2011-02-08 23:06:25 +00:00
jmcneill 232459ad54 abuse config_interrupts to make sure we don't switch to 'intr' mode until
interrupts are enabled
2011-02-08 13:40:35 +00:00
jmcneill 8485f28760 add support for command buffering in vcons. still a WIP, same limitations
as async drawing (no ddb, needs interrupts). you can try it with options
VCONS_DRAW_INTR. as with async, there are still occasional glitches.
2011-02-08 12:45:04 +00:00
tsutsui b04b7da893 Switch NetBSD/hp300 to wscons with rasops. Simply ported from OpenBSD/hp300.
- Only A1416 Kathmandu (topcat) framebuffer on 425t is tested, but
  all other variants (TigerShark, Hyperion, DaVinci, GatorBox, Renaissance)
  should also work if they are working on OpenBSD/hp300.
- sti(4) and SGC bus support are not pulled because I don't have 425e
  and I can't confirm that 362 and 382 actually have SGC bus.
  (I'll commit a DIO based dumb driver for 362 and 382 framebuffers later)
- Xorg server with wsfb driver will also be integrated soon
  once after keycode with NoSymbol problem is addressed.
  (We have to re-think what code should be used on WSDISPLAY_COMPAT_RAWKBD)
- MI HIL keyboard and mouse drivers are working fine though
  cngetc via hilkbd has some problem (still we can input commands).
- No old HP-UX like HIL ioctl compatibility (we removed COMPAT_HPUX anyway).
  grfinfo(8) and hilinfo(8) will be removed shortly.

Demonstrated on NetBSD booth at Open Source Conference 2011 Kagawa.
2011-02-06 18:26:51 +00:00
macallan 195f4ebf1c Add support for asynchronous drawing in vcons.
This is not finished but good enough for others to play with, enable with
options VCONS_DRAW_ASYNC
With this all drawing operations will be posted to a ring buffer instead
of being run directly, and run by a kernel thread. This avoids having to wait
for drawing operations to finish with the kernel lock held ( to a degree at
least ) and scrolling a (slow) framebuffer console should not disrupt other
operations anymore.
Problems:
- we need to switch back to synchronous operations when panicing or entering
  ddb, also re-enable async drawing when leaving ddb
- there are still occasional glitches
tested on an SS20 with cg14 and cg6 for dumb and accelerated cases
2011-01-25 20:28:21 +00:00
cegger e28cc170ed Implement new WSDISPLAYIO_GET_BUSID ioctl.
It returns the bus id and allows userland (like Xorg) to create mapping
of ttyE? and bus id. For now only PCI is implemented.

First discussed with macallan@ then public on tech-kern@ and tech-x11@
2011-01-22 15:14:27 +00:00
jruoho 871220a39a Add wskbd_hotkey_deregister() to match wskbd_hotkey_register().
XXX: This is kind of futile; the only user of the wskbd(4)'s hotkey interface
     is hpqlb(4), which is a questionable driver, being, by design,
     limited only to the laptop model for which the driver was written.
2010-10-26 05:12:34 +00:00
macallan 17887680e3 clarify how backlight control ioctl()s are supposed to work
TODO: adapt r128fb and radeonfb
2010-10-02 00:52:02 +00:00
macallan 42092a5f99 add separate flags for putchar() based copycols() and copyrows() methods
for hw that can accelerate one but not the other, like Sun's Creator series
VCONS_DONT_READ does the same as before
2010-09-21 03:33:14 +00:00
macallan 9c10440f53 Add copycols() and copyrows() methods which, instead of calling the underlying
driver methods, call the driver's putchar() method to redraw the affected
areas.
For unaccelerated framebuffers where reads are expensive and we can't spare
any memory for a shadow framebuffer. Enabled by setting VCONS_DONT_READ in
scr_flags
2010-08-18 16:46:51 +00:00
ahoka d144c6d14a output ^_ on control-/ like xterm does. 2010-07-01 14:49:34 +00:00
rmind 3c507045e2 Remove pfind() and pgfind(), fix locking in various broken uses of these.
Rename real routines to proc_find() and pgrp_find(), remove PFIND_* flags
and have consistent behaviour.  Provide proc_find_raw() for special cases.
Fix memory leak in sysctl_proc_corename().

COMPAT_LINUX: rework ptrace() locking, minimise differences between
different versions per-arch.

Note: while this change adds some formal cosmetics for COMPAT_DARWIN and
COMPAT_IRIX - locking there is utterly broken (for ages).

Fixes PR/43176.
2010-07-01 02:38:26 +00:00
dholland 61655fede0 PR kern/38900 Arnaud Lacombe: don't try to do WSDISPLAY_SCROLLSUPPORT
things if NWSDISPLAY is 0.

Arguably the right fix is to not allow "options WSDISPLAY_SCROLLSUPPORT"
to be enabled in this case, but AIUI config doesn't know how to encode
rules like that.
2010-05-31 04:27:18 +00:00
drochner 8e8bf15598 add just as much "detach" code to keep the box from panicking on
removal of a USB "udl" device
(needs more work, but I got the hardware for a quick test only)
2010-04-11 14:04:10 +00:00
jdc 54c6f4b764 Add mappings for KS_End/KS_KP_End, so that the `End' key actually does
something.
2010-03-12 08:40:50 +00:00
mrg ebc9e23316 various aprint_* fixes. 2010-03-11 03:54:56 +00:00
drochner 4faa4ba521 retire our private definitions for the scan1/3/5/7/9 DEC graphics
symbols, use the unicode definitions instead (which apparently didn't
exist when I wrote that)
2010-02-25 11:20:09 +00:00
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
drochner ff24957791 put back the "vt100base_data" variable which was souce of confusion,
it is really needed, as noted by Geoff Wing
2010-02-11 10:07:14 +00:00
skrll 6abd7610a4 Remove accidental commit. 2010-02-10 22:25:08 +00:00
skrll 1caeee472f Oops. Whitespace in previous. 2010-02-10 20:54:46 +00:00
drochner 265bc2e92c Allow big parts of the vt100 emulation code (what is in
wsemul_vt100_subr.c) to be used by alternative terminal emulators
(which are not in-tree yet but can be loaded as LKMs).
For this, split out that part of the state structure which is used
by the sharable code and include that in the original vt100 state.
This is only a query-replace and sed(1) job for now, it makes sense
to rearrange things a bit so that even more code can be changed --
will do so later.
2010-02-10 19:39:39 +00:00
drochner f4b5ad99de add some missing (mostly hungarian or polish) dead accent combinations,
from lkundrak's netbsd-sk_cz-howto
2010-02-05 18:26:38 +00:00
drochner 6d35fa3886 give up some silly macros which were only used ~once, and reduce
dependency on "locators.h"
makes the code more LKM frienly
2010-02-02 16:54:40 +00:00
drochner 1921d00aaf add hooks to allow terminal emulations to be installed by LKMs
(these are not available in early bootstrap, so this is not an
option for the system's default emulation)
2010-02-02 16:18:29 +00:00
drochner 25fb8de00b -rename the "KS_GROUP_Ascii" key symbol category to "Plain" because
this is what it meant all the time -- it includes characters >127
-delegate translation of all key symbols >127 to the terminal emulation
 layer -- formerly everything non-special was passed to the tty subsystem
 directly, involving truncation to a "char", which effectively meant
 some ISO-1 assumption
2010-01-28 22:36:19 +00:00
macallan 0e3560f1eb revert brainfart 2010-01-13 05:08:24 +00:00
macallan 179feaec06 send PMF events for volume control keys 2010-01-12 17:39:21 +00:00
dyoung 3022acc4eb Expand PMF_FN_* macros. 2010-01-08 19:42:11 +00:00
macallan 608f7f5569 add WSDISPLAY_TYPE_XVR1000 2009-12-31 05:08:05 +00:00
tsutsui 9dc186d614 Reserve WSDISPLAY_TYPE for DisplayLink DL-1x0/DL-1x5 USB LCDs and
USB-VGA adaptors (which may require a new ioctl for DUMBFB ops). From
FUKAUMI Naoki.
2009-11-15 17:42:24 +00:00
christos 28b2719313 Don't call usl_sync_check_sig from an interrupt context. Call it only if waitok.
Stack trace:	mutex_vector_enter <- usl_sync_check_sig <- usl_detachproc <-
		wsdisplay_switch <- wskbd_translate <- wskbd_input <-
		pckbd_input <- pckbcintr <- intr_biglock_wrapper <-
		Xintr_ioapic_edge1
Reported by Anon Ymous
2009-10-04 22:24:15 +00:00
macallan 19bc30d9ac add vcons_replay_msgbuf() for use by wsdisplay drivers to replay the message
buffer when attaching so older log messages will show up in the scrollback
buffer
Idea from gimpy
2009-08-20 02:01:08 +00:00
cegger 7cf2991222 struct device * -> device_t, no functional changes intended. 2009-05-12 14:38:26 +00:00
mkirby ff12b9febc Add a Czech (QWERTY) keyboard layout, and teach wscons about latin 2 characters.
Original code from Lubomir Kundrak, adapted to current and cleaned up by me.

Fixes PR kern/16216

ok agc@ jdc@
2009-04-06 17:32:09 +00:00
yamt 74ccc189c4 wsevent_copyout_events50: fix a bogus panic. 2009-02-18 13:20:02 +00:00
snj 3c510e6b43 s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202. 2009-02-18 04:17:44 +00:00
apb 0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
uwe c795b4c2a9 G/c duplicate definition of WSCONS_EVENT_ASCII. 2009-02-08 22:58:56 +00:00
drochner cf45120117 Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
2009-01-22 20:40:20 +00:00
yamt cf5a92c11e always use the new version of wscons_event for in-kernel. 2009-01-16 15:14:11 +00:00
yamt 350f838fcf wsevent_init: always initialize version. pointed out by christos. 2009-01-16 14:38:09 +00:00
yamt 0915dface4 - reduce the number of #ifdefs.
- build compat glues if MODULAR.
2009-01-15 04:22:11 +00:00
christos 4c7a98373d Allocate the max size needed so that we don't need to realloc in setversion.
Problem pointed out by yamt.
2009-01-14 15:34:36 +00:00
christos 8945a0f495 provide wscons_event compatibility with 5.0. 2009-01-13 18:05:55 +00:00
he 761f38db5c In wsdisplay_kbdholdscreen(), just return if sc->sc_focus is NULL.
There is apparently no guarantee sc->sc_focus will be non-NULL,
as proved by a crash I experienced earlier today (admittedly on 4.0.1).
2008-11-07 19:33:13 +00:00
cegger ee1dc8ea5f use device_lookup_private to get softc
use device_lookup to get device_t
2008-06-12 23:04:37 +00:00
cegger 7028bd34e9 use device_lookup_private to get sc
ok cube
2008-06-11 16:17:01 +00:00