diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-10-03 08:14:48 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 15:04:10 (GMT) |
commit | 212f26398f63bc905ea28f55b31d4ecd4a21a33b (patch) | |
tree | 011d7f2032fbd23a0da204efcf31508b64220475 /drivers/video | |
parent | e299dd4d7c5f38a24045e0578049d872b62f21eb (diff) | |
download | linux-212f26398f63bc905ea28f55b31d4ecd4a21a33b.tar.xz |
[PATCH] fbcon: Remove cursor timer if unused
Remove the cursor timer (cursor flashing) on the following conditions:
- if vc is in KD_GRAPHICS mode, ie, when X owns the console
- if vc is blanked
This misbehavior was exposed by Dave Jones.
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/console/fbcon.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 050856e..9e3ff00 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -396,9 +396,8 @@ static void fb_flashcursor(void *private) vc = vc_cons[ops->currcon].d; if (!vc || !CON_IS_VISIBLE(vc) || - fbcon_is_inactive(vc, info) || registered_fb[con2fb_map[vc->vc_num]] != info || - vc_cons[ops->currcon].d->vc_deccm != 1) { + vc->vc_deccm != 1) { release_console_sem(); return; } @@ -2166,7 +2165,12 @@ static int fbcon_switch(struct vc_data *vc) fbcon_del_cursor_timer(old_info); } - fbcon_add_cursor_timer(info); + if (fbcon_is_inactive(vc, info) || + ops->blank_state != FB_BLANK_UNBLANK) + fbcon_del_cursor_timer(info); + else + fbcon_add_cursor_timer(info); + set_blitting_type(vc, info); ops->cursor_reset = 1; @@ -2276,10 +2280,11 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) update_screen(vc); } - if (!blank) - fbcon_add_cursor_timer(info); - else + if (fbcon_is_inactive(vc, info) || + ops->blank_state != FB_BLANK_UNBLANK) fbcon_del_cursor_timer(info); + else + fbcon_add_cursor_timer(info); return 0; } |