Index: sys/dev/fb/vesa.c =================================================================== --- sys/dev/fb/vesa.c +++ sys/dev/fb/vesa.c @@ -134,6 +134,7 @@ static vi_bitblt_t vesa_bitblt; static vi_diag_t vesa_diag; static int vesa_bios_info(int level); +static int vesa_late_load(int flags); static video_switch_t vesavidsw = { vesa_probe, @@ -1141,7 +1142,7 @@ * initialization for now and try again later. */ if (adp == NULL) { - vga_sub_configure = vesa_configure; + vga_sub_configure = vesa_late_load; return (ENODEV); } @@ -1926,6 +1927,25 @@ return (error); } +/* + * To be called from the vga_sub_configure hook in case the VGA adapter is + * not found when VESA is loaded. + */ +static int +vesa_late_load(int flags) +{ + int error; + + mtx_init(&vesa_lock, "VESA lock", NULL, MTX_DEF); + + error = vesa_configure(flags); + + if (error == 0) + vesa_bios_info(bootverbose); + + return (error); +} + static int vesa_unload(void) {