History log of /freebsd-11-stable/sys/dev/vt/vt_buf.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 330641 08-Mar-2018 eadler

MFC r326599:

Implement "vidcontrol -h <history_size>" for vt(4)

PR: 210415


# 321199 19-Jul-2017 emaste

MFC r313547, r313777: fix mouse selection when vt(4) scrolls

r313547 (ray, submitted by hselasky):

o Reset mouse selection when new lines reach selection lines.
o Fix how selection handled on display.

r313777 (rpokala):

Un-break vt(4) for {powerpc,powerpc64,sparc64} LINT kernel builds

The {powerpc,powerpc64,sparc64} LINT kernel builds fail with this error:

sys/dev/vt/vt_buf.c:198: warning: 'vtbuf_htw' defined but not used

Move vtbuf_htw() inside the '#if SC_NO_CUTPASTE' block where it belongs, and
put it in the proper order.

This fixes the immedate issue w/ vt(4), but all three then fail on different
issues.

PR: 211922
Relnotes: Yes


# 302408 07-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


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 273932 01-Nov-2014 dumbbell

vt(4): Adjust the cursor position after changing the window size

A new terminal_set_cursor() is added: it wraps the existing
teken_set_cursor() function.

In vtbuf_grow(), the cursor position is adjusted at the end of the
function. In vt_change_font(), we call terminal_set_cursor() just after
terminal_set_winsize_blank(), while the terminal is mute.

This fixes a bug where, after loading a kernel video driver which
increases the terminal window size, the cursor remains at its old
position, in other words, in the middle of the display content.

PR: 194421
MFC after: 1 week


# 271899 20-Sep-2014 bz

Make gcc happy by initialising the variable only set in a couple of
case statements without a default.

MFC after: 2 days
X-MFC with: r271871


# 271871 19-Sep-2014 dumbbell

vt(4): Rewrite history scrolling

It's now possible to scroll up the 500 hard-coded lines of history, not
just a fraction of them. For instance, one can reach the top of the boot
process.

Sometimes, when scrolling or when changing the screen size (by changing
the font or loading a KMS driver for instance), one could see the
history cycling (old content appeared below latest lines). This is
fixed.

Now, when the resolution changes are more lines can be shown, the
displayed area is adjusted so that, if the screen was filled with
content before, it's filled with content after as well: more history
is visible, instead of having blank lines below the previously visible
content.

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


# 271466 12-Sep-2014 ray

Fix stray char on paste.

Tested by: dumbbell and me
MFC after: 1 week


# 271382 10-Sep-2014 ray

spelling fixes

Submitted by: "Sam Fourman Jr." <sfourman@gmail.com>
MFC after: 1 week


# 270785 29-Aug-2014 dumbbell

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

CID: 1230002, 1230003
MFC after: 1 week


# 270667 26-Aug-2014 dumbbell

vt(4): When creating a window buffer, fill it entirely

... not just the visible part.

This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the
resolution goes up), the originally hidden, uninitialized area of the
buffer is displayed on the screen. This leads to a missing text cursor
when it's over an unitialized area.

This was also visible when selecting text: the uninitialized area was
not highlighted.

Internally, this area was zeroed: characters were all 0x00000000,
meaning the foreground and background color was black. Now, everything
is filled with a space with a gray foreground color, like the visible
area.

While here, remove the check for the mute flag and always use
TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
black background).

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


# 270288 21-Aug-2014 dumbbell

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

MFC after: 1 week


# 269780 10-Aug-2014 dumbbell

vt(4): Add vtbuf_dirty*_locked() to lock vtbuf once, not twice

In several functions, vtbuf_putchar() in particular, the lock on vtbuf
is acquired twice:
1. once by the said functions;
2. once in vtbuf_dirty().

Now, vtbuf_dirty_locked() and vtbuf_dirty_cell_locked() allow to
acquire that lock only once.

This improves the input speed of vt(4). To measure the gain, a
50,000-lines file was displayed on the console using cat(1). The time
taken by cat(1) is reported below:
o On amd64, with vt_vga:
- before: 1.0"
- after: 0.5"
o On sparc64, with creator_vt:
- before: 13.6"
- after: 10.5"

MFC after: 1 week


# 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


# 266861 29-May-2014 emaste

Update size in vt_grow if we don't have to reallocate

vt_grow may be called with a new size that's larger than previous but
does not require reallocation - for example, when the number of columns
is the same and new number of rows is less than the history size.
Prior to this change we would fail to update vb_scr_size, and then hit
a KASSERT when trying to write to the newly visible rows.

Sponsored by: The FreeBSD Foundation


# 266856 29-May-2014 emaste

Correct KASSERT strings

Rows refer to height and cols to width.


# 265681 08-May-2014 ray

Fix scrollback.

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


# 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


# 258136 14-Nov-2013 ray

Done cut/paste "word" selection mode support.
It still selects everything which is not space around.

Sponsored by: The FreeBSD Foundation

Sponsored by: The FreeBSD Foundation


# 258134 14-Nov-2013 ray

wrap long lines.

Sponsored by: The FreeBSD Foundation
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


# 258111 13-Nov-2013 ray

Simplify a bit vtbuf_set_mark.

Sponsored by: The FreeBSD Foundation


# 258093 13-Nov-2013 ray

Do not add <CR><LF> for last (single) line of paste buffer.

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)


# 257971 11-Nov-2013 ray

Add mouse related vtbuf operations.

Sponsored by: The FreeBSD Foundation


# 257547 02-Nov-2013 ray

Fix copyrights.

Sponsored by: The FreeBSD Foundation


# 257074 24-Oct-2013 ray

o Fix scroll calculations.
o Make vthistory_seek to return amount of lines to update +on_top/-on_bottom of
screen.

Sponsored by: The FreeBSD Foundation


# 256970 23-Oct-2013 ray

Turn off confusing rotation of scroll history.

Sponsored by: The FreeBSD Foundation


# 256894 22-Oct-2013 ray

Don't forget to clean terminal window memory. But colors makes more smiles.

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.