# \[PATCH\] fbcon: unconditionally initialize cursor blink interval

- Subsystems: CONSOLE SUBSYSTEM, FRAMEBUFFER LAYER, THE REST
- Maintainers: Greg Kroah-Hartman, Helge Deller, Linus Torvalds
- List: linux-fbdev
- 4 messages, 3 authors
- Page: https://ratatoskr.run/linux-fbdev/2015/08/4550413/t

## \[PATCH\] fbcon: unconditionally initialize cursor blink interval

- From: Scot Doyle \<hidden\>
- Date: 2015-08-04 12:33:37 
- Message: https://ratatoskr.run/linux-fbdev/2015/08/4550413.md

```text
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 <redacted>
Signed-off-by: Scot Doyle <redacted>
---
 drivers/video/console/fbcon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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
-- 
2.1.4

```

## Re: \[PATCH\] fbcon: unconditionally initialize cursor blink interval

- From: Pavel Machek \<hidden\>
- Date: 2015-08-04 20:32:54 
- Message: https://ratatoskr.run/linux-fbdev/2015/08/4550882.md

```text
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 <redacted>
> Signed-off-by: Scot Doyle <redacted>

Acked-by: Pavel Machek <redacted>

> 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

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
```

## Re: \[PATCH\] fbcon: unconditionally initialize cursor blink interval

- From: Scot Doyle \<hidden\>
- Date: 2015-08-10 14:06:00 
- Message: https://ratatoskr.run/linux-fbdev/2015/08/4554922.md

```text
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 <redacted>
> > Signed-off-by: Scot Doyle <redacted>
> 
> Acked-by: Pavel Machek <redacted>
> 

Tomi, this one should also go in 4.2 fixes.

```

## Re: \[PATCH\] fbcon: unconditionally initialize cursor blink interval

- From: Tomi Valkeinen \<hidden\>
- Date: 2015-08-10 14:22:01 
- Message: https://ratatoskr.run/linux-fbdev/2015/08/4554933.md

```text


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 <redacted>
>>> Signed-off-by: Scot Doyle <redacted>
>>
>> Acked-by: Pavel Machek <redacted>
>>
> 
> Tomi, this one should also go in 4.2 fixes.

Thanks, I've queued for 4.2 fixes.

 Tomi

```
