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
F102753399: D34221.diff
Sat, Nov 16, 5:28 PM
Unknown Object (File)
Sat, Nov 9, 5:37 AM
Unknown Object (File)
Wed, Nov 6, 11:47 PM
Unknown Object (File)
Thu, Oct 31, 7:53 AM
Unknown Object (File)
Oct 16 2024, 4:52 AM
Unknown Object (File)
Oct 15 2024, 6:50 AM
Unknown Object (File)
Oct 14 2024, 2:20 AM
Unknown Object (File)
Oct 12 2024, 8:29 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 44549
Build 41437: 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