Changeset 2bc137c2 in mainline for kernel/arch
- Timestamp:
- 2006-11-22T12:36:59Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ccb0cbc
- Parents:
- 33dc0ad
- Location:
- kernel/arch
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/drivers/vesa.c
r33dc0ad r2bc137c2 38 38 39 39 #include <genarch/fb/fb.h> 40 #include <genarch/fb/visuals.h> 40 41 #include <arch/drivers/vesa.h> 41 42 #include <putchar.h> … … 68 69 void vesa_init(void) 69 70 { 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); 71 91 } 72 92 -
kernel/arch/mips32/src/mips32.c
r33dc0ad r2bc137c2 54 54 #include <arch/debugger.h> 55 55 #include <genarch/fb/fb.h> 56 #include <genarch/fb/visuals.h> 56 57 #include <macros.h> 57 58 #include <ddi/device.h> … … 123 124 console_init(device_assign_devno()); 124 125 #ifdef CONFIG_FB 125 fb_init(0x12000000, 640, 480, 24, 1920, false); // gxemul framebuffer126 fb_init(0x12000000, 640, 480, 1920, VISUAL_RGB_8_8_8); // gxemul framebuffer 126 127 #endif 127 128 sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1); -
kernel/arch/ppc32/src/ppc32.c
r33dc0ad r2bc137c2 39 39 #include <arch/interrupt.h> 40 40 #include <genarch/fb/fb.h> 41 #include <genarch/fb/visuals.h> 41 42 #include <userspace.h> 42 43 #include <proc/uarg.h> … … 76 77 if (config.cpu_active == 1) { 77 78 /* 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); 79 98 80 99 /* Initialize IRQ routing */ -
kernel/arch/ppc64/src/ppc64.c
r33dc0ad r2bc137c2 38 38 #include <arch/interrupt.h> 39 39 #include <genarch/fb/fb.h> 40 #include <genarch/fb/visuals.h> 40 41 #include <userspace.h> 41 42 #include <proc/uarg.h> … … 69 70 { 70 71 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 72 93 73 94 /* Merge all zones to 1 big zone */ -
kernel/arch/sparc64/src/drivers/scr.c
r33dc0ad r2bc137c2 36 36 #include <genarch/ofw/ofw_tree.h> 37 37 #include <genarch/fb/fb.h> 38 #include <genarch/fb/visuals.h> 38 39 #include <arch/types.h> 39 40 #include <typedefs.h> … … 76 77 uint32_t fb_linebytes = 0; 77 78 uint32_t fb_scanline = 0; 79 unsigned int visual; 78 80 79 81 prop = ofw_tree_getprop(node, "width"); … … 116 118 return; 117 119 } 118 119 if (fb_depth == 24) 120 121 switch (fb_depth) { 122 case 8: 123 fb_scanline = fb_linebytes * (fb_depth >> 3); 124 visual = VISUAL_INDIRECT_8; 125 break; 126 case 16: 127 fb_scanline = fb_linebytes * (fb_depth >> 3); 128 visual = VISUAL_RGB_5_6_5; 129 break; 130 case 24: 120 131 fb_scanline = fb_linebytes * 4; 121 else 132 visual = VISUAL_RGB_8_8_8_0; 133 break; 134 case 32: 122 135 fb_scanline = fb_linebytes * (fb_depth >> 3); 136 visual = VISUAL_RGB_0_8_8_8; 137 break; 138 default: 139 printf("Unsupported bits per pixel.\n"); 140 return; 141 } 123 142 124 143 break; 125 144 case SCR_FFB: 126 fb_depth = 32;127 145 fb_scanline = 8192; 146 visual = VISUAL_RGB_0_8_8_8; 128 147 129 148 ofw_upa_reg_t *reg = &((ofw_upa_reg_t *) prop->value)[FFB_REG_24BPP]; … … 138 157 } 139 158 140 fb_init(fb_addr, fb_width, fb_height, fb_ depth, fb_scanline, true);159 fb_init(fb_addr, fb_width, fb_height, fb_scanline, visual); 141 160 } 142 161
Note:
See TracChangeset
for help on using the changeset viewer.