From patchwork Wed Jun 29 08:19:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 9204393 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A07E260757 for ; Wed, 29 Jun 2016 08:29:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90D7328635 for ; Wed, 29 Jun 2016 08:29:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8538B28648; Wed, 29 Jun 2016 08:29:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04BEF28635 for ; Wed, 29 Jun 2016 08:29:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751460AbcF2I3a (ORCPT ); Wed, 29 Jun 2016 04:29:30 -0400 Received: from ozlabs.ru ([83.169.36.222]:53121 "EHLO ozlabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbcF2I31 (ORCPT ); Wed, 29 Jun 2016 04:29:27 -0400 X-Greylist: delayed 598 seconds by postgrey-1.27 at vger.kernel.org; Wed, 29 Jun 2016 04:29:26 EDT Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 45597120586; Wed, 29 Jun 2016 10:19:21 +0200 (CEST) From: Alexey Kardashevskiy To: linux-fbdev@vger.kernel.org Cc: Alexey Kardashevskiy , Benjamin Herrenschmidt , Paul Mackerras , Greg Kroah-Hartman , Jean-Christophe Plagniol-Villard , Jean-Philippe Brucker , Jiri Slaby , Pavel Machek , Scot Doyle , Tomi Valkeinen Subject: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Date: Wed, 29 Jun 2016 18:19:12 +1000 Message-Id: <1467188352-5580-1-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 2.5.0.rc3 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is rather a bugreport than actual revert but nevertheless. Since 27a4c827c34a I started noticing weird traces and quite often I could not boot my test machine which is POWER8 box with AST video or ATI video (video adapter type does not matter much although is happens lot more often with the OpenPOWER machine which got AST). The system console is IPMI, not the actual video adapter. I bisected it to this: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=27a4c827c34ac4256a190cc9d24607f953c1c459 For some reason which I do not understand, in cursor_timer_handler(), ops->cur_blink_jiffies is zero. Why can this happen? What is a proper fix? Thanks. Tested-by: Alexey Kardashevskiy --- drivers/video/console/fbcon.c | 12 ++++++------ drivers/video/console/fbcon.h | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index afd3301..7e5b425 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 + ops->cur_blink_jiffies); + mod_timer(&ops->cursor_timer, jiffies + HZ/5); } 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 + ops->cur_blink_jiffies; + ops->cursor_timer.expires = jiffies + HZ / 5; ops->cursor_timer.data = (unsigned long ) info; add_timer(&ops->cursor_timer); ops->flags |= FBCON_FLAGS_CURSOR_TIMER; @@ -709,7 +709,7 @@ static int con2fb_acquire_newinfo(struct vc_data *vc, struct fb_info *info, } if (!err) { - ops->cur_blink_jiffies = HZ / 5; +// ops->cur_blink_jiffies = HZ / 5; info->fbcon_par = ops; if (vc) @@ -957,7 +957,7 @@ static const char *fbcon_startup(void) ops->currcon = -1; ops->graphics = 1; ops->cur_rotate = -1; - ops->cur_blink_jiffies = HZ / 5; +// ops->cur_blink_jiffies = HZ / 5; info->fbcon_par = ops; p->con_rotate = initial_rotation; set_blitting_type(vc, info); @@ -1095,7 +1095,7 @@ static void fbcon_init(struct vc_data *vc, int init) con_copy_unimap(vc, svc); ops = info->fbcon_par; - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); +// ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); p->con_rotate = initial_rotation; set_blitting_type(vc, info); @@ -1309,7 +1309,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode) int y; int c = scr_readw((u16 *) vc->vc_pos); - ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); +// ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms); if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) return; diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h index 7aaa4ea..6bd2e0c 100644 --- a/drivers/video/console/fbcon.h +++ b/drivers/video/console/fbcon.h @@ -70,7 +70,6 @@ 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;