diff options
Diffstat (limited to 'drivers/video/nvidia')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 13 |
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 |
953 | static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t state) | 953 | static 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; |