diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2012-02-16 22:51:44 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2012-02-16 22:51:44 +0000 |
commit | 1556e63481fe32777f5b0770a8ad34405cef7f29 (patch) | |
tree | 321e35c5426c0ed8c4faed2d475724fc5108ea1a /sys | |
parent | 2f18ee9d47eef25c563aa6d184ce4e36d49eadd4 (diff) | |
download | src-1556e63481fe32777f5b0770a8ad34405cef7f29.tar.gz src-1556e63481fe32777f5b0770a8ad34405cef7f29.zip |
Set the initial mode for the adapter after executing VESA BIOS POST.
There is no need to set initial mode for BIOS.
Notes
Notes:
svn path=/head/; revision=231843
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/fb/vesa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/fb/vesa.c b/sys/dev/fb/vesa.c index 0ec8a5544a91..fcb384dee43c 100644 --- a/sys/dev/fb/vesa.c +++ b/sys/dev/fb/vesa.c @@ -1469,6 +1469,7 @@ vesa_save_state(video_adapter_t *adp, void *p, size_t size) static int vesa_load_state(video_adapter_t *adp, void *p) { + int mode; if ((adp != vesa_adp) || (((adp_state_t *)p)->sig != V_STATE_SIG)) return ((*prevvidsw->load_state)(adp, p)); @@ -1478,8 +1479,10 @@ vesa_load_state(video_adapter_t *adp, void *p) /* Try BIOS POST to restore a sane state. */ (void)vesa_bios_post(); - (void)int10_set_mode(adp->va_initial_bios_mode); - (void)vesa_set_mode(adp, adp->va_mode); + mode = adp->va_mode; + (void)vesa_set_mode(adp, adp->va_initial_mode); + if (mode != adp->va_initial_mode); + (void)vesa_set_mode(adp, mode); return (vesa_bios_save_restore(STATE_LOAD, ((adp_state_t *)p)->regs)); } |