summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm
diff options
context:
space:
mode:
authorLiviu Dudau <Liviu.Dudau@arm.com>2017-03-27 16:20:57 +0100
committerLiviu Dudau <Liviu.Dudau@arm.com>2017-11-24 13:24:48 +0000
commitfebae9bc946de2c85e324b20bb7dc7b2d4e49d37 (patch)
treec114fe9759e0b3caaacdd8660c8cf90a0a86916f /drivers/gpu/drm/arm
parentc209101fc1c91a318422733a3721ff6a9ff7899f (diff)
downloadblackbird-op-linux-febae9bc946de2c85e324b20bb7dc7b2d4e49d37.tar.gz
blackbird-op-linux-febae9bc946de2c85e324b20bb7dc7b2d4e49d37.zip
drm: hdlcd: Update PM code to save/restore console.
Update the PM code to suspend/resume the fbdev_cma console. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r--drivers/gpu/drm/arm/hdlcd_drv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index 764d0c83710c..45b174fea36b 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/clk.h>
#include <linux/component.h>
+#include <linux/console.h>
#include <linux/list.h>
#include <linux/of_graph.h>
#include <linux/of_reserved_mem.h>
@@ -432,9 +433,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
return 0;
drm_kms_helper_poll_disable(drm);
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1);
hdlcd->state = drm_atomic_helper_suspend(drm);
if (IS_ERR(hdlcd->state)) {
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
drm_kms_helper_poll_enable(drm);
return PTR_ERR(hdlcd->state);
}
@@ -451,8 +454,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
return 0;
drm_atomic_helper_resume(drm, hdlcd->state);
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
drm_kms_helper_poll_enable(drm);
- pm_runtime_set_active(dev);
return 0;
}
OpenPOWER on IntegriCloud