Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vt/hw/fb/vt_early_fb.c
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | #ifdef FDT | ||||
ih = OF_open(name); | ih = OF_open(name); | ||||
#endif | #endif | ||||
/* | /* | ||||
* Set up the color map | * Set up the color map | ||||
*/ | */ | ||||
switch (info->fb_depth) { | switch (info->fb_depth) { | ||||
case 8: | case 8: | ||||
vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, | vt_config_cons_colors(info, COLOR_FORMAT_RGB, | ||||
0x7, 5, 0x7, 2, 0x3, 0); | 0x7, 5, 0x7, 2, 0x3, 0); | ||||
break; | break; | ||||
case 15: | case 15: | ||||
vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, | vt_config_cons_colors(info, COLOR_FORMAT_RGB, | ||||
0x1f, 10, 0x1f, 5, 0x1f, 0); | 0x1f, 10, 0x1f, 5, 0x1f, 0); | ||||
break; | break; | ||||
case 16: | case 16: | ||||
vt_generate_cons_palette(info->fb_cmap, COLOR_FORMAT_RGB, | vt_config_cons_colors(info, COLOR_FORMAT_RGB, | ||||
0x1f, 11, 0x3f, 5, 0x1f, 0); | 0x1f, 11, 0x3f, 5, 0x1f, 0); | ||||
break; | break; | ||||
case 24: | case 24: | ||||
case 32: | case 32: | ||||
#if BYTE_ORDER == BIG_ENDIAN | #if BYTE_ORDER == BIG_ENDIAN | ||||
vt_generate_cons_palette(info->fb_cmap, | vt_config_cons_colors(info, | ||||
COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); | COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); | ||||
#else | #else | ||||
vt_generate_cons_palette(info->fb_cmap, | vt_config_cons_colors(info, | ||||
COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); | COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); | ||||
#endif | #endif | ||||
#ifdef FDT | #ifdef FDT | ||||
for (i = 0; i < 16; i++) { | for (i = 0; i < 16; i++) { | ||||
OF_call_method("color!", ih, 4, 1, | OF_call_method("color!", ih, 4, 1, | ||||
(cell_t)((info->fb_cmap[i] >> 16) & 0xff), | (cell_t)((info->fb_cmap[i] >> 16) & 0xff), | ||||
(cell_t)((info->fb_cmap[i] >> 8) & 0xff), | (cell_t)((info->fb_cmap[i] >> 8) & 0xff), | ||||
(cell_t)((info->fb_cmap[i] >> 0) & 0xff), | (cell_t)((info->fb_cmap[i] >> 0) & 0xff), | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |