Changeset 2bc137c2 in mainline for kernel/arch/ppc32/src


Ignore:
Timestamp:
2006-11-22T12:36:59Z (19 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/ppc32/src/ppc32.c

    r33dc0ad r2bc137c2  
    3939#include <arch/interrupt.h>
    4040#include <genarch/fb/fb.h>
     41#include <genarch/fb/visuals.h>
    4142#include <userspace.h>
    4243#include <proc/uarg.h>
     
    7677        if (config.cpu_active == 1) {
    7778                /* Initialize framebuffer */
    78                 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.bpp, bootinfo.screen.scanline, false);
     79                unsigned int visual;
     80               
     81                switch (bootinfo.screen.bpp) {
     82                case 8:
     83                        visual = VISUAL_INDIRECT_8;
     84                        break;
     85                case 16:
     86                        visual = VISUAL_RGB_5_5_5;
     87                        break;
     88                case 24:
     89                        visual = VISUAL_RGB_8_8_8;
     90                        break;
     91                case 32:
     92                        visual = VISUAL_RGB_0_8_8_8;
     93                        break;
     94                default:
     95                        panic("Unsupported bits per pixel");
     96                }
     97                fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, bootinfo.screen.scanline, visual);
    7998               
    8099                /* Initialize IRQ routing */
Note: See TracChangeset for help on using the changeset viewer.