Commit 27a4c827 authored by Scot Doyle's avatar Scot Doyle Committed by Greg Kroah-Hartman

fbcon: use the cursor blink interval provided by vt

vt now provides a cursor blink interval via vc_data. Use this
interval instead of the currently hardcoded 200 msecs. Store it in
fbcon_ops to avoid locking the console in cursor_timer_handler().
Signed-off-by: default avatarScot Doyle <lkml14@scotdoyle.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bd63364c
...@@ -402,7 +402,7 @@ static void cursor_timer_handler(unsigned long dev_addr) ...@@ -402,7 +402,7 @@ static void cursor_timer_handler(unsigned long dev_addr)
struct fbcon_ops *ops = info->fbcon_par; struct fbcon_ops *ops = info->fbcon_par;
queue_work(system_power_efficient_wq, &info->queue); queue_work(system_power_efficient_wq, &info->queue);
mod_timer(&ops->cursor_timer, jiffies + HZ/5); mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
} }
static void fbcon_add_cursor_timer(struct fb_info *info) static void fbcon_add_cursor_timer(struct fb_info *info)
...@@ -417,7 +417,7 @@ static void fbcon_add_cursor_timer(struct fb_info *info) ...@@ -417,7 +417,7 @@ static void fbcon_add_cursor_timer(struct fb_info *info)
init_timer(&ops->cursor_timer); init_timer(&ops->cursor_timer);
ops->cursor_timer.function = cursor_timer_handler; ops->cursor_timer.function = cursor_timer_handler;
ops->cursor_timer.expires = jiffies + HZ / 5; ops->cursor_timer.expires = jiffies + ops->cur_blink_jiffies;
ops->cursor_timer.data = (unsigned long ) info; ops->cursor_timer.data = (unsigned long ) info;
add_timer(&ops->cursor_timer); add_timer(&ops->cursor_timer);
ops->flags |= FBCON_FLAGS_CURSOR_TIMER; ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
...@@ -1309,9 +1309,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode) ...@@ -1309,9 +1309,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
return; return;
if (vc->vc_cursor_type & 0x10) ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
fbcon_del_cursor_timer(info); fbcon_del_cursor_timer(info);
else if (!(vc->vc_cursor_type & 0x10))
fbcon_add_cursor_timer(info); fbcon_add_cursor_timer(info);
ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1; ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1;
......
...@@ -70,6 +70,7 @@ struct fbcon_ops { ...@@ -70,6 +70,7 @@ struct fbcon_ops {
struct fb_cursor cursor_state; struct fb_cursor cursor_state;
struct display *p; struct display *p;
int currcon; /* Current VC. */ int currcon; /* Current VC. */
int cur_blink_jiffies;
int cursor_flash; int cursor_flash;
int cursor_reset; int cursor_reset;
int blank_state; int blank_state;
......
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