freebsd-skq/sys/dev/vt/hw
Marcel Moolenaar 296a51148d 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@
2015-08-15 16:13:28 +00:00
..
efifb Improve support for Macs that have a stride not equal to the 2015-08-15 16:13:28 +00:00
fb - Nuke dupe $FreeBSD$. 2015-07-27 14:03:34 +00:00
ofwfb Let unchangeable 8-bit frame buffers have vaguely correct colors. 2015-03-10 17:04:11 +00:00
vga Fix text mode operation. 2015-08-13 14:43:11 +00:00