Skip to contentSkip to conversation

amd64-agp: resume but too late?

PATCH Pavel Machek 2 participants 3 messages May 26, 2008 – May 28, 2008 Agpgart driver

lore
Share & tools
lore
#0 lore raw

Hi!

I don't get it:

drivers/char/agp/amd64-agp.c +2 -0
@@ -549,6 +549,8 @@ static int agp_amd64_suspend(struct pci_
        return 0;
 }
 
+/* FIXME: this is strange; we enable iommu translation here, but that
+ * may be too late, no? */
 static int agp_amd64_resume(struct pci_dev *pdev)
 {
        pci_set_power_state(pdev, PCI_D0);

...but resume is normal pci device, so other devices may be resumed before this one, and already depend on iommu running...

How is this supposed to work? Should agp_amd64_resume be called from sysdev or something like that?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 16 lines · Pavel Machek

Hi!

I don't get it:

drivers/char/agp/amd64-agp.c +2 -0
@@ -549,6 +549,8 @@ static int agp_amd64_suspend(struct pci_
        return 0;
 }
 
+/* FIXME: this is strange; we enable iommu translation here, but that
+ * may be too late, no? */
 static int agp_amd64_resume(struct pci_dev *pdev)
 {
        pci_set_power_state(pdev, PCI_D0);
Quoted 5 lines

...but resume is normal pci device, so other devices may be resumed before this one, and already depend on iommu running...

How is this supposed to work? Should agp_amd64_resume be called from sysdev or something like that?

Hmm, you sent a patch some days ago to change it to suspend_late/resume_early. Is the discussion resolved about that ?

Thanks,
tglx

#2 lore raw
Quoted 17 lines · Thomas Gleixner
Quoted 16 lines · Pavel Machek

Hi!

I don't get it:

drivers/char/agp/amd64-agp.c +2 -0
@@ -549,6 +549,8 @@ static int agp_amd64_suspend(struct pci_
        return 0;
 }
 
+/* FIXME: this is strange; we enable iommu translation here, but that
+ * may be too late, no? */
 static int agp_amd64_resume(struct pci_dev *pdev)
 {
        pci_set_power_state(pdev, PCI_D0);
Quoted 8 lines
Quoted 5 lines

...but resume is normal pci device, so other devices may be resumed before this one, and already depend on iommu running...

How is this supposed to work? Should agp_amd64_resume be called from sysdev or something like that?

Hmm, you sent a patch some days ago to change it to suspend_late/resume_early. Is the discussion resolved about that ?

I'm not aware of such patch. I don't think I sent it.

I did add suspend/resume support to pci-gart_64.c , which is confusingly similar code. That patch needs a bit more testing, and some de-uglyfication.
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html