Bug 29574

Summary: [855] Overlay hang
Product: DRI Reporter: Bruno <bonbons>
Component: DRM/IntelAssignee: Daniel Vetter <daniel>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: medium CC: daniel, peter, vasyl.demin
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Tarball with i915 state (debugfs), dmesg, Xorg.log
none
Tarball with i915 stat (debugfs), dmesg, Xorg.log none

Description Bruno 2010-08-14 04:20:35 UTC
Created attachment 37856 [details]
Tarball with i915 state (debugfs), dmesg, Xorg.log

System is Acer TM660 laptop with i855 chipset:
  00:02.0 VGA compatible controller [0300]: Intel Corporation 82852/855GM
          Integrated Graphics Device [8086:3582] (rev 02)
  00:02.1 Display controller [0380]: Intel Corporation 82852/855GM Integrated
          Graphics Device [8086:3582] (rev 02)

Software (Gentoo distribution):
  linux-2.6.35 (with a few patches,
                all unrelated to GPU except for Daniel Vetter's cache-coherancy
                patch and ickle's patch to disable output polling from bug #29536)
  x11-drivers/xf86-video-intel-2.12.0
  x11-libs/libdrm-2.4.21
  x11-base/xorg-server-1.7.7-r1
  media-libs/mesa-7.8.2


Steps to reproduce:
- start X
- play video with mplayer (using xv video output)
  mplayer complains with and displays no video:
      X11 error: BadAlloc (insufficient resources for operation)
- retry playing video with mplayer (using gl output)
  GPU hang + Xorg crash
  (see logs and i915 state attached)

Note: not hung/crash if playing right away with mplayer -vo gl, and video
      shows as expected.
Comment 1 Chris Wilson 2010-08-14 05:21:20 UTC
Overlay hang:

0x01ff0710:      0x18800080: MI_BATCH_BUFFER_START
0x01ff0714:      0x029b8001:    dword 1
0x01ff0718:      0x02000004: MI_FLUSH
0x01ff071c:      0x00000000: MI_NOOP
0x01ff0720:      0x10800001: MI_STORE_DATA_INDEX
0x01ff0724:      0x00000080:    dword 1
0x01ff0728:      0x000007ff:    dword 2
0x01ff072c:      0x01000000: MI_USER_INTERRUPT
0x01ff0730:      0x08a00000: MI_OVERLAY_FLIP
0x01ff0734:      0x3716a001:    dword 1
0x01ff0738: HEAD 0x01810000: MI_WAIT_FOR_EVENT
0x01ff073c:      0x00000000: MI_NOOP
0x01ff0740:      0x10800001: MI_STORE_DATA_INDEX
0x01ff0744:      0x00000080:    dword 1
0x01ff0748:      0x00000800:    dword 2
0x01ff074c:      0x01000000: MI_USER_INTERRUPT

Feel brave? Care to try my overlay branch in http://cgit.freedesktop.org/~ickle/linux-2.6/log/?h=overlay ?
Comment 2 Bruno 2010-08-14 07:00:49 UTC
Created attachment 37857 [details]
Tarball with i915 stat (debugfs), dmesg, Xorg.log

Here is the result of braveness:
linus's tree with anholt/drm-intel-next and ickle/overlay applied (plus a few more things that fix bugs in other areas - all as of 2-3 hours ago)

This time no crash on mplayer -vo gl (but no video either). GPU hangs at -vo xv time with some new messages in dmesg:
[drm:intel_calculate_wm] *ERROR* Insufficient FIFO for plane, expect flickering: entries required = 70, available = 42.
Comment 3 Chris Wilson 2010-08-14 07:18:20 UTC
The ISR reports the Overlay Plane Flip Pending, which implies that no subsequent VBLANK event happened. Are we enabling the overlay on the wrong plane? [The hang occurs on OVERLAY_ON.] Daniel is also reporting misbehaviour with the forced Pipe A quirk.
Comment 4 Peter Stuge 2010-08-25 20:04:06 UTC
Chris' overlay branch works okey for me on ThinkPad X40.

Rebasing the overlay branch onto drm-intel.git does not work so well. Xv doesn't seem to work at all; I get X11 error: BadAlloc (insufficient resources for operation) and the kernel locked up on resume at least once.

Plain overlay branch seems more stable and gives working video.
Comment 5 Jesse Barnes 2010-09-01 09:37:42 UTC
Dan likes overlay bugs.
Comment 6 Vasyl Demin 2010-09-05 14:09:25 UTC
Same problem on laptop HP Compaq nx9020.

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

Arch Linux i686
kernel26 2.6.35.4-1
xf86-video-intel 2.12.0-1
libdrm 2.4.21-2
xorg-server 1.8.1.902-1
mesa 7.8.2-1

Lines from Xorg.0.log after run mplayer with xv output:

[  3227.674] (EE) intel(0): Detected a hung GPU, disabling acceleration.

After run mplayer with gl output:

[  3251.158] 
Backtrace:
[  3251.159] 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80df05b]
[  3251.159] 1: /usr/bin/X (0x8048000+0x63da5) [0x80abda5]
[  3251.159] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xb77a440c]
[  3251.159] 3: /usr/lib/xorg/modules/extensions/libdri2.so (0xb7398000+0x31ef) [0xb739b1ef]
[  3251.159] 4: /usr/bin/X (0x8048000+0x2170f) [0x806970f]
[  3251.159] 5: /usr/bin/X (0x8048000+0x1a4b5) [0x80624b5]
[  3251.159] 6: /lib/libc.so.6 (__libc_start_main+0xe6) [0xb74d9c76]
[  3251.159] 7: /usr/bin/X (0x8048000+0x1a0a1) [0x80620a1]
[  3251.159] Segmentation fault at address (nil)
[  3251.159] 
Fatal server error:
[  3251.159] Caught signal 11 (Segmentation fault). Server aborting
[  3251.159]

Sorry, I can't try Chris' overlay branch because I don't have necessary skill.
I just want to confirm a bug.
Comment 7 Daniel Vetter 2010-12-04 08:54:57 UTC
Bruno, can you please give a status update for this bug? If it still happens, please report current versions of your graphics stack.

Thx, Daniel
Comment 8 Bruno 2010-12-04 09:26:31 UTC
(In reply to comment #7)
> Bruno, can you please give a status update for this bug? If it still happens,
> please report current versions of your graphics stack.

Seems either kernel update or libdrm update fixed it as it does not happen anymore (be it mplayer -vo gl or mplayer -vo xv) and I get video as expected.

Though mplayer -vo gl causes a line in Xorg.log:
(EE) DoSwapInterval: cx = (nil), GLX screen = (nil)



My current stack is:
 - kernel 2.6.36-rc7-00125-gb88d3c2
 - x11-drivers/xf86-video-intel-2.12.0
 - media-libs/mesa-7.8.2
 - x11-libs/libdrm-2.4.22
 - x11-base/xorg-server-1.7.7-r1
Comment 9 Daniel Vetter 2010-12-04 09:32:05 UTC
Please reopen in case it shows up again.

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.