Bug 75478 - [BDW]Some Piglit and Ogles2conform cases cause GPU hang
Summary: [BDW]Some Piglit and Ogles2conform cases cause GPU hang
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-25 06:13 UTC by lu hua
Modified: 2014-05-14 03:27 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (92.75 KB, text/plain)
2014-02-25 06:14 UTC, lu hua
Details
/sys/class/drm/card0/error (2.77 MB, text/plain)
2014-02-25 06:15 UTC, lu hua
Details
dmesg(glsl-fs-raytrace-bug27060) (108.90 KB, text/plain)
2014-03-17 07:10 UTC, lu hua
Details

Description lu hua 2014-02-25 06:13:16 UTC
System Environment:
--------------------------
Platform: Broadwell
Libdrm:		(master)libdrm-2.4.52-4-gc5de5abbd90333fe1359283fb3a5e457b0f389f3
Mesa:		(master)73c78c514f8db0605c0deb85382003d0f66b5525
Xserver:	(master)xorg-server-1.15.0-631-g0f10cfd4b903d4db293ec47c8a9a0d8b33965803
Xf86_video_intel:(master)2.99.910-68-gff49944928c7399527b11bb0da7699711591c21a
Cairo:		(master)4144307dbfbe7b297135d9ea4b080cae7e06b997
Libva:		(staging)8be6d274d931d8041934efa63caaee75a5984755
Libva_intel_driver:(staging)bd630edd844b88ea543a027654db296ff7da16cd
Kernel:	(drm-intel-nightly)1be8f2b4dd6d3db00af24d4891c82d2650bd282d

Bug detailed description:
------------------------- 
Some Piglit and Ogles2conform cause GPU hang on above system environment.

Following Piglit cases cause GPU hang:
glsl-fs-raytrace-bug27060
spec/glsl-1.40/uniform_buffer/fs-struct-copy-complicated
spec/glsl-1.40/uniform_buffer/vs-struct-copy-complicated
spec/glsl-1.50/uniform_buffer/gs-struct-copy-complicated
shaders/glsl-fs-vec4-indexing-temp-src-in-nested-loop-combined
shaders/glsl-fs-atan-3
spec/glsl-1.30/execution/clipping/vs-clip-distance-bulk-assign
spec/glsl-1.30/execution/varying-packing-mixed-types
shaders/glsl-max-varyings


Following Ogles2conform cases cause GPU hang, then system will be no response:
(GLES20)GL_acos_acos_float_frag_xvary.test
(GLES20)GL_acos_acos_vec2_frag_xvary.test
(GLES20)GL_atan_atan_float_frag_xvary.test
(GLES20)GL_atan_atan_float_vert_xvary.test
(GLES20)GL_atan_atan_vec2_vert_xvary.test

Reproduce steps:
-------------------------
1. run ./bin/glsl-fs-raytrace-bug27060 -fbo -auto
Comment 1 lu hua 2014-02-25 06:14:57 UTC
Created attachment 94700 [details]
dmesg
Comment 2 lu hua 2014-02-25 06:15:33 UTC
Created attachment 94701 [details]
/sys/class/drm/card0/error
Comment 3 lu hua 2014-02-25 07:51:37 UTC
(GLES20)GL_functions_mat4_empty_inout_mat4_array_vert.test and 
(GLES20)GL_sin_sin_vec3_frag_xvary.test also cause GPU hang.
Comment 4 lu hua 2014-02-25 08:32:56 UTC
Webglc case conformance_ogles_mustpass.run.txt also causes GPU hang.
Comment 5 lu hua 2014-02-28 06:29:43 UTC
Ogles2conform cases cause system no response, So file new Bug 75591.
Comment 6 lu hua 2014-03-17 07:10:47 UTC
Created attachment 95910 [details]
dmesg(glsl-fs-raytrace-bug27060)

Test on latest -nightly kernel and Mesa master branch. Some Piglit cases still have this issue. run Ogles2conform cases, this issue goes away.
glsl-fs-raytrace-bug27060 has this issue.
Comment 7 lu hua 2014-03-17 08:47:57 UTC
Decreasing priority.
It only reports GPU hang on dmesg. 
System no response issue goes away.
Comment 8 Kenneth Graunke 2014-03-17 17:54:24 UTC
I've looked at these extensively, and I have no clue.  It appears to be a hang in the shader; converting IF/ELSE/ENDIF to NOP makes the tests not hang.  I've also tried adding lots of "switch" flags, and that doesn't help either.

Maybe somebody else will have an idea.
Comment 9 Kenneth Graunke 2014-05-08 23:45:53 UTC
Fixed by this patch:
http://article.gmane.org/gmane.comp.video.mesa3d.devel/77713
Comment 10 Kenneth Graunke 2014-05-09 21:52:56 UTC
Fixed by:

commit 9584959123b0453cf5313722357e3abb9f736aa7
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu May 8 16:44:37 2014 -0700

    i965: Fix GPU hangs on Broadwell in shaders with some control flow.
    
    According to the documentation, we need to set the source 0 register
    type to IMM for flow control instructions that have both JIP and UIP.
    
    Fixes GPU hangs in approximately 10 Piglit tests, 5 es3conform tests,
    Unigine Crypt, a WebGL raytracer demo, and several Steam titles.

Topi, Kristian, and I all verified the fix.
Comment 11 lu hua 2014-05-14 03:27:11 UTC
Verified.Fixed.


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.