On Fri, 2011-03-04 at 01:48 -0600, K, Mythri P wrote: > The panel driver(hdmi_omap4_panel.c) in omap2/dss acts as a controller > to manage the enable and disable requests and synchronize audio and video. > > Signed-off-by: Mythri P K <mythripk@xxxxxx> > --- > drivers/video/omap2/dss/Kconfig | 8 + > drivers/video/omap2/dss/Makefile | 1 + > drivers/video/omap2/dss/hdmi_omap4_panel.c | 206 ++++++++++++++++++++++++++++ > 3 files changed, 215 insertions(+), 0 deletions(-) > create mode 100644 drivers/video/omap2/dss/hdmi_omap4_panel.c > <snip> > +static int hdmi_panel_suspend(struct omap_dss_device *dssdev) > +{ > + int r = 0; > + > + mutex_lock(&hdmi.hdmi_lock); > + > + if (dssdev->state == OMAP_DSS_DISPLAY_DISABLED || > + dssdev->state == OMAP_DSS_DISPLAY_SUSPENDED) { Here you could check if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) > + r = -EINVAL; > + goto err; > + } > + > + dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; > + > + omapdss_hdmi_display_disable(dssdev); > + > +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_ACTIVE) { Here you should check if (dssdev->state != OMAP_DSS_DISPLAY_SUSPENDED) Tomi -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html