Commit 212f2639 authored by Antonino A. Daplas's avatar Antonino A. Daplas Committed by Linus Torvalds

[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: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e299dd4d
...@@ -396,9 +396,8 @@ static void fb_flashcursor(void *private) ...@@ -396,9 +396,8 @@ static void fb_flashcursor(void *private)
vc = vc_cons[ops->currcon].d; vc = vc_cons[ops->currcon].d;
if (!vc || !CON_IS_VISIBLE(vc) || if (!vc || !CON_IS_VISIBLE(vc) ||
fbcon_is_inactive(vc, info) ||
registered_fb[con2fb_map[vc->vc_num]] != info || registered_fb[con2fb_map[vc->vc_num]] != info ||
vc_cons[ops->currcon].d->vc_deccm != 1) { vc->vc_deccm != 1) {
release_console_sem(); release_console_sem();
return; return;
} }
...@@ -2166,7 +2165,12 @@ static int fbcon_switch(struct vc_data *vc) ...@@ -2166,7 +2165,12 @@ static int fbcon_switch(struct vc_data *vc)
fbcon_del_cursor_timer(old_info); 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); set_blitting_type(vc, info);
ops->cursor_reset = 1; ops->cursor_reset = 1;
...@@ -2276,10 +2280,11 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch) ...@@ -2276,10 +2280,11 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
update_screen(vc); update_screen(vc);
} }
if (!blank) if (fbcon_is_inactive(vc, info) ||
fbcon_add_cursor_timer(info); ops->blank_state != FB_BLANK_UNBLANK)
else
fbcon_del_cursor_timer(info); fbcon_del_cursor_timer(info);
else
fbcon_add_cursor_timer(info);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment