diff options
author | Kan-Ru Chen <kanru@0xlab.org> | 2011-06-22 20:39:59 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-06-22 20:39:59 +0100 |
commit | b26b8d7d1b15bcb2eeeafcda0b1ae5c0f7166838 (patch) | |
tree | b20f6ea17311dab4c31186ef5fdf595405ceeef0 | |
parent | 272e311e8da0243a0fe2fdbdca4586d0225558e3 (diff) |
After resume the HDMI/DVI output was still blank. It turns out that
framebuffers have to be reconfigured so the output is activated again.
Signed-off-by: Kan-Ru Chen <kanru@0xlab.org>
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 505bc12a303..d099badcb24 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -29,6 +29,8 @@ #include <linux/device.h> #include <linux/platform_device.h> #include <linux/omapfb.h> +#include <linux/console.h> +#include <linux/pm.h> #include <video/omapdss.h> #include <plat/vram.h> @@ -2233,6 +2235,37 @@ static int omapfb_init_display(struct omapfb2_device *fbdev, return 0; } +#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; @@ -2376,6 +2409,7 @@ static struct platform_driver omapfb_driver = { .driver = { .name = "omapfb", .owner = THIS_MODULE, + .pm = &omapfb_pm_ops, }, }; |