diff options
author | Scot Doyle <lkml14@scotdoyle.com> | 2015-03-26 16:56:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 20:15:52 +0300 |
commit | 27a4c827c34ac4256a190cc9d24607f953c1c459 (patch) | |
tree | e69c1db12e9a59d903e4be2f215e0fd90134bedb /drivers/video/console/fbcon.c | |
parent | bd63364caa8df38bad2b25b11b2a1b849475cce5 (diff) | |
download | linux-27a4c827c34ac4256a190cc9d24607f953c1c459.tar.xz |
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: Scot Doyle <lkml14@scotdoyle.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video/console/fbcon.c')
-rw-r--r-- | drivers/video/console/fbcon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index b97210671a81..05b1d1a71ef9 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -402,7 +402,7 @@ static void cursor_timer_handler(unsigned long dev_addr) struct fbcon_ops *ops = info->fbcon_par; 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) @@ -417,7 +417,7 @@ static void fbcon_add_cursor_timer(struct fb_info *info) init_timer(&ops->cursor_timer); 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; add_timer(&ops->cursor_timer); ops->flags |= FBCON_FLAGS_CURSOR_TIMER; @@ -1309,9 +1309,9 @@ static void fbcon_cursor(struct vc_data *vc, int mode) if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) return; - if (vc->vc_cursor_type & 0x10) - fbcon_del_cursor_timer(info); - else + ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); + fbcon_del_cursor_timer(info); + if (!(vc->vc_cursor_type & 0x10)) fbcon_add_cursor_timer(info); ops->cursor_flash = (mode == CM_ERASE) ? 0 : 1; |