static int hdmi_panel_enable(struct omap_dss_device *dssdev) { int r = 0; DSSDBG("ENTER hdmi_panel_enable\n"); mutex_lock(&hdmi.hdmi_lock); if (dssdev->state != OMAP_DSS_DISPLAY_DISABLED) { r = -EINVAL; goto err; } /* Always re-detect HDMI device during resume */ hdmi_panel_hpd_handler(hdmi_get_current_hpd()); dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; r = omapdss_hdmi_display_enable(dssdev); if (r) { DSSERR("failed to power on\n"); dssdev->state = OMAP_DSS_DISPLAY_DISABLED; goto err; } err: mutex_unlock(&hdmi.hdmi_lock); return r; }
static int hdmi_panel_resume(struct omap_dss_device *dssdev) { int r = 0; mutex_lock(&hdmi.hdmi_lock); if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) goto err; dssdev->state = OMAP_DSS_DISPLAY_DISABLED; err: mutex_unlock(&hdmi.hdmi_lock); hdmi_panel_hpd_handler(hdmi_get_current_hpd()); return r; }
static int dss_resume_device(struct device *dev, void *data) { int r; struct omap_dss_device *dssdev = to_dss_device(dev); if (!dssdev->activate_after_resume && !strcmp(dssdev->name, "hdmi")) { if (hdmi_get_current_hpd()) hdmi_panel_hpd_handler(1); } if (dssdev->activate_after_resume && dssdev->driver->resume) { r = dssdev->driver->resume(dssdev); if (r) return r; } dssdev->activate_after_resume = false; return 0; }
static int hdmi_panel_resume(struct omap_dss_device *dssdev) { int r = 0; HDMIDBG("ENTER state=%d \n", dssdev->state); mutex_lock(&hdmi.hdmi_lock); if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) { r = -EINVAL; goto err; } dssdev->state = OMAP_DSS_DISPLAY_DISABLED; err: mutex_unlock(&hdmi.hdmi_lock); hdmi_panel_hpd_handler(hdmi_get_current_hpd()); HDMIDBG("error:%d \n", r); return r; }