History log of /freebsd-current/sys/dev/vt/vt_cpulogos.c
Revision Date Author Comments
# fdafd315 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

sys: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 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_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


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


# 06296f77 08-Feb-2022 Stefan Grundmann <sg2342@googlemail.com>

vt: fix splash_cpu logos use of vd_drawrect

In the (extremely unlikely) case of vd->vd_height ==
vt_logo_sprite_height the vd_drawrect code would write outside of
frame-buffer memory.

MFC after: 1 week
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D34220


# 6c7e4d72 19-Jan-2022 Mark Johnston <markj@FreeBSD.org>

vt: Use a taskqueue to clear splash_cpu logos

vt_fini_logos() calls vtbuf_grow(), which reallocates the console
window's buffer using malloc(M_WAITOK). Because vt_fini_logos() is
called via a callout, we end up panicking if INVARIANTS is enabled.

Fix the problem simply by clearing the logos using a timed taskqueue.
taskqueue_thread is formally allowed to sleep; of course, if we actually
end up sleeping to satisfy the allocation, then we have bigger problems.

PR: 260896
Reviewed by: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33932


# b1460baa 17-Oct-2019 Ed Maste <emaste@FreeBSD.org>

Update Conrad Meyer's email

cem is now a committer

Approved by: cem


# 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.


# 0374e156 08-Jul-2019 Eric van Gyzen <vangyzen@FreeBSD.org>

Ignore kern.vt.splash_cpu without graphics

When the system has no graphical console, such as bhyve in common
configurations, ignore kern.vt.splash_cpu, instead of panicking
on INVARIANTS kernels.

Reviewed by: cem dumbbell
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20877


# e2e050c8 19-May-2019 Conrad Meyer <cem@FreeBSD.org>

Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header
pollution substantially.

EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c
files into appropriate headers (e.g., sys/proc.h, powernv/opal.h).

As a side effect of reduced header pollution, many .c files and headers no
longer contain needed definitions. The remainder of the patch addresses
adding appropriate includes to fix those files.

LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by
sys/mutex.h since r326106 (but silently protected by header pollution prior
to this change).

No functional change (intended). Of course, any out of tree modules that
relied on header pollution for sys/eventhandler.h, sys/lock.h, or
sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped.


# 4e5a8fdb 16-May-2018 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Resume vt_timer() in vtterm_post_input() only

There is no need to try to resume it after each smaller operations
(putchar, cursor_position, copy, fill).

The resume function already checks if the timer is armed before doing
anything, but it uses an atomic cmpset which is expensive. And resuming
the timer at the end of input processing is enough.

While here, we also skip timer resume if the input is for another
windows than the currently displayed one. I.e. if `ttyv0` is currently
displayed, any changes to `ttyv1` shouldn't resume the timer (which
would refresh `ttyv0`).

By doing the same benchmark as r333669, I get:
* vt(4), before r333669: 1500 ms
* vt(4), with this patch: 760 ms
* syscons(4): 700 ms


# 2696ce47 19-Apr-2017 Jung-uk Kim <jkim@FreeBSD.org>

Revert r316796. It is not necessary since r317173.


# bae56e46 13-Apr-2017 Jung-uk Kim <jkim@FreeBSD.org>

Attempt to clear logos more thoroughly.

PR: 202288
Reviewed by: cem


# 15d449a5 21-Aug-2015 Conrad Meyer <cem@FreeBSD.org>

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


# 75ac3a73 21-Jul-2015 Conrad Meyer <cem@FreeBSD.org>

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