All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
@ 2016-06-29  8:19 Alexey Kardashevskiy
  2016-06-29  8:31 ` Benjamin Herrenschmidt
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alexey Kardashevskiy @ 2016-06-29  8:19 UTC (permalink / raw)
  To: linux-fbdev


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'a4c827c34ac4256a190cc9d24607f953c1c459

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.


---
 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;
-- 
2.5.0.rc3


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
  2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
@ 2016-06-29  8:31 ` Benjamin Herrenschmidt
  2016-06-29  8:31 ` Benjamin Herrenschmidt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2016-06-29  8:31 UTC (permalink / raw)
  To: linux-fbdev

On Wed, 2016-06-29 at 18:29 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2016-06-29 at 18:19 +1000, Alexey Kardashevskiy wrote:
> > 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/com
> > mi
> > t/?id'a4c827c34ac4256a190cc9d24607f953c1c459
> > 
> > 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.
> 
> Rings a bell... do you have fbcon: initialize blink interval before
> calling fb_set_par (f235f664a8afabccf863a5dee4777d2d7b676fda) ?

Also check if you have:

> Cheers,
> Ben.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
  2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
  2016-06-29  8:31 ` Benjamin Herrenschmidt
@ 2016-06-29  8:31 ` Benjamin Herrenschmidt
  2016-06-29 12:00 ` Alexey Kardashevskiy
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2016-06-29  8:31 UTC (permalink / raw)
  To: linux-fbdev

On Wed, 2016-06-29 at 18:29 +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2016-06-29 at 18:19 +1000, Alexey Kardashevskiy wrote:
> > 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/com
> > mi
> > t/?id'a4c827c34ac4256a190cc9d24607f953c1c459
> > 
> > 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.
> 
> Rings a bell... do you have fbcon: initialize blink interval before
> calling fb_set_par (f235f664a8afabccf863a5dee4777d2d7b676fda) ?

Also check if you have:

"fbcon: set a default value to blink interval"
(upstream ID a1e533ec07d583d01349ef13c0c965b8633e1b91).

> Cheers,
> Ben.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
  2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
  2016-06-29  8:31 ` Benjamin Herrenschmidt
  2016-06-29  8:31 ` Benjamin Herrenschmidt
@ 2016-06-29 12:00 ` Alexey Kardashevskiy
  2016-06-29 13:55 ` Scot Doyle
  2016-06-30  1:55 ` Alexey Kardashevskiy
  4 siblings, 0 replies; 6+ messages in thread
From: Alexey Kardashevskiy @ 2016-06-29 12:00 UTC (permalink / raw)
  To: linux-fbdev

On 29/06/16 18:31, Benjamin Herrenschmidt wrote:
> On Wed, 2016-06-29 at 18:29 +1000, Benjamin Herrenschmidt wrote:
>> On Wed, 2016-06-29 at 18:19 +1000, Alexey Kardashevskiy wrote:
>>> 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/com
>>> mi
>>> t/?id'a4c827c34ac4256a190cc9d24607f953c1c459
>>>
>>> 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.
>>
>> Rings a bell... do you have fbcon: initialize blink interval before
>> calling fb_set_par (f235f664a8afabccf863a5dee4777d2d7b676fda) ?
> 
> Also check if you have:
> 
> "fbcon: set a default value to blink interval"
> (upstream ID a1e533ec07d583d01349ef13c0c965b8633e1b91).


Yes, both. The problem I see appears from v4.4 till the very recent
upstream kernel which I am debugging now and which is v4.7-rc5.


-- 
Alexey

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
  2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
                   ` (2 preceding siblings ...)
  2016-06-29 12:00 ` Alexey Kardashevskiy
@ 2016-06-29 13:55 ` Scot Doyle
  2016-06-30  1:55 ` Alexey Kardashevskiy
  4 siblings, 0 replies; 6+ messages in thread
From: Scot Doyle @ 2016-06-29 13:55 UTC (permalink / raw)
  To: linux-fbdev

On Wed, 29 Jun 2016, Alexey Kardashevskiy wrote:
> On 29/06/16 18:31, Benjamin Herrenschmidt wrote:
> > On Wed, 2016-06-29 at 18:29 +1000, Benjamin Herrenschmidt wrote:
> >> On Wed, 2016-06-29 at 18:19 +1000, Alexey Kardashevskiy wrote:
> >>> 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/com
> >>> mi
> >>> t/?id'a4c827c34ac4256a190cc9d24607f953c1c459
> >>>
> >>> 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.
> >>
> >> Rings a bell... do you have fbcon: initialize blink interval before
> >> calling fb_set_par (f235f664a8afabccf863a5dee4777d2d7b676fda) ?
> > 
> > Also check if you have:
> > 
> > "fbcon: set a default value to blink interval"
> > (upstream ID a1e533ec07d583d01349ef13c0c965b8633e1b91).
> 
> 
> Yes, both. The problem I see appears from v4.4 till the very recent
> upstream kernel which I am debugging now and which is v4.7-rc5.

Hi Alexey,

Have you tried commit 1b45996d2ebf "tty: vt: Fix soft lockup in 
fbcon cursor blink timer." from the tty-linus branch of Greg's tty tree?

Or if that doesn't work, then perhaps
"fbcon: warn on invalid cursor blink intervals" from 
http://thread.gmane.org/gmane.linux.kernel.stable/178675/focus"26587 ?

Thanks,
Scot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt"
  2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
                   ` (3 preceding siblings ...)
  2016-06-29 13:55 ` Scot Doyle
@ 2016-06-30  1:55 ` Alexey Kardashevskiy
  4 siblings, 0 replies; 6+ messages in thread
From: Alexey Kardashevskiy @ 2016-06-30  1:55 UTC (permalink / raw)
  To: linux-fbdev

On 29/06/16 23:55, Scot Doyle wrote:
> On Wed, 29 Jun 2016, Alexey Kardashevskiy wrote:
>> On 29/06/16 18:31, Benjamin Herrenschmidt wrote:
>>> On Wed, 2016-06-29 at 18:29 +1000, Benjamin Herrenschmidt wrote:
>>>> On Wed, 2016-06-29 at 18:19 +1000, Alexey Kardashevskiy wrote:
>>>>> 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/com
>>>>> mi
>>>>> t/?id'a4c827c34ac4256a190cc9d24607f953c1c459
>>>>>
>>>>> 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.
>>>>
>>>> Rings a bell... do you have fbcon: initialize blink interval before
>>>> calling fb_set_par (f235f664a8afabccf863a5dee4777d2d7b676fda) ?
>>>
>>> Also check if you have:
>>>
>>> "fbcon: set a default value to blink interval"
>>> (upstream ID a1e533ec07d583d01349ef13c0c965b8633e1b91).
>>
>>
>> Yes, both. The problem I see appears from v4.4 till the very recent
>> upstream kernel which I am debugging now and which is v4.7-rc5.
> 
> Hi Alexey,
> 
> Have you tried commit 1b45996d2ebf "tty: vt: Fix soft lockup in 
> fbcon cursor blink timer." from the tty-linus branch of Greg's tty tree?


This one does fix the problem, thanks! I'll run my reboot test for little
longer and update if it fails.


Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>

> 
> Or if that doesn't work, then perhaps
> "fbcon: warn on invalid cursor blink intervals" from 
> http://thread.gmane.org/gmane.linux.kernel.stable/178675/focus"26587 ?



-- 
Alexey

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-30  1:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29  8:19 [RFC PATCH kernel] Revert "fbcon: use the cursor blink interval provided by vt" Alexey Kardashevskiy
2016-06-29  8:31 ` Benjamin Herrenschmidt
2016-06-29  8:31 ` Benjamin Herrenschmidt
2016-06-29 12:00 ` Alexey Kardashevskiy
2016-06-29 13:55 ` Scot Doyle
2016-06-30  1:55 ` Alexey Kardashevskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.