[Intel-gfx] Fixing the hotplug storm bugs once and for all?

2010-07-25 Thread Andrew Lutomirski
For well over a year now, I (and apparently lots of other people) have
had to run patched kernels to avoid crippling hotplug storms.

As far as I can tell, on my laptop, enabling DPC_HOTPLUG_INT_EN is
safe, but setting either DPB_... or DPD_... (or both) will cause
intermittent hotplug interrupt storms.  (Turning off all three DP
hotplug bits also makes the laptop stable but prevents the DP port
from working.)

My laptop is a Lenovo X200s with VGA and LVDS on the laptop itself and
DP on the docking port.  If I boot w/o the docking port, I have:


General definitions block:
CRT DDC GMBUS addr: 0x02
Use ACPI DPMS CRT power states: no
Skip CRT detect at boot: no
Use DPMS on AIM devices: yes
Boot display type: 0x
TV data block present: yes
Child device info:
Device type: 1009 (TV)
Signature:
AIM offset: 0
DVO port: 0x05
Child device info:
Device type: 1022 (LFP)
Signature:
AIM offset: 52048
DVO port: 0x04
Child device info:
Device type: 68c6 (DisplayPort)
Signature:
AIM offset: 61152
DVO port: 0x08

Maybe it's time we started reading that part of VBIOS to detect which
outputs really exist.  (If that's unsafe, we could add a DMI list.)

Any thoughts?  It would be nice if 2.6.36 could work without patches.

Thanks,
Andy
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] i915 (GM45) instability (and an oops)

2010-07-25 Thread Andrew Lutomirski
I've been running 2.6.35 rc's and xf86-drv-intel git master for
awhile, and X has been a bit unstable.  Every now and then, graphics
freeze completely, except that the mouse still works (I think) and
capslock toggles the LED.

If I switch to a different VT and killall -9 Xorg, everything recovers.

If I switch to a different VT and switch directly back to X, X hangs
completely -- mouse can't move and capslock doesn't work.  Alt-SysRq-R
doesn't work either (not sure why).

It just happened again and I tried something a bit different.  I
switched to a console, did 'echo 1 i915_wedged', and got an oops:

[20815.509691] [drm] Manually setting wedged to 1
[20815.509701] BUG: sleeping function called from invalid context at
arch/x86/mm/fault.c:1072
[20815.509708] in_atomic(): 0, irqs_disabled(): 1, pid: 4543, name: bash
[20815.509716] Pid: 4543, comm: bash Not tainted 2.6.35-rc6+ #40
[20815.509722] Call Trace:
[20815.509738]  [81036eed] __might_sleep+0xe8/0xed
[20815.509749]  [81446e2d] do_page_fault+0x1aa/0x2ac
[20815.509759]  [814441ef] page_fault+0x1f/0x30
[20815.509770]  [8102c1af] ? __wake_up_common+0x25/0x84
[20815.509778]  [8102fc53] __wake_up+0x39/0x4d
[20815.509823]  [a0079608] i915_wedged_write+0xd4/0x10d [i915]
[20815.509834]  [811b6e0f] ? security_file_permission+0x16/0x18
[20815.509845]  [810f4f3d] vfs_write+0xae/0x10b
[20815.509852]  [810f505a] sys_write+0x4a/0x6e
[20815.509863]  [81002b2b] system_call_fastpath+0x16/0x1b
[20815.509880] Oops:  [#1] SMP
[20815.509947] last sysfs file:
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:00/PNP0C09:00/PNP0C0A:00/power_supply/BAT0/voltage_now
[20815.510097] CPU 1
[20815.510128] Modules linked in: fuse tun tp_smapi thinkpad_ec
cpufreq_ondemand xt_multiport ipt_MASQUERADE iptable_nat nf_nat
ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6
kvm_intel kvm uinput arc4 snd_hda_codec_conexant ecb snd_hda_intel
iwlagn snd_hda_codec snd_hwdep iwlcore snd_seq snd_seq_device snd_pcm
mac80211 thinkpad_acpi snd_timer tpm_tis hwmon cfg80211 tpm iTCO_wdt
i2c_i801 tpm_bios snd iTCO_vendor_support snd_page_alloc microcode
soundcore aes_x86_64 aes_generic xts gf128mul dm_crypt i915
drm_kms_helper drm i2c_algo_bit i2c_core video output [last unloaded:
scsi_wait_scan]
[20815.510257]
[20815.510257] Pid: 4543, comm: bash Not tainted 2.6.35-rc6+ #40 7465CTO/7465CTO
[20815.510257] RIP: 0010:[8102c1af]  [8102c1af]
__wake_up_common+0x25/0x84
[20815.510257] RSP: 0018:8800378f1e28  EFLAGS: 00010082
[20815.510257] RAX: ffe8 RBX: 880135770350 RCX: 
[20815.510257] RDX: 0001 RSI: 0003 RDI: 880135770358
[20815.510257] RBP: 8800378f1e68 R08:  R09: 000a
[20815.510257] R10: 0005 R11:  R12: 0003
[20815.510257] R13: 0001 R14: 7fd2044d5000 R15: 0001
[20815.510257] FS:  7fd2044a5700() GS:880001f0()
knlGS:
[20815.510257] CS:  0010 DS:  ES:  CR0: 80050033
[20815.510257] CR2:  CR3: b805c000 CR4: 000406e0
[20815.510257] DR0:  DR1:  DR2: 
[20815.510257] DR3:  DR6: 0ff0 DR7: 0400
[20815.510257] Process bash (pid: 4543, threadinfo 8800378f,
task 880137705bc0)
[20815.510257] Stack:
[20815.510257]  88013577 0001 7fd2044d5000
880135770350
[20815.510257] 0 0286 0001 7fd2044d5000
0001
[20815.510257] 0 8800378f1ea8 8102fc53 8800378f1e98

[20815.510257] Call Trace:
[20815.510257]  [8102fc53] __wake_up+0x39/0x4d
[20815.510257]  [a0079608] i915_wedged_write+0xd4/0x10d [i915]
[20815.510257]  [811b6e0f] ? security_file_permission+0x16/0x18
[20815.510257]  [810f4f3d] vfs_write+0xae/0x10b
[20815.510257]  [810f505a] sys_write+0x4a/0x6e
[20815.510257]  [81002b2b] system_call_fastpath+0x16/0x1b
[20815.510257] Code: 48 01 78 28 c9 c3 55 48 89 e5 41 57 41 56 41 55
41 54 53 48 83 ec 18 0f 1f 44 00 00 48 8b 47 08 41 89 f4 48 83 e8 18
48 83 c7 08 4c 8b 68 18 89 d3 41 89 cf 49 83 ed 18 48 89 7d c8 eb 33
44 8b
[20815.510257] RIP  [8102c1af] __wake_up_common+0x25/0x84
[20815.510257]  RSP 8800378f1e28
[20815.510257] CR2: 

I then switched back to Xorg and it was completely frozen.  SysRq+R
did nothing, but SysRq+K got me a VT back.  Xorg was unkillable
(sorry, should have gotten a stack trace, but I didn't).  cat
i915_wedged showed that wedged = 1.  I tried echo 1 i915_wedged again
and the system froze hard -- even SysRq+B did nothing.

This is my trusty bug-exposing GM45 laptop :)  The backtrace is on 2.6.35-rc6+.

--Andy
___
Intel-gfx mailing list

[Intel-gfx] [PATCH] drm/i915: Clear any existing dither mode prior to enabling spatial dithering

2010-07-25 Thread Chris Wilson
We cannot the initial configuration set by the BIOS not to have a dither
mode enabled which conflicts with our enabling the Spatial Temporal 1
dither mode for PCH. In particular, the BIOS may either enable temporal
dithering or the Spatial Temporal 2 with the result that we enable pure
temporal dithering. Temporal dithering looks bad and is perceived as a
flicker.

Fixes:

  Bug 29248 - [Arrandale] Annoying flicker on internal panel, goes away
  after suspend to RAM
  https://bugs.freedesktop.org/show_bug.cgi?id=29248

Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk
---
 drivers/gpu/drm/i915/intel_display.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c 
b/drivers/gpu/drm/i915/intel_display.c
index 7133436..fb6568b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3925,6 +3925,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
if (dev_priv-lvds_dither) {
if (HAS_PCH_SPLIT(dev)) {
pipeconf |= PIPE_ENABLE_DITHER;
+   pipeconf = ~PIPE_DITHER_TYPE_MASK;
pipeconf |= PIPE_DITHER_TYPE_ST01;
} else
lvds |= LVDS_ENABLE_DITHER;
-- 
1.7.1

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