[linux-pm] [patch/rft 2.6.17-rc5-git 4/6] PM_EVENT_PRETHAW for various graphics cards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

>  #ifdef CONFIG_PM
> -static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t state)
> +static int nvidiafb_suspend(struct pci_dev *dev, pm_message_t mesg)
>  {
>  	struct fb_info *info = pci_get_drvdata(dev);
>  	struct nvidia_par *par = info->par;
>  
> +	if (mesg.event == PM_EVENT_PRETHAW)
> +		mesg.event = PM_EVENT_FREEZE;
>  	acquire_console_sem();
> -	par->pm_state = state.event;
> +	par->pm_state = mesg.event;
>  
> -	if (state.event == PM_EVENT_FREEZE) {
> -		dev->dev.power.power_state = state;
> -	} else {
> +	if (mesg.event == PM_EVENT_SUSPEND) {
>  		fb_set_suspend(info, 1);
>  		nvidiafb_blank(FB_BLANK_POWERDOWN, info);
>  		nvidia_write_regs(par, &par->SavedReg);
>  		pci_save_state(dev);
>  		pci_disable_device(dev);
> -		pci_set_power_state(dev, pci_choose_state(dev, state));
> +		pci_set_power_state(dev, pci_choose_state(dev, mesg));
>  	}
> +	dev->dev.power.power_state = mesg;

If PRETHAW event is sent, we still store FREEZE into power_state. That
is not consistent with other drivers.

> Index: g26/drivers/video/savage/savagefb_driver.c
> ===================================================================
> --- g26.orig/drivers/video/savage/savagefb_driver.c	2006-06-02 18:08:30.000000000 -0700
> +++ g26/drivers/video/savage/savagefb_driver.c	2006-06-02 18:11:27.000000000 -0700
> @@ -2151,24 +2151,24 @@ static void __devexit savagefb_remove (s
>  	}
>  }
>  
> -static int savagefb_suspend (struct pci_dev* dev, pm_message_t state)
> +static int savagefb_suspend (struct pci_dev* dev, pm_message_t mesg)
>  {
>  	struct fb_info *info = pci_get_drvdata(dev);
>  	struct savagefb_par *par = info->par;
>  
>  	DBG("savagefb_suspend");
>  
> -
> -	par->pm_state = state.event;
> +	if (mesg.event == PM_EVENT_PRETHAW)
> +		mesg.event = PM_EVENT_FREEZE;
> +	par->pm_state = mesg.event;
> +	dev->dev.power.power_state = mesg;

Same here.
						Pavel

-- 
Thanks for all the (sleeping) penguins.


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux