aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2013-04-05 18:45:22 -0400
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2013-04-07 11:09:34 -0400
commit888eef2e8c2d9fc2e6ccf58fb4a8f9f6d8ff9a22 (patch)
treead1171157ae796e262b6262821e355d46bca1a62
parent8ba8209fefb67edf2ecbb92e9f16008bfaa1b031 (diff)
drm/gma500: Add hooks for hibernation
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>
-rw-r--r--drivers/gpu/drm/gma500/power.c15
-rw-r--r--drivers/gpu/drm/gma500/power.h3
-rw-r--r--drivers/gpu/drm/gma500/psb_drv.c3
3 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/power.c b/drivers/gpu/drm/gma500/power.c
index 4c575a9a9c81..b6b135fcd59c 100644
--- a/drivers/gpu/drm/gma500/power.c
+++ b/drivers/gpu/drm/gma500/power.c
@@ -315,3 +315,18 @@ int psb_runtime_idle(struct device *dev)
315 else 315 else
316 return 1; 316 return 1;
317} 317}
318
319int gma_power_thaw(struct device *_dev)
320{
321 return gma_power_resume(_dev);
322}
323
324int gma_power_freeze(struct device *_dev)
325{
326 return gma_power_suspend(_dev);
327}
328
329int gma_power_restore(struct device *_dev)
330{
331 return gma_power_resume(_dev);
332}
diff --git a/drivers/gpu/drm/gma500/power.h b/drivers/gpu/drm/gma500/power.h
index 1969d2ecb328..56d8708bd41c 100644
--- a/drivers/gpu/drm/gma500/power.h
+++ b/drivers/gpu/drm/gma500/power.h
@@ -41,6 +41,9 @@ void gma_power_uninit(struct drm_device *dev);
41 */ 41 */
42int gma_power_suspend(struct device *dev); 42int gma_power_suspend(struct device *dev);
43int gma_power_resume(struct device *dev); 43int gma_power_resume(struct device *dev);
44int gma_power_thaw(struct device *dev);
45int gma_power_freeze(struct device *dev);
46int gma_power_restore(struct device *_dev);
44 47
45/* 48/*
46 * These are the functions the driver should use to wrap all hw access 49 * These are the functions the driver should use to wrap all hw access
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 111e3df9c5de..bddea5807442 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -601,6 +601,9 @@ static void psb_remove(struct pci_dev *pdev)
601static const struct dev_pm_ops psb_pm_ops = { 601static const struct dev_pm_ops psb_pm_ops = {
602 .resume = gma_power_resume, 602 .resume = gma_power_resume,
603 .suspend = gma_power_suspend, 603 .suspend = gma_power_suspend,
604 .thaw = gma_power_thaw,
605 .freeze = gma_power_freeze,
606 .restore = gma_power_restore,
604 .runtime_suspend = psb_runtime_suspend, 607 .runtime_suspend = psb_runtime_suspend,
605 .runtime_resume = psb_runtime_resume, 608 .runtime_resume = psb_runtime_resume,
606 .runtime_idle = psb_runtime_idle, 609 .runtime_idle = psb_runtime_idle,