Changeset 2bc137c2 in mainline for kernel/arch/ia32/src/drivers/vesa.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/ia32/src/drivers/vesa.c

    r33dc0ad r2bc137c2  
    3838
    3939#include <genarch/fb/fb.h>
     40#include <genarch/fb/visuals.h>
    4041#include <arch/drivers/vesa.h>
    4142#include <putchar.h>
     
    6869void vesa_init(void)
    6970{
    70         fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_bpp, vesa_scanline, false);
     71        unsigned int visual;
     72       
     73        switch (vesa_bpp) {
     74        case 8:
     75                visual = VISUAL_INDIRECT_8;
     76                break;
     77        case 16:
     78                visual = VISUAL_RGB_5_6_5;
     79                break;
     80        case 24:
     81                visual = VISUAL_RGB_8_8_8;
     82                break;
     83        case 32:
     84                visual = VISUAL_RGB_0_8_8_8;
     85                break;
     86        default:
     87                panic("Unsupported bits per pixel");
     88        }
     89       
     90        fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_scanline, visual);
    7191}
    7292
Note: See TracChangeset for help on using the changeset viewer.