Bug 107562 - ThinkPad T450 - Broadwell-U: [drm:hsw_disable_ips [i915]] *ERROR* Timed out waiting for IPS disable
Summary: ThinkPad T450 - Broadwell-U: [drm:hsw_disable_ips [i915]] *ERROR* Timed out w...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Imre Deak
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: Triaged, ReadyForDev
Keywords:
: 107494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-13 19:28 UTC by Diego Viola
Modified: 2018-09-07 14:38 UTC (History)
3 users (show)

See Also:
i915 platform: BDW
i915 features: display/IPS


Attachments
dmesg (62.62 KB, text/plain)
2018-08-13 19:28 UTC, Diego Viola
no flags Details
lspci (1.38 KB, text/plain)
2018-08-13 19:29 UTC, Diego Viola
no flags Details
dmesg.xz (8.01 MB, application/x-xz)
2018-08-25 00:39 UTC, Diego Viola
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Viola 2018-08-13 19:28:45 UTC
Created attachment 141071 [details]
dmesg

OS/Distro: Arch Linux x86_64

Sometimes this appears in dmesg:

[149791.911280] [drm:hsw_disable_ips [i915]] *ERROR* Timed out waiting for IPS disable

I am using the stock Arch kernel: 4.17.14-arch1-1-ARCH.

Full dmesg is attached.
Comment 1 Diego Viola 2018-08-13 19:29:16 UTC
Created attachment 141072 [details]
lspci
Comment 2 Diego Viola 2018-08-13 19:42:01 UTC
If you need more information, please feel free to ask.
Comment 3 Diego Viola 2018-08-13 21:36:36 UTC
I can't see the error "Timed out waiting for IPS disable" in dmesg anymore with drm-tip.

[diego@t450 ~]$ uname -a
Linux t450 4.18.0-g273ade7f #1 SMP PREEMPT Mon Aug 13 16:59:26 -03 2018 x86_64 GNU/Linux
[diego@t450 ~]$ 

drm-tip commit 273ade7fd922e8074e5832fe5e014720aecba57c

I do get frequent freezes on this laptop though, the freezes occur at random times and I cannot chvt, I can only do a hard reset at that point.

I don't know if this bug is related to the freezes I get, and I have no further evidence so I will close this bug and investigate the cause of the freezes later.
Comment 4 Diego Viola 2018-08-13 22:18:59 UTC
I think I close this bug too soon, I went back to the stock archlinux kernel and I do not see the error straight after booting.

I will be running with drm-tip kernel for a few days and try to reproduce the error.
Comment 5 Jani Saarinen 2018-08-14 06:09:51 UTC
ok, thanks. 
Please report failure using latest drm-tip:
https://cgit.freedesktop.org/drm-tip and send dmesg with drm.debug=0x1e
log_buf_len=4M from boot to failure.
Comment 6 Diego Viola 2018-08-17 00:37:54 UTC
After 3 days of using drm-tip, I can confirm I still get the error:

[149791.911280] [drm:hsw_disable_ips [i915]] *ERROR* Timed out waiting for IPS disable

I've booted with drm.debug=0x1e log_buf_len=4M and will post the dmesg the next time it happens again. Thanks.
Comment 7 Jani Saarinen 2018-08-17 06:18:57 UTC
ok, thanks.
Comment 8 Diego Viola 2018-08-25 00:26:57 UTC
Today is 1 week since I've started running my laptop with drm.debug=0x1e log_buf_len=4M as an attempt to get the debug output.

For some reason though I wasn't able to reproduce the "IPS disable" error when running with these parameters.

I am curious why I'm unable to reproduce the problem when running with these parameters, should I have waited longer?
Comment 9 Diego Viola 2018-08-25 00:39:36 UTC
Created attachment 141274 [details]
dmesg.xz

Attaching the captured dmesg in case you find something useful anyway.

Please let me know if I can try something else.
Comment 10 Diego Viola 2018-08-26 01:47:35 UTC
So I'm having a very hard time trying to reproduce this error, as it happens very randomly.

If someone knows how to reproduce this error please let me know.
Comment 11 Diego Viola 2018-08-26 23:57:28 UTC
I got this again with the 4.18.5-arch1-1-ARCH kernel, frustrating.

[41496.594392] [drm:hsw_disable_ips [i915]] *ERROR* Timed out waiting for IPS disable
Comment 12 Diego Viola 2018-08-27 02:44:56 UTC
I've got another system freeze just after I rebooted without these parameters: drm.debug=0x1e log_buf_len=4M.

I will try running with netconsole and see if I can get some useful logs.
Comment 13 Diego Viola 2018-08-27 05:55:05 UTC
I am curious if the debug low is somehow messing with timing or if there's a race somewhere, that's why I can't never get the "IPS disable" error when booting with the debug parameters.
Comment 14 Diego Viola 2018-08-27 05:56:34 UTC
(In reply to Diego Viola from comment #13)
> I am curious if the debug low is somehow messing with timing or if there's a
> race somewhere, that's why I can't never get the "IPS disable" error when
> booting with the debug parameters.

debug log*
Comment 15 Imre Deak 2018-08-27 09:04:16 UTC
Hi Diego,

sounds like a timing issue. Could you try if you can reproduce the problem with the following patch?

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ad0f0e5389d9..19c4b3ff691b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5081,7 +5081,7 @@ void hsw_disable_ips(const struct intel_crtc_state *crtc_state)
 		/* wait for pcode to finish disabling IPS, which may take up to 42ms */
 		if (intel_wait_for_register(dev_priv,
 					    IPS_CTL, IPS_ENABLE, 0,
-					    42))
+					    100))
 			DRM_ERROR("Timed out waiting for IPS disable\n");
 	} else {
 		I915_WRITE(IPS_CTL, 0);
Comment 16 Diego Viola 2018-08-27 18:09:22 UTC
(In reply to Imre Deak from comment #15)
> Hi Diego,
> 
> sounds like a timing issue. Could you try if you can reproduce the problem
> with the following patch?
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index ad0f0e5389d9..19c4b3ff691b 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5081,7 +5081,7 @@ void hsw_disable_ips(const struct intel_crtc_state
> *crtc_state)
>  		/* wait for pcode to finish disabling IPS, which may take up to 42ms */
>  		if (intel_wait_for_register(dev_priv,
>  					    IPS_CTL, IPS_ENABLE, 0,
> -					    42))
> +					    100))
>  			DRM_ERROR("Timed out waiting for IPS disable\n");
>  	} else {
>  		I915_WRITE(IPS_CTL, 0);

Hi Imre,

Thanks for your patch. I am currently running drm-tip (4.19.0-rc1-gfd1d65ac5-dirty) with your patch applied and so far so good, no errors yet.

I'll run with this for the rest of the week before confirming, but for now all is good.

Thanks.
Comment 17 Diego Viola 2018-09-03 14:41:10 UTC
Hello,

I can confirm the bug is fixed after applying Imre's patch, I no longer see the error in dmesg.

Thanks.
Comment 18 Imre Deak 2018-09-04 13:12:19 UTC
*** Bug 107494 has been marked as a duplicate of this bug. ***
Comment 19 Imre Deak 2018-09-05 18:24:25 UTC
Fix in drm-tip:

commit acb3ef0ee40ea657280a4a11d9f60eb2937c0dca
Author: Imre Deak <imre.deak@intel.com>
Date:   Wed Sep 5 13:00:05 2018 +0300

    drm/i915/bdw: Increase IPS disable timeout to 100ms
Comment 20 Diego Viola 2018-09-06 02:28:50 UTC
Thank you for fixing this bug, I appreciate it a lot.
Comment 21 Lakshmi 2018-09-07 14:38:06 UTC
Closing this bug as Resolved/fixed.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.