From: Ben Dooks <ben-linux@fluff.org>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: vince@simtec.co.uk, Ben Dooks <ben-linux@fluff.org>
Subject: [PATCH] FB/SM501: Ensure console suspended before saving state
Date: Mon, 19 Nov 2007 18:06:51 +0000 [thread overview]
Message-ID: <20071119180725.449257893@fluff.org> (raw)
In-Reply-To: 20071119180650.568288237@fluff.org
[-- Attachment #1: simtec/simtec-drivers-fb-sm501-suspendbeforecopy.patch --]
[-- Type: text/plain, Size: 1627 bytes --]
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>
Index: linux-2.6.22-quilt9/drivers/video/sm501fb.c
===================================================================
--- linux-2.6.22-quilt9.orig/drivers/video/sm501fb.c
+++ linux-2.6.22-quilt9/drivers/video/sm501fb.c
@@ -1681,6 +1681,15 @@ static int sm501fb_suspend_fb(struct sm5
if (par->screen.size == 0)
return 0;
+ /* blank the relevant interface to ensure unit power minimised */
+ (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
+
+ /* tell console/fb driver we are suspending */
+
+ acquire_console_sem();
+ fb_set_suspend(fbi, 1);
+ release_console_sem();
+
/* backup copies in case chip is powered down over suspend */
par->store_fb = vmalloc(par->screen.size);
@@ -1700,12 +1709,6 @@ static int sm501fb_suspend_fb(struct sm5
memcpy_fromio(par->store_fb, par->screen.k_addr, par->screen.size);
memcpy_fromio(par->store_cursor, par->cursor.k_addr, par->cursor.size);
- /* blank the relevant interface to ensure unit power minimised */
- (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi);
-
- acquire_console_sem();
- fb_set_suspend(fbi, 1);
- release_console_sem();
return 0;
--
Ben (ben@fluff.org, http://www.fluff.org/)
'a smiley only costs 4 bytes'
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2007-11-19 18:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-19 18:06 [PATCH] SM501 and S3C2410 fb driver fixes for 2.6.24-rc3 Ben Dooks
2007-11-19 18:06 ` Ben Dooks [this message]
2007-11-19 18:06 ` [PATCH] FB: Fix resume path in S3C2410 framebuffer driver Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Update debugging " Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Ensure S3C2410 framebuffer clears initial memory to black Ben Dooks
2007-11-19 18:06 ` [PATCH] FB: Check default_display parameter passed in platform data Ben Dooks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071119180725.449257893@fluff.org \
--to=ben-linux@fluff.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=vince@simtec.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).