Subversion Repositories HelenOS

Rev

Rev 1837 | Rev 2071 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1837 Rev 1993
Line 35... Line 35...
35
 */
35
 */
36
 
36
 
37
#ifdef CONFIG_FB
37
#ifdef CONFIG_FB
38
 
38
 
39
#include <genarch/fb/fb.h>
39
#include <genarch/fb/fb.h>
-
 
40
#include <genarch/fb/visuals.h>
40
#include <arch/drivers/vesa.h>
41
#include <arch/drivers/vesa.h>
41
#include <putchar.h>
42
#include <putchar.h>
42
#include <mm/page.h>
43
#include <mm/page.h>
43
#include <mm/frame.h>
44
#include <mm/frame.h>
44
#include <mm/as.h>
45
#include <mm/as.h>
Line 65... Line 66...
65
    return false;
66
    return false;
66
}
67
}
67
 
68
 
68
void vesa_init(void)
69
void vesa_init(void)
69
{
70
{
-
 
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
   
70
    fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_bpp, vesa_scanline, false);
90
    fb_init(vesa_ph_addr, vesa_width, vesa_height, vesa_scanline, visual);
71
}
91
}
72
 
92
 
73
#endif
93
#endif
74
 
94
 
75
/** @}
95
/** @}