Skip to content

Commit

Permalink
drm/gma500: Add hooks for hibernation
Browse files Browse the repository at this point in the history
Currently we do whatever is done during suspend/resume but we might need some
more work for hibernation so keep them in separate functions.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
  • Loading branch information
Patrik Jakobsson committed Apr 7, 2013
1 parent 8ba8209 commit 888eef2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/gpu/drm/gma500/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,18 @@ int psb_runtime_idle(struct device *dev)
else
return 1;
}

int gma_power_thaw(struct device *_dev)
{
return gma_power_resume(_dev);
}

int gma_power_freeze(struct device *_dev)
{
return gma_power_suspend(_dev);
}

int gma_power_restore(struct device *_dev)
{
return gma_power_resume(_dev);
}
3 changes: 3 additions & 0 deletions drivers/gpu/drm/gma500/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ void gma_power_uninit(struct drm_device *dev);
*/
int gma_power_suspend(struct device *dev);
int gma_power_resume(struct device *dev);
int gma_power_thaw(struct device *dev);
int gma_power_freeze(struct device *dev);
int gma_power_restore(struct device *_dev);

/*
* These are the functions the driver should use to wrap all hw access
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/gma500/psb_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ static void psb_remove(struct pci_dev *pdev)
static const struct dev_pm_ops psb_pm_ops = {
.resume = gma_power_resume,
.suspend = gma_power_suspend,
.thaw = gma_power_thaw,
.freeze = gma_power_freeze,
.restore = gma_power_restore,
.runtime_suspend = psb_runtime_suspend,
.runtime_resume = psb_runtime_resume,
.runtime_idle = psb_runtime_idle,
Expand Down

0 comments on commit 888eef2

Please sign in to comment.