Re: commit "radeonfb: Fix resume from D3Cold on some platforms"breaks resume from RAM on PowerBook

From: Gaudenz Steinlin
Date: Fri Mar 06 2009 - 06:42:12 EST


On Fri, Mar 06, 2009 at 08:57:20PM +1100, Benjamin Herrenschmidt wrote:
>
> > So you are able to resume with my minimal config + CPU_FREQ? This would
> > be really strange if it is really the exact same model.
>
> Yes, it appears to be :-)
>
> > To verify if we really have the same model I included some data below. I
> > also included the gcc and binutils versions.
> >
> > Please tell me if you have any further ideas on what to test.
>
> In the commmit your revert, I added a function that "tests" if the chip
> appears to need to be POSTed: radeon_check_power_loss(). Try commenting
> out the content and make it always return 1.

This does not help.

>
> Another thing you can try in radeonfb_pci_resume():
>
> if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) {
> + pci_restore_state(pdev);

Adding this fixes the bug. Apparently the PCI core does not fully
restore the state. Before your suggestions I also tried to find out
which part of your commit breaks resume and I found out that if I
reinsert the parts to save and restore the pci configuration the bug is
fixed. It seems that somehow the PCI coniguration is not fully restored [1].

> + pci_enable_device(pdev);

This does not help.

> + pci_set_master(pdev);

This does not help.

Gaudenz

[1] These are just my wild guesses. I don't really understand much of
the code involved.

--
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/