@@ -3104,6 +3104,31 @@ static int vc5_hdmi_init_resources(struct drm_device *drm,
return 0;
}
+static int vc4_hdmi_suspend(struct device *dev)
+{
+ struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
+ struct drm_device *drm = vc4_hdmi->connector.dev;
+
+ if (drm && drm->mode_config.poll_enabled)
+ drm_kms_helper_poll_disable(drm);
+
+ return pm_runtime_force_suspend(dev);
+}
+
+static int vc4_hdmi_resume(struct device *dev)
+{
+ struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
+ struct drm_device *drm = vc4_hdmi->connector.dev;
+ int ret;
+
+ ret = pm_runtime_force_resume(dev);
+
+ if (drm && drm->mode_config.poll_enabled)
+ drm_kms_helper_poll_enable(drm);
+
+ return ret;
+}
+
static int vc4_hdmi_runtime_suspend(struct device *dev)
{
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
@@ -3405,6 +3430,7 @@ static const struct dev_pm_ops vc4_hdmi_pm_ops = {
SET_RUNTIME_PM_OPS(vc4_hdmi_runtime_suspend,
vc4_hdmi_runtime_resume,
NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(vc4_hdmi_suspend, vc4_hdmi_resume)
};
struct platform_driver vc4_hdmi_driver = {