Changeset b4fa652 in mainline for kernel/genarch/src/fb/fb.c
- Timestamp:
- 2006-08-04T08:21:30Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b006a2c8
- Parents:
- d7e3fa66
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/fb/fb.c
rd7e3fa66 rb4fa652 135 135 } 136 136 137 /** Put pixel - 8-bit depth (3:2:3) */ 137 /** Put pixel - 8-bit depth (color palette/3:2:3) 138 * 139 * Even though we try 3:2:3 color scheme here, an 8-bit framebuffer 140 * will most likely use a color palette. The color appearance 141 * will be pretty random and depend on the default installed 142 * palette. This could be fixed by supporting custom palette 143 * and setting it to simulate the 8-bit truecolor. 144 */ 138 145 static void rgb_1byte(void *dst, int rgb) 139 146 { … … 141 148 } 142 149 143 /** Return pixel color - 8-bit depth (3:2:3) */ 150 /** Return pixel color - 8-bit depth (color palette/3:2:3) 151 * 152 * See the comment for rgb_1byte(). 153 */ 144 154 static int byte1_rgb(void *src) 145 155 { … … 330 340 /** Initialize framebuffer as a chardev output device 331 341 * 332 * @param addr Physical address of the framebuffer333 * @param x Screen width in pixels334 * @param y Screen height in pixels335 * @param bpp Bits per pixel (8, 16, 24, 32)336 * @param scan Bytes per one scanline337 * 338 */ 339 void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan )342 * @param addr Physical address of the framebuffer 343 * @param x Screen width in pixels 344 * @param y Screen height in pixels 345 * @param bpp Bits per pixel (8, 16, 24, 32) 346 * @param scan Bytes per one scanline 347 * @param align Request alignment for 24bpp mode. 348 */ 349 void fb_init(uintptr_t addr, unsigned int x, unsigned int y, unsigned int bpp, unsigned int scan, bool align) 340 350 { 341 351 switch (bpp) { … … 353 363 rgb2scr = rgb_3byte; 354 364 scr2rgb = byte3_rgb; 355 pixelbytes = 3; 365 if (align) 366 pixelbytes = 4; 367 else 368 pixelbytes = 3; 356 369 break; 357 370 case 32:
Note:
See TracChangeset
for help on using the changeset viewer.