Wakeup broken on iBook G3

8 messages, 2 authors, 2005-03-22 · open the first message on its own page

Wakeup broken on iBook G3

From: Andreas Schwab <hidden>
Date: 2005-03-20 17:19:46

Ever since the massive changes to the radeonfb pm code I've never been
able to get a working wakeup on my iBook G3.  The screen keeps blank after
wakeup, I hear the cdrom drive being reset, and then the system crashes
hard.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: Wakeup broken on iBook G3

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-03-21 04:00:58

On Sun, 2005-03-20 at 18:19 +0100, Andreas Schwab wrote:
Ever since the massive changes to the radeonfb pm code I've never been
able to get a working wakeup on my iBook G3.  The screen keeps blank after
wakeup, I hear the cdrom drive being reset, and then the system crashes
hard.
What video chip is this ? And what CPU ? Are you sure it's the radeonfb
patch ? There have been other changes to the system PM code
approximately at the same time. The "massive" PM change didn't really
change what was done to the vidoe chip on older models (mostly _added_
new code, totally separate, for new models). I suspect for example a
problem with the cache flush code in pmac_cache.S on some G3 CPUs ...

There is also an old problem with AGP and sleep that is coming & going
lately. Can you check if it works if you never go to X ? (That is boot
in console mode, do not ever launch X, launching X and quitting X breaks
the test I want you to do, then suspend/resume).

Ben.

Re: Wakeup broken on iBook G3

From: Andreas Schwab <hidden>
Date: 2005-03-21 10:35:51

Benjamin Herrenschmidt [off-list ref] writes:
What video chip is this ?
Radeon Mobility M7 LY
And what CPU ?
750FX
Are you sure it's the radeonfb patch ?
It's hard to tell.  I tried going back to the 2.6.10 radeon driver, but
that doesn't have the necessary hooks to tell the PM code that it can
sleep.  If you can give a hint how to forward port that I can give it a
try.
There is also an old problem with AGP and sleep that is coming & going
lately. Can you check if it works if you never go to X ?
Did that, same problem.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: Wakeup broken on iBook G3

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-03-21 12:24:14

On Mon, 2005-03-21 at 11:35 +0100, Andreas Schwab wrote:
Benjamin Herrenschmidt [off-list ref] writes:
quoted
What video chip is this ?
Radeon Mobility M7 LY
quoted
And what CPU ?
750FX
quoted
Are you sure it's the radeonfb patch ?
It's hard to tell.  I tried going back to the 2.6.10 radeon driver, but
that doesn't have the necessary hooks to tell the PM code that it can
sleep.  If you can give a hint how to forward port that I can give it a
try.
quoted
There is also an old problem with AGP and sleep that is coming & going
lately. Can you check if it works if you never go to X ?
Did that, same problem.
Can you try playing with pmac_sleep.S and pmac_cache.S, basically
reverting those including the calls to set_L2CR in via-pmu.c ?

Ben.

Re: Wakeup broken on iBook G3

From: Andreas Schwab <hidden>
Date: 2005-03-21 20:56:38

Benjamin Herrenschmidt [off-list ref] writes:
Can you try playing with pmac_sleep.S and pmac_cache.S, basically
reverting those including the calls to set_L2CR in via-pmu.c ?
That makes it even worse (it apparently crashes almost immediately after
wakeup).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: Wakeup broken on iBook G3

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-03-21 23:24:18

On Mon, 2005-03-21 at 21:56 +0100, Andreas Schwab wrote:
Benjamin Herrenschmidt [off-list ref] writes:
quoted
Can you try playing with pmac_sleep.S and pmac_cache.S, basically
reverting those including the calls to set_L2CR in via-pmu.c ?
That makes it even worse (it apparently crashes almost immediately after
wakeup).
Hrm... Ok...

At this point, I don't know for sure what's up, there have been several
reports but nobody physically close to me has any of these machines for
me to test with.

Have you tried with very latest bk which contains by workarounds for
radeon erratas ? The M7 has smore bugs that might have been triggered by
the moving of code around that I did in the latest readeonfb.

Also, in pmac_cache.S, try locating that bit:

	/* disp-flush L1 */
	li	r4,0x4000
	mtctr	r4
	lis	r4,0xfff0
1:	lwzx	r0,r0,r4
	addi	r4,r4,32
	bdnz	1b
	sync
	isync

And turn the li r4,0x4000 into lis r4,2 and let me know if that makes
any difference... Same a little bit later, there is:


	lis	r4,2
	mtctr	r4
	lis	r4,0xfff0
1:	lwzx	r0,r0,r4
	addi	r4,r4,32
	bdnz	1b
	sync
	isync

Here, try turning the lis r4,2 into lis r4,0x20

And let me know if any of these help.

Finally, what happens if you boot without any framebuffer in the kernel
(no fbdev at all, no fbcon, just no console), ssh into the box, and put
it to sleep ? Does it wake up ?

Ben.

Re: Wakeup broken on iBook G3

From: Andreas Schwab <hidden>
Date: 2005-03-22 00:42:40

Benjamin Herrenschmidt [off-list ref] writes:
Have you tried with very latest bk which contains by workarounds for
radeon erratas ? The M7 has smore bugs that might have been triggered by
the moving of code around that I did in the latest readeonfb.
Correction: it's actually an M6.
Also, in pmac_cache.S, try locating that bit:

	/* disp-flush L1 */
	li	r4,0x4000
	mtctr	r4
	lis	r4,0xfff0
1:	lwzx	r0,r0,r4
	addi	r4,r4,32
	bdnz	1b
	sync
	isync

And turn the li r4,0x4000 into lis r4,2 and let me know if that makes
any difference...
This did help.
Same a little bit later, there is:


	lis	r4,2
	mtctr	r4
	lis	r4,0xfff0
1:	lwzx	r0,r0,r4
	addi	r4,r4,32
	bdnz	1b
	sync
	isync

Here, try turning the lis r4,2 into lis r4,0x20
This didn't, got crash in __flush_dcache_icache when called from
update_mmu_cache.  (I tested both changes separately.)
Finally, what happens if you boot without any framebuffer in the kernel
(no fbdev at all, no fbcon, just no console), ssh into the box, and put
it to sleep ?
I have no idea how to put it into sleep in this configuration.  The
pbbuttonsd says that sleep is not supported.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: Wakeup broken on iBook G3

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2005-03-22 02:02:56

On Tue, 2005-03-22 at 01:42 +0100, Andreas Schwab wrote:
I have no idea how to put it into sleep in this configuration.  The
pbbuttonsd says that sleep is not supported.
You need "snooze" and do "snooze -f", but I think the L1 cache flush is
the culprit, I'll try to find a solution.

Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help