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
F153243648: D34221.id103171.diff
Mon, Apr 20, 12:48 AM
F153243530: D34221.id103171.diff
Mon, Apr 20, 12:47 AM
F153234112: D34221.id102548.diff
Sun, Apr 19, 11:38 PM
F153160819: D34221.id.diff
Sun, Apr 19, 1:18 PM
Unknown Object (File)
Sat, Apr 18, 10:31 PM
Unknown Object (File)
Thu, Apr 16, 9:18 PM
Unknown Object (File)
Fri, Apr 10, 11:03 PM
Unknown Object (File)
Fri, Apr 10, 8:10 PM

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