diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-12-09 11:01:30 -0800 |
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-12-11 16:10:21 -0800 |
| commit | 287a33501983068c15007483389436106285cc55 (patch) | |
| tree | 15a5b058f5de54a5db23d8f18b64e886c0646760 | |
| parent | ee0c12747d3ed7c479b0cb77d83e065138ed1559 (diff) | |
| download | olio-linux-3.10-287a33501983068c15007483389436106285cc55.tar.xz olio-linux-3.10-287a33501983068c15007483389436106285cc55.zip | |
Adding suspend/resume functions that clear out the framebuffer (to prevent the 'jumping watch hands' issue)
Change-Id: I56cf6f54c71065ded5c49e2493e47bcfb268b5ad
| -rw-r--r-- | drivers/video/omap2/omapfb/omapfb-main.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 13733c8bb1b..98c645429bd 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2640,8 +2640,8 @@ static int omapfb_probe(struct platform_device *pdev) r = omapfb_init_display(fbdev, def_display); if (r) { dev_err(fbdev->dev, - "failed to initialize default " - "display\n"); + "failed to initialize default " + "display\n"); goto cleanup; } } @@ -2687,9 +2687,36 @@ static int __exit omapfb_remove(struct platform_device *pdev) return 0; } +/* Need to add suspend / wake pair of functions here. + * All we really need is for the suspend function to clear the screen + * to black. + */ + +static int omapfb_suspend (struct platform_device * pdev, pm_message_t state) +{ + struct omapfb2_device *fbdev = platform_get_drvdata(pdev); + struct fb_info * fbi; + + fbi = fbdev->fbs[0]; + + if (fbi != NULL) + omapfb_clear_fb(fbi); + + return 0; +} + +static int omapfb_resume (struct platform_device * pdev) +{ + /* No need to do anything, I think */ + + return 0; +} + static struct platform_driver omapfb_driver = { .probe = omapfb_probe, .remove = __exit_p(omapfb_remove), + .suspend = omapfb_suspend, + .resume = omapfb_resume, .driver = { .name = "omapfb", .owner = THIS_MODULE, |