History log of /src/sys/dev/vt/vt.h (Results 1 – 25 of 372)
Revision Date Author Comments
# 5e1c7867 14-Jan-2026 Quentin Thébault <quentin.thebault@defenso.fr>

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
th

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
that will actually send the signal in sys/kern/kern_sig.c uses
_SIG_VALID which allows up to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the
use of higher signal numbers so that applications are not limited to
SIGUSR1 and SIGUSR2 for vt release and acquire signals.

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Reviewed by: emaste, imp, kevans
Differential Revision: https://reviews.freebsd.org/D53615

show more ...


# b93028d8 09-Jul-2024 Emmanuel Vadot <manu@FreeBSD.org>

vt: Add vd_bitblt_argb

This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision: https://reviews.freebsd.org/

vt: Add vd_bitblt_argb

This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision: https://reviews.freebsd.org/D45929
Reviewed by: tsoome
Sponsored by: Beckhoff Automation GmbH & Co. KG

show more ...


# 162a2b85 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is tha

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is that this DRM code
acquires locks which can't be acquired when vtbuf_lock, an MTX_SPIN
mutex, is already held.

[How]
A vt(4) backend can now set the `vd_bitblt_after_vtbuf_unlock` flag to
true if it wants to be called outside of vt_buf_lock.

In this case, vt(4) uses an internal version of bitblt_text that uses
the `vd_drawn` arrays, plus a new `vd_pos_to_flush` array, to track
characters to draw/refresh. This internal version then uses the
backend's bitblt_bmp callback to draw the characters after vt_buf has
been unlocked.

Drawing borders and CPU logos is also deferred after the vt_buf lock is
released for the same reason.

We introduce another lock (a default mutex), only used when the
`vd_bitblt_after_vtbuf_unlock` flag is set, to replace part the role of
the vt_buf lock and manage concurrent calls to vt_flush().

The `SC_NO_CONSDRAWN` define is dropped because we now always need the
`vd_drawn` arrays.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D42057

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 29ab1945 14-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

Reviewed by: manu
Approved by: manu
Differential Re

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38089

show more ...


# 90b89100 05-Oct-2022 Ivan Quitschal <tezeka@hotmail.com>

vt(4): When cutting a line, append a newline character.

While at it optimise "case 3" into a default.
This way there is no need to initialize the "mark" variable in the beginning,
because all cases

vt(4): When cutting a line, append a newline character.

While at it optimise "case 3" into a default.
This way there is no need to initialize the "mark" variable in the beginning,
because all cases set it.

MFC after: 1 week
Sponsored by: NVIDIA Networking
Differential Revision: https://reviews.freebsd.org/D36042

show more ...


# 2cce9aa0 26-Sep-2022 Hans Petter Selasky <hselasky@FreeBSD.org>

vt(4): Make sure vt_switch_timer() has a sleepable context.

Fixes the following panic backtrace:

panic()
usbhid_sync_xfer()
usbhid_set_report()
hid_set_report()
hidbus_write()
hid_write()
hkbd_set_

vt(4): Make sure vt_switch_timer() has a sleepable context.

Fixes the following panic backtrace:

panic()
usbhid_sync_xfer()
usbhid_set_report()
hid_set_report()
hidbus_write()
hid_write()
hkbd_set_leds()
hkbd_ioctl_locked()
hkbd_ioctl_locked()
hkbd_ioctl()
kbdmux_ioctl()
vt_window_switch()
vt_switch_timer()

Differential Revision: https://reviews.freebsd.org/D36715
MFC after: 1 week
Sponsored by: NVIDIA Networking

show more ...


# ff1c8af8 20-Sep-2021 Mitchell Horne <mhorne@FreeBSD.org>

vt: use TERMINAL_DECLARE_EARLY() macro

It simplifies the declaration of the driver structures a little. There
are no current consumers of this macro, in fact it looks like it was
added for exactly t

vt: use TERMINAL_DECLARE_EARLY() macro

It simplifies the declaration of the driver structures a little. There
are no current consumers of this macro, in fact it looks like it was
added for exactly this purpose.

This decreases the scope of some variables, so rework the initialization
in vt_init_logos() such that it doesn't require them.

No functional change intended.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34820

show more ...


# 2533eca1 03-Nov-2021 Warner Losh <imp@FreeBSD.org>

vt(4): Connect to teken's TP_SETBELLPD

Add the glue needed to listen to TP_SETBELLPD which teken uses to
inform its client drivers about the results of parsing
\e[=<pitch>;<duration>B. It converts t

vt(4): Connect to teken's TP_SETBELLPD

Add the glue needed to listen to TP_SETBELLPD which teken uses to
inform its client drivers about the results of parsing
\e[=<pitch>;<duration>B. It converts these to a Hz value for the
tone/pitch of the bell and a duration in ms. There's some loss of
precision because <pitch> in the escape seuquence is defined to be
(1193182 / pitch) Hz and <duration> is in 10ms units. Also note that
kbdcontrol also parses 'off' but then doesn't send the proper escape
sequence, leading me to wonder if that's another bug since teken
appears to parse that sequence properly and I've added code here to
treat that as the same as quiet or disabled.

In general, Hz from 100 to 2000 is good. Outside that range is possible,
but even at 100Hz the square wave is starting to sound bad and above
2000Hz the speaker may not respond.

Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D32620

show more ...


# 9feff969 08-Aug-2021 Ed Maste <emaste@FreeBSD.org>

Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder (in the associated license block).

S

Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights

These ones were unambiguous cases where the Foundation was the only
listed copyright holder (in the associated license block).

Sponsored by: The FreeBSD Foundation

show more ...


# c4a0333b 31-Dec-2020 Kyle Evans <kevans@FreeBSD.org>

vt: restore tty when console is ungrabbed

When a break-to-debugger is triggered, kdb will grab the console and vt(4)
will generally switch back to ttyv0. If one issues a continue from the
debugger,

vt: restore tty when console is ungrabbed

When a break-to-debugger is triggered, kdb will grab the console and vt(4)
will generally switch back to ttyv0. If one issues a continue from the
debugger, then kdb will ungrab the console and the system rolls on.

This change adds a perhaps minor feature: when we're down to grab == 0 and
if vt actually switched away to ttyv0, switch back to the tty it was
previously on before the console was grabbed.

The justification behind this is that a typical flow is to work in
!ttyv0 to avoid console spam while occasionally dropping to ddb to inspect
system state before returning. This could easily enough be tossed behind
a sysctl or something if it's not generally appreciated, but I anticipate
indifference.

Reviewed by: ray
Differential Revision: https://reviews.freebsd.org/D27110

show more ...


# d276d86e 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

vt: clean up empty lines in .c and .h files


# e7fd9688 14-Jun-2020 Toomas Soome <tsoome@FreeBSD.org>

Move font related data structured to sys/font.c and update vtfontcvt

Prepare support to be able to handle font data in loader, consolidate
data structures to sys/font.h and update vtfontcvt.

vtfont

Move font related data structured to sys/font.c and update vtfontcvt

Prepare support to be able to handle font data in loader, consolidate
data structures to sys/font.h and update vtfontcvt.

vtfontcvt update is about to output set of glyphs in form of C source,
the implementation does allow to output compressed or uncompressed font
bitmaps.

Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D24189

show more ...


# 98f7cf02 28-May-2020 Jason A. Harmening <jah@FreeBSD.org>

vt(4): Add support for `vidcontrol -C'

Extract scrollback buffer initialization into a common routine, used both
during vt(4) init and in handling the CONS_CLRHIST ioctl.

PR: 224436
Reviewed by: e

vt(4): Add support for `vidcontrol -C'

Extract scrollback buffer initialization into a common routine, used both
during vt(4) init and in handling the CONS_CLRHIST ioctl.

PR: 224436
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D24815

show more ...


# eee77063 20-Dec-2019 Kyle Evans <kevans@FreeBSD.org>

vt: store a pointer to the keyboard instead of index

This effectively reverts r355935, but is functionally equivalent. We gain no
benefit from storing the index and repeatedly fetching the keyboard

vt: store a pointer to the keyboard instead of index

This effectively reverts r355935, but is functionally equivalent. We gain no
benefit from storing the index and repeatedly fetching the keyboard with
`kbd_get_keyboard` when we need it. We'll be notified when it's going away
so we can clean up the pointer.

All existing references were trivially converted. Only once instance
actually needed the index.

show more ...


# 668ee101 26-Sep-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r352587 through r352763.


# df1bc27a 25-Sep-2019 Toomas Soome <tsoome@FreeBSD.org>

vt: use colors from terminal emulator

Instead of hardcoded colors, use terminal state. This also means,
we need to record the pointer to terminal state with vtbuf.


# da2d1e9d 29-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338298 through r338391.


# 5e1c7867 14-Jan-2026 Quentin Thébault <quentin.thebault@defenso.fr>

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
th

vt(4): allow up to _SIG_MAXSIG (128) for VT_SETMODE

VT_SETMODE ioctl currently checks the provided signal numbers with its
own ISSIGVALID macro that uses NSIG (32) as a maximum, although the code
that will actually send the signal in sys/kern/kern_sig.c uses
_SIG_VALID which allows up to _SIG_MAXSIG (128).

This change aligns the vt code with the kernel internals and enables the
use of higher signal numbers so that applications are not limited to
SIGUSR1 and SIGUSR2 for vt release and acquire signals.

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Reviewed by: emaste, imp, kevans
Differential Revision: https://reviews.freebsd.org/D53615

show more ...


# b93028d8 09-Jul-2024 Emmanuel Vadot <manu@FreeBSD.org>

vt: Add vd_bitblt_argb

This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision: https://reviews.freebsd.org/

vt: Add vd_bitblt_argb

This blit an ARGB image on the dedicated vd.
This also adds vt_fb_bitblt_argb which will works for most of the vt backends

Differential Revision: https://reviews.freebsd.org/D45929
Reviewed by: tsoome
Sponsored by: Beckhoff Automation GmbH & Co. KG

show more ...


# 162a2b85 24-Nov-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is tha

vt(4): New bitblt_text variant making a copy before unlocking vt_buf

[Why]
In the DRM drivers and the integration with vt(4), we need to execute
DRM code outside of the vtbuf_lock. The reason is that this DRM code
acquires locks which can't be acquired when vtbuf_lock, an MTX_SPIN
mutex, is already held.

[How]
A vt(4) backend can now set the `vd_bitblt_after_vtbuf_unlock` flag to
true if it wants to be called outside of vt_buf_lock.

In this case, vt(4) uses an internal version of bitblt_text that uses
the `vd_drawn` arrays, plus a new `vd_pos_to_flush` array, to track
characters to draw/refresh. This internal version then uses the
backend's bitblt_bmp callback to draw the characters after vt_buf has
been unlocked.

Drawing borders and CPU logos is also deferred after the vt_buf lock is
released for the same reason.

We introduce another lock (a default mutex), only used when the
`vd_bitblt_after_vtbuf_unlock` flag is set, to replace part the role of
the vt_buf lock and manage concurrent calls to vt_flush().

The `SC_NO_CONSDRAWN` define is dropped because we now always need the
`vd_drawn` arrays.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D42057

show more ...


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


# 29ab1945 14-Jan-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

Reviewed by: manu
Approved by: manu
Differential Re

vt(4): Return errors from `vt_{,de}allocate()`

This is useful to the DRM drivers to let them know if a device is
effectively used by the console.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38089

show more ...


12345678910>>...15