aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2014-11-14 08:18:28 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-03-24 07:50:56 -0400
commitccd7b5ed7d1ed47ee5ea2f66325972811eb093bd (patch)
tree23f62404c19aff8b6cd0b8c4c854c0207d65fff3 /drivers/gpu/drm/omapdrm
parentf5a1d3174f9e1d2d55bfd06626586963283e58be (diff)
drm/omap: stop connector polling during suspend
When not using proper hotplug detection, DRM polls periodically the connectors to find out if a cable is connected. This polling can happen at any time, even very late in the suspend process. This causes a problem with omapdrm, when the poll happens during the suspend process after GPIOs have been disabled, leading to a crash in gpio_get(). This patch fixes the issue by adding suspend and resume hooks to omapdrm, in which we disable and enable, respectively, the polling. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_drv.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 8d8cf82ecdf7..c4c237317901 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -706,9 +706,28 @@ static int pdev_remove(struct platform_device *device)
706 return 0; 706 return 0;
707} 707}
708 708
709static int omap_drm_suspend(struct device *dev)
710{
711 struct drm_device *drm_dev = dev_get_drvdata(dev);
712
713 drm_kms_helper_poll_disable(drm_dev);
714
715 return 0;
716}
717
718static int omap_drm_resume(struct device *dev)
719{
720 struct drm_device *drm_dev = dev_get_drvdata(dev);
721
722 drm_kms_helper_poll_enable(drm_dev);
723
724 return omap_gem_resume(dev);
725}
726
709#ifdef CONFIG_PM 727#ifdef CONFIG_PM
710static const struct dev_pm_ops omapdrm_pm_ops = { 728static const struct dev_pm_ops omapdrm_pm_ops = {
711 .resume = omap_gem_resume, 729 .suspend = omap_drm_suspend,
730 .resume = omap_drm_resume,
712}; 731};
713#endif 732#endif
714 733