From: Scot Doyle <lkml14@scotdoyle.com> To: Tomi Valkeinen <tomi.valkeinen@ti.com>, Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Richard Weinberger <richard.weinberger@gmail.com>, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/2] fbcon: store cursor blink interval in fbcon_ops Date: Fri, 30 Jan 2015 09:37:48 +0000 (UTC) [thread overview] Message-ID: <alpine.DEB.2.11.1501300936310.2359@localhost.localdomain> (raw) In-Reply-To: <alpine.DEB.2.11.1501300932470.2288@localhost.localdomain> fbcon toggles cursor display state every 200 milliseconds when blinking. Since users prefer different toggle intervals, prepare to expose the interval via sysfs by moving it to fbdev_ops and setting the default to 200 milliseconds. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> --- drivers/video/console/fbcon.c | 5 +++-- drivers/video/console/fbcon.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index ea43724..7a2030b 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -405,7 +405,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->blink_jiffies); } static void fbcon_add_cursor_timer(struct fb_info *info) @@ -420,7 +420,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->blink_jiffies; ops->cursor_timer.data = (unsigned long ) info; add_timer(&ops->cursor_timer); ops->flags |= FBCON_FLAGS_CURSOR_TIMER; @@ -959,6 +959,7 @@ static const char *fbcon_startup(void) ops->currcon = -1; ops->graphics = 1; ops->cur_rotate = -1; + ops->blink_jiffies = msecs_to_jiffies(200); info->fbcon_par = ops; p->con_rotate = initial_rotation; set_blitting_type(vc, info); diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index 6bd2e0c..642c4e7 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 blink_jiffies; int cursor_flash; int cursor_reset; int blank_state; -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Scot Doyle <lkml14@scotdoyle.com> To: Tomi Valkeinen <tomi.valkeinen@ti.com>, Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org>, Richard Weinberger <richard.weinberger@gmail.com>, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/2] fbcon: store cursor blink interval in fbcon_ops Date: Fri, 30 Jan 2015 09:37:48 +0000 [thread overview] Message-ID: <alpine.DEB.2.11.1501300936310.2359@localhost.localdomain> (raw) In-Reply-To: <alpine.DEB.2.11.1501300932470.2288@localhost.localdomain> fbcon toggles cursor display state every 200 milliseconds when blinking. Since users prefer different toggle intervals, prepare to expose the interval via sysfs by moving it to fbdev_ops and setting the default to 200 milliseconds. Signed-off-by: Scot Doyle <lkml14@scotdoyle.com> --- drivers/video/console/fbcon.c | 5 +++-- drivers/video/console/fbcon.h | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index ea43724..7a2030b 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -405,7 +405,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->blink_jiffies); } static void fbcon_add_cursor_timer(struct fb_info *info) @@ -420,7 +420,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->blink_jiffies; ops->cursor_timer.data = (unsigned long ) info; add_timer(&ops->cursor_timer); ops->flags |= FBCON_FLAGS_CURSOR_TIMER; @@ -959,6 +959,7 @@ static const char *fbcon_startup(void) ops->currcon = -1; ops->graphics = 1; ops->cur_rotate = -1; + ops->blink_jiffies = msecs_to_jiffies(200); info->fbcon_par = ops; p->con_rotate = initial_rotation; set_blitting_type(vc, info); diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index 6bd2e0c..642c4e7 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 blink_jiffies; int cursor_flash; int cursor_reset; int blank_state; -- 2.1.4
next prev parent reply other threads:[~2015-01-30 9:39 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-30 8:40 [PATCH v5 0/2] fbcon: user-defined cursor blink interval Scot Doyle 2015-01-30 8:40 ` Scot Doyle 2015-01-30 8:43 ` [PATCH v5 1/2] fbcon: store cursor blink interval in fbcon_ops Scot Doyle 2015-01-30 8:43 ` Scot Doyle 2015-01-30 8:44 ` [PATCH v5 2/2] fbcon: expose cursor blink interval via sysfs Scot Doyle 2015-01-30 8:44 ` Scot Doyle 2015-01-30 9:35 ` [PATCH v6 0/2] fbcon: user-defined cursor blink interval Scot Doyle 2015-01-30 9:35 ` Scot Doyle 2015-01-30 9:37 ` Scot Doyle [this message] 2015-01-30 9:37 ` [PATCH v6 1/2] fbcon: store cursor blink interval in fbcon_ops Scot Doyle 2015-01-30 9:40 ` [PATCH v6 2/2] fbcon: expose cursor blink interval via sysfs Scot Doyle 2015-01-30 9:40 ` Scot Doyle 2015-02-20 12:04 ` Tomi Valkeinen 2015-02-20 12:04 ` 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.DEB.2.11.1501300936310.2359@localhost.localdomain \ --to=lkml14@scotdoyle.com \ --cc=geert@linux-m68k.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=plagnioj@jcrosoft.com \ --cc=richard.weinberger@gmail.com \ --cc=tomi.valkeinen@ti.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.