diff mbox

fbcon: unconditionally initialize cursor blink interval

Message ID alpine.DEB.2.11.1508041215100.1151@local (mailing list archive)
State New, archived
Headers show

Commit Message

Scot Doyle Aug. 4, 2015, 12:33 p.m. UTC
A sun7i-a20-olinuxino-micro fails to boot when kernel parameter
vt.global_cursor_default=0. The value is copied to vc->vc_deccm
causing the initialization of ops->cur_blink_jiffies to be skipped.
Unconditionally initialize it.

Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
---
 drivers/video/console/fbcon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Pavel Machek Aug. 4, 2015, 8:32 p.m. UTC | #1
On Tue 2015-08-04 12:33:32, Scot Doyle wrote:
> A sun7i-a20-olinuxino-micro fails to boot when kernel parameter
> vt.global_cursor_default=0. The value is copied to vc->vc_deccm
> causing the initialization of ops->cur_blink_jiffies to be skipped.
> Unconditionally initialize it.
> 
> Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

> index 658c34b..1aaf893 100644
> --- a/drivers/video/console/fbcon.c
> +++ b/drivers/video/console/fbcon.c
> @@ -1306,10 +1306,11 @@ 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);
> +
>  	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
>  		return;
>  
> -	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
>  	if (vc->vc_cursor_type & 0x10)
>  		fbcon_del_cursor_timer(info);
>  	else
Scot Doyle Aug. 10, 2015, 2:05 p.m. UTC | #2
On Tue, 4 Aug 2015, Pavel Machek wrote:
> On Tue 2015-08-04 12:33:32, Scot Doyle wrote:
> > A sun7i-a20-olinuxino-micro fails to boot when kernel parameter
> > vt.global_cursor_default=0. The value is copied to vc->vc_deccm
> > causing the initialization of ops->cur_blink_jiffies to be skipped.
> > Unconditionally initialize it.
> > 
> > Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
> > Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
> 
> Acked-by: Pavel Machek <pavel@ucw.cz>
> 

Tomi, this one should also go in 4.2 fixes.

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomi Valkeinen Aug. 10, 2015, 2:21 p.m. UTC | #3
On 10/08/15 17:05, Scot Doyle wrote:
> On Tue, 4 Aug 2015, Pavel Machek wrote:
>> On Tue 2015-08-04 12:33:32, Scot Doyle wrote:
>>> A sun7i-a20-olinuxino-micro fails to boot when kernel parameter
>>> vt.global_cursor_default=0. The value is copied to vc->vc_deccm
>>> causing the initialization of ops->cur_blink_jiffies to be skipped.
>>> Unconditionally initialize it.
>>>
>>> Reported-and-tested-by: Jonathan Liu <net147@gmail.com>
>>> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
>>
>> Acked-by: Pavel Machek <pavel@ucw.cz>
>>
> 
> Tomi, this one should also go in 4.2 fixes.

Thanks, I've queued for 4.2 fixes.

 Tomi
diff mbox

Patch

diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 658c34b..1aaf893 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -1306,10 +1306,11 @@  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);
+
 	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
 		return;
 
-	ops->cur_blink_jiffies = msecs_to_jiffies(vc->vc_cur_blink_ms);
 	if (vc->vc_cursor_type & 0x10)
 		fbcon_del_cursor_timer(info);
 	else