History log of /freebsd/sys/dev/vt/hw/vga/vt_vga.c (Results 1 – 25 of 83)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7cd7b849 22-Jul-2025 Matteo Riondato <matteo@FreeBSD.org>

vt: refer to correct man section.

Signed-off-by: Matteo Riondato <matteo@FreeBSD.org>
Reviewed by: imp,emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1781


Revision tags: release/14.3.0-p1, release/14.2.0-p4, release/13.5.0-p2, release/14.3.0, release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0
# 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 ...


Revision tags: release/14.1.0, release/13.3.0
# 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.

Remov

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

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

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

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


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 3af6e882 07-May-2022 John Baldwin <jhb@FreeBSD.org>

vt: Remove unused devclass argument to DRIVER_MODULE.


# 05188320 24-Feb-2022 Roger Pau Monné <royger@FreeBSD.org>

vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized

There's too many broken hardware out there that wrongly has the
ACPI_FADT_NO_VGA bit set. Ignore it unless running as a virtualized
guest,

vt/vga: ignore ACPI_FADT_NO_VGA unless running virtualized

There's too many broken hardware out there that wrongly has the
ACPI_FADT_NO_VGA bit set. Ignore it unless running as a virtualized
guest, as then the expectation would be that the hypervisor does
provide correct ACPI tables.

Reviewed by: emaste, 0mp, eugen
MFC: 3 days
Sponsored by: Citrix Systems R&D
PR: 230172
Differential revision: https://reviews.freebsd.org/D34392

show more ...


# f266082f 02-Mar-2022 Ed Maste <emaste@FreeBSD.org>

vt_vga: fix colour in pixel blocks with more than 4 colours

VGA hardware provides many different graphics and data access modes,
each with different capabilities and limitations.

VGA vt(4) graphics

vt_vga: fix colour in pixel blocks with more than 4 colours

VGA hardware provides many different graphics and data access modes,
each with different capabilities and limitations.

VGA vt(4) graphics mode operates on blocks of pixels at a time. When a
given pixel block contains only two colours the vt_vga driver uses write
mode 3. When the block contains more than two colours it uses write
mode 0. This is done because two-colour write mode 3 is much more
efficient.

In practice write mode 3 is used most of the time, as there is often a
single foreground colour and single background colour across the entire
console. One common exception requiring the use of mode 0 is when the
mouse cursor is drawn over a background other than black, as we need
black and white for the cursor in addition to the background colour.

VGA's default 16-colour palette provides the same set of colours as the
system console, but in a different order. Previously we configured a
non-default VGA palette that had the same colours at the same indexes.
However, this caused anything drawn before the kernel started (drawn by
the loader, for instance) to change colours once the kernel configured
the new, non-default palette.

In 5e251aec8636 we switched to leaving the default VGA palette in place,
translating console colour indexes to VGA colour indexes as necessary.
This translation was missed for the write mode 0 case for pixel blocks
with more than two colours.

PR: 261751
Reviewed by: adrian
MFC after: 1 week
Fixes: 5e251aec8636 ("vt(4): Use default VGA palette")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34412

show more ...


# 731a929a 02-Mar-2022 Ed Maste <emaste@FreeBSD.org>

vt_vga: Correct "plane" spelling

I suspect the variable names and comments were accidentally French.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


Revision tags: release/12.3.0
# dbc7ca59 22-Sep-2021 Ed Maste <emaste@FreeBSD.org>

vt: bound buffer access in redraw optimization

PR: 248628
Reported by: oleg
Reviewed by: cem, oleg (both earlier)
Fixes: ee97b2336aa4 ("Speed up vt(4) by keeping...")
MFC after: 3 days
Sponsored b

vt: bound buffer access in redraw optimization

PR: 248628
Reported by: oleg
Reviewed by: cem, oleg (both earlier)
Fixes: ee97b2336aa4 ("Speed up vt(4) by keeping...")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32059

show more ...


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0
# da2d1e9d 29-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r338298 through r338391.


# ee97b233 25-Aug-2018 Colin Percival <cperciva@FreeBSD.org>

Speed up vt(4) by keeping a record of the most recently drawn character and
the foreground and background colours. In bitblt_text functions, compare
values to this cache and don't re-draw the charac

Speed up vt(4) by keeping a record of the most recently drawn character and
the foreground and background colours. In bitblt_text functions, compare
values to this cache and don't re-draw the characters if they haven't changed.
When invalidating the display, clear this cache in order to force characters
to be redrawn; also force full redraws between suspend/resume pairs since odd
artifacts can otherwise result.

When scrolling the display (which is where most time is spent within the vt
driver) this yields a significant performance improvement if most lines are
less than the width of the terminal, since this avoids re-drawing blanks on
top of blanks.

(Note that "re-drawing" here includes writing to the VGA text mode buffer; on
virtualized systems this can be extremely slow since it triggers a glyph
being rendered onto a 640x480 screen).

On a c5.4xlarge EC2 instance (with emulated text mode VGA) this cuts the time
spent in vt(4) during the kernel boot from 1200 ms to 700ms; on my laptop
(with a 3200x1800 display) the corresponding time is reduced from 970 ms down
to 155 ms.

Reviewed by: imp, cem
Approved by: re (gjb)
Relnotes: Significant speedup in vt(4) and the system boot generally.
Differential Revision: https://reviews.freebsd.org/D16723

show more ...


# 14b841d4 11-Aug-2018 Kyle Evans <kevans@FreeBSD.org>

MFH @ r337607, in preparation for boarding


# f9c0a512 10-Aug-2018 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r337286 through r337585.


# 0b4d5eb8 07-Aug-2018 Colin Percival <cperciva@FreeBSD.org>

Replace a pair of 8-bit writes to VGA memory with a single 16-bit write.

The VGA "text mode" buffer has a pair of bytes for each character: One
byte for the character symbol, and an "attribute" byte

Replace a pair of 8-bit writes to VGA memory with a single 16-bit write.

The VGA "text mode" buffer has a pair of bytes for each character: One
byte for the character symbol, and an "attribute" byte encoding the
foreground and background colours. When updating the screen, we were
writing these two bytes separately.

On some virtualized systems, every write results in a glyph being redrawn
into a (graphical) virtual screen; writing these two bytes separately
results in twice as much work being done to draw characters, whereas if
we perform a single 16-bit write instead, the character only needs to be
redrawn once.

On an EC2 c5.4xlarge instance, this change cuts 1.30s from the kernel boot,
speeding it up from 8.90s to 7.60s.

MFC after: 1 week

show more ...


# 28ebccd5 25-Jun-2018 Konstantin Belousov <kib@FreeBSD.org>

Fix compilation.

Pointy hat to: me
Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# 7705dd4d 25-Jun-2018 Konstantin Belousov <kib@FreeBSD.org>

Provide a helper function acpi_get_fadt_bootflags() to fetch the FADT
x86 boot flags.

Reviewed by: royger
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D160

Provide a helper function acpi_get_fadt_bootflags() to fetch the FADT
x86 boot flags.

Reviewed by: royger
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D16004
MFC after: 1 week

show more ...


# 120186ad 25-Jun-2018 Konstantin Belousov <kib@FreeBSD.org>

Always initialize the ignore local variable.

Reviewed by: royger
Sponsored by: The FreeBSD Foundation
Differential revision: https://reviews.freebsd.org/D16004


# 8f62926e 25-Jun-2018 Roger Pau Monné <royger@FreeBSD.org>

vt: add option to ignore NO_VGA flag in ACPI

To workaround buggy firmware that sets this flag when there's actually
a VGA present.

Reported and tested by: Yasuhiro KIMURA <yasu@utahime.org>
Sponsor

vt: add option to ignore NO_VGA flag in ACPI

To workaround buggy firmware that sets this flag when there's actually
a VGA present.

Reported and tested by: Yasuhiro KIMURA <yasu@utahime.org>
Sponsored by: Citrix Systems R&D
Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D16003

show more ...


Revision tags: release/11.2.0
# 649d7b46 18-May-2018 Ed Maste <emaste@FreeBSD.org>

vt: add more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols

vt: add more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

¦ | U+00A6 Broken bar
✓ √ U+2713 Checkmark

Sponsored by: The FreeBSD Foundation

show more ...


# 5e251aec 10-May-2018 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

vt(4): Use default VGA palette

Before this change, the VGA palette was configured to match the shell
palette (e.g. color #1 was red). There was one glitch early in boot when
the vt(4)'s VGA palette

vt(4): Use default VGA palette

Before this change, the VGA palette was configured to match the shell
palette (e.g. color #1 was red). There was one glitch early in boot when
the vt(4)'s VGA palette was loaded: the loader's logo would switch from
red to blue. Likewise for the "Booting..." message switching from blue
to red. That's because the loader's logo was drawed with the default VGA
palette where a few colors are swapped compared to the shell palette
(e.g. blue <-> red).

This change configures the default VGA palette during initialization and
converts input's colors from shell to VGA palette index.

There should be no visible changes, except the loader's logo which will
keep its original color.

Reviewed by: eadler

show more ...


# 185aba2d 12-Apr-2018 Ed Maste <emaste@FreeBSD.org>

vt: add three more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
s

vt: add three more cp437 mappings for vga textmode

In UTF-8 locales mandoc uses a number of characters outside of the Basic
Latin group, e.g. from general punctuation or miscellaneous mathematical
symbols, and these rendered as ? in text mode.

This change adds (char, replacement, code point, description):

– - U+2013 En Dash
⟨ < U+27E8 Mathematical Left Angle Bracket
⟩ > U+27E9 Mathematical Right Angle Bracket

This change addresses some common cases; there are others that still
need to be added after a more thorough review.

PR: 227409
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

show more ...


# c2272faa 13-Mar-2018 Roger Pau Monné <royger@FreeBSD.org>

vt_vga: check if VGA is available from ACPI FADT table

On x86 the IA-PC Boot Flags in the FADT can signal whether VGA is
available or not.

Sponsored by: Citrix systems R&D
Reviewed by: marcel
Dif

vt_vga: check if VGA is available from ACPI FADT table

On x86 the IA-PC Boot Flags in the FADT can signal whether VGA is
available or not.

Sponsored by: Citrix systems R&D
Reviewed by: marcel
Differential revision: https://reviews.freebsd.org/D14397

show more ...


Revision tags: release/10.4.0, release/11.1.0
# 4198293b 17-Jun-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r319801 through r320041.


# e6b01ed7 14-Jun-2017 Enji Cooper <ngie@FreeBSD.org>

Use nitems(..) when computing `max` instead of the longhand version of
the same logic

MFC after: 1 month


Revision tags: release/11.0.1, release/11.0.0
# 4ed3c0e7 30-Apr-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

sys: Make use of our rounddown() macro when sys/param.h is available.

No functional change.


1234