]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86/ACPI: restore VESA mode upon resume from S3
authorJan Beulich <jbeulich@suse.com>
Mon, 2 Sep 2019 12:41:19 +0000 (14:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 2 Sep 2019 12:41:19 +0000 (14:41 +0200)
In order for "acpi_sleep=s3_mode" to have any effect, we should record
the video mode we switched to during boot. Since right now there's mode
setting code for VESA modes only in the resume case, record the mode
just in that one case.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/video.S

index 335a51c9b5c8f322524565a7ee0a83e18ff3e23f..20097aa64304c2856003296482d02d35a11bdf56 100644 (file)
@@ -455,14 +455,17 @@ check_vesa:
         cmpb    $0x99, %al
         jnz     _setbad                 # Doh! No linear frame buffer.
 
+        pushw   %bx
         subb    $VIDEO_FIRST_VESA>>8, %bh
         orw     $0x4000, %bx            # Use linear frame buffer
         movw    $0x4f02, %ax            # VESA BIOS mode set call
         int     $0x10
+        popw    %bx
         cmpw    $0x004f, %ax            # AL=4f if implemented
         jnz     _setbad                 # AH=0 if OK
 
         movb    $1, bootsym(graphic_mode)  # flag graphic mode
+        movw    %bx, bootsym(video_mode)
         stc
         ret