drm/exynos: Ensure suspended runtime PM state during system suspend
authorMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 11 Jun 2018 12:25:00 +0000 (14:25 +0200)
committerInki Dae <inki.dae@samsung.com>
Tue, 24 Jul 2018 07:28:53 +0000 (16:28 +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>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
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 e868773ea5097cf3afd0592c2bf51ef66adf84cc..94529aa8233922b71cc36011fff305280651be53 100644 (file)
@@ -673,6 +673,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 af7ab1ceb50f4d0572b5c56aaa055cfb21b45133..c8449ae4f4feda409f29c700f361b0560eaac981 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>
@@ -278,6 +279,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 a1ed6146a3b5c476db81c4440b04d6a392b33617..781b82c2c579b2707947c0c732001f6e794d9713 100644 (file)
@@ -1863,6 +1863,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 01b1570d0c3ab4b775a3b6871c074978df653155..b7f56935a46bc2a33fec03c18854774cb331f70d 100644 (file)
@@ -1192,6 +1192,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 2174814273e2071934c817e180848498627f6e14..2fd299a58297edd559b2b5928a63833b3c2622df 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 3a11c719a58087a054c43076f432bcbe54656bb6..2092a650df7d56b1262fc2f09036eb88ec62ce38 100644 (file)
@@ -2093,6 +2093,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 272c79f5f5bff856dfa4a29a2574a70ee72366cf..e45278e076dacd9157165c8c533554ecb1ecd886 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 = {