提交 bca404af 编写于 作者: D Dmitry Baryshkov 提交者: Linus Torvalds

fbdev: fix FB console blanking

The commit aef7db4b 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.

If you use a driver that defines ->fb_blank operation and at the same time
that driver relies on other driver (e.g.  backlight or lcd class) to blank
the screen, when the fbcon times out and tries to blank the fb, it will
call only fb driver blanker and won't notify the other driver.  Thus FB
output is disabled, but the screen isn't blanked.

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: NDmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 03801553
...@@ -2389,16 +2389,13 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) ...@@ -2389,16 +2389,13 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
if (!fbcon_is_inactive(vc, info)) { if (!fbcon_is_inactive(vc, info)) {
if (ops->blank_state != blank) { if (ops->blank_state != blank) {
int ret = 1;
ops->blank_state = blank; ops->blank_state = blank;
fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW); fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
ops->cursor_flash = (!blank); ops->cursor_flash = (!blank);
if (info->fbops->fb_blank) if (!(info->flags & FBINFO_MISC_USEREVENT))
ret = info->fbops->fb_blank(blank, info); if (fb_blank(info, blank))
if (ret) fbcon_generic_blank(vc, info, blank);
fbcon_generic_blank(vc, info, blank);
} }
if (!blank) if (!blank)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册