Changeset 2bc137c2 in mainline for kernel/arch/ppc64/src/ppc64.c


Ignore:
Timestamp:
2006-11-22T12:36:59Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ccb0cbc
Parents:
33dc0ad
Message:

make framebuffer code more generic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc64/src/ppc64.c

    r33dc0ad r2bc137c2  
    3838#include <arch/interrupt.h>
    3939#include <genarch/fb/fb.h>
     40#include <genarch/fb/visuals.h>
    4041#include <userspace.h>
    4142#include <proc/uarg.h>
     
    6970{
    7071        if (config.cpu_active == 1) {
    71                 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
     72                /* Initialize framebuffer */
     73                unsigned int visual;
     74               
     75                switch (bootinfo.screen.bpp) {
     76                case 8:
     77                        visual = VISUAL_INDIRECT_8;
     78                        break;
     79                case 16:
     80                        visual = VISUAL_RGB_5_5_5;
     81                        break;
     82                case 24:
     83                        visual = VISUAL_RGB_8_8_8;
     84                        break;
     85                case 32:
     86                        visual = VISUAL_RGB_0_8_8_8;
     87                        break;
     88                default:
     89                        panic("Unsupported bits per pixel");
     90                }
     91                fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
     92               
    7293       
    7394                /* Merge all zones to 1 big zone */
Note: See TracChangeset for help on using the changeset viewer.