xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "xen-devel" <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>, WeiLiu <wl@xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH RFC 2/3] x86/ACPI: restore VESA mode upon resume from S3
Date: Fri, 14 Jun 2019 05:37:50 -0600	[thread overview]
Message-ID: <5D03870E0200007800238473@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <5D03853F0200007800238448@prv1-mh.provo.novell.com>

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>
---
RFC: On the box that I've been trying to test this on this didn't really
     make a difference (in the random cases where resume works in the
     first place there): The graphics card looks to remain powered off
     even after the Dom0 kernel has resumed. Additionally using
     "acpi_sleep=s3_bios" didn't make a difference either. Furthermore
     it looks like the serial console (connected via PCI card) doesn't
     work (yet) immediately after resume (I suppose it too is powered
     down), and resume hangs altogether with it in use. Hence it's sort
     of difficult to actually debug anything here.
---
I'm wondering actually whether the user having to explicitly request the
mode restoration is a good model: Why would we _not_ want to restore the
mode we've set during boot? In the worst case Dom0 kernel or X will
change the mode another time.

--- a/xen/arch/x86/boot/video.S
+++ b/xen/arch/x86/boot/video.S
@@ -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
 





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-06-14 11:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:30 [Xen-devel] [PATCH 0/3] x86: S3 resume adjustments Jan Beulich
2019-06-14 11:37 ` [Xen-devel] [PATCH 1/3] x86/ACPI: re-park previously parked CPUs upon resume from S3 Jan Beulich
2019-06-14 16:52   ` Julien Grall
2019-06-17  6:40     ` Jan Beulich
2019-06-17  8:12       ` Julien Grall
2019-08-29 13:37   ` Andrew Cooper
2019-06-14 11:37 ` Jan Beulich [this message]
2019-08-29 14:45   ` [Xen-devel] [PATCH RFC 2/3] x86/ACPI: restore VESA mode " Andrew Cooper
2019-08-29 15:18     ` Jan Beulich
2019-06-14 11:38 ` [Xen-devel] [PATCH 3/3] x86: a little bit of 16-bit video mode setting code cleanup Jan Beulich
2019-08-29 14:08   ` Andrew Cooper
2019-08-29 14:23     ` Jan Beulich
2019-08-29 14:38       ` Andrew Cooper
2019-08-29 15:07         ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5D03870E0200007800238473@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).