Bug 40172 - [ILK] Fuzzy screen after dpms cycles on lenovo t510 [bisected, 3.0+]
Summary: [ILK] Fuzzy screen after dpms cycles on lenovo t510 [bisected, 3.0+]
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest normal
Assignee: Jesse Barnes
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 09:26 UTC by roberth
Modified: 2017-07-24 23:04 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Script to reproduce (168 bytes, application/octet-stream)
2011-08-17 09:26 UTC, roberth
no flags Details
Screenshot without the problem (941.60 KB, image/jpeg)
2011-08-17 09:27 UTC, roberth
no flags Details
Screenshot with the problem (1.11 MB, image/jpeg)
2011-08-17 09:27 UTC, roberth
no flags Details
Xorg.0.log (33.84 KB, text/plain)
2011-08-17 09:28 UTC, roberth
no flags Details
dmesg with debug info (after reproducing the problem) (188.98 KB, text/plain)
2011-08-17 09:29 UTC, roberth
no flags Details
dmesg with debug info (just before reproducing the problem) (178.43 KB, text/plain)
2011-08-17 09:30 UTC, roberth
no flags Details
intel_reg_dumper output (before) (7.09 KB, text/plain)
2011-08-17 09:30 UTC, roberth
no flags Details
intel_reg_dumper output (after) (7.09 KB, text/plain)
2011-08-17 09:31 UTC, roberth
no flags Details
xrandr --verbose (6.51 KB, text/plain)
2011-08-17 09:31 UTC, roberth
no flags Details
manual revert of offending patch (1.29 KB, patch)
2012-04-14 10:44 UTC, Daniel Vetter
no flags Details | Splinter Review

Description roberth 2011-08-17 09:26:43 UTC
Created attachment 50311 [details]
Script to reproduce

Forwarding this for launchpad bug reporter Marc Deslauriers
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/814325

After f0575e92974d328e8816ed89704c985a7d7d90ac (drm/i915: DP_PIPE_ENABLED must check transcoder on CPT) was introduced in the kernel this person's Lenovo T510 machine started to come back from dpms fuzzy (see attached pictures) randomly, and another dpms cycle corrects it. This is still a problem on 3.1-rc2, and seems to be limited to this one machine with an optimus configuration (set to use only the integrated GPU) after testing on a wide variety of other machines including another T510 with an intel only config. He can reproduce the bug with the attached epilepsy.sh script which does rapid dpms off and on again easily.


System environment: 
-- chipset: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] 
-- system architecture: amd64
-- xf86-video-intel/xserver/mesa/libdrm version: both ubuntu 11.04 and current 11.10 were tested. 11.04: libdrm 2.4.23, xf86-video-intel 2.14, mesa 7.10.2, xserver 1.10.1, kernel 2.6.38-11.48
11.10: libdrm 2.4.26, xf86-video-intel 2.15.901, mesa 7.11, xserver 1.10.2.902, kernel 3.0.1
-- kernel version: 2.6.38-11 (which has the above commit backported), 3.1-rc2, various other kernels in between those two
-- Linux distribution: Ubuntu 11.04, Ubuntu 11.10
-- Machine or mobo model: Lenovo T510 (4313CTO)
-- Display connector: LVDS
Comment 1 roberth 2011-08-17 09:27:26 UTC
Created attachment 50312 [details]
Screenshot without the problem
Comment 2 roberth 2011-08-17 09:27:45 UTC
Created attachment 50313 [details]
Screenshot with the problem
Comment 3 roberth 2011-08-17 09:28:39 UTC
Created attachment 50314 [details]
Xorg.0.log
Comment 4 roberth 2011-08-17 09:29:30 UTC
Created attachment 50315 [details]
dmesg with debug info (after reproducing the problem)
Comment 5 roberth 2011-08-17 09:30:25 UTC
Created attachment 50316 [details]
dmesg with debug info (just before reproducing the problem)
Comment 6 roberth 2011-08-17 09:30:57 UTC
Created attachment 50317 [details]
intel_reg_dumper output (before)
Comment 7 roberth 2011-08-17 09:31:16 UTC
Created attachment 50318 [details]
intel_reg_dumper output (after)
Comment 8 roberth 2011-08-17 09:31:38 UTC
Created attachment 50319 [details]
xrandr --verbose
Comment 9 Jesse Barnes 2011-08-18 08:31:34 UTC
I can't make sense of this based on the commit... I'm afraid this might be timing related rather than an actual register change, since the register dumps before & after are identical.

Can you isolate which part of the patch causes problems?
Comment 10 roberth 2011-08-18 09:09:30 UTC
(In reply to comment #9)
> I can't make sense of this based on the commit... I'm afraid this might be
> timing related rather than an actual register change, since the register dumps
> before & after are identical.
> 
> Can you isolate which part of the patch causes problems?

Argh, I'm terribly sorry for this but the actual offending commit was 

drm/i915: disable PCH ports if needed when disabling a CRTC

Which needed a bit of fixing to apply to .38, but has the same failure in both the backport and the upstream kernel

http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-natty.git;a=commit;h=bbeaf8811ba070fd186dfcabc957044c3a1149ac
Comment 11 Jesse Barnes 2011-08-18 09:28:14 UTC
Ah ok, that makes more sense.  Does this patch change anything?  We might be disabling LVDS incorrectly (i.e. without a corresponding panel power sequence):

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_d
index 35364e6..ab8a36d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1394,7 +1394,7 @@ static void intel_disable_pch_ports(struct drm_i915_privat
        val = I915_READ(reg);
        if (ADPA_PIPE_ENABLED(val, pipe))
                I915_WRITE(reg, val & ~ADPA_DAC_ENABLE);
-
+#if 0
        reg = PCH_LVDS;
        val = I915_READ(reg);
        if (LVDS_PIPE_ENABLED(val, pipe)) {
@@ -1402,7 +1402,7 @@ static void intel_disable_pch_ports(struct drm_i915_privat
                POSTING_READ(reg);
                udelay(100);
        }
-
+#endif
        disable_pch_hdmi(dev_priv, pipe, HDMIB);
        disable_pch_hdmi(dev_priv, pipe, HDMIC);
        disable_pch_hdmi(dev_priv, pipe, HDMID);
Comment 12 Marc Deslauriers 2011-08-18 10:17:37 UTC
@Jesse,

Unfortunately no, I can still reproduce with the patch in comment 11.
Comment 13 roberth 2011-08-18 10:20:29 UTC
(In reply to comment #12)
> @Jesse,
> 
> Unfortunately no, I can still reproduce with the patch in comment 11.

he tested on 3.0.1 there with this kernel

http://kernel.ubuntu.com/~sarvatt/fdo40172/
Comment 14 Jesse Barnes 2011-08-19 10:27:41 UTC
Can you try to isolate which part of the PCH port disable causes trouble?  My other guess would be the panel register unlock, which might allow a clock change or something else to sneak in and cause LVDS problems...
Comment 15 Chris Wilson 2011-09-07 14:30:59 UTC
I wonder if this relates to drm/i915: Enable dither whenever display bpc < frame buffer bpc?
Comment 16 Marc Deslauriers 2012-01-05 09:56:06 UTC
FYI, I still have this issue with 3.2.0.
Comment 17 Daniel Vetter 2012-04-14 10:44:31 UTC
Created attachment 59984 [details] [review]
manual revert of offending patch

Can you please try with the latest 3.3 kernel (or maybe even 3.4-rc) and check whether this patch still solves your issues?
Comment 18 Jesse Barnes 2012-04-18 12:12:08 UTC
Any update?  I think this must have been fixed by one of the dither fixes...
Comment 19 Marc Deslauriers 2012-05-02 07:45:42 UTC
Sorry for the delay. I've just tried, and I can still reliably reproduce this with 3.4rc5.
Comment 20 Marc Deslauriers 2012-05-02 07:46:52 UTC
Do you want me to try with 3.4rc5 and the patch in comment 17?
Comment 21 Marc Deslauriers 2012-05-02 09:44:05 UTC
OK, unfortunately I can still reproduce the issue with 3.4rc5 and the patch in comment 17.
Comment 22 Daniel Vetter 2012-05-20 12:32:45 UTC
Ok, so the manual revert doesn't help any longer. Which means something else changed, too.
Comment 23 Daniel Vetter 2012-09-11 14:55:07 UTC
Can you please try the modeset-rework branch from my personal git repo at:

http://cgit.freedesktop.org/~danvet/drm

Among other things, this undoes the offending commit in a rather through-rough manner.
Comment 24 Chris Wilson 2012-11-22 00:04:09 UTC
2 months have passed since the last request for patch feedback, and the modeset-rework has landed upstream... Presuming fixed.
Comment 25 Marc Deslauriers 2013-05-18 14:59:25 UTC
Sorry for the lack of feedback. I can still reproduce this reliably with 3.5.0 and 3.8.0.
Comment 26 D B 2014-11-16 04:11:31 UTC
I can verify this occurs occasionally with my Lenovo T510 ThinkPad on Trusty Tahr (14.04 Ubuntu). Please let me know if any supporting documentation is needed on my end.
Comment 27 Marc Deslauriers 2014-11-16 04:46:39 UTC
I can confirm that this is still an issue with 3.13 and 3.16.
Comment 28 Daniel Vetter 2014-11-18 09:45:20 UTC
Can someone lease retest with latest drm-intel-nightly from http://cgit.freedesktop.org/drm-intel Thanks. Still no idea though what's amiss here ...
Comment 29 D B 2014-11-19 00:58:12 UTC
i would try this if someone could walk me through downloading, applying and installing this patch - i don't know what i'm doing here.
Comment 30 roberth 2014-11-19 02:29:06 UTC
(In reply to D B from comment #29)
> i would try this if someone could walk me through downloading, applying and
> installing this patch - i don't know what i'm doing here.

Long shot but if you're on debian or ubuntu you can install a new one from here http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-nightly/current/
Comment 31 D B 2014-11-19 03:02:54 UTC
trying to install from there gives me "Dependency is not satisfiable: linux-headers-3.18.0-994"
Comment 32 Jani Nikula 2015-01-29 14:37:33 UTC
(In reply to Daniel Vetter from comment #28)
> Can someone lease retest with latest drm-intel-nightly from
> http://cgit.freedesktop.org/drm-intel Thanks. Still no idea though what's
> amiss here ...

Ping for the testing.
Comment 33 D B 2015-01-29 18:24:22 UTC
I would do the testing, but I'm unable to successfully install the new kernel. It would be appreciated if someone could give me a walk-through of how to accomplish this.
Comment 34 Marc Deslauriers 2015-01-29 19:07:31 UTC
The good news is I no longer seem to be able to reproduce this with kernel 3.18 in the current Ubuntu daily.

The bad news is running the test script three times in a row has given me a headache :)
Comment 35 Jani Nikula 2015-01-30 06:41:57 UTC
(In reply to D B from comment #33)
> I would do the testing, but I'm unable to successfully install the new
> kernel. It would be appreciated if someone could give me a walk-through of
> how to accomplish this.

I'm afraid that's beyond our scope here; please try to look at your distro's documentation and wikis.

(In reply to Marc Deslauriers from comment #34)
> The good news is I no longer seem to be able to reproduce this with kernel
> 3.18 in the current Ubuntu daily.

Thanks for testing. I'm optimistic today, and closing the bug based on this. Please don't hesitate to reopen if the problem reappears on v3.18 or later.

> The bad news is running the test script three times in a row has given me a
> headache :)

I'm sorry to hear that, clearly RESOLVED NOTOURBUG though. ;)


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.