Commit ecfdedd7 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: force runtime PM suspend on system suspend

Use SET_LATE_SYSTEM_SLEEP_PM_OPS in DSS submodules to force runtime PM
suspend and resume.

We use suspend late version so that omapdrm's system suspend callback is
called first, as that will disable all the display outputs after which
it's safe to force DSS into suspend.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200618095153.611071-1-tomi.valkeinen@ti.comAcked-by: default avatarTony Lindgren <tony@atomide.com>
Fixes: cef76630 ("drm/omap: Prepare DSS for probing without legacy platform data")
Cc: stable@vger.kernel.org # v5.7+
Tested-by: default avatarTony Lindgren <tony@atomide.com>
parent a72a6a16
...@@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct device *dev) ...@@ -4915,6 +4915,7 @@ static int dispc_runtime_resume(struct device *dev)
static const struct dev_pm_ops dispc_pm_ops = { static const struct dev_pm_ops dispc_pm_ops = {
.runtime_suspend = dispc_runtime_suspend, .runtime_suspend = dispc_runtime_suspend,
.runtime_resume = dispc_runtime_resume, .runtime_resume = dispc_runtime_resume,
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
}; };
struct platform_driver omap_dispchw_driver = { struct platform_driver omap_dispchw_driver = {
......
...@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev) ...@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev)
static const struct dev_pm_ops dsi_pm_ops = { static const struct dev_pm_ops dsi_pm_ops = {
.runtime_suspend = dsi_runtime_suspend, .runtime_suspend = dsi_runtime_suspend,
.runtime_resume = dsi_runtime_resume, .runtime_resume = dsi_runtime_resume,
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
}; };
struct platform_driver omap_dsihw_driver = { struct platform_driver omap_dsihw_driver = {
......
...@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev) ...@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev)
static const struct dev_pm_ops dss_pm_ops = { static const struct dev_pm_ops dss_pm_ops = {
.runtime_suspend = dss_runtime_suspend, .runtime_suspend = dss_runtime_suspend,
.runtime_resume = dss_runtime_resume, .runtime_resume = dss_runtime_resume,
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
}; };
struct platform_driver omap_dsshw_driver = { struct platform_driver omap_dsshw_driver = {
......
...@@ -902,6 +902,7 @@ static int venc_runtime_resume(struct device *dev) ...@@ -902,6 +902,7 @@ static int venc_runtime_resume(struct device *dev)
static const struct dev_pm_ops venc_pm_ops = { static const struct dev_pm_ops venc_pm_ops = {
.runtime_suspend = venc_runtime_suspend, .runtime_suspend = venc_runtime_suspend,
.runtime_resume = venc_runtime_resume, .runtime_resume = venc_runtime_resume,
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
}; };
static const struct of_device_id venc_of_match[] = { static const struct of_device_id venc_of_match[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment