Bug 56416 - [SNB bisected] SNB hang with rc6 and hiz on glxgears (and other GL apps) immediately after xinit.
Summary: [SNB bisected] SNB hang with rc6 and hiz on glxgears (and other GL apps) imme...
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Eric Anholt
QA Contact:
URL:
Whiteboard:
Keywords:
: 55409 62141 63899 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-10-26 06:26 UTC by ye.tian
Modified: 2015-05-20 01:24 UTC (History)
12 users (show)

See Also:
i915 platform:
i915 features:


Attachments
implement Hiz w/a for msaa (1.58 KB, patch)
2012-12-14 22:18 UTC, Daniel Vetter
Details | Splinter Review

Description ye.tian 2012-10-26 06:26:28 UTC
System Environment:       
--------------------------------------------------------
Platform: SNB
Mesa:   (master)86cd77d0a9ac940c2c06eebc5e9ef840d176712a
Xserver:(master)xorg-server-1.13.0-55-ga69429a17bf4630f6e26f61630a1c2b287202627
Kernel: (drm-intel-nightly) 032e254cefb0485c95aceca269be499b91f48aa0

Bug detailed description:
---------------------------------------------------------
System hung with xinit when run smokin-guns/glxgears on SNB. It works well on gnome-session.
It's Mesa regression, by bisected show that the first bad commit is bce58e1.
BTW, reboot after update Mesa version, which can reproduce the bug.   

commit bce58e155db7202a98642c10e6132dee4e08162b
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Jul 4 10:52:32 2012 -0700
    intel: Convert to using private depth/stencil buffers (v2)

netconsole 
-----------------------------------------------------------
[  187.724789] [drm:__gen6_gt_force_wake_get] *ERROR* Timed out waiting for forcewake to ack request.
[  187.739467] [drm:__gen6_gt_wait_for_thread_c0] *ERROR* GT thread status wait timed out

Reproduce steps:
-----------------------------------------
1, xinit&
2, ./smokinguns.x86_64 (glxgears)
Comment 1 meng 2012-12-12 06:23:51 UTC
The problem will be fixed when disable RC6 in kernel.
Comment 2 Ben Widawsky 2012-12-14 21:49:46 UTC
(In reply to comment #1)
> The problem will be fixed when disable RC6 in kernel.

Can you read the value of register 0x2120, and if bit 8 isn't set, set it.

You'll need the mask bit enable.
Comment 3 Daniel Vetter 2012-12-14 22:18:10 UTC
Created attachment 71523 [details] [review]
implement Hiz w/a for msaa

Kernel patch to test.
Comment 4 Daniel Vetter 2012-12-14 22:20:14 UTC
Also: Is this an SNB GT1? Please spec the exact model and pci id of the VGA device.
Comment 5 meng 2012-12-17 02:12:01 UTC
(In reply to comment #2)

By intel_reg_read, the vaule of register 0x2120 : 0x6800, but I can't enable the bit8 by "intel_reg_write 0x2120 0x6880".
Comment 6 meng 2012-12-17 03:18:57 UTC
With above patch, the problem still exists.

Model:DELL U2410
pci id of the VGA device:
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0102] (rev 09)
Comment 7 Eric Anholt 2013-03-19 16:16:29 UTC
Running intel_forcewaked during glxgears startup also prevents the failure.
Comment 8 Eric Anholt 2013-03-19 16:33:38 UTC
(oh, and since it hasn't been noted in the bug yet, disabling hiz does as well.  and it happens on gt2s)
Comment 9 Eric Anholt 2013-03-19 16:47:22 UTC
8x4 alignment doesn't help (-geometry 304x300), and applying a few missing workarounds to blorp doesn't help (snb-hiz-debug of my tree).  CCing people I was talking about this bug to yesterday.
Comment 10 Chad Versace 2013-03-19 18:29:51 UTC
Chrome OS experiences a similar bug. Below is the patch that Chrome uses to workaround it. Could someone please verify if this patch fixes this bug?

David Airlie on Fedora is also working with a similar bug. This patch fixed it for him.

http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=blob;f=media-libs/mesa/files/9.0-i965-Make-sure-we-do-render-between-two-hiz-flushes.patch;h=590b13b4c3da13be6ad8a8115576e6320cef7825;hb=HEAD

This patch may produce incorrect rendering, so I don't think it should be committed as-is.
Comment 11 ye.tian 2013-03-20 06:46:20 UTC
Verified with the above patch.
Comment 12 ye.tian 2013-03-20 09:04:41 UTC
(In reply to comment #11)
> Verified with the above patch.

Sorry, with the patch the problem still exists.
Comment 13 ye.tian 2013-03-20 09:51:06 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Verified with the above patch.
> 
> Sorry, with the patch the problem still exists.

Sorry, I made an error with the above patch.  
Verified with the above patch, it works well.
Comment 14 Eric Anholt 2013-04-29 21:54:20 UTC
*** Bug 62141 has been marked as a duplicate of this bug. ***
Comment 15 Daniel Vetter 2013-04-29 22:22:32 UTC
Might-or-might-not-be-relevant: https://patchwork.kernel.org/patch/2481431/
Comment 16 Austin Lund 2013-04-29 23:38:53 UTC
*** Bug 63899 has been marked as a duplicate of this bug. ***
Comment 17 Eric Anholt 2013-05-01 23:30:17 UTC
Just posted a fix that works on my system.  It's the head commit of:

http://cgit.freedesktop.org/~anholt/mesa/log/?h=snb-blorp-fix
Comment 18 ye.tian 2013-05-02 06:51:20 UTC
(In reply to comment #17)
> Just posted a fix that works on my system.  It's the head commit of:
> 
> http://cgit.freedesktop.org/~anholt/mesa/log/?h=snb-blorp-fix

Verified with the above patch.
Comment 19 Gordon Jin 2013-05-02 07:45:44 UTC
Let's keep the bug open until the patch committed to mesa master.
Comment 20 Eric Anholt 2013-05-02 15:56:41 UTC
*** Bug 55409 has been marked as a duplicate of this bug. ***
Comment 21 Austin Lund 2013-05-05 09:34:36 UTC
This seems to have been committed in master as 1dfea559c3.


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.