On 9 June 2011 17:58, Kan-Ru Chen <ka...@0xlab.org> wrote: > After resume the HDMI/DVI output was still blank. It turns out that > framebuffers have to be reconfigured so the output is activated again. >
Hi Andy, Can you review Kan-Ru's patch? Since Android assumes full-functional PM, it is vital to improve the resuming behavior of OMAP framebuffer. Thanks, -jserv > --- > drivers/video/omap2/omapfb/omapfb-main.c | 33 > ++++++++++++++++++++++++++++++ > 1 files changed, 33 insertions(+), 0 deletions(-) > > diff --git a/drivers/video/omap2/omapfb/omapfb-main.c > b/drivers/video/omap2/omapfb/omapfb-main.c > index 2bd90ca..a5a0725 100644 > --- a/drivers/video/omap2/omapfb/omapfb-main.c > +++ b/drivers/video/omap2/omapfb/omapfb-main.c > @@ -30,6 +30,7 @@ > #include <linux/platform_device.h> > #include <linux/omapfb.h> > #include <linux/console.h> > +#include <linux/pm.h> > > #include <plat/display.h> > #include <plat/vram.h> > @@ -2274,6 +2275,37 @@ static int omapfb_parse_def_modes(struct > omapfb2_device *fbdev) > return r; > } > > +#ifdef CONFIG_PM > +static int omapfb_suspend(struct device *dev) > +{ > + return 0; > +} > + > +static int omapfb_resume(struct device *dev) > +{ > + struct platform_device *pdev = to_platform_device(dev); > + struct omapfb2_device *fbdev = platform_get_drvdata(pdev); > + int i; > + > + if (fbdev != NULL) { > + for (i = 0; i < fbdev->num_fbs; i++) { > + omapfb_set_par(fbdev->fbs[i]); > + } > + } > + return 0; > +} > +#else > +#define omapfb_suspend NULL > +#define omapfb_resume NULL > +#endif > + > +static const struct dev_pm_ops omapfb_pm_ops = { > + .suspend = omapfb_suspend, > + .resume = omapfb_resume, > + .poweroff = omapfb_suspend, > + .restore = omapfb_resume, > +}; > + > static int omapfb_probe(struct platform_device *pdev) > { > struct omapfb2_device *fbdev = NULL; > @@ -2440,6 +2472,7 @@ static struct platform_driver omapfb_driver = { > .driver = { > .name = "omapfb", > .owner = THIS_MODULE, > + .pm = &omapfb_pm_ops, > }, > }; > > -- > 1.7.5.3 _______________________________________________ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev