2004-04-25 18:29:50

by Karol Kozimor

[permalink] [raw]
Subject: [AGP] intel_845_configure() at resume

Hi,
I've been trying to nail down the AGP problems most swsusp[12]/pmdisk users
are experiencing (deadlocks or reboots around the phase of copying the
original kernel back).

I have an i845MP chipset, which has its resume callback present in the
driver (the intel_845_configure()). I did the testing using 2.6.5+swsusp2,
but the outcome for the other implementations should be the same. The new
radeonfb code is compiled in. MCE is not compiled, as it tends to
interfere.

The video adapter is a Radeon M7, using XFree86-4.4 native drivers and
kernel DRM modules, DRI is on. This configuration is rock solid with 2.4
if suspend / resume is concerned.

The standard behaviour for my system is as follows:
1) Provided intel-agp.ko has not been loaded, it suspends and resumes
fairly stable.

2) Once the module has been loaded, but no X has been run, the system will
hang in intel_845_configure(), exactly at
#v+ drivers/char/agp/intel-agp.c +1481
/* clear any possible error conditions */
pci_write_config_word(agp_bridge->dev, INTEL_I845_ERRSTS, 0x001c);
#v-
Commenting the line out leads to a successful resume.

3) If X is started, and suspend is done from another (text) VT, the system
hangs a bit earlier, exactly at:
#v+ drivers/char/agp/intel-agp.c +1475
/* agpctrl */
pci_write_config_dword(agp_bridge->dev, INTEL_AGPCTRL, 0x0000);
#v-
Commenting this (and all the following) line allows the system to
resume, but switching back to the X VT produces garbled screen (colour
distorted, etc.) and hangs the system (though SysRq works).

4) Apparently, if X is started and loads the module itself, and no
additional VT switching occurs, the first resume attempt succeeds.

Also, I'm curious as to whether the whole mechanism is correct -- it seems
to send bytes back and forth during resume, intead of reading (and saving)
them at suspend and writing back at resume.
Can anyone comment on that?
Best regards,

--
Karol 'sziwan' Kozimor
[email protected]


2004-04-26 18:52:36

by Karol Kozimor

[permalink] [raw]
Subject: Re: [AGP] intel_845_configure() at resume

Thus wrote Herbert Xu:
> Karol Kozimor <[email protected]> wrote:
> > I've been trying to nail down the AGP problems most swsusp[12]/pmdisk users
> > are experiencing (deadlocks or reboots around the phase of copying the
> > original kernel back).
>
> Please test my patch at the bottom of
>
> http://bugs.debian.org/234976

That seems to fix Pavel's swsusp here, I can now suspend from X with
glxgears running. I didn't do any thorough testing though, only a
couple of cycles. Thanks for your work.
Best regards,

--
Karol 'sziwan' Kozimor
[email protected]