return 1; /* Function call failed */
if ( gi->signature != VESA_MAGIC )
return 2; /* No magic */
+#if 1
+ /* Linear frame buffer is a VBE 2.0 feature. In theory this
+ test is redundant given that we check the bitmasks. */
if ( gi->version < 0x0200 ) {
return 3; /* VESA 2.0 not supported */
}
+#endif
/* Copy general info */
memcpy(&__vesa_info.gi, gi, sizeof *gi);
mi->mode_attr, mi->h_res, mi->v_res, mi->bpp, mi->memory_layout,
mi->rpos, mi->gpos, mi->bpos);
- /* Must be an LFB color graphics mode supported by the hardware */
- if ( (mi->mode_attr & 0x0099) != 0x0099 )
+ /* Must be an LFB color graphics mode supported by the hardware.
+
+ The bits tested are:
+ 7 - linear frame buffer available
+ 4 - graphics mode
+ 3 - color mode
+ 1 - mode information available (mandatory in VBE 1.2+)
+ 0 - mode supported by hardware
+ */
+ if ( (mi->mode_attr & 0x009b) != 0x009b )
continue;
/* Must be 640x480, 32 bpp */