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
Unknown Object (File)
Wed, Apr 17, 4:48 PM
Unknown Object (File)
Mon, Apr 1, 1:12 PM
Unknown Object (File)
Thu, Mar 28, 2:17 AM
Unknown Object (File)
Feb 21 2024, 6:42 AM
Unknown Object (File)
Feb 17 2024, 11:46 PM
Unknown Object (File)
Jan 27 2024, 6:18 AM
Unknown Object (File)
Dec 26 2023, 10:27 AM
Unknown Object (File)
Dec 26 2023, 8:54 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 44462
Build 41350: 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