Changeset b4fa652 in mainline for boot/arch/sparc64/loader/ofwarch.c


Ignore:
Timestamp:
2006-08-04T08:21:30Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b006a2c8
Parents:
d7e3fa66
Message:

Support 24bpp framebuffers with 4 pixelbytes (each pixel aligned on 32-bits).

At least on sparc64, the OpenFirmware linebytes property specifies the number
of pixels between consecutive scan lines of the display. Fix scanilne calculation,
including possible alignment.

Add note to 8bpp pixel functions pointing out drawbacks of that mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/ofwarch.c

    rd7e3fa66 rb4fa652  
    3636#include <printf.h>
    3737
     38int bpp2align[] = {
     39        [0] = 0,                /** Invalid bpp. */
     40        [1] = 1,                /** 8bpp is not aligned. */
     41        [2] = 2,                /** 16bpp is naturally aligned. */
     42        [3] = 4,                /** 24bpp is aligned on 4 byte boundary. */
     43        [4] = 4,                /** 32bpp is naturally aligned. */
     44};
     45
    3846void write(const char *str, const int len)
    3947{
Note: See TracChangeset for help on using the changeset viewer.