提交 ccd7b5ed 编写于 作者: T Tomi Valkeinen

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: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 f5a1d317
......@@ -706,9 +706,28 @@ static int pdev_remove(struct platform_device *device)
return 0;
}
static int omap_drm_suspend(struct device *dev)
{
struct drm_device *drm_dev = dev_get_drvdata(dev);
drm_kms_helper_poll_disable(drm_dev);
return 0;
}
static int omap_drm_resume(struct device *dev)
{
struct drm_device *drm_dev = dev_get_drvdata(dev);
drm_kms_helper_poll_enable(drm_dev);
return omap_gem_resume(dev);
}
#ifdef CONFIG_PM
static const struct dev_pm_ops omapdrm_pm_ops = {
.resume = omap_gem_resume,
.suspend = omap_drm_suspend,
.resume = omap_drm_resume,
};
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册