* resource for S3 suspend/resume of Radeon
@ 2003-03-17 14:42 Charl P. Botha
[not found] ` <1047912152.28830.32.camel-1Jw6Eky0yc0@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Charl P. Botha @ 2003-03-17 14:42 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Dear list,
This patch to Linux kernel 2.4.20-ben8 has just been brought to my
attention: http://penguinppc.org/~benh/new_sleep.diff
benh and ATI seem to have fixed the suspension code of the radeon. I
have looked at this (see the Radeon bits) and at Patrick Mochel's power
management architecture code and documentation and it does look like a
lot of this code could be used to make ACPI S3 (suspend to RAM) a
reality on Radeon-using laptops.
I don't have time to look at this right now, but will do so as soon as
another lazy weekend comes up. If someone else has the time and
inclination (Ole Rohne? ;), please go ahead!
Thanks,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047912152.28830.32.camel-1Jw6Eky0yc0@public.gmane.org>
@ 2003-03-17 15:34 ` Karol Kozimor
[not found] ` <20030317153434.GB3936-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-03-17 15:35 ` Charl P. Botha
2003-03-17 16:23 ` Ole Myren Rohne
2 siblings, 1 reply; 12+ messages in thread
From: Karol Kozimor @ 2003-03-17 15:34 UTC (permalink / raw)
To: Charl P. Botha; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thus wrote Charl P. Botha:
> This patch to Linux kernel 2.4.20-ben8 has just been brought to my
> attention: http://penguinppc.org/~benh/new_sleep.diff
>
> benh and ATI seem to have fixed the suspension code of the radeon. I
> have looked at this (see the Radeon bits) and at Patrick Mochel's power
> management architecture code and documentation and it does look like a
> lot of this code could be used to make ACPI S3 (suspend to RAM) a
> reality on Radeon-using laptops.
Which radeon do you have in mind exactly? I use an M7 LW chip, and I get
the following: both in 2.4.x and 2.5.x the display does not power-off when
in S1 (which is, I believe, expected), and during S3 it poweroffs and comes
back in, provided I pass the acpi_sleep=s3_bios option.
The latter was only tested using VGA console, because AFAIK the framebuffer
support in current 2.5 kernels is faulty (at least it didn'r work for me,
and since I have problems with 2.5 that are more serious, I didn't
investigate).
Anyway, my Radeon seems to work quite fine.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047912152.28830.32.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 15:34 ` Karol Kozimor
@ 2003-03-17 15:35 ` Charl P. Botha
[not found] ` <1047915331.28836.45.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 16:23 ` Ole Myren Rohne
2 siblings, 1 reply; 12+ messages in thread
From: Charl P. Botha @ 2003-03-17 15:35 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, 2003-03-17 at 15:42, Charl P. Botha wrote:
> benh and ATI seem to have fixed the suspension code of the radeon. I
> have looked at this (see the Radeon bits) and at Patrick Mochel's power
> management architecture code and documentation and it does look like a
> lot of this code could be used to make ACPI S3 (suspend to RAM) a
> reality on Radeon-using laptops.
Hmmm, this might not be AS useful as I thought. Could a pmac expert
elaborate on the differences between its suspend and ACPI S3? For S3 we
need something that can init the chip almost from scratch.
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <20030317153434.GB3936-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2003-03-17 15:47 ` Charl P. Botha
[not found] ` <1047916074.28836.58.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-18 6:36 ` Ole Myren Rohne
1 sibling, 1 reply; 12+ messages in thread
From: Charl P. Botha @ 2003-03-17 15:47 UTC (permalink / raw)
To: Karol Kozimor; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, 2003-03-17 at 16:34, Karol Kozimor wrote:
> Thus wrote Charl P. Botha:
> > lot of this code could be used to make ACPI S3 (suspend to RAM) a
> > reality on Radeon-using laptops.
>
> Which radeon do you have in mind exactly? I use an M7 LW chip, and I get
> the following: both in 2.4.x and 2.5.x the display does not power-off when
You could try using the radeontool (google it) to remedy this.
> in S1 (which is, I believe, expected), and during S3 it poweroffs and comes
> back in, provided I pass the acpi_sleep=s3_bios option.
Wow, you mean to say that you can flawlessly S3 suspend/resume with
kernel 2.4? I would assume that this is due to your laptop's support
for S3 in BIOS. Not all laptops have this... see for instance what Ole
had to do to get his working:
http://home.cern.ch/mrohne/P2120/P2120_Linux_S3.html
Drivers in the new kernel need to be able to suspend/resume (S1, S3 and
S4) without more than the minimum required support in the BIOS.
Thanks,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047915331.28836.45.camel-1Jw6Eky0yc0@public.gmane.org>
@ 2003-03-17 16:20 ` Ducrot Bruno
2003-03-17 18:12 ` Patrick Mochel
1 sibling, 0 replies; 12+ messages in thread
From: Ducrot Bruno @ 2003-03-17 16:20 UTC (permalink / raw)
To: Charl P. Botha; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, Mar 17, 2003 at 04:35:31PM +0100, Charl P. Botha wrote:
> On Mon, 2003-03-17 at 15:42, Charl P. Botha wrote:
> > benh and ATI seem to have fixed the suspension code of the radeon. I
> > have looked at this (see the Radeon bits) and at Patrick Mochel's power
> > management architecture code and documentation and it does look like a
> > lot of this code could be used to make ACPI S3 (suspend to RAM) a
> > reality on Radeon-using laptops.
>
> Hmmm, this might not be AS useful as I thought. Could a pmac expert
> elaborate on the differences between its suspend and ACPI S3? For S3 we
> need something that can init the chip almost from scratch.
I am not a great pmac expert, but as I understand the whole things (and
also what I get actually from my powerbook), suspending a pmac
look like 'S3'.
The only difference, though, is that there is a unified
PMU which is more 'friendly' to control, instead of having a lot of
southbridges with different behaviour. Also openfirmware for pmac
is more easy to hack-fix (there is only one OEM...)
Cheers,
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047912152.28830.32.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 15:34 ` Karol Kozimor
2003-03-17 15:35 ` Charl P. Botha
@ 2003-03-17 16:23 ` Ole Myren Rohne
[not found] ` <m3hea29d2d.fsf-ksZHQmIzGzSqwiivBfVWcw@public.gmane.org>
2 siblings, 1 reply; 12+ messages in thread
From: Ole Myren Rohne @ 2003-03-17 16:23 UTC (permalink / raw)
To: Charl P. Botha; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
"Charl P. Botha" <c.p.botha-ra0OqMccq8edIhEUFHOBvg@public.gmane.org> writes:
> benh and ATI seem to have fixed the suspension code of the radeon.
It is certainly encouraging to see that someone is working on the
radeon resume! The following comment calls however for some caution
when it comes to hoping that a direct port to an ACPI-based system
will work:
* only supports the mobile chips in D2 mode, that is typically what
* is used on Apple laptops,
If I'm guessing correctly, D2 is "clocks off, static registers
preserved" while ACPI/S3 certainly means D3 (power off) -> even more
device state to be restored.
> I don't have time to look at this right now, but will do so as soon as
> another lazy weekend comes up.
If you haven't already done so, you might want get access to the ATI
docs *before* your lazy weekend...
> If someone else has the time and inclination (Ole Rohne? ;), please
> go ahead!
I've resolved not to waste more time on it - at least for the
moment. And I'm quite happy with the POST-hack - dirty as it might
be...
Ole
PS: I've updated the patches at
<http://home.cern.ch/mrohne/P2120/P2120_Linux_S3.html> to
linux-2.5.64-bk11 and XFree86-4.3.0. I hope they're OK this time...
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047916074.28836.58.camel-1Jw6Eky0yc0@public.gmane.org>
@ 2003-03-17 16:26 ` Karol Kozimor
[not found] ` <20030317162624.GB2249-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
0 siblings, 1 reply; 12+ messages in thread
From: Karol Kozimor @ 2003-03-17 16:26 UTC (permalink / raw)
To: Charl P. Botha; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Thus wrote Charl P. Botha:
> > Which radeon do you have in mind exactly? I use an M7 LW chip, and I get
> > the following: both in 2.4.x and 2.5.x the display does not power-off when
> You could try using the radeontool (google it) to remedy this.
Thanks, I will. I'm currently trying to deal with it on ACPI level, but
perhaps using radeontool is better.
No that I've tested it: it seems that radeontool goes further than ACPI,
disabling not only the backlight (as my laptop does), but also the LCD
itself. Neat.
> > in S1 (which is, I believe, expected), and during S3 it poweroffs and comes
> > back in, provided I pass the acpi_sleep=s3_bios option.
> Wow, you mean to say that you can flawlessly S3 suspend/resume with
> kernel 2.4? I would assume that this is due to your laptop's support
No, I meant S3 only in 2.5. 2.4 has no S3 code whatsoever, at least AFAIK.
> for S3 in BIOS. Not all laptops have this... see for instance what Ole
> had to do to get his working:
> http://home.cern.ch/mrohne/P2120/P2120_Linux_S3.html
Anyway, since the first 2.5 I used (2.5.59) I am able to suspend-to-RAM,
then resume. Normally, the screen is off, and the keyboard is mute, but
appending acpi_sleep=s3_bios does it for the screen, and reloading the
atkeyb module brings the keyboard back to life. NIC needs several seconds
(and several pings also) to resume (it's a rtl8139 chip).
> Drivers in the new kernel need to be able to suspend/resume (S1, S3 and
> S4) without more than the minimum required support in the BIOS.
S4 is a bit easier. See this: I have radeonfb hard-compiled in the kernel.
When I resume, the kernel that boots first initializes the display
properly, and then the kernel that is read from swap has the display
already running, so it doesn't have to worry about it. I suppose it would
be much harder when radeonfb was compiled as a module. Then, I think that
it's S3 that is the most difficult.
Best regards,
--
Karol 'sziwan' Kozimor
sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <m3hea29d2d.fsf-ksZHQmIzGzSqwiivBfVWcw@public.gmane.org>
@ 2003-03-17 16:52 ` Charl P. Botha
0 siblings, 0 replies; 12+ messages in thread
From: Charl P. Botha @ 2003-03-17 16:52 UTC (permalink / raw)
To: Ole Myren Rohne; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, Mar 17, 2003 at 05:23:54PM +0100, Ole Myren Rohne wrote:
> * only supports the mobile chips in D2 mode, that is typically what
> * is used on Apple laptops,
>
> If I'm guessing correctly, D2 is "clocks off, static registers
> preserved" while ACPI/S3 certainly means D3 (power off) -> even more
> device state to be restored.
I thought about something like this, but at least benh's work gives us
something to work with.
> > I don't have time to look at this right now, but will do so as soon as
> > another lazy weekend comes up.
>
> If you haven't already done so, you might want get access to the ATI
> docs *before* your lazy weekend...
Urgh, then I have to become part of the xfree86/dri in-crowd. I don't think
this can be easily organised in the near future.
Thanks,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <20030317162624.GB2249-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
@ 2003-03-17 16:54 ` Charl P. Botha
2003-03-21 9:26 ` Pavel Machek
1 sibling, 0 replies; 12+ messages in thread
From: Charl P. Botha @ 2003-03-17 16:54 UTC (permalink / raw)
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Mon, Mar 17, 2003 at 05:26:24PM +0100, Karol Kozimor wrote:
> Anyway, since the first 2.5 I used (2.5.59) I am able to suspend-to-RAM,
> then resume. Normally, the screen is off, and the keyboard is mute, but
> appending acpi_sleep=s3_bios does it for the screen, and reloading the
> atkeyb module brings the keyboard back to life. NIC needs several seconds
> (and several pings also) to resume (it's a rtl8139 chip).
I still need to find out why my laptop doesn't even want to begin waking up.
:) Maybe it's very tired.
> > Drivers in the new kernel need to be able to suspend/resume (S1, S3 and
> > S4) without more than the minimum required support in the BIOS.
>
> S4 is a bit easier. See this: I have radeonfb hard-compiled in the kernel.
> When I resume, the kernel that boots first initializes the display
> properly, and then the kernel that is read from swap has the display
> already running, so it doesn't have to worry about it. I suppose it would
> be much harder when radeonfb was compiled as a module. Then, I think that
> it's S3 that is the most difficult.
swsusp has worked perfectly for me for some time, at least ever since
http://cpbotha.net/dri_resume.html :)
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <1047915331.28836.45.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 16:20 ` Ducrot Bruno
@ 2003-03-17 18:12 ` Patrick Mochel
1 sibling, 0 replies; 12+ messages in thread
From: Patrick Mochel @ 2003-03-17 18:12 UTC (permalink / raw)
To: Charl P. Botha; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On 17 Mar 2003, Charl P. Botha wrote:
> On Mon, 2003-03-17 at 15:42, Charl P. Botha wrote:
> > benh and ATI seem to have fixed the suspension code of the radeon. I
> > have looked at this (see the Radeon bits) and at Patrick Mochel's power
> > management architecture code and documentation and it does look like a
> > lot of this code could be used to make ACPI S3 (suspend to RAM) a
> > reality on Radeon-using laptops.
>
> Hmmm, this might not be AS useful as I thought. Could a pmac expert
> elaborate on the differences between its suspend and ACPI S3? For S3 we
> need something that can init the chip almost from scratch.
The concepts are identical - the OS must suspend/resume devices before
telling the platform to enter the sleep state. And, the code should be
identical. IIRC, the pmac doesn't ever have the liberty of re-POSTing any
devices, as the OpenFirmware context is completely lost after booting.
In general, the pmac is a few steps ahead of x86 in terms of power
management support.
On top of that, Ben is incredibly talented and has the benefit (or curse
;) of knowing both power management and the ATI cards very well.
-pat
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <20030317153434.GB3936-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-03-17 15:47 ` Charl P. Botha
@ 2003-03-18 6:36 ` Ole Myren Rohne
1 sibling, 0 replies; 12+ messages in thread
From: Ole Myren Rohne @ 2003-03-18 6:36 UTC (permalink / raw)
To: Karol Kozimor; +Cc: Charl P. Botha, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Karol Kozimor <sziwan-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org> writes:
> provided I pass the acpi_sleep=s3_bios option.
...which probably shows that your BIOS is more helpful than what is on
the P2120 (cf our previous exchange about waking up the 8139too).
> The latter was only tested using VGA console, because AFAIK the framebuffer
> support in current 2.5 kernels is faulty
I think there is a bug in the 8MB special case of radeonfb memory sizing.
> Anyway, my Radeon seems to work quite fine.
...with your BIOS.
IUC, there is no requirement that the BIOS should POST (or allow lcall
$0xc000,$3 to work) on S3 resume.
Ole
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: resource for S3 suspend/resume of Radeon
[not found] ` <20030317162624.GB2249-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-03-17 16:54 ` Charl P. Botha
@ 2003-03-21 9:26 ` Pavel Machek
1 sibling, 0 replies; 12+ messages in thread
From: Pavel Machek @ 2003-03-21 9:26 UTC (permalink / raw)
To: Charl P. Botha, acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi!
> S4 is a bit easier. See this: I have radeonfb hard-compiled in the kernel.
> When I resume, the kernel that boots first initializes the display
> properly, and then the kernel that is read from swap has the display
> already running, so it doesn't have to worry about it. I suppose it would
> be much harder when radeonfb was compiled as a module. Then, I think that
Well, you'd need to copy module insertion
code into radeon_resume and module
deletion in radeon_suspend... It should
not be too hard.
Pavel
--
Pavel
Written on sharp zaurus, because my Velo1 broke. If you have Velo you don't need...
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-03-21 9:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-17 14:42 resource for S3 suspend/resume of Radeon Charl P. Botha
[not found] ` <1047912152.28830.32.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 15:34 ` Karol Kozimor
[not found] ` <20030317153434.GB3936-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-03-17 15:47 ` Charl P. Botha
[not found] ` <1047916074.28836.58.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 16:26 ` Karol Kozimor
[not found] ` <20030317162624.GB2249-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-03-17 16:54 ` Charl P. Botha
2003-03-21 9:26 ` Pavel Machek
2003-03-18 6:36 ` Ole Myren Rohne
2003-03-17 15:35 ` Charl P. Botha
[not found] ` <1047915331.28836.45.camel-1Jw6Eky0yc0@public.gmane.org>
2003-03-17 16:20 ` Ducrot Bruno
2003-03-17 18:12 ` Patrick Mochel
2003-03-17 16:23 ` Ole Myren Rohne
[not found] ` <m3hea29d2d.fsf-ksZHQmIzGzSqwiivBfVWcw@public.gmane.org>
2003-03-17 16:52 ` Charl P. Botha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox