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-12-14 11:26:19 -06:00
2021-11-03 15:00:39 -07:00
2021-10-29 07:23:59 -05:00
2021-08-27 16:20:37 +02:00
2021-09-25 08:20:49 -07:00
2021-10-26 05:03:34 +03:00
2019-05-21 10:50:46 +02:00
2021-10-19 09:40:18 +02:00
2019-05-21 10:50:45 +02:00
2021-04-05 08:43:50 +02:00
2020-06-09 09:39:13 -07:00
2019-05-21 10:50:45 +02:00
2019-05-21 10:50:45 +02:00
2019-06-05 17:37:13 +02:00
2021-05-21 10:09:30 +02:00
2021-08-16 19:02:19 +02:00
2021-03-24 08:26:32 +01:00
2021-06-04 15:35:03 +02:00
2021-09-14 10:46:19 +02:00
2020-11-03 09:52:04 +01:00
2020-08-28 12:10:04 +02:00
2019-05-21 10:50:45 +02:00
2020-08-23 17:36:59 -05:00
2019-05-21 10:50:45 +02:00
2020-03-18 12:27:03 +01:00
2020-03-18 12:27:04 +01:00
2019-05-21 10:50:45 +02:00
2021-07-13 19:21:41 -05:00
2020-02-23 20:28:12 +01:00
2020-12-04 01:01:22 +11:00
2021-04-02 18:28:12 +11:00
2019-05-21 10:50:45 +02:00
2019-05-24 17:36:45 +02:00
2019-05-30 11:26:35 -07:00
2020-04-23 16:55:24 +02:00
2021-03-17 13:16:18 -07:00
2021-07-27 12:17:21 +02:00
2021-11-01 05:26:48 -04:00