From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Thu, 19 May 2016 09:01:39 +0000 Subject: Re: [PATCH] fbcon: use default if cursor blink interval is not valid Message-Id: <20160519090139.GA1539@amd> List-Id: References: <1463510464-28124-1-git-send-email-ddaney.cavm@gmail.com> <20160517204912.GA29719@amd> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Scot Doyle Cc: Jonathan Liu , Peter Hurley , David Daney , Jean-Philippe Brucker , Dann Frazier , Ming Lei , Jiri Slaby , Greg Kroah-Hartman , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, "Chintakuntla, Radha" , Tomi Valkeinen , stable@vger.kernel.org, ddaney.cavm@gmail.com, Alistair Popple , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org Hi! > Two current [1] and three previous [2] systems locked during boot > because the cursor flash timer was set using an ops->cur_blink_jiffies > value of 0. Previous patches attempted to solve the problem by moving > variable initialization earlier in the setup sequence [2]. > > Use the normal cursor blink default interval of 200 ms if > ops->cur_blink_jiffies is not in the range specified in commit > bd63364caa8d. Since invalid values are not used, specific system > initialization timings should not cause lockups. > > [1] https://bugs.launchpad.net/bugs/1574814 > [2] see commits: 2a17d7e80f1d, f235f664a8af, a1e533ec07d5 Acked-by: Pavel Machek > static void cursor_timer_handler(unsigned long dev_addr) > { > struct fb_info *info = (struct fb_info *) 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 + > + cursor_blink_jiffies(ops->cur_blink_jiffies)); > } > > static void fbcon_add_cursor_timer(struct fb_info *info) And actually... perhaps mod_timer should have some check for too low timeouts..? WARN_ON? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html