diff options
author | Liviu Dudau <Liviu.Dudau@arm.com> | 2017-03-27 11:20:57 -0400 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2017-11-24 08:24:48 -0500 |
commit | febae9bc946de2c85e324b20bb7dc7b2d4e49d37 (patch) | |
tree | c114fe9759e0b3caaacdd8660c8cf90a0a86916f | |
parent | c209101fc1c91a318422733a3721ff6a9ff7899f (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 5 |
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 @@ | |||
13 | #include <linux/spinlock.h> | 13 | #include <linux/spinlock.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/component.h> | 15 | #include <linux/component.h> |
16 | #include <linux/console.h> | ||
16 | #include <linux/list.h> | 17 | #include <linux/list.h> |
17 | #include <linux/of_graph.h> | 18 | #include <linux/of_graph.h> |
18 | #include <linux/of_reserved_mem.h> | 19 | #include <linux/of_reserved_mem.h> |
@@ -432,9 +433,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev) | |||
432 | return 0; | 433 | return 0; |
433 | 434 | ||
434 | drm_kms_helper_poll_disable(drm); | 435 | drm_kms_helper_poll_disable(drm); |
436 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1); | ||
435 | 437 | ||
436 | hdlcd->state = drm_atomic_helper_suspend(drm); | 438 | hdlcd->state = drm_atomic_helper_suspend(drm); |
437 | if (IS_ERR(hdlcd->state)) { | 439 | if (IS_ERR(hdlcd->state)) { |
440 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); | ||
438 | drm_kms_helper_poll_enable(drm); | 441 | drm_kms_helper_poll_enable(drm); |
439 | return PTR_ERR(hdlcd->state); | 442 | return PTR_ERR(hdlcd->state); |
440 | } | 443 | } |
@@ -451,8 +454,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev) | |||
451 | return 0; | 454 | return 0; |
452 | 455 | ||
453 | drm_atomic_helper_resume(drm, hdlcd->state); | 456 | drm_atomic_helper_resume(drm, hdlcd->state); |
457 | drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0); | ||
454 | drm_kms_helper_poll_enable(drm); | 458 | drm_kms_helper_poll_enable(drm); |
455 | pm_runtime_set_active(dev); | ||
456 | 459 | ||
457 | return 0; | 460 | return 0; |
458 | } | 461 | } |