From: Scot Doyle <lkml14-enLWO88E2pdl57MIdRCFDg@public.gmane.org>
To: Tomi Valkeinen <tomi.valkeinen-l0cyMroinI0@public.gmane.org>,
Jean-Christophe Plagniol-Villard
<plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
Cc: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>,
Michael Kerrisk
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>,
Geert Uytterhoeven
<geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/2] fbcon: use the cursor blink interval provided by vt
Date: Fri, 27 Feb 2015 19:15:48 +0000 (UTC) [thread overview]
Message-ID: <alpine.LNX.2.11.1502271914040.4248@localhost> (raw)
In-Reply-To: <alpine.LNX.2.11.1502271905580.4212@localhost>
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-enLWO88E2pdl57MIdRCFDg@public.gmane.org>
Acked-by: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
---
drivers/video/console/fbcon.c | 10 +++++-----
drivers/video/console/fbcon.h | 1 +
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index b972106..05b1d1a 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;
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index 6bd2e0c..7aaa4ea 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -70,6 +70,7 @@ struct fbcon_ops {
struct fb_cursor cursor_state;
struct display *p;
int currcon; /* Current VC. */
+ int cur_blink_jiffies;
int cursor_flash;
int cursor_reset;
int blank_state;
--
2.3.0
next prev parent reply other threads:[~2015-02-27 19:15 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.DEB.2.11.1501262034380.1945@localhost.localdomain>
[not found] ` <alpine.DEB.2.11.1501262040380.2052@localhost.localdomain>
[not found] ` <20150225094946.GA24627@amd>
2015-02-25 23:32 ` [PATCH 2/2] fbcon: expose cursor blink interval via sysfs Scot Doyle
2015-02-26 22:02 ` Pavel Machek
2015-02-27 19:10 ` [PATCH 0/2] add cursor blink interval terminal escape sequence Scot Doyle
2015-02-27 19:13 ` [PATCH 1/2] vt: add cursor blink interval " Scot Doyle
2015-03-14 17:48 ` Scot Doyle
2015-03-25 11:19 ` Greg Kroah-Hartman
[not found] ` <20150325111949.GA24230-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-03-26 13:51 ` [PATCH v2 0/3] add cursor blink interval terminal " Scot Doyle
2015-03-26 13:54 ` [PATCH v2 1/3] vt: add cursor blink interval " Scot Doyle
2015-03-28 0:35 ` Mike Frysinger
2015-03-28 7:50 ` Pavel Machek
2015-03-26 13:56 ` [PATCH v2 2/3] fbcon: use the cursor blink interval provided by vt Scot Doyle
2015-05-19 21:15 ` Kevin Hilman
[not found] ` <CAMAWPa-6ZbE5cDkEZq0XpYa2pHcnf3qweSSVHAXhfhUAUCbKcA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-19 21:40 ` Thierry Reding
2015-05-19 21:45 ` Kevin Hilman
[not found] ` <CAMAWPa88E2pfViKLXjxWHuT4ZkVhzYt_BsXGePzc-70ZrEmJFA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-19 21:52 ` Thierry Reding
2015-05-19 23:41 ` Greg Kroah-Hartman
[not found] ` <20150519234112.GA25218-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-05-20 12:36 ` Thierry Reding
[not found] ` <20150520123615.GA24016-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-05-21 4:26 ` Greg Kroah-Hartman
[not found] ` <20150521042638.GB22632-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-05-21 8:00 ` Thierry Reding
2015-05-22 2:00 ` Greg Kroah-Hartman
2015-05-22 10:00 ` Thierry Reding
2015-05-22 10:33 ` Arnd Bergmann
2015-05-22 11:49 ` Thierry Reding
2015-05-22 13:07 ` Silvan Jegen
2015-05-22 13:24 ` Arnd Bergmann
2015-05-22 14:41 ` Thierry Reding
2015-05-22 14:32 ` Greg Kroah-Hartman
[not found] ` <20150522143205.GA6508-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2015-05-22 14:44 ` Thierry Reding
2015-05-20 0:36 ` Scot Doyle
2015-03-26 13:57 ` [PATCH v2 3/3] console_codes.4: Add CSI sequence for cursor blink interval Scot Doyle
2015-03-28 7:51 ` Pavel Machek
2015-07-05 17:41 ` Scot Doyle
2015-07-21 16:55 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkgqTckfydFTDFsoqB1b_fAEiDZGYP=7b-bhN8d4Mp-bsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-21 18:45 ` Scot Doyle
2015-03-28 7:54 ` [PATCH v2 0/3] add cursor blink interval terminal escape sequence Pavel Machek
2015-05-10 13:32 ` Greg Kroah-Hartman
2015-02-27 19:15 ` Scot Doyle [this message]
2015-05-27 5:57 ` [PATCH 2/2] fbcon: use the cursor blink interval provided by vt Andrey Wagin
[not found] ` <CANaxB-zX4GkExeCzwgYZVDVZE47DHOCnRiYe86difk4fRMK=9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-27 7:52 ` Scot Doyle
2015-05-27 11:07 ` Andrey Wagin
2015-03-02 11:15 ` [PATCH 0/2] add cursor blink interval terminal escape sequence Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LNX.2.11.1502271914040.4248@localhost \
--to=lkml14-enlwo88e2pdl57midrcfdg@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jslaby-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.org \
--cc=plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org \
--cc=tomi.valkeinen-l0cyMroinI0@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).