drm/exynos: Ensure suspended runtime PM state during system suspend
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 11 Jun 2018 11:30:13 +0000 (13:30 +0200)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:58:03 +0000 (14:58 +0900)
Add calls to pm_runtime_force_{suspend,resume} as SYSTEM_SLEEP_PM_OPS for
all drivers for the real Exynos DRM hardware modules. This ensures that
the resources will be released for the system PM suspend/resume cycle.
Exynos DRM core already takes care of suspending the whole display pipeline
before PM callbacks of the real devices are called.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I29ad062624f110926a091dd6ad778e50de664986

drivers/gpu/drm/exynos/exynos5433_drm_decon.c
drivers/gpu/drm/exynos/exynos7_drm_decon.c
drivers/gpu/drm/exynos/exynos_dp.c
drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/exynos/exynos_drm_fimd.c
drivers/gpu/drm/exynos/exynos_drm_mic.c
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/exynos/exynos_mixer.c

index 10b27635300409f7a23c089226f1927903164253..aef487dd873153d77fd602726ab6bd92256ab593 100644 (file)
@@ -664,6 +664,8 @@ err:
 static const struct dev_pm_ops exynos5433_decon_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos5433_decon_suspend, exynos5433_decon_resume,
                           NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                                    pm_runtime_force_resume)
 };
 
 static const struct of_device_id exynos5433_decon_driver_dt_match[] = {
index 3931d5e33fe07aa77ec5a39c30875f9ac0b8edd6..88cbd000eb094cb480d85d77a7cf40f664f1bd1f 100644 (file)
@@ -832,6 +832,8 @@ static int exynos7_decon_resume(struct device *dev)
 static const struct dev_pm_ops exynos7_decon_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos7_decon_suspend, exynos7_decon_resume,
                           NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 struct platform_driver decon_driver = {
index 39629e7a80b9804e26e1219935c4fa727da84cfc..b4beadce1ec05a8acdb507e1a48f504478056509 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/clk.h>
 #include <linux/of_graph.h>
 #include <linux/component.h>
+#include <linux/pm_runtime.h>
 #include <video/of_display_timing.h>
 #include <video/of_videomode.h>
 #include <video/videomode.h>
@@ -268,6 +269,8 @@ static int exynos_dp_resume(struct device *dev)
 
 static const struct dev_pm_ops exynos_dp_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_dp_suspend, exynos_dp_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 static const struct of_device_id exynos_dp_match[] = {
index 7904ffa9abfb95ca17bf3f938b83e19c67a0c897..71157281139bea99974fd5f4112830fd30df4d96 100644 (file)
@@ -1880,6 +1880,8 @@ err_clk:
 
 static const struct dev_pm_ops exynos_dsi_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_dsi_suspend, exynos_dsi_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 struct platform_driver dsi_driver = {
index d42ae2bc3e5679fd2258a6edf0b8f7a7ae700a8b..81a9d1c7bcc16c20ad63409da17e0029506d30d1 100644 (file)
@@ -1184,6 +1184,8 @@ static int exynos_fimd_resume(struct device *dev)
 
 static const struct dev_pm_ops exynos_fimd_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_fimd_suspend, exynos_fimd_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 struct platform_driver fimd_driver = {
index ba4a32b132baada502df485477d85281600b872f..3f7320b03f2334e36de0a410ef46c14db3dc5515 100644 (file)
@@ -367,6 +367,8 @@ static int exynos_mic_resume(struct device *dev)
 
 static const struct dev_pm_ops exynos_mic_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_mic_suspend, exynos_mic_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 static int exynos_mic_probe(struct platform_device *pdev)
index 614eda2500d4e081c8c7e93fba2556aeeab03717..32c1920e8012037db2d6b49166e41f35eb735c25 100644 (file)
@@ -2094,6 +2094,8 @@ static int __maybe_unused exynos_hdmi_resume(struct device *dev)
 
 static const struct dev_pm_ops exynos_hdmi_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 struct platform_driver hdmi_driver = {
index dc5d79465f9b7f8708c09ccf6df097b90ac2c6f7..c31a3d2e52fecc21bd25809328e2dcaad41da63d 100644 (file)
@@ -1271,6 +1271,8 @@ static int __maybe_unused exynos_mixer_resume(struct device *dev)
 
 static const struct dev_pm_ops exynos_mixer_pm_ops = {
        SET_RUNTIME_PM_OPS(exynos_mixer_suspend, exynos_mixer_resume, NULL)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
 };
 
 struct platform_driver mixer_driver = {