+static void print_mode_info(int mode, struct vid_modeinfo *mi)
+{
+ infomsg("VBE mode %04x\n", mode);
+ infomsg(" %dx%d %d bpp (%d colors)\n", mi->width, mi->height,
+ mi->bpp, mi->ncolors);
+ infomsg(" pitch: %d bytes, %d vmem pages\n", mi->pitch, mi->pages);
+
+ if(mi->bpp > 8) {
+ infomsg(" RGB mask %06x %06x %06x (pos: %d %d %d)\n", (unsigned int)mi->rmask,
+ (unsigned int)mi->gmask, (unsigned int)mi->bmask, mi->rshift,
+ mi->gshift, mi->bshift);
+ }
+
+ if(mode & VBE_MODE_LFB) {
+ infomsg(" LFB address %xh, size: %d\n", (unsigned int)mi->vmem_addr,
+ (int)mi->vmem_size);
+ } else {
+ infomsg(" banked window %d kb, granularity: %d kb, step: %d\n", mi->win_size,
+ mi->win_gran, mi->win_step);
+ }
+}
+