diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2016-08-31 08:55:56 -0400 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2016-09-18 09:20:38 -0400 |
commit | 5b67723e6096f5470f361656cd108430d3b12c67 (patch) | |
tree | 6e3ca035c43a35aa9e3850fa426311c996be173d | |
parent | 83bd7b20aaf499030bf857ef64de3c19309b107d (diff) |
drm/exynos: rotator: fix system and runtime pm integration
Use generic helpers instead of open-coding usage of runtime pm for system
sleep pm, which was potentially broken for some corner cases.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_rotator.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c index 404367a430b5..6591e406084c 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c +++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c | |||
@@ -794,29 +794,6 @@ static int rotator_clk_crtl(struct rot_context *rot, bool enable) | |||
794 | return 0; | 794 | return 0; |
795 | } | 795 | } |
796 | 796 | ||
797 | |||
798 | #ifdef CONFIG_PM_SLEEP | ||
799 | static int rotator_suspend(struct device *dev) | ||
800 | { | ||
801 | struct rot_context *rot = dev_get_drvdata(dev); | ||
802 | |||
803 | if (pm_runtime_suspended(dev)) | ||
804 | return 0; | ||
805 | |||
806 | return rotator_clk_crtl(rot, false); | ||
807 | } | ||
808 | |||
809 | static int rotator_resume(struct device *dev) | ||
810 | { | ||
811 | struct rot_context *rot = dev_get_drvdata(dev); | ||
812 | |||
813 | if (!pm_runtime_suspended(dev)) | ||
814 | return rotator_clk_crtl(rot, true); | ||
815 | |||
816 | return 0; | ||
817 | } | ||
818 | #endif | ||
819 | |||
820 | static int rotator_runtime_suspend(struct device *dev) | 797 | static int rotator_runtime_suspend(struct device *dev) |
821 | { | 798 | { |
822 | struct rot_context *rot = dev_get_drvdata(dev); | 799 | struct rot_context *rot = dev_get_drvdata(dev); |
@@ -833,7 +810,8 @@ static int rotator_runtime_resume(struct device *dev) | |||
833 | #endif | 810 | #endif |
834 | 811 | ||
835 | static const struct dev_pm_ops rotator_pm_ops = { | 812 | static const struct dev_pm_ops rotator_pm_ops = { |
836 | SET_SYSTEM_SLEEP_PM_OPS(rotator_suspend, rotator_resume) | 813 | SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, |
814 | pm_runtime_force_resume) | ||
837 | SET_RUNTIME_PM_OPS(rotator_runtime_suspend, rotator_runtime_resume, | 815 | SET_RUNTIME_PM_OPS(rotator_runtime_suspend, rotator_runtime_resume, |
838 | NULL) | 816 | NULL) |
839 | }; | 817 | }; |