Bug 31901 - [arrandale] flicker on x201s LVDS laptop display with stripy patterns
Summary: [arrandale] flicker on x201s LVDS laptop display with stripy patterns
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Daniel Vetter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 11:06 UTC by roberth
Modified: 2017-07-24 23:06 UTC (History)
6 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg from problematic boot (60.75 KB, text/plain)
2010-11-24 11:08 UTC, roberth
no flags Details
Xorg.0.log from problematic boot (26.43 KB, text/plain)
2010-11-24 11:08 UTC, roberth
no flags Details
Image which exhibits the problem (1.45 KB, image/png)
2010-11-24 11:09 UTC, roberth
no flags Details
intel_reg_dumper output with flicker (7.16 KB, text/plain)
2010-11-24 14:08 UTC, Dagfinn Ilmari Mannsåker
no flags Details
intel_reg_dumper output without flicker (7.16 KB, text/plain)
2010-11-24 14:20 UTC, Dagfinn Ilmari Mannsåker
no flags Details
intel_reg_dumper output with forced lanes=4 (7.16 KB, text/plain)
2010-12-07 15:00 UTC, Dagfinn Ilmari Mannsåker
no flags Details
intel_reg_dumper output with drm-intel-next (10.32 KB, text/plain)
2010-12-15 13:37 UTC, Dagfinn Ilmari Mannsåker
no flags Details
intel_reg_dumper output with drm-intel-next as of 608ca70d (10.32 KB, text/plain)
2010-12-27 14:50 UTC, Dagfinn Ilmari Mannsåker
no flags Details

Description roberth 2010-11-24 11:06:35 UTC
Forwarding this bug from Ubuntu reporter Dagfinn Ilmari Mannsåker:
https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/680748

[Original bug report]
Since upgrading to Maverick, the display on my ThinkPad X201s flickers when viewing stripy patterns, like the attached image. I tried upgrading to the latest xorg-edgers (including the 2.6.37 kernel), without any improvement.

DistroRelease: Ubuntu 10.10
DRM.card0.LVDS.1:
 status: connected
 enabled: enabled
 dpms: On
 modes: 1440x900
 edid-base64: AP///////wAwrhRAAAAAADQTAQOAGhB46uWVk1ZPkCgoUFQAAAABAQEBAQEBAQEBAQEBAQEB8BygoFCEGjAYEDYABaMQAAAY8BygoFCEGjAYEDYABaMQAAAYAAAADwCVCjKVCjIZAQAwZABVAAAA/gBMVEQxMjFFUTNCCiAgAIg=
dmi.product.name: 5129CTO
dmi.product.version: ThinkPad X201s
dmi.sys.vendor: LENOVO
dmi.bios.version: 6QET44WW (1.14 )


kernel: 2.6.35-23.40-generic 2.6.35.7 (2.6.37-rc3 also tested)
libdrm: 2.4.21-1ubuntu2.1 (2.4.22+git20101122.51b89504-0ubuntu0sarvatt~maverick 
also tested)
mesa: 7.9~git20100924-0ubuntu2 (7.10.0+git20101122.93102b4c-0ubuntu0sarvatt~maverick also tested)
xf86-video-intel: 2:2.12.0-1ubuntu5.1 (2:2.13.901+git20101117.33c08882-0ubuntu0sarvatt~maverick also tested)


00:02.0 VGA compatible controller [0300]: Intel Corporation Core Processor Integrated Graphics Controller [8086:0046] (rev 02) (prog-if 00 [VGA controller])
	Subsystem: Lenovo Device [17aa:215a]
Comment 1 roberth 2010-11-24 11:08:06 UTC
Created attachment 40552 [details]
dmesg from problematic boot
Comment 2 roberth 2010-11-24 11:08:41 UTC
Created attachment 40553 [details]
Xorg.0.log from problematic boot
Comment 3 roberth 2010-11-24 11:09:17 UTC
Created attachment 40554 [details]
Image which exhibits the problem
Comment 4 Dagfinn Ilmari Mannsåker 2010-11-24 14:08:59 UTC
Created attachment 40558 [details]
intel_reg_dumper output with flicker
Comment 5 Dagfinn Ilmari Mannsåker 2010-11-24 14:20:52 UTC
Created attachment 40559 [details]
intel_reg_dumper output without flicker

Using an Ubuntu 10.04.1 live image, I see no flickering.

kernel: 2.6.32-24-generic 2.6.32.12
libdrm: 2.4.18-1ubuntu3
mesa: 7.7.1-1ubuntu3
xf86-video-intel: 2:2.9.1-3ubuntu5
Comment 6 Chris Wilson 2010-12-06 02:53:25 UTC
The difference appears to simply be that in the working setup all 4 fdi lanes are used, whereas in the stripy broken setup, just 1 lane. This suggests that we are running too close to the bandwidth limit on a single lane.

On drm-intel-fixes, I've tweaked the fdi m/n calculation which may help, but that uses the same computed number of lanes.

Can you first try that branch and then (if it still fails) apply this tweak to print out the details of the computation and up the lane count to 2 (increase to 3 and then 4 until the display is stable):


diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_d
index d9b7092..a9645fb 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3790,6 +3790,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
                         */
                        u32 bps = target_clock * bpp * 21 / 20;
                        lane = bps / (link_bw * 8) + 1;
+                       printk(KERN_ERR "target=%d, bpp=%d, bps=%d, link_bw=%d, 
+                              target_clock, bpp, bps, link_bw, lane);
+                       lane = 2;
                }
 
                intel_crtc->fdi_lanes = lane;
Comment 7 Dagfinn Ilmari Mannsåker 2010-12-07 15:00:19 UTC
Created attachment 40887 [details]
intel_reg_dumper output with forced lanes=4

The patch made no difference, even with lane = 4.

The calculation comes out as target=74080, bpp=18, bps=1400112, link_bw=270000, lanes=1

Attached is the intel_regs_dumper output with lane = 4
Comment 8 Chris Wilson 2010-12-15 11:49:05 UTC
So all the registers that are dumped are the same. The stripy pattern is reminiscent of CxSR/FBC failure, but I can rule that out as you found the same issue on 2.6.37-rc3. I am back to being stumped, x201s happens to be our favourite laptop so is well tested... The only thing left to test is whether any of the fixes in drm-intel-fixes/drm-intel-next help. The LVDS SSC frequency fix might be relevant, but the symptom for that one is a failure to enable the pipe, i.e. a blank screen as opposed to stripy.
Comment 9 Dagfinn Ilmari Mannsåker 2010-12-15 13:37:55 UTC
Created attachment 41156 [details]
intel_reg_dumper output with drm-intel-next

I still get flicker with drm-intel-next (using the amd64 package from http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2010-12-15-natty/)
Comment 10 Chris Wilson 2010-12-15 14:20:46 UTC
Ok, that doesn't yet have the SSC refclk fix, which is my remaining hope. I haven't yet merged that from -fixes into -next. If that fails, we have two choices: (1) randomly disable bits until it works or (2) bisect and hope to find a single rogue commit.
Comment 11 Dagfinn Ilmari Mannsåker 2010-12-27 14:34:23 UTC
(In reply to comment #10)
> Ok, that doesn't yet have the SSC refclk fix, which is my remaining hope. I
> haven't yet merged that from -fixes into -next. If that fails, we have two
> choices: (1) randomly disable bits until it works or (2) bisect and hope to
> find a single rogue commit.

If by "the SSC refclk fix" you mean "drm/i915/bios: Reverse order of 100/120 Mhz SSC clocks", that did not fix it.  I'm currently running 608ca70d22c0ea0d52aa71f52b8e326055c274d1 (http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2010-12-24-natty/) and still see the flickering.
Comment 12 Dagfinn Ilmari Mannsåker 2010-12-27 14:50:58 UTC
Created attachment 41479 [details]
intel_reg_dumper output with drm-intel-next as of 608ca70d
Comment 13 Chris Wilson 2011-01-19 05:52:46 UTC
I've tuned the watermarks to account for TLB misses, and we've tweaked the SSC settings. Can you please test drm-intel-next [http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git]?
Comment 14 Chris Wilson 2011-07-29 02:44:19 UTC
Hmm, can you please retest with drm-intel-fixes for this

commit 2704cf5fbd248871a745d210733c6319959d2b0c
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Thu Jul 28 11:52:45 2011 -0700

    drm/i915: flush plane control changes on ILK+ as well
    
    After writing to the plane control reg we need to write to the surface
    reg to trigger the double buffered register latch.  On previous
    chipsets, writing to DSPADDR was enough, but on ILK+ DSPSURF is the reg
    that triggers the double buffer latch.
    
    v2: write DSPADDR too to cover pre-965 chipsets
    v3: use flush_display_plane instead, that's what it's for
    v4: send the right patch
    
    Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Tested-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

fixed the flickering on one Arrandale eDP which might be related, along with plenty of other fixes.
Comment 15 Dagfinn Ilmari Mannsåker 2011-07-29 08:26:21 UTC
Which repository is that commit available in? I can't find it in http://git.kernel.org/?p=linux/kernel/git/ickle/drm-intel.git, and Google doesn't know about the SHA1.
Comment 16 Chris Wilson 2011-07-29 08:31:27 UTC
My apologies, I thought I had included the address in the cases where it did not appear before:

 git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6.git
Comment 17 Dagfinn Ilmari Mannsåker 2011-08-23 05:17:04 UTC
Finally got around to testing with the kernel at
http://kernel.ubuntu.com/~kernel-ppa/mainline/drm-intel-next/2011-07-30-oneiric/, which is built from commit 9b546e571b94cacccf1091cc9cc0bd8a6a207a66 and contains 2704cf5fbd248871a745d210733c6319959d2b0c, but I'm still seeing the flickering.
Comment 18 Daniel Vetter 2012-04-14 10:09:44 UTC
Can you please retest with latest stable kernel (3.3 at this moment) and also please test whether adding i915.lvds_use_ssc=0 to your kernel bootline helps. In any case, please add drm.debug=0xe to your kernel bootline and attach the full dmesg.
Comment 19 Dagfinn Ilmari Mannsåker 2012-05-05 08:37:06 UTC
I am no longer seeing the flicker with Ubuntu 12.04, which has the the following versions:

libdrm-intel1 2.4.32-1ubuntu1
libdrm2 2.4.32-1ubuntu1
libgl1-mesa-dri 8.0.2-0ubuntu3
linux-image-3.2.0-24-generic 3.2.0-24.38
xserver-xorg-video-intel 2:2.17.0-1ubuntu4
Comment 20 Daniel Vetter 2012-05-05 08:53:03 UTC
Ok, it's unclear what fixed things, but things seem fixed. Thanks for reporting this issue, I'll close it as unreproducible, please reopen if this shows up again for you.


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.