diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-02-06 04:39:38 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:17 -0500 |
commit | 40488db20e3f43e65f10747f9026fba7d59d29a3 (patch) | |
tree | 58c2258f30223f74230dc3606d9df888a1d42f0d /drivers/video/sm501fb.c | |
parent | bc9c6a175fa8123587668c38959a105e3ccb6bbd (diff) |
FB/SM501: ensure console suspended before saving state
Move the console suspend to before we save the state of
the framebuffer to ensure that it does not try and change
the fb state again once we have copied it out.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Vincent Sanders <vince@simtec.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/sm501fb.c')
-rw-r--r-- | drivers/video/sm501fb.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c index 8c39e4d5b08f..e83dfba7e636 100644 --- a/drivers/video/sm501fb.c +++ b/drivers/video/sm501fb.c | |||
@@ -1698,6 +1698,15 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info, | |||
1698 | if (par->screen.size == 0) | 1698 | if (par->screen.size == 0) |
1699 | return 0; | 1699 | return 0; |
1700 | 1700 | ||
1701 | /* blank the relevant interface to ensure unit power minimised */ | ||
1702 | (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi); | ||
1703 | |||
1704 | /* tell console/fb driver we are suspending */ | ||
1705 | |||
1706 | acquire_console_sem(); | ||
1707 | fb_set_suspend(fbi, 1); | ||
1708 | release_console_sem(); | ||
1709 | |||
1701 | /* backup copies in case chip is powered down over suspend */ | 1710 | /* backup copies in case chip is powered down over suspend */ |
1702 | 1711 | ||
1703 | par->store_fb = vmalloc(par->screen.size); | 1712 | par->store_fb = vmalloc(par->screen.size); |
@@ -1717,12 +1726,6 @@ static int sm501fb_suspend_fb(struct sm501fb_info *info, | |||
1717 | 1726 | ||
1718 | memcpy_fromio(par->store_fb, par->screen.k_addr, par->screen.size); | 1727 | memcpy_fromio(par->store_fb, par->screen.k_addr, par->screen.size); |
1719 | memcpy_fromio(par->store_cursor, par->cursor.k_addr, par->cursor.size); | 1728 | memcpy_fromio(par->store_cursor, par->cursor.k_addr, par->cursor.size); |
1720 | /* blank the relevant interface to ensure unit power minimised */ | ||
1721 | (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi); | ||
1722 | |||
1723 | acquire_console_sem(); | ||
1724 | fb_set_suspend(fbi, 1); | ||
1725 | release_console_sem(); | ||
1726 | 1729 | ||
1727 | return 0; | 1730 | return 0; |
1728 | 1731 | ||