linux-stable/drivers/video
Vaibhav Gupta c1a4777671 fbdev: aty128fb: use generic power management
Drivers should do only device-specific jobs. But in general, drivers using
legacy PCI PM framework for .suspend()/.resume() have to manage many PCI
PM-related tasks themselves which can be done by PCI Core itself. This
brings extra load on the driver and it directly calls PCI helper functions
to handle them.

Switch to the new generic framework by updating function signatures and
define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove
unnecessary calls to the PCI Helper functions along with the legacy
.suspend & .resume bindings.

Now,
- aty128_pci_suspend() had a "pm_message_t" type parameter as per legacy
  PCI PM framework that got deprecated in generic.
- Rename the callback as aty128_pci_suspend_late() and preserve the
  parameter.
- Define 3 new callbacks as:
        * aty128_pci_suspend()
        * aty128_pci_freeze()
        * aty128_pci_hibernate()
  which in turn call aty128_pci_suspend_late() by passing appropriate
  value for "pm_message_t" type parameter.
- Bind the callbacks in "struct dev_pm_ops" type variable
  "aty128_pci_pm_ops".

Signed-off-by: Vaibhav Gupta <vaibhavgupta40@gmail.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <bjorn@helgaas.com>
Cc: Vaibhav Gupta <vaibhav.varodek@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andres Salomon <dilinger@queued.net>
CC: Antonino Daplas <adaplas@gmail.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200819185654.151170-6-vaibhavgupta40@gmail.com
2020-09-08 13:33:13 +02:00
..
backlight pwm: Changes for v5.9-rc1 2020-08-14 16:00:09 -07:00
console TTY/Serial patches for 5.9-rc1 2020-08-06 14:56:11 -07:00
fbdev fbdev: aty128fb: use generic power management 2020-09-08 13:33:13 +02:00
logo .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
display_timing.c
hdmi.c drm-misc-next for v5.9: 2020-06-24 15:45:51 +10:00
Kconfig
Makefile
of_display_timing.c
of_videomode.c
vgastate.c
videomode.c