Changeset 20eb5e4d in mainline for kernel/genarch/src/fb/fb.c
- Timestamp:
- 2008-12-07T00:41:59Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5d9430d7
- Parents:
- 2b1f860
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/fb/fb.c
r2b1f860 r20eb5e4d 190 190 *((uint8_t *) dst) = RED(rgb, 3) << 5 | GREEN(rgb, 2) << 3 | 191 191 BLUE(rgb, 3); 192 }193 194 static void sb1500rgb_byte8(void *dst, int rgb)195 {196 if (RED(rgb, 1) && GREEN(rgb, 1) && BLUE(rgb, 1))197 *((uint8_t *) dst) = 255;198 else if (RED(rgb, 1) && GREEN(rgb, 1))199 *((uint8_t *) dst) = 150;200 else if (GREEN(rgb, 1) && BLUE(rgb, 1))201 *((uint8_t *) dst) = 47;202 else if (RED(rgb, 1) && BLUE(rgb, 1))203 *((uint8_t *) dst) = 48;204 else if (RED(rgb, 1))205 *((uint8_t *) dst) = 32;206 else if (GREEN(rgb, 1))207 *((uint8_t *) dst) = 47;208 else if (BLUE(rgb, 1))209 *((uint8_t *) dst) = 2;210 else211 *((uint8_t *) dst) = 1;212 192 } 213 193 … … 467 447 pixelbytes = 1; 468 448 break; 469 case VISUAL_SB1500_PALETTE:470 rgb2scr = sb1500rgb_byte8;471 scr2rgb = byte8_rgb;472 pixelbytes = 1;473 break;474 449 case VISUAL_RGB_5_5_5: 475 450 rgb2scr = rgb_byte555; … … 506 481 } 507 482 508 unsigned int fbsize = props->scan * props->y + props->offset;483 unsigned int fbsize = props->scan * props->y; 509 484 510 485 /* Map the framebuffer */ 511 fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr, fbsize); 486 fbaddress = (uint8_t *) hw_map((uintptr_t) props->addr + props->offset, 487 fbsize); 512 488 fbaddress += props->offset; 513 489 … … 532 508 sysinfo_set_item_val("fb.visual", NULL, props->visual); 533 509 sysinfo_set_item_val("fb.address.physical", NULL, props->addr); 510 sysinfo_set_item_val("fb.offset", NULL, props->offset); 534 511 sysinfo_set_item_val("fb.invert-colors", NULL, invert_colors); 535 512
Note:
See TracChangeset
for help on using the changeset viewer.