Page MenuHomeFreeBSD

vt: implement rotation for framebuffer consoles
Needs ReviewPublic

Authored by sg2342_googlemail.com on Feb 9 2022, 1:41 AM.
Tags
None
Referenced Files
F173811467: D34221.id103171.diff
Mon, Sep 28, 3:15 PM
F173804038: D34221.id102793.diff
Mon, Sep 28, 1:43 PM
F173801538: D34221.id102544.diff
Mon, Sep 28, 1:19 PM
F173800763: D34221.id102548.diff
Mon, Sep 28, 1:10 PM
Unknown Object (File)
Sun, Sep 27, 1:23 PM
Unknown Object (File)
Sun, Sep 27, 3:19 AM
Unknown Object (File)
Sun, Sep 27, 3:14 AM
Unknown Object (File)
Sun, Sep 27, 2:32 AM

Details

Reviewers
imp
emaste
Summary

tunable "kern.vt.rotate" controls behaviour:
1 - if witdh < height (Portrait mode display): rotate 270 degrees
90 - rotate 90 degrees
180 - rotate 180 degrees
270 - rotate 270 degrees
all other values or undefined - no rotation

https://reviews.freebsd.org/D34220 must be merged before this can go in, otherwise vt_cpulogos will write outside of framebuffer memory if the rotation is 90 or 270.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44367
Build 41255: arc lint + arc unit

Event Timeline

cem added inline comments.
sys/sys/fbio.h
159–160

Maybe 0x10, 0x20?

sys/sys/fbio.h
159–160

I am not even sure these belong in fbio.h at all; i'm also unsure about the naming. before this change elements of fb_info where relevant for all fb users, the _ROTATE_ flags are only relevant for vt. but i needed a place to stash 2 bits.

flags base 16 in fbio.h, style(9) in vt_fb.c

  • reduce number of fb_flags to two
  • use switch/case in vt_fb_setpixel() and vt_fb_bitblt_bitmap() rotation code
  • in vt_fb_setpixel(): re-order offset calculation in the 90 degree case
  • vt_fb_bitblt_bitmap(): add break after the last case