linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix FB console blanking
@ 2008-11-24 16:07 Dmitry Baryshkov
  2008-11-24 16:41 ` Geert Uytterhoeven
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2008-11-24 16:07 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Dmitry Baryshkov, Andrew Morton

The commit aef7db4bd5a3b6068dfa05919a3d685199eed116 fixed the problem
with recursive locking in fb blanking code if blank is caused by user
setting the /sys/class/graphics/fb*/blank. However this broke the fbcon
timeout blanking.

Restore fbcon blanking and at the same time apply the proper fix for the
above problem: if fbcon_blank is called with FBINFO_FLAG_USEREVENT, we
are already called through notification from fb_blank, thus we don't
have to blank the fb again.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
---
 drivers/video/console/fbcon.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 9cbff84..2f2f0f9 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2400,16 +2400,13 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
 
  	if (!fbcon_is_inactive(vc, info)) {
 		if (ops->blank_state != blank) {
-			int ret = 1;
-
 			ops->blank_state = blank;
 			fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
 			ops->cursor_flash = (!blank);
 
-			if (info->fbops->fb_blank)
-				ret = info->fbops->fb_blank(blank, info);
-			if (ret)
-				fbcon_generic_blank(vc, info, blank);
+			if (!(info->flags & FBINFO_MISC_USEREVENT))
+				if (fb_blank(info, blank))
+					fbcon_generic_blank(vc, info, blank);
 		}
 
 		if (!blank)
-- 
1.5.6.5


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-11-24 16:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 16:07 [PATCH] Fix FB console blanking Dmitry Baryshkov
2008-11-24 16:41 ` Geert Uytterhoeven
2008-11-24 16:50   ` Dmitry Baryshkov

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).