Changeset b4fa652 in mainline for boot/arch/sparc64/loader/main.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/main.c

    rd7e3fa66 rb4fa652  
    3232#include "_components.h"
    3333#include <ofw.h>
     34#include "ofwarch.h"
    3435#include <align.h>
    3536
     
    6061        }
    6162        bootinfo.screen.addr = ofw_translate(bootinfo.screen.addr);
     63        /* transform scanline to bytes with respect to potential alignment */
     64        bootinfo.screen.scanline = bootinfo.screen.scanline*bpp2align[bootinfo.screen.bpp >> 3];
    6265       
    6366        if (!ofw_keyboard(&bootinfo.keyboard))
    6467                printf("Error: unable to get keyboard properties\n");
    65        
     68
    6669        printf("\nDevice statistics\n");
    6770        printf(" memory: %dM\n", bootinfo.memmap.total>>20);
Note: See TracChangeset for help on using the changeset viewer.