Bug 41682 - [SNB] Activating rc6 results in render glitches
[SNB] Activating rc6 results in render glitches
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: DRM/Intel
unspecified
Other All
: medium normal
Assigned To: Eugeni Dodonov
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-11 06:08 UTC by Florian Ludwig
Modified: 2012-04-16 14:33 UTC (History)
9 users (show)

See Also:


Attachments
Wallpaper with leftovers (62.62 KB, image/png)
2011-10-11 06:12 UTC, Florian Ludwig
no flags Details
Glitches in Chrome after switching between worspaces in GNOME (28.68 KB, image/png)
2011-10-11 06:13 UTC, Florian Ludwig
no flags Details
Video of rhythmbox, its mostly interesting at about 1:00 (410.23 KB, video/ogg)
2011-10-11 06:20 UTC, Florian Ludwig
no flags Details
Screen corruption with rc6=1 (14.12 KB, image/png)
2011-10-13 06:37 UTC, Lukas Hejtmanek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Ludwig 2011-10-11 06:08:39 UTC
Enabling rc6 via kernel parameter: i915.i915_enable_rc6=1 results in render glitches after some usage time (two days without reboot).

Those glitches all seem to be related to redraw problems.

Usage:
 * External monitor through VGA
 * Suspsend-to-ram
 * Software usage, mostly: google chrome, evolution, rhythmbox, pidgin, gnome-terminal and evince
 * no compositing (gnome 3 fallback mode forced)

Problems appear:
 * sometimes when typing in an input field letters disappear
 * the wallpaper collects fragements of other software
 * "animated" widgets, like the progress bar in rhymbox are most prone to glitches

I will attach some screenshots / videos.


Hardware
Thinkpad x220 tablet
Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
$ lspci
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 6 Series/C200 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b4)
00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b4)
00:1d.0 USB Controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation QM67 Express Chipset Family LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller (rev 04)
00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 04)
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6205 (rev 34)
0d:00.0 System peripheral: Ricoh Co Ltd Device e823 (rev 04)


Software
Fedora 15 with:
Mesa 7.11-1
xorg-x11-drv-intel 2.15.0-5
kernel 2.6.40.6-0 (which is, afaik, a renamed 3.0.4 kernel)
Comment 1 Florian Ludwig 2011-10-11 06:12:16 UTC
Created attachment 52213 [details]
Wallpaper with leftovers
Comment 2 Florian Ludwig 2011-10-11 06:13:46 UTC
Created attachment 52214 [details]
Glitches in Chrome after switching between worspaces in GNOME
Comment 3 Florian Ludwig 2011-10-11 06:20:11 UTC
Created attachment 52215 [details]
Video of rhythmbox, its mostly interesting at about 1:00
Comment 4 Eugeni Dodonov 2011-10-11 08:06:14 UTC
Paulo, you have a thinkpad x220, can you reproduce those problems as well?
Comment 5 Eugeni Dodonov 2011-10-11 08:07:45 UTC
Florian, by a chance, do you have SNA enabled?
Comment 6 Florian Ludwig 2011-10-11 08:46:54 UTC
(In reply to comment #5)
> Florian, by a chance, do you have SNA enabled?

I don't think so as I am using the precompiled packages straight out of fedora. But how do I make sure its not?

PS not setting the kernel parameter i915.i915_enable_rc6=1 does produce no problem at all even if the system is running for weeks without reboot.
Comment 7 Gordon Jin 2011-10-11 17:41:33 UTC
(moving to kernel component)
Comment 8 Chris Wilson 2011-10-12 04:46:14 UTC
An odd effect, reminiscent of either a flush going astray and/or a blend state update. (In particular it looks like the flush going missing before a change in blend state ;-)
Comment 9 Daniel Vetter 2011-10-13 02:56:37 UTC
Quick check: Does disabling framebuffer compression help? I.e. please boot with i915.i915_enable_fbc=0 i915.i915_enable_rc6=1
Comment 10 Lukas Hejtmanek 2011-10-13 06:36:51 UTC
(In reply to comment #9)
> Quick check: Does disabling framebuffer compression help? I.e. please boot with
> i915.i915_enable_fbc=0 i915.i915_enable_rc6=1

Does not. Just tried it.

root@anubis:/sys/module/i915/parameters# grep .* *
enable_hangcheck:Y
fbpercrtc:0
i915_enable_fbc:0
i915_enable_rc6:1
lvds_downclock:0
lvds_use_ssc:1
modeset:1
panel_ignore_lid:0
powersave:1
reset:Y
semaphores:0
vbt_sdvo_panel_type:-1


and see attachement..
Comment 11 Lukas Hejtmanek 2011-10-13 06:37:37 UTC
Created attachment 52291 [details]
Screen corruption with rc6=1
Comment 12 Paulo Zanoni 2011-10-13 06:49:03 UTC
(In reply to comment #4)
> Paulo, you have a thinkpad x220, can you reproduce those problems as well?

I'm not sure if I have seen this problem, I'll try to reproduce it and start
paying attention. I use an external VGA monitor but the uptime is always only a
few hours. I'll try to use more sleep and get higher uptimes.

I believe there are more people on our team with x220 laptops (Keith?).
Comment 13 Daniel Vetter 2011-10-13 07:15:45 UTC
For the render corruptions, can you please try the latest git version of
xf86-video-intel, specifically

commit d0184b59095d5b8fab1a65ceba075d29189130d4
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sun Oct 9 18:43:14 2011 +0200

    snb: implement PIPE_CONTROL workaround
Comment 14 Florian Ludwig 2011-10-14 03:20:49 UTC
(In reply to comment #13)
> For the render corruptions, can you please try the latest git version of
> xf86-video-intel, specifically
> 
> commit d0184b59095d5b8fab1a65ceba075d29189130d4
> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date:   Sun Oct 9 18:43:14 2011 +0200
> 
>     snb: implement PIPE_CONTROL workaround

I checked out git master, compiled and installed it. I still get some corruption. Hope I did all right, though.

$ git log | grep d0184b59095d5b8fab1a65ceba075d29189130d4
commit d0184b59095d5b8fab1a65ceba075d29189130d4

# from Xorg.0.log:
[  1568.266] (II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
[  1568.267] (II) Module intel: vendor="X.Org Foundation"
[  1568.267]    compiled for 1.10.4, module version = 2.16.0
[  1568.267]    Module class: X.Org Video Driver
[  1568.267]    ABI class: X.Org Video Driver, version 10.0

$ md5sum /usr/lib64/xorg/modules/drivers/intel_drv.so xf86-video-intel/src/.libs/intel_drv.so
067854b3e477bcd8104cb3d7ca39eccb  /usr/lib64/xorg/modules/drivers/intel_drv.so
067854b3e477bcd8104cb3d7ca39eccb  xf86-video-intel/src/.libs/intel_drv.so

# driver parameters:
fbpercrtc:0
i915_enable_fbc:0
i915_enable_rc6:1
lvds_downclock:0
lvds_use_ssc:1
modeset:-1
panel_ignore_lid:0
powersave:1
reset:Y
semaphores:0
vbt_sdvo_panel_type:-1
Comment 15 Chris Wilson 2011-11-09 12:30:31 UTC
Do you have iommu enabled on this system by any chance, and if so does intel_iommu=off make a difference?
Comment 16 Lukas Hejtmanek 2011-11-10 03:42:15 UTC
(In reply to comment #15)
> Do you have iommu enabled on this system by any chance, and if so does
> intel_iommu=off make a difference?

Personally, I do not enable iommu but I still got corruption with the current git head (as of Nov. 10th). forcewake utility seems to prevent the corruption. 

Should I continue here or file another bug?
Comment 17 Chris Wilson 2011-11-10 04:00:26 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Do you have iommu enabled on this system by any chance, and if so does
> > intel_iommu=off make a difference?
> 
> Personally, I do not enable iommu but I still got corruption with the current
> git head (as of Nov. 10th). forcewake utility seems to prevent the corruption. 
> 
> Should I continue here or file another bug?

That sounds consistent with the original bug description, so I think we are dealing with the same bug and thanks for narrowing down that it does appear to be glitchy only when rc6 takes effect.
Comment 18 Daniel Vetter 2011-11-10 04:15:38 UTC
Eric's recent clock gating fixes might be related. Can you test the latest drm-intel-next from http://cgit.freedesktop.org/~keithp/linux/ please?
Comment 19 Lukas Hejtmanek 2011-11-10 07:22:16 UTC
(In reply to comment #18)
> Eric's recent clock gating fixes might be related. Can you test the latest
> drm-intel-next from http://cgit.freedesktop.org/~keithp/linux/ please?

I cherry picked those two gating patches, but they don't seem to help.
Comment 20 Andy Botting 2012-02-06 08:08:08 UTC
I've been seeing exactly the same problem on my early 2011 Macbook Pro.

Initially, I thought it might have been due to my unsual setup - but it seems not.

I am required to boot in EFI mode to even access the Intel GPU. 

There's a bit of trickery required to switch the GMUX from the internal Radeon GPU to the Intel, and also a funky patch to allow me to perform an manual override of the LVDS channels (which I believe is something specific to my type of machine without a traditional BIOS). Without it, the picture never makes it to the screen. It's probably a candidate for another bugzilla entry :)

I'm using an up-to-date Gentoo installation with:

media-libs/mesa-7.11.2
x11-drivers/xf86-video-intel-2.17.0-r3
sys-kernel/vanilla-sources-3.2.2

cd /sys/module/i915/parameters; grep .* *
fbpercrtc:0
i915_enable_fbc:-1
i915_enable_rc6:1
lvds_channels:2
lvds_downclock:0
lvds_use_ssc:0
modeset:1
panel_ignore_lid:0
powersave:1
reset:Y
semaphores:-1
vbt_sdvo_panel_type:-1

Disabling RC6 fixes all the glitches, but also increases my power consumption by approx 10W. It's something like: rc6=0: 26W, rc6=1: 13W.

Would love to get this worked out. Let me know if I can test anything or provide any more information.
Comment 21 Andy Botting 2012-02-06 08:53:36 UTC
Just a little follow-up information

My kernel args look like this:
BOOT_IMAGE=/kernel-genkernel-x86_64-3.2.2 root=/dev/ram0 real_root=/dev/mapper/vg-gentoo init=/linuxrc dolvm rootfstype=ext4 reboot=pci acpi_backlight=vendor pcie_aspm=force i915.lvds_channels=2 i915.modeset=1 i915.lvds_use_ssc=0 intel_iommu=off i915.i915_enable_rc6=1

I'm using kernel 3.2.2, but I require this patch to get the Intel GPU output to the screen:
'Implement manual override of LVDS single/dual channel mode'
http://lists.freedesktop.org/archives/intel-gfx/2011-March/009584.html

To make this patch work, this commit had to be reverted:
4b645f14021871e06ce96c359bbdf0b48248c26e
drm/i915: add PLL sharing support to handle 3 pipes
Comment 22 Eugeni Dodonov 2012-04-02 11:05:06 UTC
Could you please re-test with kernel 3.3 and RC6 enabled? I am pretty certain it should fix the problem for you.
Comment 23 Chris Wilson 2012-04-14 06:34:07 UTC
Believed to be fixed by disabling the deeper rc6 power states (rc6p and rc6pp).
Comment 24 Florian Mickler 2012-04-16 14:33:55 UTC
A patch referencing this bug report has been merged in Linux v3.4-rc2:

commit aa46419186992e6b8b8010319f0ca7f40a0d13f5
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Fri Mar 23 11:57:19 2012 -0300

    drm/i915: enable plain RC6 on Sandy Bridge by default