HomeFreeBSD

Improve support for Macs that have a stride not equal to the

Description

Improve support for Macs that have a stride not equal to the
horizonal resolution (width). In those cases fb_bpp ended up
completely wrong -- as in 6 bytes per pixel or something like
that. Since we already have a way to calculate fb_depth given
the masks and fb_bpp is effectively the same as fb_depth, all
we need to do is make sure fb_bpp is rounded to the next
multiple of the number of bits in a byte -- we assume we can
divide by the number of bits in a byte throughout vt(4).
While here:

  • simplify how we calculate fb_depth.
  • use fb_bpp instead of fb_depth to calculate fb_stride; we know we can divide fb_bpp.
  • don't limit fb_width and fb_height by VT_FB_DEFAULT_WIDTH and VT_FB_DEFAULT_HEIGHT (resp.). Those constants have not relation to the size of the frame buffer.

This at least fixes "lower-resolution" Macs. We're talking
1280x1024 or so. There still is a problem with 27" Macs,
which typically have a horizontal resolution over 2K.

PR: 193745 (partial)
Ok'd by: emaste@

Details

Provenance
marcelAuthored on
Parents
rS286808: Improve the VT initialization message: have it say what the
Branches
Unknown
Tags
Unknown