Bug 192452 - vt_vga very slow since r269471
Summary: vt_vga very slow since r269471
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2014-08-06 20:38 UTC by Nathan Whitehorn
Modified: 2014-09-02 17:47 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Whitehorn freebsd_committer 2014-08-06 20:38:33 UTC
The VGA driver has become unusably slow since r269471. I suspect that the support for non-8x8 fonts has dramatically increased the incidence of reads from VGA memory. It might be best if the driver could be refactored to avoid reads entirely, for example by passing some concept of write granularity up from the driver into the vt core so that vd_bitbltchr() is called only for operations of that width (redrawing partial characters).
Comment 1 Ed Maste freebsd_committer 2014-09-02 17:47:01 UTC
Fixed by r270322

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