]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/omap: force runtime PM suspend on system suspend
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 18 Jun 2020 09:51:52 +0000 (12:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:44 +0000 (13:07 +0200)
commit ecfdedd7da5d54416db5ca0f851264dca8736f59 upstream.

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: Tomi Valkeinen <tomi.valkeinen@ti.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200618095153.611071-1-tomi.valkeinen@ti.com
Acked-by: Tony Lindgren <tony@atomide.com>
Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data")
Cc: stable@vger.kernel.org # v5.7+
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/omapdrm/dss/dispc.c
drivers/gpu/drm/omapdrm/dss/dsi.c
drivers/gpu/drm/omapdrm/dss/dss.c
drivers/gpu/drm/omapdrm/dss/venc.c

index dbb90f2d2ccde5973db67530924c358059cec747..7782b163dd7213e45792a7df66a5bcd9d48bc470 100644 (file)
@@ -4936,6 +4936,7 @@ static int dispc_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dispc_pm_ops = {
        .runtime_suspend = dispc_runtime_suspend,
        .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 = {
index 79ddfbfd1b588257de01de8fc5e8e8667e64d6cb..eeccf40bae41667adb5d5f7e2156200f21840a62 100644 (file)
@@ -5467,6 +5467,7 @@ static int dsi_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dsi_pm_ops = {
        .runtime_suspend = dsi_runtime_suspend,
        .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 = {
index 4d5739fa4a5d8140a2e200c44beaab14a7f2860d..6ccbc29c4ce4bbbdc8950e4041620e061166ffa1 100644 (file)
@@ -1614,6 +1614,7 @@ static int dss_runtime_resume(struct device *dev)
 static const struct dev_pm_ops dss_pm_ops = {
        .runtime_suspend = dss_runtime_suspend,
        .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 = {
index 766553bb2f87b7b7e36cc107396980d10e67be92..4d3e7a72435f3a551fd119fee8a3f6f6a517c97f 100644 (file)
@@ -945,6 +945,7 @@ static int venc_runtime_resume(struct device *dev)
 static const struct dev_pm_ops venc_pm_ops = {
        .runtime_suspend = venc_runtime_suspend,
        .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[] = {