public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stefan Dösinger" <stefandoesinger-RbZlAiThDcE@public.gmane.org>
To: Carl-Daniel Hailfinger
	<c-d.hailfinger.kernel.2004-hi6Y0CQ0nG0@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Matthias Hentges
	<mailinglisten-H4PcyxPeSRnR7s880joybQ@public.gmane.org>,
	Oliver Dawid
	<od-VRmHG7Xu4f31qYPpFx2fzhvVK+yQ3ZXh@public.gmane.org>
Subject: Re: Re: Samsung P35 and S3 suspend
Date: Thu, 16 Dec 2004 21:57:02 +0100	[thread overview]
Message-ID: <200412162157.02741.stefandoesinger@gmx.at> (raw)
In-Reply-To: <41C1D3CB.5010805-hi6Y0CQ0nG0@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2380 bytes --]


> > Just a note about 2.6.10-rc2/3 kernels: I also had some Problems with
> > them. snd-Intel8x0 needs an update concerning PCI config save/restore and
> > ehci-hcd causes problems after resume. uhci-hcd suspend/resume works for
> > me, except that I must not plug or unplug usb devices while the system is
> > supended.
>
> Could you go into more detail? Changing the hardware config while suspended
> is obviously not recommended, but what are the exact problems occuring
> besides that?
I get a kernel panic at resume if I plugged in a device while suspended 
(Capslock led blinking, screen stays black)
The system locks during resume up if I unplug a device while in S3(capslock 
led not blinking, screen stays black too.)

> > No, I think it's the kernels problem. The various framebuffer drivers 
should 
> > know how to wake up the card.
> > There were some discussions on the linux-fbdev-devel list about writing a 
> > lightwhight(20-30k) 8086 emulator for the kernel to avoid real mode hacks.
> > As far as I know, this should be based on the 8086 emulator XFree/X.org 
uses.

> Yes, but for that to work we should have a procedure in place which allows
> us to get the card working again without having to crash a secondary vesa
> xserver. If boot-radeon could be extended to do the things the crashing
> vesa xserver does, we would be much better off. That could be folded
> a) into the kernel framebuffer drivers
> b) into the radeon xserver.
In the ideal case the frame buffer driver would run the VGA Rom post 
routine($0xc000:$3) in an X86 emulator(or in vm86 mode if it works), set up 
the frame buffer and at the end of the resume function the device is in the 
same state where it was before suspend and user mode programs like the 
X-Server won't recognise that the system was suspended.
That's at least my opinion.

Boot-radeon and the others are supposed to do that(in User mode), but the 
80x86 environment they set up seems to be incorrect in some way so they crash 
before they finish their task on some systems. If it works, the display comes 
back without any Vesa X11 server.

Attached is a patch against Xorg-6.8.0 which makes the radeon X11 driver call 
the reset routine if it notices that the system was in S3. This patch is 
quite uncomfortable because it's necessary to recompile X11. It is from 
Gentoo where it is compiled by default.

Stefan

[-- Attachment #2: 9375_all_6.7.0-radeon-resume-from-S3-suspend.patch --]
[-- Type: text/x-diff, Size: 1508 bytes --]

This enables resume from suspend level S3 by asking the Radeon chip if it
thinks it has no memory.  If so, the card is re-POSTed via the int10
interface.  Reportedly enables the driver to work for this type of
suspend/resume cycle on Dell D600 laptops (Dell D800s as well, if the video
BIOS is patched to 4.28.20.31.C1 or later). See Gentoo bug #48095 or Debian bug
#234575. This patch by Emmanuel Thome and Ole Rohne, and this info borrowed from
Debian.

--- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003-10-25 00:10:20.000000000 +0200
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c.new	2003-11-22 17:20:14.000000000 +0100
@@ -345,6 +345,7 @@
     "xf86InitInt10",
     "xf86FreeInt10",
     "xf86int10Addr",
+    "xf86ExecX86int10",
     NULL
 };
 
@@ -6409,9 +6410,22 @@
 {
     ScrnInfoPtr    pScrn = xf86Screens[scrnIndex];
     RADEONInfoPtr  info  = RADEONPTR(pScrn);
+    unsigned char * RADEONMMIO = info->MMIO;
 
     RADEONTRACE(("RADEONEnterVT\n"));
 
+    if (INREG(RADEON_CONFIG_MEMSIZE) == 0) { /* Softboot V_BIOS */
+      xf86Int10InfoPtr pInt;
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+	       "zero MEMSIZE, probably at D3cold. Re-POSTing via int10.\n");
+      pInt = xf86InitInt10 (info->pEnt->index);
+      if (pInt) {
+        pInt->num = 0xe6;
+        xf86ExecX86int10 (pInt);
+        xf86FreeInt10 (pInt);
+      }
+    }
+
     if (info->FBDev) {
 	unsigned char *RADEONMMIO = info->MMIO;
 	if (!fbdevHWEnterVT(scrnIndex,flags)) return FALSE;


  parent reply	other threads:[~2004-12-16 20:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15  4:55 Samsung P35 and S3 suspend Carl-Daniel Hailfinger
     [not found] ` <41BFC3AD.5030001-hi6Y0CQ0nG0@public.gmane.org>
2004-12-15 13:28   ` Matthias Hentges
2004-12-15 17:59     ` Carl-Daniel Hailfinger
     [not found]       ` <41C07B6F.70900-hi6Y0CQ0nG0@public.gmane.org>
2004-12-16  1:03         ` Matthias Hentges
2004-12-16  3:24           ` Carl-Daniel Hailfinger
     [not found]             ` <41C0FFF3.4010902-hi6Y0CQ0nG0@public.gmane.org>
2004-12-16 14:29               ` Carl-Daniel Hailfinger
     [not found]                 ` <41C19BD8.7050201-hi6Y0CQ0nG0@public.gmane.org>
2004-12-16 17:32                   ` Stefan Dösinger
     [not found]                     ` <200412161832.09711.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-12-16 18:28                       ` Carl-Daniel Hailfinger
     [not found]                         ` <41C1D3CB.5010805-hi6Y0CQ0nG0@public.gmane.org>
2004-12-16 20:57                           ` Stefan Dösinger [this message]
     [not found]                             ` <200412162157.02741.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-12-16 21:10                               ` Matthew Garrett
2004-12-16 21:26                                 ` Stefan Dösinger
     [not found]                                   ` <200412162226.43166.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-12-16 21:42                                     ` Matthew Garrett
2004-12-17  0:25                               ` Carl-Daniel Hailfinger
     [not found]                                 ` <41C22792.2000205-hi6Y0CQ0nG0@public.gmane.org>
2004-12-17 15:49                                   ` Stefan Dösinger
     [not found]                                     ` <200412171649.08125.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-12-20 18:12                                       ` Carl-Daniel Hailfinger
2004-12-16 18:10                   ` Carl-Daniel Hailfinger
     [not found]                     ` <41C1CFA2.20304-hi6Y0CQ0nG0@public.gmane.org>
2004-12-16 18:41                       ` Matthias Hentges
2004-12-16 19:09                         ` Matthew Garrett
2004-12-20 20:34                           ` Carl-Daniel Hailfinger
     [not found]                             ` <41C7374D.6090407-hi6Y0CQ0nG0@public.gmane.org>
2004-12-21  0:39                               ` Carl-Daniel Hailfinger
2004-12-22  2:06                       ` Carl-Daniel Hailfinger
     [not found]                         ` <41C8D689.3020502-hi6Y0CQ0nG0@public.gmane.org>
2004-12-22 11:37                           ` Johan Vromans
     [not found]                             ` <m2zn067edh.fsf-KjnUIgV0B0bak1Ioo/c9IoRWq/SkRNHw@public.gmane.org>
2004-12-22 15:35                               ` Carl-Daniel Hailfinger
     [not found]                                 ` <41C9945E.9080101-hi6Y0CQ0nG0@public.gmane.org>
2004-12-26 12:13                                   ` Pavel Machek
     [not found]                                     ` <20041226121316.GA1590-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-26 14:43                                       ` Stefan Dösinger
     [not found]                                         ` <20041226194039.GC1739@elf.ucw.cz>
     [not found]                                           ` <20041226194039.GC1739-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-12-30 21:39                                             ` PATCH: Call acpi_leave_sleep_state before resuming devices Stefan Dösinger
  -- strict thread matches above, loose matches on Subject: below --
2004-12-27  1:43 Re: Samsung P35 and S3 suspend Li, Shaohua
     [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575D82398-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-12-27 12:18   ` Stefan Dösinger
     [not found]     ` <200412271318.32251.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-12-28  2:12       ` Li Shaohua
2004-12-27  2:08 Li, Shaohua
     [not found] ` <16A54BF5D6E14E4D916CE26C9AD30575D823DC-4yWAQGcml66iAffOGbnezLfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-12-27 11:51   ` Stefan Dösinger

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=200412162157.02741.stefandoesinger@gmx.at \
    --to=stefandoesinger-rbzlaithdce@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=c-d.hailfinger.kernel.2004-hi6Y0CQ0nG0@public.gmane.org \
    --cc=mailinglisten-H4PcyxPeSRnR7s880joybQ@public.gmane.org \
    --cc=od-VRmHG7Xu4f31qYPpFx2fzhvVK+yQ3ZXh@public.gmane.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