From patchwork Sat Jan 24 17:38:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scot Doyle X-Patchwork-Id: 5699951 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8A11FC058D for ; Sat, 24 Jan 2015 17:40:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B62EE202E5 for ; Sat, 24 Jan 2015 17:40:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C349020254 for ; Sat, 24 Jan 2015 17:40:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753454AbbAXRkw (ORCPT ); Sat, 24 Jan 2015 12:40:52 -0500 Received: from mx1.scotdoyle.com ([23.226.141.211]:36910 "EHLO mx1.scotdoyle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753169AbbAXRkv (ORCPT ); Sat, 24 Jan 2015 12:40:51 -0500 Received: by mx1.scotdoyle.com (Postfix) id D36A737009D7; Sat, 24 Jan 2015 17:40:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mx1.scotdoyle.com (Postfix) with ESMTP id 2E742370097E; Sat, 24 Jan 2015 17:40:39 +0000 (UTC) Date: Sat, 24 Jan 2015 17:38:54 +0000 (UTC) From: Scot Doyle To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen cc: Geert Uytterhoeven , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] fbcon: store cursor blink interval in fbcon_ops In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The fbcon cursor, when set to blink, is hardcoded to toggle display state five times per second. Move this setting to a the driver's fbdev_ops structure, retaining the default blink interval. Signed-off-by: Scot Doyle --- 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;