aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/nvidia
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-08-15 02:11:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:37 -0400
commitc78a7c2dd913e68ce853d43edaba14eac91b2fd1 (patch)
treefdb0d56a04bbcaa3d14327873ec7cb1a9b527e26 /drivers/video/nvidia
parentb887d2e63c8857149ef59eb6e05adfaa018b8ebf (diff)
PM: video drivers and PM_EVENT_PRETHAW
Video drivers which explicitly test for messages reporting PM_EVENT_FREEZE will now handle PM_EVENT_PRETHAW the same way. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r--drivers/video/nvidia/nvidia.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index d4f850117874..f8cd4c519aeb 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -950,24 +950,25 @@ static struct fb_ops nvidia_fb_ops = {
950}; 950};
951 951
952#ifdef CONFIG_PM 952#ifdef CONFIG_PM
953static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t state) 953static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg)
954{ 954{
955 struct fb_info *info = pci_get_drvdata(dev); 955 struct fb_info *info = pci_get_drvdata(dev);
956 struct nvidia_par *par = info->par; 956 struct nvidia_par *par = info->par;
957 957
958 if (mesg.event == PM_EVENT_PRETHAW)
959 mesg.event = PM_EVENT_FREEZE;
958 acquire_console_sem(); 960 acquire_console_sem();
959 par->pm_state = state.event; 961 par->pm_state = mesg.event;
960 962
961 if (state.event == PM_EVENT_FREEZE) { 963 if (mesg.event == PM_EVENT_SUSPEND) {
962 dev->dev.power.power_state = state;
963 } else {
964 fb_set_suspend(info, 1); 964 fb_set_suspend(info, 1);
965 nvidiafb_blank(FB_BLANK_POWERDOWN, info); 965 nvidiafb_blank(FB_BLANK_POWERDOWN, info);
966 nvidia_write_regs(par, &par->SavedReg); 966 nvidia_write_regs(par, &par->SavedReg);
967 pci_save_state(dev); 967 pci_save_state(dev);
968 pci_disable_device(dev); 968 pci_disable_device(dev);
969 pci_set_power_state(dev, pci_choose_state(dev, state)); 969 pci_set_power_state(dev, pci_choose_state(dev, mesg));
970 } 970 }
971 dev->dev.power.power_state = mesg;
971 972
972 release_console_sem(); 973 release_console_sem();
973 return 0; 974 return 0;