Vaibhav Gupta
0aeddbd0cb
via-agp: convert to generic power management
Convert via-agp from legacy PCI power management to the generic power
management framework.
Previously, via-agp used legacy PCI power management, and agp_via_suspend()
and agp_via_resume() were responsible for both device-specific things and
generic PCI things:
agp_via_suspend
pci_save_state(pdev) <-- generic PCI
pci_set_power_state(pdev, pci_choose_state(pdev, state)) <-- generic PCI
agp_via_resume
pci_set_power_state(pdev, PCI_D0) <-- generic PCI
pci_restore_state(pdev) <-- generic PCI
via_configure_agp3() <-- device-specific
via_configure() <-- device-specific
With generic power management, the PCI bus PM methods do the generic PCI
things, and the driver needs only the device-specific part, i.e.,
suspend_devices_and_enter
dpm_suspend_start(PMSG_SUSPEND)
pci_pm_suspend # PCI bus .suspend() method
agp_via_suspend <-- not needed at all; removed
suspend_enter
dpm_suspend_noirq(PMSG_SUSPEND)
pci_pm_suspend_noirq # PCI bus .suspend_noirq() method
pci_save_state <-- generic PCI
pci_prepare_to_sleep <-- generic PCI
pci_set_power_state
...
dpm_resume_end(PMSG_RESUME)
pci_pm_resume # PCI bus .resume() method
pci_restore_standard_config
pci_set_power_state(PCI_D0) <-- generic PCI
pci_restore_state <-- generic PCI
agp_via_resume # dev->driver->pm->resume
via_configure_agp3() <-- device-specific
via_configure() <-- device-specific
[bhelgaas: commit log]
Link: https://lore.kernel.org/r/20211208193305.147072-4-helgaas@kernel.org
Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Dave Airlie <airlied@redhat.com>
2021-12-14 11:26:19 -06:00
..
2021-11-10 11:52:40 -08:00
2021-11-04 08:21:47 -07:00
2021-11-12 08:05:47 +09:00
2021-11-11 13:09:33 +01:00
2021-11-06 14:36:12 -07:00
2021-11-09 11:24:08 -08:00
2021-11-04 09:09:37 -07:00
2021-11-13 09:11:33 -08:00
2021-12-14 11:26:19 -06:00
2021-11-14 11:11:51 -08:00
2021-11-04 19:48:47 +01:00
2021-11-03 17:00:52 -07:00
2021-11-06 14:36:12 -07:00
2021-11-08 11:49:48 -08:00
2021-11-10 14:06:51 +01:00
2021-11-10 11:47:55 -08:00
2021-11-12 12:11:07 -08:00
2021-11-05 08:42:02 -07:00
2021-11-10 16:15:54 -08:00
2021-11-08 11:55:21 -08:00
2021-11-12 12:11:07 -08:00
2021-11-05 08:31:51 -07:00
2021-11-04 13:56:55 -07:00
2021-11-06 14:08:17 -07:00
2021-11-10 11:52:40 -08:00
2021-11-10 11:36:43 -08:00
2021-11-05 08:42:02 -07:00
2021-11-12 11:53:16 -08:00
2021-11-06 14:36:12 -07:00
2021-11-12 16:09:51 +00:00
2021-11-06 14:08:17 -07:00
2021-11-09 11:24:08 -08:00
2021-11-10 11:52:40 -08:00
2021-11-06 14:36:12 -07:00
2021-11-10 11:36:43 -08:00
2021-11-10 11:52:40 -08:00
2021-11-06 14:08:17 -07:00
2021-11-09 11:24:08 -08:00
2021-11-11 09:49:36 -08:00
2021-11-07 19:37:04 +00:00
2021-11-10 10:56:02 -08:00
2021-11-09 11:20:07 -08:00
2021-11-14 11:11:51 -08:00
2021-11-14 10:38:27 -08:00
2021-11-02 15:58:39 -07:00
2021-11-04 08:21:47 -07:00
2021-11-05 08:24:17 -07:00
2021-11-10 11:36:43 -08:00
2021-11-05 11:57:13 +01:00
2021-11-06 13:30:33 -07:00
2021-11-08 12:07:52 -08:00
2021-11-03 17:00:52 -07:00
2021-11-10 09:07:26 -08:00
2021-11-12 11:44:31 -08:00
2021-11-08 14:17:49 +01:00
2021-11-12 12:25:50 -08:00
2021-11-10 16:15:54 -08:00
2021-11-10 16:15:54 -08:00
2021-11-12 12:25:50 -08:00
2021-11-04 08:21:47 -07:00
2021-11-12 10:56:25 -08:00
2021-11-04 09:09:37 -07:00
2021-11-11 09:40:15 -08:00
2021-11-03 15:00:39 -07:00
2021-11-12 12:11:07 -08:00
2021-11-10 15:32:38 +01:00
2021-11-10 09:41:22 -08:00
2021-11-10 11:14:21 -08:00