.runtime_suspend = psb_runtime_suspend,
.runtime_resume = psb_runtime_resume,
.runtime_idle = psb_runtime_idle,
+ .resume = ospm_power_resume,
+ .suspend = ospm_power_suspend,
};
static struct drm_driver driver = {
static struct pci_driver psb_pci_driver = {
.name = DRIVER_NAME,
.id_table = pciidlist,
- .resume = ospm_power_resume,
- .suspend = ospm_power_suspend,
.probe = psb_probe,
.remove = psb_remove,
#ifdef CONFIG_PM
* Description: OSPM is telling our driver to suspend so save state
* and power down all hardware.
*/
-int ospm_power_suspend(struct pci_dev *pdev, pm_message_t state)
+int ospm_power_suspend(struct device *dev)
{
+ struct pci_dev *pdev = to_pci_dev(dev);
int ret = 0;
int graphics_access_count;
int videoenc_access_count;
/*
* ospm_power_resume
*/
-int ospm_power_resume(struct pci_dev *pdev)
+int ospm_power_resume(struct device *dev)
{
+ struct pci_dev *pdev = to_pci_dev(dev);
+
if (gbSuspendInProgress || gbResumeInProgress) {
#ifdef OSPM_GFX_DPK
printk(KERN_ALERT "OSPM_GFX_DPK: %s hw_island: Suspend || gbResumeInProgress!!!! \n", __func__);
int psb_runtime_suspend(struct device *dev)
{
- pm_message_t state;
int ret = 0;
- state.event = 0;
#ifdef OSPM_GFX_DPK
printk(KERN_ALERT "OSPM_GFX_DPK: %s \n", __func__);
return -EBUSY;
}
else
- ret = ospm_power_suspend(gpDrmDevice->pdev, state);
+ ret = ospm_power_suspend(&gpDrmDevice->pdev->dev);
return ret;
}
/*
* OSPM will call these functions
*/
-int ospm_power_suspend(struct pci_dev *pdev, pm_message_t state);
-int ospm_power_resume(struct pci_dev *pdev);
+int ospm_power_suspend(struct device *dev);
+int ospm_power_resume(struct device *dev);
/*
* These are the functions the driver should use to wrap all hw access