Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: Linux 3.10-rc7
       [not found]   ` <CA+55aFxuB_nx8fZ_kN8U=fMFOq43cKZC_HJbj=6vKo7-fDqNuw@mail.gmail.com>
@ 2013-06-25 19:37     ` Daniel Vetter
  2013-06-25 19:54       ` Jesse Barnes
  0 siblings, 1 reply; 13+ messages in thread
From: Daniel Vetter @ 2013-06-25 19:37 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Shuah Khan, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie

On Tue, Jun 25, 2013 at 9:05 PM, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> Adding the appropriate cc'd.. I'm not seeing why this would start
> happening now, but there's been a number of commits that touch the
> intel crtc 'active' state and hotplug logic, so I'm assuming one of
> them is to blame.. Lots of small changes around
> ironlake_crtc_mode_set() etc.
>
> This warning seems to imply that the pll activity count is buggered.
> Anybody? Chris/Daniel/Dave?

Hm, looks like a new one. On a quick guess it's an ugly interaction
between the new state restore code we've added for vt-switchless
resume in 3.10 and the lack of proper pch pll refcount reconstruction
when taking over foreign state. I'm thinking of
1) hibernate to disk with every crtc switched off
2) after power cycle boot into the loader kernel with crtc enables
3) restore the hibernated kernel image
4) restored kernel reads out current hw state and restores the old
state by disabling everything
5) we hit the WARN(!pll->active) and also the follow-up assert since
the hw pch pll is indeed on (it's driving the crtc we're disabling
after all), but our state reconstruction failed to track this
properly.

Dunno on a quick guess what to do this late in the -rc to duct-tape
this WARN away, since we should at least try to shut down the pch pll
(which we currently won't do). For 3.11 I've completely revamped the
pch pll code with massively increased paranoia and much better
tracking of the hw state. It's not all merged yet (some will probably
miss 3.11), but the refcounting part is all in -next.

So I think the first step would be to test latest linux-next (or the
drm-intel-nightly branch from
http://cgit.freedesktop.org/~danvet/drm-intel/ if you just want the
drm parts on top of a recent -rc). Also it'd be good to corrobate my
guess of what's going on with a dmesg with drm debugging enabled
(drm.debug=0xe).

Adding more lists to cc + Jesse since he's the guilty one for the
vt-switchless state restore stuff.

Cheers, Daniel


>                   Linus
>
> On Tue, Jun 25, 2013 at 5:28 AM, Shuah Khan <shuah.kh@samsung.com> wrote:
>>
>> I started seeing this message during suspend to disk in reboot mode test
>> back 3.10-rc6 and 3.10-rc7 has the same problem. I haven't started
>> debugging yet. Looking to see if this is a known issue. I don't see this
>> problem on 3.9.7.
>>
>> [ 2097.548150] WARNING: at drivers/gpu/drm/i915/intel_display.c:1656
>> ironlake_crtc_disable+0x865/0x890 [i915]()
>> [ 2097.548177] Modules linked in: rfcomm bnep parport_pc ppdev arc4
>> iwldvm mac80211 ext2 i915 joydev coretemp kvm_intel snd_hda_codec_hdmi
>> iwlwifi snd_hda_codec_realtek kvm snd_hda_intel snd_hda_codec cfg80211
>> snd_hwdep snd_pcm drm_kms_helper btusb snd_seq_midi bluetooth drm
>> snd_rawmidi uvcvideo snd_seq_midi_event ghash_clmulni_intel snd_seq
>> aesni_intel ablk_helper videobuf2_core cryptd tpm_infineon videodev
>> snd_timer lrw gf128mul snd_seq_device glue_helper psmouse snd aes_x86_64
>> media samsung_laptop videobuf2_vmalloc microcode videobuf2_memops
>> serio_raw soundcore tpm_tis snd_page_alloc i2c_algo_bit lpc_ich wmi
>> video mac_hid lp parport hid_generic usbhid hid r8169
>> [ 2097.548180] CPU: 3 PID: 2736 Comm: kworker/u16:0 Not tainted
>> 3.10.0-rc7+ #2
>> [ 2097.548181] Hardware name: SAMSUNG ELECTRONICS CO., LTD.
>> 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012
>> [ 2097.548186] Workqueue: events_unbound async_run_entry_fn
>> [ 2097.548189]  0000000000000009 ffff8803f05a5a58 ffffffff81690b04
>> ffff8803f05a5a98
>> [ 2097.548190]  ffffffff81043880 ffff88040a978000 ffff8803f074e000
>> ffff88040a978000
>> [ 2097.548192]  ffff88040a97a688 00000000000e0300 ffff88040af6e000
>> ffff8803f05a5aa8
>> [ 2097.548192] Call Trace:
>> [ 2097.548197]  [<ffffffff81690b04>] dump_stack+0x19/0x1b
>> [ 2097.548201]  [<ffffffff81043880>] warn_slowpath_common+0x70/0xa0
>> [ 2097.548203]  [<ffffffff810438ca>] warn_slowpath_null+0x1a/0x20
>> [ 2097.548214]  [<ffffffffa0428f35>] ironlake_crtc_disable+0x865/0x890
>> [i915]
>> [ 2097.548223]  [<ffffffffa042a408>] __intel_set_mode+0x458/0xd00 [i915]
>> [ 2097.548232]  [<ffffffffa04345d9>]
>> intel_modeset_setup_hw_state+0x679/0xa60 [i915]
>> [ 2097.548236]  [<ffffffff8169404d>] ? mutex_lock+0x1d/0x50
>> [ 2097.548242]  [<ffffffffa03ff277>] __i915_drm_thaw+0x137/0x1d0 [i915]
>> [ 2097.548249]  [<ffffffffa03ff5cb>] i915_resume+0x7b/0xd0 [i915]
>> [ 2097.548255]  [<ffffffffa03ff636>] i915_pm_resume+0x16/0x20 [i915]
>> [ 2097.548258]  [<ffffffff81355463>] pci_pm_restore+0x73/0xd0
>> [ 2097.548259]  [<ffffffff813553f0>] ? pci_pm_default_resume+0x50/0x50
>> [ 2097.548261]  [<ffffffff813553f0>] ? pci_pm_default_resume+0x50/0x50
>> [ 2097.548264]  [<ffffffff81424f9b>] dpm_run_callback.isra.3+0x3b/0x70
>> [ 2097.548265]  [<ffffffff81425824>] device_resume+0xd4/0x1b0
>> [ 2097.548267]  [<ffffffff81425921>] async_resume+0x21/0x50
>> [ 2097.548269]  [<ffffffff8107001b>] async_run_entry_fn+0x3b/0x140
>> [ 2097.548272]  [<ffffffff810626ae>] process_one_work+0x16e/0x3f0
>> [ 2097.548274]  [<ffffffff81062dc2>] worker_thread+0x122/0x370
>> [ 2097.548276]  [<ffffffff81062ca0>] ? rescuer_thread+0x330/0x330
>> [ 2097.548277]  [<ffffffff810695e0>] kthread+0xc0/0xd0
>> [ 2097.548279]  [<ffffffff81069520>] ? kthread_create_on_node+0x130/0x130
>> [ 2097.548281]  [<ffffffff8169f81c>] ret_from_fork+0x7c/0xb0
>> [ 2097.548283]  [<ffffffff81069520>] ? kthread_create_on_node+0x130/0x130
>> [ 2097.548284] ---[ end trace 989c661118e428a8 ]---
>>
>> [ 2097.548295] WARNING: at drivers/gpu/drm/i915/intel_display.c:1091
>> assert_pch_pll+0x18f/0x1f0 [i915]()
>> [ 2097.548296] PCH PLL state for reg c6014 assertion failure (expected
>> off, current on), val=89086008
>> [ 2097.548315] Modules linked in: rfcomm bnep parport_pc ppdev arc4
>> iwldvm mac80211 ext2 i915 joydev coretemp kvm_intel snd_hda_codec_hdmi
>> iwlwifi snd_hda_codec_realtek kvm snd_hda_intel snd_hda_codec cfg80211
>> snd_hwdep snd_pcm drm_kms_helper btusb snd_seq_midi bluetooth drm
>> snd_rawmidi uvcvideo snd_seq_midi_event ghash_clmulni_intel snd_seq
>> aesni_intel ablk_helper videobuf2_core cryptd tpm_infineon videodev
>> snd_timer lrw gf128mul snd_seq_device glue_helper psmouse snd aes_x86_64
>> media samsung_laptop videobuf2_vmalloc microcode videobuf2_memops
>> serio_raw soundcore tpm_tis snd_page_alloc i2c_algo_bit lpc_ich wmi
>> video mac_hid lp parport hid_generic usbhid hid r8169
>> [ 2097.548317] CPU: 3 PID: 2736 Comm: kworker/u16:0 Tainted: G        W
>>     3.10.0-rc7+ #2
>> [ 2097.548318] Hardware name: SAMSUNG ELECTRONICS CO., LTD.
>> 900X3C/900X3D/900X4C/900X4D/SAMSUNG_NP1234567890, BIOS P03AAC 07/12/2012
>> [ 2097.548321] Workqueue: events_unbound async_run_entry_fn
>> [ 2097.548323]  0000000000000009 ffff8803f05a59b8 ffffffff81690b04
>> ffff8803f05a59f8
>> [ 2097.548324]  ffffffff81043880 0000000000000009 ffff88040a978000
>> ffff88040a97a688
>> [ 2097.548325]  0000000000000000 0000000000000000 0000000089086008
>> ffff8803f05a5a58
>> [ 2097.548326] Call Trace:
>> [ 2097.548328]  [<ffffffff81690b04>] dump_stack+0x19/0x1b
>> [ 2097.548330]  [<ffffffff81043880>] warn_slowpath_common+0x70/0xa0
>> [ 2097.548332]  [<ffffffff81043966>] warn_slowpath_fmt+0x46/0x50
>> [ 2097.548360]  [<ffffffffa042436f>] assert_pch_pll+0x18f/0x1f0 [i915]
>> [ 2097.548382]  [<ffffffffa0428c79>] ironlake_crtc_disable+0x5a9/0x890
>> [i915]
>> [ 2097.548404]  [<ffffffffa042a408>] __intel_set_mode+0x458/0xd00 [i915]
>> [ 2097.548429]  [<ffffffffa04345d9>]
>> intel_modeset_setup_hw_state+0x679/0xa60 [i915]
>> [ 2097.548438]  [<ffffffff8169404d>] ? mutex_lock+0x1d/0x50
>> [ 2097.548454]  [<ffffffffa03ff277>] __i915_drm_thaw+0x137/0x1d0 [i915]
>> [ 2097.548472]  [<ffffffffa03ff5cb>] i915_resume+0x7b/0xd0 [i915]
>> [ 2097.548490]  [<ffffffffa03ff636>] i915_pm_resume+0x16/0x20 [i915]
>> [ 2097.548496]  [<ffffffff81355463>] pci_pm_restore+0x73/0xd0
>> [ 2097.548500]  [<ffffffff813553f0>] ? pci_pm_default_resume+0x50/0x50
>> [ 2097.548504]  [<ffffffff813553f0>] ? pci_pm_default_resume+0x50/0x50
>> [ 2097.548509]  [<ffffffff81424f9b>] dpm_run_callback.isra.3+0x3b/0x70
>> [ 2097.548513]  [<ffffffff81425824>] device_resume+0xd4/0x1b0
>> [ 2097.548517]  [<ffffffff81425921>] async_resume+0x21/0x50
>> [ 2097.548524]  [<ffffffff8107001b>] async_run_entry_fn+0x3b/0x140
>> [ 2097.548529]  [<ffffffff810626ae>] process_one_work+0x16e/0x3f0
>> [ 2097.548534]  [<ffffffff81062dc2>] worker_thread+0x122/0x370
>> [ 2097.548540]  [<ffffffff81062ca0>] ? rescuer_thread+0x330/0x330
>> [ 2097.548544]  [<ffffffff810695e0>] kthread+0xc0/0xd0
>> [ 2097.548549]  [<ffffffff81069520>] ? kthread_create_on_node+0x130/0x130
>> [ 2097.548553]  [<ffffffff8169f81c>] ret_from_fork+0x7c/0xb0
>> [ 2097.548558]  [<ffffffff81069520>] ? kthread_create_on_node+0x130/0x130
>> [ 2097.548560] ---[ end trace 989c661118e428a9 ]---
>>
>> -- Shuah
>>
>> Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research
>> America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658



--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

* Re: Linux 3.10-rc7
  2013-06-25 19:37     ` Linux 3.10-rc7 Daniel Vetter
@ 2013-06-25 19:54       ` Jesse Barnes
  2013-06-25 19:59         ` Shuah Khan
  0 siblings, 1 reply; 13+ messages in thread
From: Jesse Barnes @ 2013-06-25 19:54 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: Linus Torvalds, Shuah Khan, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx

On Tue, 25 Jun 2013 21:37:37 +0200
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:

> On Tue, Jun 25, 2013 at 9:05 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> > Adding the appropriate cc'd.. I'm not seeing why this would start
> > happening now, but there's been a number of commits that touch the
> > intel crtc 'active' state and hotplug logic, so I'm assuming one of
> > them is to blame.. Lots of small changes around
> > ironlake_crtc_mode_set() etc.
> >
> > This warning seems to imply that the pll activity count is buggered.
> > Anybody? Chris/Daniel/Dave?
> 
> Hm, looks like a new one. On a quick guess it's an ugly interaction
> between the new state restore code we've added for vt-switchless
> resume in 3.10 and the lack of proper pch pll refcount reconstruction
> when taking over foreign state. I'm thinking of
> 1) hibernate to disk with every crtc switched off
> 2) after power cycle boot into the loader kernel with crtc enables
> 3) restore the hibernated kernel image
> 4) restored kernel reads out current hw state and restores the old
> state by disabling everything
> 5) we hit the WARN(!pll->active) and also the follow-up assert since
> the hw pch pll is indeed on (it's driving the crtc we're disabling
> after all), but our state reconstruction failed to track this
> properly.
> 
> Dunno on a quick guess what to do this late in the -rc to duct-tape
> this WARN away, since we should at least try to shut down the pch pll
> (which we currently won't do). For 3.11 I've completely revamped the
> pch pll code with massively increased paranoia and much better
> tracking of the hw state. It's not all merged yet (some will probably
> miss 3.11), but the refcounting part is all in -next.
> 
> So I think the first step would be to test latest linux-next (or the
> drm-intel-nightly branch from
> http://cgit.freedesktop.org/~danvet/drm-intel/ if you just want the
> drm parts on top of a recent -rc). Also it'd be good to corrobate my
> guess of what's going on with a dmesg with drm debugging enabled
> (drm.debug=0xe).
> 
> Adding more lists to cc + Jesse since he's the guilty one for the
> vt-switchless state restore stuff.

Yeah, looks like we don't fetch the PLL state on resume from hibernate,
leading to this warning.  The refcount is nonzero, indicating the pll
is in use, but the active field is clear, which means we're missing an
update somewhere.

Shuah, just to confirm, does your resume actually work ok aside from
the warning?  I *think* it's harmless in this case, but does indicate a
real bug in our state tracking... trying to come up with a patch now.

Thanks,
-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: Linux 3.10-rc7
  2013-06-25 19:54       ` Jesse Barnes
@ 2013-06-25 19:59         ` Shuah Khan
  2013-06-25 20:08           ` Jesse Barnes
  0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2013-06-25 19:59 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Daniel Vetter, Linus Torvalds, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx, Shuah Khan

On 06/25/2013 01:52 PM, Jesse Barnes wrote:
> On Tue, 25 Jun 2013 21:37:37 +0200
> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>

>>
>> Adding more lists to cc + Jesse since he's the guilty one for the
>> vt-switchless state restore stuff.
>
> Yeah, looks like we don't fetch the PLL state on resume from hibernate,
> leading to this warning.  The refcount is nonzero, indicating the pll
> is in use, but the active field is clear, which means we're missing an
> update somewhere.
>
> Shuah, just to confirm, does your resume actually work ok aside from
> the warning?  I *think* it's harmless in this case, but does indicate a
> real bug in our state tracking... trying to come up with a patch now.
>
> Thanks,
>

Resume works just fine. I see it take longer for it to suspend compared 
to 3.9.7 and then resumes just fine. Suspend taking longer very well 
could be because of this warn_on. Other than this warn_on I haven't 
noticed any other problems.

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

* Re: Linux 3.10-rc7
  2013-06-25 19:59         ` Shuah Khan
@ 2013-06-25 20:08           ` Jesse Barnes
  2013-06-25 20:51             ` Shuah Khan
  0 siblings, 1 reply; 13+ messages in thread
From: Jesse Barnes @ 2013-06-25 20:08 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Daniel Vetter, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie, Linus Torvalds

On Tue, 25 Jun 2013 19:59:28 +0000
Shuah Khan <shuah.kh@samsung.com> wrote:

> On 06/25/2013 01:52 PM, Jesse Barnes wrote:
> > On Tue, 25 Jun 2013 21:37:37 +0200
> > Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >
> 
> >>
> >> Adding more lists to cc + Jesse since he's the guilty one for the
> >> vt-switchless state restore stuff.
> >
> > Yeah, looks like we don't fetch the PLL state on resume from hibernate,
> > leading to this warning.  The refcount is nonzero, indicating the pll
> > is in use, but the active field is clear, which means we're missing an
> > update somewhere.
> >
> > Shuah, just to confirm, does your resume actually work ok aside from
> > the warning?  I *think* it's harmless in this case, but does indicate a
> > real bug in our state tracking... trying to come up with a patch now.
> >
> > Thanks,
> >
> 
> Resume works just fine. I see it take longer for it to suspend compared 
> to 3.9.7 and then resumes just fine. Suspend taking longer very well 
> could be because of this warn_on. Other than this warn_on I haven't 
> noticed any other problems.

Here's the patch I'm testing now, can you give it a try?

-- 
Jesse Barnes, Intel Open Source Technology Center

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 56746dc..df0caf0 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9289,6 +9289,49 @@ void i915_redisable_vga(struct drm_device *dev)
 	}
 }
 
+static void ironlake_crtc_pll_get(struct intel_crtc *crtc)
+{
+	struct drm_device *dev = crtc->base.dev;
+	struct drm_i915_private *dev_priv = dev->dev_private;
+	u32 dpll_sel;
+
+	if (HAS_PCH_IBX(dev_priv->dev))
+		crtc->pch_pll = &dev_priv->pch_plls[crtc->pipe];
+
+	if (HAS_PCH_CPT(dev_priv->dev)) {
+		dpll_sel = I915_READ(PCH_DPLL_SEL);
+
+		switch (crtc->pipe) {
+		case PIPE_A:
+			if ((dpll_sel & TRANSA_DPLL_ENABLE) &&
+			    (dpll_sel & TRANSA_DPLLB_SEL))
+				crtc->pch_pll = &dev_priv->pch_plls[1];
+			else if (dpll_sel & TRANSA_DPLL_ENABLE)
+				crtc->pch_pll = &dev_priv->pch_plls[0];
+			break;
+		case PIPE_B:
+			if ((dpll_sel & TRANSB_DPLL_ENABLE) &&
+			    (dpll_sel & TRANSB_DPLLB_SEL))
+				crtc->pch_pll = &dev_priv->pch_plls[1];
+			else if (dpll_sel & TRANSB_DPLL_ENABLE)
+				crtc->pch_pll = &dev_priv->pch_plls[0];
+			break;
+		case PIPE_C:
+			if ((dpll_sel & TRANSC_DPLL_ENABLE) &&
+			    (dpll_sel & TRANSC_DPLLB_SEL))
+				crtc->pch_pll = &dev_priv->pch_plls[1];
+			else if (dpll_sel & TRANSC_DPLL_ENABLE)
+				crtc->pch_pll = &dev_priv->pch_plls[0];
+			break;
+		default:
+			BUG();
+		}
+	}
+
+	crtc->pch_pll->refcount++;
+	crtc->pch_pll->active = 1;
+}
+
 /* Scan out the current hw modeset state, sanitizes it and maps it into the drm
  * and i915 state tracking structures. */
 void intel_modeset_setup_hw_state(struct drm_device *dev,
@@ -9346,6 +9389,9 @@ setup_pipes:
 
 		crtc->base.enabled = crtc->active;
 
+		if (crtc->active && HAS_PCH_SPLIT(dev))
+			ironlake_crtc_pll_get(crtc);
+
 		DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n",
 			      crtc->base.base.id,
 			      crtc->active ? "enabled" : "disabled");

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

* Re: Linux 3.10-rc7
  2013-06-25 20:08           ` Jesse Barnes
@ 2013-06-25 20:51             ` Shuah Khan
  2013-06-25 20:54               ` Tomas Winkler
                                 ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Shuah Khan @ 2013-06-25 20:51 UTC (permalink / raw)
  To: Jesse Barnes
  Cc: Daniel Vetter, Linus Torvalds, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx, Shuah Khan

On 06/25/2013 02:06 PM, Jesse Barnes wrote:
> On Tue, 25 Jun 2013 19:59:28 +0000
> Shuah Khan <shuah.kh@samsung.com> wrote:
>
>> On 06/25/2013 01:52 PM, Jesse Barnes wrote:
>>> On Tue, 25 Jun 2013 21:37:37 +0200
>>> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>>>
>>
>>>>
>>>> Adding more lists to cc + Jesse since he's the guilty one for the
>>>> vt-switchless state restore stuff.
>>>
>>> Yeah, looks like we don't fetch the PLL state on resume from hibernate,
>>> leading to this warning.  The refcount is nonzero, indicating the pll
>>> is in use, but the active field is clear, which means we're missing an
>>> update somewhere.
>>>
>>> Shuah, just to confirm, does your resume actually work ok aside from
>>> the warning?  I *think* it's harmless in this case, but does indicate a
>>> real bug in our state tracking... trying to come up with a patch now.
>>>
>>> Thanks,
>>>
>>
>> Resume works just fine. I see it take longer for it to suspend compared
>> to 3.9.7 and then resumes just fine. Suspend taking longer very well
>> could be because of this warn_on. Other than this warn_on I haven't
>> noticed any other problems.
>
> Here's the patch I'm testing now, can you give it a try?
>

Jesse,

With this patch warn_on went away. Resume worked. I started seeing:

[   78.733062] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
[   78.733079] mei_me 0000:00:16.0: reset: wrong host start response
[   78.733082] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING

over and over again after resume from reboot mode suspend. dmesg filled 
up with these messages.

I did suspend to disk shutdown mode right away. Resume worked, no 
warn_ons, and no mei_me messages.

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

* Re: Linux 3.10-rc7
  2013-06-25 20:51             ` Shuah Khan
@ 2013-06-25 20:54               ` Tomas Winkler
  2013-06-25 20:57               ` Tomas Winkler
  2013-06-25 21:09               ` Jesse Barnes
  2 siblings, 0 replies; 13+ messages in thread
From: Tomas Winkler @ 2013-06-25 20:54 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Daniel Vetter, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie, Linus Torvalds


[-- Attachment #1.1: Type: text/plain, Size: 1823 bytes --]

On Tue, Jun 25, 2013 at 11:51 PM, Shuah Khan <shuah.kh@samsung.com> wrote:

> On 06/25/2013 02:06 PM, Jesse Barnes wrote:
> > On Tue, 25 Jun 2013 19:59:28 +0000
> > Shuah Khan <shuah.kh@samsung.com> wrote:
> >
> >> On 06/25/2013 01:52 PM, Jesse Barnes wrote:
> >>> On Tue, 25 Jun 2013 21:37:37 +0200
> >>> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >>>
> >>
> >>>>
> >>>> Adding more lists to cc + Jesse since he's the guilty one for the
> >>>> vt-switchless state restore stuff.
> >>>
> >>> Yeah, looks like we don't fetch the PLL state on resume from hibernate,
> >>> leading to this warning.  The refcount is nonzero, indicating the pll
> >>> is in use, but the active field is clear, which means we're missing an
> >>> update somewhere.
> >>>
> >>> Shuah, just to confirm, does your resume actually work ok aside from
> >>> the warning?  I *think* it's harmless in this case, but does indicate a
> >>> real bug in our state tracking... trying to come up with a patch now.
> >>>
> >>> Thanks,
> >>>
> >>
> >> Resume works just fine. I see it take longer for it to suspend compared
> >> to 3.9.7 and then resumes just fine. Suspend taking longer very well
> >> could be because of this warn_on. Other than this warn_on I haven't
> >> noticed any other problems.
> >
> > Here's the patch I'm testing now, can you give it a try?
> >
>
> Jesse,
>
> With this patch warn_on went away. Resume worked. I started seeing:
>
> [   78.733062] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
> [   78.733079] mei_me 0000:00:16.0: reset: wrong host start response
> [   78.733082] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
>
> over and over again after resume from reboot mode suspend. dmesg filled
> up with these messages.
>

Can you please send me the log part when this starts?

Thanks
Tomas

[-- Attachment #1.2: Type: text/html, Size: 2664 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: Linux 3.10-rc7
  2013-06-25 20:51             ` Shuah Khan
  2013-06-25 20:54               ` Tomas Winkler
@ 2013-06-25 20:57               ` Tomas Winkler
  2013-06-25 21:11                 ` Shuah Khan
  2013-06-25 21:09               ` Jesse Barnes
  2 siblings, 1 reply; 13+ messages in thread
From: Tomas Winkler @ 2013-06-25 20:57 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Daniel Vetter, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie, Linus Torvalds

On Tue, Jun 25, 2013 at 11:51 PM, Shuah Khan <shuah.kh@samsung.com> wrote:
>
> On 06/25/2013 02:06 PM, Jesse Barnes wrote:
> > On Tue, 25 Jun 2013 19:59:28 +0000
> > Shuah Khan <shuah.kh@samsung.com> wrote:
> >
> >> On 06/25/2013 01:52 PM, Jesse Barnes wrote:
> >>> On Tue, 25 Jun 2013 21:37:37 +0200
> >>> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >>>
> >>
> >>>>
> >>>> Adding more lists to cc + Jesse since he's the guilty one for the
> >>>> vt-switchless state restore stuff.
> >>>
> >>> Yeah, looks like we don't fetch the PLL state on resume from
> >>> hibernate,
> >>> leading to this warning.  The refcount is nonzero, indicating the pll
> >>> is in use, but the active field is clear, which means we're missing an
> >>> update somewhere.
> >>>
> >>> Shuah, just to confirm, does your resume actually work ok aside from
> >>> the warning?  I *think* it's harmless in this case, but does indicate
> >>> a
> >>> real bug in our state tracking... trying to come up with a patch now.
> >>>
> >>> Thanks,
> >>>
> >>
> >> Resume works just fine. I see it take longer for it to suspend compared
> >> to 3.9.7 and then resumes just fine. Suspend taking longer very well
> >> could be because of this warn_on. Other than this warn_on I haven't
> >> noticed any other problems.
> >
> > Here's the patch I'm testing now, can you give it a try?
> >
>
> Jesse,
>
> With this patch warn_on went away. Resume worked. I started seeing:
>
> [   78.733062] mei_me 0000:00:16.0: unexpected reset: dev_state =
> RESETTING
> [   78.733079] mei_me 0000:00:16.0: reset: wrong host start response
> [   78.733082] mei_me 0000:00:16.0: unexpected reset: dev_state =
> RESETTING
>
> over and over again after resume from reboot mode suspend. dmesg filled
> up with these messages.

Can you please send me the log part when this starts?

Thanks

> I did suspend to disk shutdown mode right away. Resume worked, no
> warn_ons, and no mei_me messages.
>
> -- Shuah

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

* Re: Linux 3.10-rc7
  2013-06-25 20:51             ` Shuah Khan
  2013-06-25 20:54               ` Tomas Winkler
  2013-06-25 20:57               ` Tomas Winkler
@ 2013-06-25 21:09               ` Jesse Barnes
  2 siblings, 0 replies; 13+ messages in thread
From: Jesse Barnes @ 2013-06-25 21:09 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Daniel Vetter, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie, Linus Torvalds

On Tue, 25 Jun 2013 20:51:27 +0000
Shuah Khan <shuah.kh@samsung.com> wrote:

> On 06/25/2013 02:06 PM, Jesse Barnes wrote:
> > On Tue, 25 Jun 2013 19:59:28 +0000
> > Shuah Khan <shuah.kh@samsung.com> wrote:
> >
> >> On 06/25/2013 01:52 PM, Jesse Barnes wrote:
> >>> On Tue, 25 Jun 2013 21:37:37 +0200
> >>> Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> >>>
> >>
> >>>>
> >>>> Adding more lists to cc + Jesse since he's the guilty one for the
> >>>> vt-switchless state restore stuff.
> >>>
> >>> Yeah, looks like we don't fetch the PLL state on resume from hibernate,
> >>> leading to this warning.  The refcount is nonzero, indicating the pll
> >>> is in use, but the active field is clear, which means we're missing an
> >>> update somewhere.
> >>>
> >>> Shuah, just to confirm, does your resume actually work ok aside from
> >>> the warning?  I *think* it's harmless in this case, but does indicate a
> >>> real bug in our state tracking... trying to come up with a patch now.
> >>>
> >>> Thanks,
> >>>
> >>
> >> Resume works just fine. I see it take longer for it to suspend compared
> >> to 3.9.7 and then resumes just fine. Suspend taking longer very well
> >> could be because of this warn_on. Other than this warn_on I haven't
> >> noticed any other problems.
> >
> > Here's the patch I'm testing now, can you give it a try?
> >
> 
> Jesse,
> 
> With this patch warn_on went away. Resume worked. I started seeing:
> 
> [   78.733062] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
> [   78.733079] mei_me 0000:00:16.0: reset: wrong host start response
> [   78.733082] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
> 
> over and over again after resume from reboot mode suspend. dmesg filled 
> up with these messages.
> 
> I did suspend to disk shutdown mode right away. Resume worked, no 
> warn_ons, and no mei_me messages.

Ok good, so that means the new stuff we have queued will likely work
too.

I'll leave it up to Daniel and Linus whether we just kill this warning
for now though, or apply the state fetching patch.

-- 
Jesse Barnes, Intel Open Source Technology Center

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

* Re: Linux 3.10-rc7
  2013-06-25 20:57               ` Tomas Winkler
@ 2013-06-25 21:11                 ` Shuah Khan
  2013-06-26 22:11                   ` Winkler, Tomas
  0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2013-06-25 21:11 UTC (permalink / raw)
  To: Tomas Winkler
  Cc: Jesse Barnes, Daniel Vetter, Linus Torvalds, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx, Shuah Khan

On 06/25/2013 02:57 PM, Tomas Winkler wrote:
> On Tue, Jun 25, 2013 at 11:51 PM, Shuah Khan <shuah.kh@samsung.com> wrote:
>>

>> With this patch warn_on went away. Resume worked. I started seeing:
>>
>> [   78.733062] mei_me 0000:00:16.0: unexpected reset: dev_state =
>> RESETTING
>> [   78.733079] mei_me 0000:00:16.0: reset: wrong host start response
>> [   78.733082] mei_me 0000:00:16.0: unexpected reset: dev_state =
>> RESETTING
>>
>> over and over again after resume from reboot mode suspend. dmesg filled
>> up with these messages.
>
> Can you please send me the log part when this starts?
>
> Thanks
>

It rolled over and I don't have prior messages. I tried reproducing 
twice and didn't see it again. I will try a few more times and see if I 
can get it to happen again.

This is what I could save before dmesg rolled over:

[   78.709014] mei_me 0000:00:16.0: reset: wrong host start response
[   78.709016] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
[   78.709029] mei_me 0000:00:16.0: reset: unexpected enumeration 
response hbm.
[   78.709031] mei_me 0000:00:16.0: unexpected reset: dev_state = RESETTING
[   78.709069] mei_me 0000:00:16.0: reset: wrong host start response

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

* RE: Linux 3.10-rc7
  2013-06-25 21:11                 ` Shuah Khan
@ 2013-06-26 22:11                   ` Winkler, Tomas
  2013-06-26 22:24                     ` Shuah Khan
  0 siblings, 1 reply; 13+ messages in thread
From: Winkler, Tomas @ 2013-06-26 22:11 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Jesse Barnes, Daniel Vetter, Linus Torvalds, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx



> > Can you please send me the log part when this starts?
> >
> > Thanks
> >
> 
> It rolled over and I don't have prior messages. I tried reproducing twice and
> didn't see it again. I will try a few more times and see if I can get it to happen
> again.
> 
> This is what I could save before dmesg rolled over:
> 
> [   78.709014] mei_me 0000:00:16.0: reset: wrong host start response
> [   78.709016] mei_me 0000:00:16.0: unexpected reset: dev_state =
> RESETTING
> [   78.709029] mei_me 0000:00:16.0: reset: unexpected enumeration
> response hbm.
> [   78.709031] mei_me 0000:00:16.0: unexpected reset: dev_state =
> RESETTING
> [   78.709069] mei_me 0000:00:16.0: reset: wrong host start response
> 
So far I was able to positively reproduce it with  3.10-rc5 but not with 3.10-rc7 and above.

There are 3 patches that went in to fix this issue

42f132f mei: me: clear interrupts on the resume path
2753ff5 mei: nfc: fix nfc device freeing
5e85b36 mei: init: Flush scheduled work before resetting the device

Are you sure you have these 3 in?

Thanks
Tomas

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

* Re: Linux 3.10-rc7
  2013-06-26 22:11                   ` Winkler, Tomas
@ 2013-06-26 22:24                     ` Shuah Khan
  2013-07-01 14:54                       ` Shuah Khan
  0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2013-06-26 22:24 UTC (permalink / raw)
  To: Winkler, Tomas
  Cc: Jesse Barnes, Daniel Vetter, Linus Torvalds, Chris Wilson,
	Linux Kernel Mailing List, shuahkhan@gmail.com, Dave Airlie,
	intel-gfx, Shuah Khan

On 06/26/2013 04:12 PM, Winkler, Tomas wrote:
>
>
>>> Can you please send me the log part when this starts?
>>>
>>> Thanks
>>>
>>
>> It rolled over and I don't have prior messages. I tried reproducing twice and
>> didn't see it again. I will try a few more times and see if I can get it to happen
>> again.
>>
>> This is what I could save before dmesg rolled over:
>>
>> [   78.709014] mei_me 0000:00:16.0: reset: wrong host start response
>> [   78.709016] mei_me 0000:00:16.0: unexpected reset: dev_state =
>> RESETTING
>> [   78.709029] mei_me 0000:00:16.0: reset: unexpected enumeration
>> response hbm.
>> [   78.709031] mei_me 0000:00:16.0: unexpected reset: dev_state =
>> RESETTING
>> [   78.709069] mei_me 0000:00:16.0: reset: wrong host start response
>>
> So far I was able to positively reproduce it with  3.10-rc5 but not with 3.10-rc7 and above.
>
> There are 3 patches that went in to fix this issue
>
> 42f132f mei: me: clear interrupts on the resume path
> 2753ff5 mei: nfc: fix nfc device freeing
> 5e85b36 mei: init: Flush scheduled work before resetting the device
>
> Are you sure you have these 3 in?
>

Checked the git log and yes I have all three commits. It appears this 
problem is intermittent and hard to reproduce at least on 3.10-rc7. I 
tried several times yesterday to capture the log and couldn't reproduce.

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

* Re: Linux 3.10-rc7
  2013-06-26 22:24                     ` Shuah Khan
@ 2013-07-01 14:54                       ` Shuah Khan
  2013-07-04 19:26                         ` Tomas Winkler
  0 siblings, 1 reply; 13+ messages in thread
From: Shuah Khan @ 2013-07-01 14:54 UTC (permalink / raw)
  Cc: Winkler, Tomas, Jesse Barnes, Daniel Vetter, Linus Torvalds,
	Chris Wilson, Linux Kernel Mailing List, shuahkhan@gmail.com,
	Dave Airlie, intel-gfx, Shuah Khan

On 06/26/2013 04:24 PM, Shuah Khan wrote:
> On 06/26/2013 04:12 PM, Winkler, Tomas wrote:
>>
>>

>> 42f132f mei: me: clear interrupts on the resume path
>> 2753ff5 mei: nfc: fix nfc device freeing
>> 5e85b36 mei: init: Flush scheduled work before resetting the device
>>
>> Are you sure you have these 3 in?
>>
>
> Checked the git log and yes I have all three commits. It appears this
> problem is intermittent and hard to reproduce at least on 3.10-rc7. I
> tried several times yesterday to capture the log and couldn't reproduce.
>
> -- Shuah

Tomas,

I saw the mei_me problem again, however couldn't save the logs. I am 
getting into the habit of saving dmesg as soon as system gets resumed to 
catch the dmesg buffer prior to mei getting into this state. There is 
another difference in suspend sequence between 3.9.8 and 3.10-rc6 and rc-7.

When I do echo disk > state,

Screen clears and instead of going into console mode like it does on 
3.9.8, it will get back into graphics mode and show the screen exactly 
the way it was right after echo disk > state command was issued. It 
stays in that state for good 60 seconds or more and then I see the 
suspend complete.

I can start bi-sect of this problem on intel-display scope if you would 
like me to. Please let me know if the bisect scope should be larger.

-- Shuah

Shuah Khan, Linux Kernel Developer - Open Source Group Samsung Research 
America (Silicon Valley) shuah.kh@samsung.com | (970) 672-0658

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

* Re: Linux 3.10-rc7
  2013-07-01 14:54                       ` Shuah Khan
@ 2013-07-04 19:26                         ` Tomas Winkler
  0 siblings, 0 replies; 13+ messages in thread
From: Tomas Winkler @ 2013-07-04 19:26 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Daniel Vetter, intel-gfx, Linux Kernel Mailing List,
	shuahkhan@gmail.com, Dave Airlie, Linus Torvalds

On Mon, Jul 1, 2013 at 5:54 PM, Shuah Khan <shuah.kh@samsung.com> wrote:
> On 06/26/2013 04:24 PM, Shuah Khan wrote:
>> On 06/26/2013 04:12 PM, Winkler, Tomas wrote:
>>>
>>>
>
>>> 42f132f mei: me: clear interrupts on the resume path
>>> 2753ff5 mei: nfc: fix nfc device freeing
>>> 5e85b36 mei: init: Flush scheduled work before resetting the device
>>>
>>> Are you sure you have these 3 in?
>>>
>>
>> Checked the git log and yes I have all three commits. It appears this
>> problem is intermittent and hard to reproduce at least on 3.10-rc7. I
>> tried several times yesterday to capture the log and couldn't reproduce.
>>
>> -- Shuah
>
> Tomas,
>
> I saw the mei_me problem again, however couldn't save the logs. I am
> getting into the habit of saving dmesg as soon as system gets resumed to
> catch the dmesg buffer prior to mei getting into this state. There is
> another difference in suspend sequence between 3.9.8 and 3.10-rc6 and rc-7.
>
> When I do echo disk > state,
>
> Screen clears and instead of going into console mode like it does on
> 3.9.8, it will get back into graphics mode and show the screen exactly
> the way it was right after echo disk > state command was issued. It
> stays in that state for good 60 seconds or more and then I see the
> suspend complete.
>
> I can start bi-sect of this problem on intel-display scope if you would
> like me to. Please let me know if the bisect scope should be larger.
>
> -- Shuah

I got finally an older system where this reproduces consistently, I'm
trying to root cause that now.
As soon I have something to test I will send it out.

Thanks
Tomas

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

end of thread, other threads:[~2013-07-04 19:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CA+55aFz1yMZ1q5daHdTA91pW5QtQ1Yids1dLD9b2JC-ruicNQw@mail.gmail.com>
     [not found] ` <B8EFE96D1287C24090BAD9D858E15E6172FFB9@sisaex02sj>
     [not found]   ` <CA+55aFxuB_nx8fZ_kN8U=fMFOq43cKZC_HJbj=6vKo7-fDqNuw@mail.gmail.com>
2013-06-25 19:37     ` Linux 3.10-rc7 Daniel Vetter
2013-06-25 19:54       ` Jesse Barnes
2013-06-25 19:59         ` Shuah Khan
2013-06-25 20:08           ` Jesse Barnes
2013-06-25 20:51             ` Shuah Khan
2013-06-25 20:54               ` Tomas Winkler
2013-06-25 20:57               ` Tomas Winkler
2013-06-25 21:11                 ` Shuah Khan
2013-06-26 22:11                   ` Winkler, Tomas
2013-06-26 22:24                     ` Shuah Khan
2013-07-01 14:54                       ` Shuah Khan
2013-07-04 19:26                         ` Tomas Winkler
2013-06-25 21:09               ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox