summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/core.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-10-02 11:10:42 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 17:38:20 +0200
commit92bf0f9e2a9f1ea99d86ab6b0c3a87183a67e63c (patch)
tree07dd215fe2d33e68f2f8f82866e8c85c0cf5babc /drivers/gpu/drm/omapdrm/dss/core.c
parentbfeece553335f9b9bf0d4dc9ea8a602a2248dfd6 (diff)
downloadlinux-92bf0f9e2a9f1ea99d86ab6b0c3a87183a67e63c.tar.bz2
drm/omap: fix suspend/resume handling
For legacy reasons omapdss handles system suspend/resume via PM notifier callback, where the driver disables/resumes all the outputs. This doesn't work well with omapdrm. What happens on suspend is that the omapdss disables the displays while omapdrm is still happily continuing its work, possibly waiting for an vsync irq, which will never come if the display output is disabled, leading to timeouts and errors sent to userspace. This patch moves the suspend/resume handling to omapdrm, and the suspend/resume is now done safely inside modeset lock. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/core.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/core.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/core.c b/drivers/gpu/drm/omapdrm/dss/core.c
index 54eeb507f9b3..1f55d0aae03d 100644
--- a/drivers/gpu/drm/omapdrm/dss/core.c
+++ b/drivers/gpu/drm/omapdrm/dss/core.c
@@ -165,31 +165,6 @@ int dss_debugfs_create_file(const char *name, void (*write)(struct seq_file *))
#endif /* CONFIG_OMAP2_DSS_DEBUGFS */
/* PLATFORM DEVICE */
-static int omap_dss_pm_notif(struct notifier_block *b, unsigned long v, void *d)
-{
- DSSDBG("pm notif %lu\n", v);
-
- switch (v) {
- case PM_SUSPEND_PREPARE:
- case PM_HIBERNATION_PREPARE:
- case PM_RESTORE_PREPARE:
- DSSDBG("suspending displays\n");
- return dss_suspend_all_devices();
-
- case PM_POST_SUSPEND:
- case PM_POST_HIBERNATION:
- case PM_POST_RESTORE:
- DSSDBG("resuming displays\n");
- return dss_resume_all_devices();
-
- default:
- return 0;
- }
-}
-
-static struct notifier_block omap_dss_pm_notif_block = {
- .notifier_call = omap_dss_pm_notif,
-};
static int __init omap_dss_probe(struct platform_device *pdev)
{
@@ -211,8 +186,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
else if (pdata->default_device)
core.default_display_name = pdata->default_device->name;
- register_pm_notifier(&omap_dss_pm_notif_block);
-
return 0;
err_debugfs:
@@ -222,8 +195,6 @@ err_debugfs:
static int omap_dss_remove(struct platform_device *pdev)
{
- unregister_pm_notifier(&omap_dss_pm_notif_block);
-
dss_uninitialize_debugfs();
return 0;