History log of /freebsd-11.0-release/sys/dev/vt/vt.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 303312 25-Jul-2016 bdrewery

MFC r303043:

Increase vt(4) framebuffer maximum size

PR: 210382
Approved by: re (gjb)


# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 286997 21-Aug-2015 cem

vt_cpulogos: Resize all terms/windows when tearing down logos

PR: 202288 (partial)
Tested by: Jakob Alvermark
Reviewed by: ed
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3388


# 286867 18-Aug-2015 marcel

Support frame buffers that are larger than the default screen
size as defined by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT
(at this time 2048x1200). The default is really a max. We cap
the height and width to those defaults and position the screen
in the center of the frame buffer.

Ideally we use a bigger font to utility the entire real estate
that is the frame buffer, but that's seen as an improvement over
making it work first.

PR: 193745


# 285766 21-Jul-2015 cem

vt: Draw logos per CPU core

This feature is inspired by another Unix-alike OS commonly found on
airplane headrests.

A number of beasties[0] are drawn at top of framebuffer during boot,
based on the number of active SMP CPUs[1]. Console buffer output
continues to scroll in the screen area below beastie(s)[2].

After some time[3] has passed, the beasties are erased leaving the
entire terminal for use.

Includes two 80x80 vga16 beastie graphics and an 80x80 vga16 orb
graphic. (The graphics are RLE compressed to save some space -- 3x 3200
bytes uncompressed, or 4208 compressed.)

[0]: The user may select the style of beastie with

kern.vt.splash_cpu_style=(0|1|2)

[1]: Or the number may be overridden with tunable kern.vt.splash_ncpu.
[2]: https://www.youtube.com/watch?v=UP2jizfr3_o
[3]: Configurable with kern.vt.splash_cpu_duration (seconds, def. 10).

Differential Revision: https://reviews.freebsd.org/D2181
Reviewed by: dumbbell, emaste
Approved by: markj (mentor)
MFC after: 2 weeks


# 285765 21-Jul-2015 cem

vt: De-static VT_SYSCTL_INT-defined objects

Explicitly mark existing VT_SYSCTL_INTs static. This is in preparation for
D2181.

Reviewed by: dumbbell, emaste
Approved by: markj (mentor)
MFC after: 1 week


# 282646 08-May-2015 hselasky

The "SYSCTL_INT()" default value is only used for read only SYSCTLs
and is not applicable unless the integer pointer is NULL. Set it to
zero to avoid confusion. While at it remove extra semicolon at the end
of the "VT_SYSCTL_INT()" macro.

MFC after: 1 week


# 279488 01-Mar-2015 dumbbell

vt(4): Add support to "downgrade" from eg. vt_fb to vt_vga

The main purpose of this feature is to be able to unload a KMS driver.

When going back from the current vt(4) backend to the previous backend,
the previous backend is reinitialized with the special VDF_DOWNGRADE
flag set. Then the current driver is terminated with the new "vd_fini"
callback.

In the case of vt_fb and vt_vga, this allows the former to pass the
vgapci device vt_fb used to vt_vga so the device can be rePOSTed.

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


# 277795 27-Jan-2015 avg

vt(4): Use power_{suspend,resume} event handlers to implement
suspend/resume

The goal is to avoid that the vt(4) resume happens before the video
display is resumed. The original patch was provided by Andriy Gapon.

This new patch registers the handlers in vt_upgrade(). This is done
once, thanks to the VDF_ASYNC flag. I abused this flag because it was
already abused by the keyboard allocation. The event handlers then call
the backend if it provides callbacks for suspend/resume.

Differential Revision: https://reviews.freebsd.org/D1004
On behalf of: dumbbell
MFC after: 2 weeks


# 276282 27-Dec-2014 emaste

Support ALT_BREAK_TO_DEBUGGER in vt(4)

Submitted by: Andre Albsmeier on -hackers


# 274117 04-Nov-2014 dumbbell

vt(4): Support syscons' SC_HISTORY_SIZE to configure history size

Therefore, to set histry size to 2000 lines, add the following line to
your kernel configuration file:
options SC_HISTORY_SIZE=2000

The default history remains at 500 lines.

MFC after: 1 week


# 272416 02-Oct-2014 dumbbell

vt(4): Save/restore keyboard mode & LED states when switching window

Add new functions to manipulate these mode & state, instead of calling
kbdd_ioctl() everyhere.

This fixes at least two bugs:

1. The state of the Scroll Lock LED and the state of scroll mode
could be out-of-sync. For instance, if one enables scroll mode on
window #1 and switches to window #2, the LED would remain on, but
the window wouldn't be in scroll mode.

Similarily, when switching between a console and an X.Org
session, the LED states could be inconsistent with the real
state.

2. When exiting from an X.Org session, the user could be unable to
type anything. The workaround was to switch to another console
window and come back.

Differential Revision: https://reviews.freebsd.org/D821
Reviewed by: ray@
Approved by: ray@
Tested by: kwm@
MFC after: 3 days


# 271868 19-Sep-2014 dumbbell

vt(4): Remove vt_buf->vb_dirtymask

This structure and the associated functions were unused since the
implementation of vd_bitblt_text_t callbacks.

MFC after: 3 days


# 271465 12-Sep-2014 ray

Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
(forgetted in last commit)

Reviewed by: dumbbell (as D755)
MFC after: 1 week


# 271312 09-Sep-2014 ray

Revert r269474. Special keyboard combinations should be handled by separate
sysctls.


# 270785 29-Aug-2014 dumbbell

vt(4): Change vb_history_size from "int" to "unsigned int"

CID: 1230002, 1230003
MFC after: 1 week


# 270705 27-Aug-2014 dumbbell

vt(4): Add cngrab() and cnungrab() callbacks

They are used when a panic occurs or when entering a DDB session for
instance.

cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.

MFC after: 1 week


# 270702 27-Aug-2014 dumbbell

vt(4): Implement basic support for KDSETMODE ioctl

With the current implementation, this allows an X11 server to tell
the console it switches a particular window in "graphics mode". This
information is used by the mouse handling code to ignore sysmouse events
in the window taken by the X server: only him should receive those
events.

Reported by: flo@, glebius@, kan@
Tested by: flo@
Reviewed by: kan@
MFC after: 1 week


# 270613 25-Aug-2014 dumbbell

vt(4): Store a rectangle for the drawable area, not just the top-left corner

This allows backends to verify they do not draw outside of this area.
This fixes a bug in vt_vga where the text was happily drawn over the
right and bottom margins, when using the Gallant font.

MFC after: 1 week


# 270446 24-Aug-2014 dumbbell

vt(4): Remove vd_bitbltchr_t

It's replaced by vd_bitblt_text_t, which gives more context to the
backend and allows it to perform more efficiently when redrawing a given
area.

MFC after: 1 week


# 270431 23-Aug-2014 dumbbell

vt(4): Add vd_bitblt_bmp_t callback

The code was already there in all backends, we just expose it. This is
used to display the splash screen.

MFC after: 1 week


# 270404 23-Aug-2014 dumbbell

vt(4): Fix cursor handling in vt_flush()

There were situations where the cursor was not erased/redrawn or its
position was marked as dirty even though it's not displayed. The code is
now more straightforward.

At the same, add a function to determine if the cursor covers a given
area. This is used by backends to know if they need to draw the cursor.

This new function should be paired with a new state in struct vt_device,
called vd_mshown, which indicates if the cursor should be displayed.
This again simplifies vd_bitblt_text_t callback's API.

MFC after: 1 week


# 270342 22-Aug-2014 dumbbell

vt(4): Use the actual size of the mouse when marking its position as dirty

This fixes a bug where part of the cursor was not erased.

MFC after: 1 week


# 270338 22-Aug-2014 dumbbell

vt(4): The offset to center the text area is per-window now

The previous global offset, based on the last loaded font, had no
meaning for other windows. This caused a shifted text area, often partly
out-of-screen.

MFC after: 1 week


# 270336 22-Aug-2014 dumbbell

vt(4): Give the window to vd_bitblt_text_t callback

... instead of both the buffer and the font. Again, this simplifies the
API.

MFC after: 1 week


# 270331 22-Aug-2014 dumbbell

vt(4): Store cursor bitmap & colors in struct vt_device

This removes the need to specify them to each call to vd_bitblt_text_t
and, therefore, simplifies the API.

MFC after: 1 week


# 270322 22-Aug-2014 dumbbell

vt(4): Add new vd_bitblt_text_t callback, and implement it for vt_vga

Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t
receives:
o the whole text buffer
o the dirty area
o the mouse cursor (map, position, colors)

This allows the backend to perform optimization on how to draw things.
The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver
are converted (only vt_vga is included in this commit).

In vt_vga, this allows to draw the text and the cursor in one pass,
without ever reading from video memory (because it has all the context).
The main benefit is the speed improvement: no more slideshow during
boot!

Other bugs fixed in vt_vga are:
o left-most characters are drawn properly (the left-most pixels were
missing with bold characters and some wide letters such as 'm')
o no more black square around the cursor
o no cursor flickering when the text is scrolling

There are still many problems to fix: the known issues are marked with
"FIXME" inside the code.

MFC after: 1 week


# 270293 21-Aug-2014 dumbbell

vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor"

At the same time, "w" and "h" members are now called "width" and
"height". The goal is to have a more "public" structure, because it will
soon be passed as argument to a new callback, replacing vd_bitbltchr_t.

MFC after: 1 week


# 270288 21-Aug-2014 dumbbell

vt(4): Constify vt_buf argument of vtbuf_iscursor()

MFC after: 1 week


# 270280 21-Aug-2014 dumbbell

vt(4): Pause the flush timer while swithing window

This fixes bad looking refresh when switching window: squares instead
of text, flashing screen, and so on. In the worst case, vt_flush() came
at a very inappropriate timing and the screen was not refreshed at all
(leaving squares all over the place).

This doesn't fix the flickering of the screen with vt_vga, because the
sync signal is temporarily stopped and the video memory is cleared.

MFC after: 1 week


# 270273 21-Aug-2014 dumbbell

vt(4): If the cursor didn't move, don't mark its position as dirty

Currently, this has no effect, because the cursor is always redrawn
anyway. But this will be useful after improvements to the vd_bitbltchr_t
callback API.

The vt_device structure members used to store the position of the cursor
as of the last redraw are renamed from vd_mdirty{x,y} to vd_mold{x,y}.
The associated comment is fixed too. Also, their value is now expressed
in pixels, not in character columns/row.

MFC after: 1 week


# 269685 07-Aug-2014 nwhitehorn

Retire vd_maskbitbltchr. The same functionality can be obtained by testing
for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr()
were doing anyway.


# 269474 03-Aug-2014 ray

Allow to disable some special key combinations handled by vt(4), like debug
request, reboot request.

Requested by: Claude Buisson

Sponsored by: The FreeBSD Foundation


# 269185 28-Jul-2014 ray

Remove unused macro VT_CONSDEV_DECLARE. Join console device now declared in one
place.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 267992 28-Jun-2014 hselasky

Pull in r267961 and r267973 again. Fix for issues reported will follow.


# 267985 27-Jun-2014 gjb

Revert r267961, r267973:

These changes prevent sysctl(8) from returning proper output,
such as:

1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory


# 267978 27-Jun-2014 marius

In order to get vt(4) a bit closer to the feature set provided by sc(4),
implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to
SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the
default colors of normal and kernel text respectively.
Note on the naming: Although affecting the output of vt(4), technically
kern/subr_terminal.c is primarily concerned with changing default colors
so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR.
Actually, if the architecture and abstraction of terminal+teken+vt would
be perfect, dev/vt/* wouldn't be touched by this commit at all.

Reviewed by: emaste
MFC after: 3 days
Sponsored by: Bally Wulff Games & Entertainment GmbH


# 267961 27-Jun-2014 hselasky

Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after: 2 weeks
Sponsored by: Mellanox Technologies


# 267624 18-Jun-2014 ray

syscons(4) and vt(4) can be built together now.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 267007 03-Jun-2014 ray

Fix case when vt(4) started w/o driver assigned.
o Always init locks and cv ASAP.
o Initialize driver-independent parts even if driver probing fail.
o Allow to call vt_upgrade anytime, for later loaded drivers.
o New window flag VWF_READY, to track if window already initialized.
Other updates:
o Pass vd as a cookie for kbd_allocate.
o Do not blank window on driver replacement.

Tested by: hselasky (RPi), emaste(VGA, EFIFB, KMS), me

MFC after: 7 days
Sponsored by: The FreeBSD Foundation


# 265719 08-May-2014 ray

Hide debug messages under VT_DEBUG.

Sponsored by: The FreeBSD Foundation


# 265392 05-May-2014 ray

Create dataset for vt(4) drivers.

Sponsored by: The FreeBSD Foundation


# 265391 05-May-2014 ray

Define a new method for probing vt(4) driver before attach it at early stage.

Sponsored by: The FreeBSD Foundation


# 264999 27-Apr-2014 nwhitehorn

Increase the maximum framebuffer size to more reasonable values reflecting
the high-resolution boot consoles present on Open Firmware and EFI systems.


# 263885 28-Mar-2014 ray

o Add new vd_driver method to do bitblt with mask, named vd_maskbitbltchr.
o Move vd_bitbltchr vga's driver method to vd_maskbitbltchr.
o Implement new vd_bitbltchr method for vga driver. (It do single write for 8
pixels, have to be a bit faster).

MFC after: 7 days
Sponsored by: The FreeBSD Foundation


# 261552 06-Feb-2014 ray

Add two new vt(9) driver methods: vd_drawrect and vd_setpixel.
Implement vd_drawrect and vd_setpixel for vt_fb driver.

Sponsored by: The FreeBSD Foundation


# 259882 25-Dec-2013 ray

Use statndard (syscons) way to disable bell.

Testesd by: markj

Sponsored by: The FreeBSD Foundation


# 259777 23-Dec-2013 ray

o Add virtual terminal mmap request handler.
o Forward termianl framebuffer ioctl to fbd.
o Forward terminal mmap request to fbd.
o Move inclusion of sys/conf.h to vt.h.

Sponsored by: The FreeBSD Foundation


# 259680 21-Dec-2013 emaste

Support double-width characters in vt(9)

Normal and bold fonts each have a glyph map for single or left half-
glyphs, and right half glyphs. The flag TF_CJK_RIGHT in term_char_t
requests the right half-glyph.

Reviewed by: ed@
Sponsored by: The FreeBSD Foundation


# 259650 20-Dec-2013 ray

Set mouse level per window, instead of global.

Sponsored by: The FreeBSD Foundation


# 259615 19-Dec-2013 ray

Enable mouse support for terminal clients (like dialog(1)).

Sponsored by: The FreeBSD Foundation


# 259178 10-Dec-2013 ray

Break build with error in case when both syscons and newcons are enabled.

Sponsored by: The FreeBSD Foundation


# 259130 09-Dec-2013 ray

o Compat options have to be defined before sys/ioccom.h included, so move
inclusion of right after sys/param.h.
o Only vt_core module use compat options, move it from common header to module.

Reported by: Larry Rosenman ler at lerctr dot org

Sponsored by: The FreeBSD Foundation


# 259129 09-Dec-2013 ray

Respect SC_NO_CUTPASTE option. It disable mouse cursor and cut/paste support
for vt(9). Note: /dev/sysmouse not affected.

Sponsored by: The FreeBSD Foundation


# 259110 08-Dec-2013 ray

o Build syscons(9)'s splash support if both sc and splash are enabled.
o Include opt_splash.h for vt(9) to know when splash device is enabled.
o Build logo_freebsd.c only if splash and vt are enabled.
o Include opt_compat.h to know when we have to respect compatibility.

Sponsored by: The FreeBSD Foundation


# 259016 05-Dec-2013 ray

Merge VT(9) project (a.k.a. newcons).

Reviewed by: nwhitehorn
MFC_to_10_after: re approval

Sponsored by: The FreeBSD Foundation


# 258327 18-Nov-2013 ray

Notify terminal about process on current terminal start to use mouse on a
different "mouse level".

Sponsored by: The FreeBSD Foundation


# 258165 15-Nov-2013 ray

Add VT_ALT_TO_ESC_HACK enabled by default. This will prepend ESC sequence before
any chars when any of ALT keys is down.
! Not sure if it right way, but now it is possible to use Alt keys in vim.

Sponsored by: The FreeBSD Foundation


# 258130 14-Nov-2013 ray

Save last mouse event and check if the button1-up event happen w/o movement,
then ignore it. Otherwise such events broke double/triple click sequence.

Sponsored by: The FreeBSD Foundation


# 258090 13-Nov-2013 ray

o Simplify POS_INDEX macro calculation.
o New macro POS_COPY to copy between term_pos_t.
o Add vtbuf_wth/vtbuf_htw helpers, to translate between screen coordinates and
circular history buffer location.
o Update vtbuf_iscursor to mark region selected by mouse.
o New helper vtbuf_flush_mark, to update regions where copy/paste mark changed.
o New method vtbuf_get_marked_len to get storage size for paste buffer.
o vtbuf_extract_marked fill (caller allocated buffer) with selected region data.
o Simplify mouse handler for copy/paste, and use vtbuf_flush_mark to update.
o New method vtbuf_scroll_mode, to help indicate Scroll mode by hiding cursor.
o Update header with new vtbuf methods.
o Add new vt_driver method vd_markedwin, to hold last window with selection.
o Enable paste support in core module.

Sponsored by: The FreeBSD Foundation
Pointed by: Claude Buisson <clbuisson@orange.fr> (Scroll mode indication)


# 257988 11-Nov-2013 ray

Update vd_bitbltchr_t type to handle operation mask (to not touch pixels which
is not defined in mask) and bpl (bytes per source line).
Only vt_fb driver handle handle bpl yet.
Add protector for case when blitting image can be drawn partially out of screen,
like mouse cursor.

Mouse cursor and its movements works fine, copy/paste not yet.

Sponsored by: The FreeBSD Foundation


# 257984 11-Nov-2013 ray

Define vt_mouse_event method.

Sponsored by: The FreeBSD Foundation


# 257975 11-Nov-2013 ray

Use vtbuf_iscursor method instead of macro to get chars to display inverted.

Sponsored by: The FreeBSD Foundation


# 257974 11-Nov-2013 ray

Add mouse related bits.

Sponsored by: The FreeBSD Foundation


# 257973 11-Nov-2013 ray

Define marker support functions and type of markers.

Sponsored by: The FreeBSD Foundation


# 257972 11-Nov-2013 ray

Add cut/paste region markers.

Sponsored by: The FreeBSD Foundation


# 257967 11-Nov-2013 ray

Add mouse cursor format structure.

Sponsored by: The FreeBSD Foundation


# 257966 11-Nov-2013 ray

Use opt_syscons.h to get defines.
Define max number of windows as VT_MAXWINDOWS if defined, or as MAXCONS, or 12.
Define VT_MOUSE_PASTEBUTTON and VT_MOUSE_EXTENDBUTTON if defined
SC_TWOBUTTON_MOUSE or VT_TWOBUTTON_MOUSE.

Sponsored by: The FreeBSD Foundation


# 257815 07-Nov-2013 ray

Handle suspend/resume. Switch to console window before suspend, switch back on
resume. That fix issue with broken Xorg image after resume.
Fix some style whilst here.

Sponsored by: The FreeBSD Foundation


# 257724 05-Nov-2013 ray

Define default size for early console to 640x480.

Sponsored by: The FreeBSD Foundation


# 257723 05-Nov-2013 ray

Increase history size to 500 lines.

Sponsored by: The FreeBSD Foundation


# 257547 02-Nov-2013 ray

Fix copyrights.

Sponsored by: The FreeBSD Foundation


# 257076 24-Oct-2013 ray

o Mute keyboard input when ScrollLock mode is active.
o Simplify keys handling.
o Send ESC sequence for arrow keys in _cngetc, that will fix DDB history.

Sponsored by: The FreeBSD Foundation


# 256964 23-Oct-2013 ray

Add new vt_buf flag VBF_HISTORY_FULL - whole history filled.

Sponsored by: The FreeBSD Foundation


# 256902 22-Oct-2013 ray

Reverse priority. Bigger now better.

Sponsored by: The FreeBSD Foundation


# 256527 15-Oct-2013 ray

o Rename bitblt method to bitbltchr, since it used to copy char with bg/fg colors
from font table, but not bitmap copy.
o Fix small mistake in comment.

Sponsored by: The FreeBSD Foundation


# 256145 08-Oct-2013 ray

o Implement history buffer.
o Join history buffer with screen buffer. Same type of things.
o Reimplement buffer as an array of rows. Make it circular, so no overflow
tracking.
o Implement VT_PROCESS mode. Locking of VT switching by owner process.
o Add debug and deadtimer sysctls. deadtimer - defaulting to 15 seconds, time
to wait process answer in VT_PROCESS mode, to do VT switch in case when
process hang.
o Implement later console attach.
o Fix (partially yet) keyboard allocation.
o Add drivers priority. Disallow to replace KMS driver with VGA.
o Add ability to resize terminals.

Sponsored by: The FreeBSD Foundation


# 219888 22-Mar-2011 ed

Readd the vt(4) driver and corresponding tools.