Commit Graph

734 Commits

Author SHA1 Message Date
uwe adad4427e8 Default WSDISPLAY_BORDER_COLOR to WS_DEFAULT_BG.
Avoids black overscan area when WS_DEFAULT_BG is set.
2022-01-29 01:19:30 +00:00
uwe 339401cf04 wsemul_vt100.c - make static everything that can be static
Externally, wsdisplay only needs wsemul_vt100_ops.  Internally (as
vt100 emulation is split into several files) wsemul_vt100_subr.c needs
wsemul_vt100_reset().
2022-01-02 23:46:21 +00:00
hannken 2c5ad75eb4 Protect KASSERT() with "#ifdef DIAGNOSTIC" as its expression is
undefined otherwise.
2022-01-01 11:57:44 +00:00
riastradh 57efa05d59 libkern: Make KASSERT verify expression is valid if !DIAGNOSTIC.
This way it is no longer necessary to mark variables __diagused if
they are used in KASSERT conditions.

Fix fallout from this by removing now-unnecessary and `#ifdef
DIAGNOSTIC'.

Don't do the same for KDASSERT if !DEBUG -- unlike KASSERT and
DIAGNOSTIC, variables needed by KDASSERT and DEBUG are likely to be
expensive to compute (and potentially difficult for a compiler to
prove flushable), so we don't want to require them under !DEBUG.
2021-12-31 14:19:57 +00:00
msaitoh 79252e85b6 s/configuraiton/configuration/ in comment. 2021-11-10 16:57:39 +00:00
nia a5e5ee05e8 wsmouse: add support for "precision scrolling" events and (GET|SET)PARAMS
WSCONS_EVENT_HSCROLL and WSCONS_EVENT_VSCROLL are two new wscons event
types that allow scrolling with a higher precision ("smoothness") than an
emulated scroll wheel, and are useful for touch input drivers.

WSMOUSEIO_GETPARAMS and WSMOUSEIO_SETPARAMS are two new ioctls that allow
the speed and direction of precision scrolling to be configured.

both features were originally implemented in OpenBSD.
2021-09-28 06:14:27 +00:00
thorpej 12ae65d98c Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
2021-09-26 01:16:07 +00:00
nia 1048cba267 wscons: add definitions for BÉPO, a standardized, Dvorak-style optimized
keyboard layout for French
2021-09-22 17:37:31 +00:00
christos 0000e1fe68 fix the NetBSD tag. 2021-06-07 16:37:34 +00:00
christos fe17754f90 PR/56223: David Shao ^[]8;;^G make console unresponsive. From OpenBSD:
In `string' state, accept bell (^G) as an end of sequence in addition to
`ESC \', as supported by xterm; some third-party software such as
ncmpcpp rely upon this.
2021-06-07 15:52:08 +00:00
riastradh 27d434e5f5 wsdisplay(4): Use C99 initializer for usl_syncops.
Avoid sketchy function pointer cast while here.
2021-06-01 23:28:07 +00:00
mlelstv 27f97b3677 Try to guess attributes better. 2021-05-16 08:46:38 +00:00
mlelstv a848552d7a No need to check cell count. 2021-05-16 08:44:26 +00:00
nia 68060a3e71 wscons: add support for the Neo 2 German keyboard layout
Neo is an optimized layout for German and English, similar to
Dvorak for English. It can be used to type most Latin-based languages
and has separate layers for symbols and directional commands.
2021-05-11 10:16:48 +00:00
macallan 207794b100 add an ioctl() to get a list of fonts currently available via wsfont 2021-04-24 00:15:37 +00:00
macallan ddbd9be9c3 fix logic botch from previous - if we're asked to draw the cursor somewhere
else and it's still visible we need to clear it
2021-01-28 17:40:00 +00:00
macallan 1421352e0a - refactor vcons_cursor_noread() a bit so it works the same way as the other
_noread() methods instead of duplicating half of vcons_cursor()
- skip clearing the cursor only if we use all _noread() methods
- clear RI_CURSOR in all copy*_noread() methods as well if we overwrite the
  cursor
2021-01-26 16:24:17 +00:00
macallan 4f1cc4480a clear the RI_CURSOR flag when we overwrite the cursor so we can skip clearing
it when asked to do it later on
saves a bunch of framebuffer writes
2021-01-25 02:11:41 +00:00
macallan d701d9f43a introduce a putchar() based implementation of cursor() in order to avoid
framebuffer reads
quite a speedup on arm64 / genfb
2021-01-21 21:45:42 +00:00
jmcneill 1b26a1b99a Revert previous and introduce vcons_earlyinit, which is like vcons_init
except it does not setup a vcons_intr thread.
2021-01-17 19:03:32 +00:00
jmcneill d1b91ade8d The change from config_interrupts to a kthread for VCONS_DRAW_INTR init
unfortunately makes it easier to trigger a race that results in characters
not being erased properly at boot. Work around the original issue a
different way by creating a fake device_t and defer initialization until
we are sure that config_interrupt threads are done. This is not ideal and
the race is still present but fixing this properly would require a rewrite
to make this code MP-safe.
2021-01-17 16:51:12 +00:00
jmcneill b14e20ccb6 Add appropriate memory barriers around sc_busy accesses. Fixes an issue
where character cells are sometimes not erased properly on aarch64 at
boot.
2021-01-17 15:13:15 +00:00
jmcneill bc3520e106 trailing whitespace 2021-01-17 00:35:46 +00:00
jmcneill f406b92624 Instead of defining VCONS_DONT_READ as the raw value of 0x30, instead
define it as (VCONS_NO_COPYCOLS|VCONS_NO_COPYROWS) for clarify. NFC.
2021-01-16 23:19:50 +00:00
macallan 7003c5c68f be more careful when optimizing stretches of blanks into erasecols()
now testpat's output is redrawn properly
2021-01-02 03:00:56 +00:00
macallan f10f192f0e provide (bug)compatibility with vga in WSDISPLAYIO_{PUT|GET}WSCHAR
if row == 0 treat col as linear index into the text / attribute buffer,
transform into proper coordinates as needed for putchar()

with this wsmoused works as expected
2020-12-28 00:14:18 +00:00
tsutsui 831eba2610 Explicitly include generated ioconf.h for struct cfdrivers. 2020-12-27 16:09:33 +00:00
tsutsui a0efd42a57 Use C99 designated initializers for struct consdev. 2020-12-25 21:12:15 +00:00
macallan 733378379f fix tpyo
spotted by RVP, thanks!
2020-12-23 05:50:51 +00:00
thorpej 1abee2b4f1 Use sel{record,remove}_knote(). 2020-12-18 01:31:49 +00:00
mlelstv 47f463a521 Fix previous and tag the right callout... 2020-11-21 11:26:55 +00:00
mlelstv 1352e383d0 Run callout without kernel lock, the softint itself is still protected. 2020-11-21 11:23:22 +00:00
nia e1bcbb6984 wscons(4): WSKBD_TYPE_PC_AT is automatically translated to
WSKBD_TYPE_PC_XT in modern kernels
2020-10-29 09:08:35 +00:00
mlelstv 989036c7f9 Correct KB_NEXT value. No impact since KB_NEXT isn't used anywhere. 2020-10-17 10:28:10 +00:00
macallan 1035fefe6e provide KB_APPLE layout variant which uses Command-F* to switch console screens
mostly for consistent behaviour across *Books which may have ADB or USB
keyboards
2020-08-29 22:42:53 +00:00
nia 1810119c37 Clarify that KB_TR is the "Q" layout - there's two standards for Turkish. 2020-07-13 09:50:12 +00:00
nia 9c5979c439 Canadian French keyboard layout for ukbd/pckbd 2020-07-13 09:44:48 +00:00
nia d123e17c63 Add keyboard layout for Latin American Spanish to ukbd/pckbd 2020-07-13 08:45:12 +00:00
nia b9acad4106 Add Icelandic keyboard layout to ukbd/pckbd. 2020-07-12 14:31:49 +00:00
nia 07a5a11827 Add Estonian layout as a variation of Swedish for ukbd and pckbd 2020-07-12 12:13:05 +00:00
nia 68477093d7 Add support for the Brazilian keyboard layout to pckbd and ukbd.
This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.

Thanks to lun-4 for helping test this.

PR kern/44570
2020-07-12 01:35:59 +00:00
thorpej 814a779807 Update for proplib(3) API changes. 2020-06-11 02:32:06 +00:00
ad 0eaaa024ea Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.
2020-05-23 23:42:41 +00:00
pgoyette 5de4f4f07b KNF (Format block comment)
NFCI
2020-04-04 13:07:11 +00:00
mlelstv 4f33c65437 Make default protocol version used by wscons selectable and default
to the current version.

Fixes PR 55103.
2020-04-04 07:33:18 +00:00
pgoyette 8a031a1d1e Rather than keeping a separate mutex, condvar, and pserialize for each
module hook, we can share a common set of synchronization structures.
This cuts the amount of cacheline_aligned data for these structures by
50%.

Note that we still have a per-hook localcount, since we need to count
individual references.

As discussed with riastradh@

Welcome to 9.99.22 !
2019-12-12 02:15:42 +00:00
maxv 8d129e6ebf localify 2019-12-06 07:12:38 +00:00
chs d47bcd296c in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
2019-11-10 21:16:21 +00:00
rin 99ff214adc When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:

https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58
2019-07-31 14:29:54 +00:00
jmcneill 50b646b40e Halt the old console on both cnattach and preattach 2019-07-25 20:26:39 +00:00