Bug 40059

Summary: [SNB] hang in "Amnesia: The Dark Descent" demo
Product: Mesa Reporter: nobled <nobled>
Component: Drivers/DRI/i965Assignee: Kenneth Graunke <kenneth>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: ben, chris, eugeni, idr, jbarnes, kenneth, mesa-dev, nobled
Version: 8.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: i915_error_state after X restart
dmesg log after X restart

Description nobled 2011-08-13 09:39:13 UTC
Created attachment 50183 [details]
i915_error_state after X restart

All versions are from the xorg-edgers PPA packages I installed:
Distribution: Ubuntu 11.04 amd64
kernel: 3.0.0
libdrm: 2.4.6+git20110808.2acaf160
mesa: 7.12.0~git20110811.9cd64ec3
DDX (xserver-xorg-video-intel): 2:2.15.901+git20110808.f4bbbd1d
Xorg: 2:1.10.2.902+git20110708+server-1.10-branch.bc3c539e

I hit this trying the Linux demo for Amnesia: The Dark Descent:
http://www.amnesiagame.com/#demo

I started it at its lowest settings in windowed, 640x480 mode. As soon as it starts trying to render the start-screen's background scene, the desktop session/window manager starts going crazy, as the window decorations turn white or disappear, as does the taskbar/shell at the top and bottom of the screen. (I'm running the 'Ubuntu Classic' session, so it was probably compiz.)

Nothing was responding to my clicks, my Alt+F4s, or my Ctrl+Cs (I launched Amnesia from gnome-terminal -- the "^C" would appear but nothing happened). I VT-switched with Ctrl+Alt+F1 and back again, and it threw me back to the gnome login screen. After I logged in again, only the Software Rasterizer was available according to glxinfo.

I'll attach the dmesg log, and a dump of the i915_error_state file.
Comment 1 nobled 2011-08-13 09:40:21 UTC
Created attachment 50184 [details]
dmesg log after X restart
Comment 2 nobled 2011-10-10 17:18:03 UTC
Ping--Is there any other info needed?
Comment 3 nobled 2012-01-23 11:36:06 UTC
http://www.mediafire.com/?qm7nckc1da444rc

Here's an apitrace file (with the bigger CompressedTexImage2DARB calls ripped out to cut down on size dramatically) that still reproduces the hang with mesa 5a7c3433 and kernel 3.2.0.
Comment 4 Kenneth Graunke 2012-02-21 12:16:37 UTC
This is fixed by the last render target select patch on the mailing list.  Will commit it shortly...
Comment 5 Kenneth Graunke 2012-02-21 12:40:40 UTC
Fixed on master by:

commit 172bb92db1a3c317867d9cfec6f15c09c37a0f6c
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat Feb 18 21:29:29 2012 -0800

    i965: Only set Last Render Target Select on the last FB write.
    
    Fixes GPU hangs in OilRush, Trine, and Amnesia: The Dark Descent,
    which all use MRT (multiple render targets).
    
    NOTE: This is a candidate for release branches.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38720
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40059
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45216
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>

Thanks for the trimmed apitrace!
Comment 6 Kenneth Graunke 2012-02-28 13:12:20 UTC
Fixed on the 8.0 branch:

commit 16cc79f975816c0741711560be48fc498d4b4794
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sat Feb 18 21:29:29 2012 -0800

    i965: Only set Last Render Target Select on the last FB write.
    
    Fixes GPU hangs in OilRush, Trine, and Amnesia: The Dark Descent,
    which all use MRT (multiple render targets).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38720
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40059
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45216
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit 172bb92db1a3c317867d9cfec6f15c09c37a0f6c)

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.