Bug 78239

Summary: [i965]Some subcases of igt/gem_reset_stats fails
Product: DRI Reporter: Guo Jinxian <jinxianx.guo>
Component: DRM/IntelAssignee: Mika Kuoppala <mika.kuoppala>
Status: CLOSED WONTFIX QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmesg
none
dmesg none

Description Guo Jinxian 2014-05-04 04:20:39 UTC
Created attachment 98397 [details]
dmesg

*System Environment:
--------------------------
Platform: SNB IVB HSW
kernel: 
-nightly: 08ce6614d07dd1e426109672a5e323317c8d6ec7(works)
-queued: e5c03ca362819ba8ffbe5674340b61b9cd75de8f (works)
-fixes: 9bbfd20abe5025adbb0ac75160bd2e41158a9e83 (fails)


 *Bug detailed description:
-----------------------------
Some subcases of igt/gem_reset_stats below fails
ban-blt
ban-bsd
ban-render



Output:
 ./gem_reset_stats --run-subtest ban-blt
IGT-Version: 1.6-gc864279 (x86_64) (Linux: 3.15.0-rc2_drm-intel-fixes_9bbfd2_20140503+ x86_64)
retrying for ban (9)
retrying for ban (8)
retrying for ban (7)
retrying for ban (6)
retrying for ban (5)
retrying for ban (4)
retrying for ban (3)
retrying for ban (2)
retrying for ban (1)
retrying for ban (0)
Test assertion failure function test_ban, file gem_reset_stats.c:574:
Last errno: 0, Success
Failed assertion: h4 == -EIO
Subtest ban-blt: FAIL

 *Reproduce steps:
---------------------------- 
1. ./gem_reset_stats --run-subtest ban-blt
Comment 1 Guo Jinxian 2014-05-04 04:28:35 UTC
We reported another Bug 73859 to track this issue before. which was marked as invalid because getting reset stats (ioctl) was not ready on drm-intel-fixes at that time.
Comment 2 Guo Jinxian 2014-05-04 05:42:18 UTC
Cases below failed on ILK
close-pending-fork-blt
params-ctx-blt
unrelated-ctx-vebox

output:
./gem_reset_stats --run-subtest gem_reset_stats
IGT-Version: 1.6-gc864279 (x86_64) (Linux: 3.15.0-rc2_drm-intel-fixes_9bbfd2_20140503+ x86_64)
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:813:
Last errno: 0, Success
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || (intel_get_drm_devid(fd)) == 0x0112 || (intel_get_d                                                                                                                     rm_devid(fd)) == 0x0122 || (intel_get_drm_devid(fd)) == 0x0106 || (intel_get_drm_devid(fd)) == 0x0116 || (intel_g                                                                                                                     et_drm_devid(fd)) == 0x0126 || (intel_get_drm_devid(fd)) == 0x010A) || (((intel_get_drm_devid(fd)) == 0x0152 || (                                                                                                                     intel_get_drm_devid(fd)) == 0x0162 || (intel_get_drm_devid(fd)) == 0x0156 || (intel_get_drm_devid(fd)) == 0x0166                                                                                                                      || (intel_get_drm_devid(fd)) == 0x015a || (intel_get_drm_devid(fd)) == 0x016a) || (((intel_get_drm_devid(fd)) ==                                                                                                                      0x0402 || (intel_get_drm_devid(fd)) == 0x0406 || (intel_get_drm_devid(fd)) == 0x040A || (intel_get_drm_devid(fd))                                                                                                                      == 0x040B || (intel_get_drm_devid(fd)) == 0x040E || (intel_get_drm_devid(fd)) == 0x0C02 || (intel_get_drm_devid(                                                                                                                     fd)) == 0x0C06 || (intel_get_drm_devid(fd)) == 0x0C0A || (intel_get_drm_devid(fd)) == 0x0C0B || (intel_get_drm_de                                                                                                                     vid(fd)) == 0x0C0E || (intel_get_drm_devid(fd)) == 0x0A02 || (intel_get_drm_devid(fd)) == 0x0A06 || (intel_get_dr                                                                                                                     m_devid(fd)) == 0x0A0A || (intel_get_drm_devid(fd)) == 0x0A0B || (intel_get_drm_devid(fd)) == 0x0A0E || (intel_ge                                                                                                                     t_drm_devid(fd)) == 0x0D02 || (intel_get_drm_devid(fd)) == 0x0D06 || (intel_get_drm_devid(fd)) == 0x0D0A || (inte                                                                                                                     l_get_drm_devid(fd)) == 0x0D0B || (intel_get_drm_devid(fd)) == 0x0D0E) || ((intel_get_drm_devid(fd)) == 0x0412 ||                                                                                                                      (intel_get_drm_devid(fd)) == 0x0416 || (intel_get_drm_devid(fd)) == 0x041A || (intel_get_drm_devid(fd)) == 0x041                                                                                                                     B || (intel_get_drm_devid(fd)) == 0x041E || (intel_get_drm_devid(fd)) == 0x0C12 || (intel_get_drm_devid(fd)) == 0                                                                                                                     x0C16 || (intel_get_drm_devid(fd)) == 0x0C1A || (intel_get_drm_devid(fd)) == 0x0C1B || (intel_get_drm_devid(fd))                                                                                                                      == 0x0C1E || (intel_get_drm_devid(fd)) == 0x0A12 || (intel_get_drm_devid(fd)) == 0x0A16 || (intel_get_drm_devid(f                                                                                                                     d)) == 0x0A1A || (intel_get_drm_devid(fd)) == 0x0A1B || (intel_get_drm_devid(fd)) == 0x0A1E || (intel_get_drm_dev                                                                                                                     id(fd)) == 0x0D12 || (intel_get_drm_devid(fd)) == 0x0D16 || (intel_get_drm_devid(fd)) == 0x0D1A || (intel_get_drm                                                                                                                     _devid(fd)) == 0x0D1B || (intel_get_drm_devid(fd)) == 0x0D1E) || ((intel_get_drm_devid(fd)) == 0x0422 || (intel_g                                                                                                                     et_drm_devid(fd)) == 0x0426 || (intel_get_drm_devid(fd)) == 0x042A || (intel_get_drm_devid(fd)) == 0x042B || (int                                                                                                                     el_get_drm_devid(fd)) == 0x042E || (intel_get_drm_devid(fd)) == 0x0C22 || (intel_get_drm_devid(fd)) == 0x0C26 ||                                                                                                                      (intel_get_drm_devid(fd)) == 0x0C2A || (intel_get_drm_devid(fd)) == 0x0C2B || (intel_get_drm_devid(fd)) == 0x0C2E                                                                                                                      || (intel_get_drm_devid(fd)) == 0x0A22 || (intel_get_drm_devid(fd)) == 0x0A26 || (intel_get_drm_devid(fd)) == 0x                                                                                                                     0A2A || (intel_get_drm_devid(fd)) == 0x0A2B || (intel_get_drm_devid(fd)) == 0x0A2E || (intel_get_drm_devid(fd)) =                                                                                                                     = 0x0D22 || (intel_get_drm_devid(fd)) == 0x0D26 || (intel_get_drm_devid(fd)) == 0x0D2A || (intel_get_drm_devid(fd                                                                                                                     )) == 0x0D2B || (intel_get_drm_devid(fd)) == 0x0D2E)) || ((intel_get_drm_devid(fd)) == 0x0f30 || (intel_get_drm_d                                                                                                                     evid(fd)) == 0x0f31 || (intel_get_drm_devid(fd)) == 0x0f32 || (intel_get_drm_devid(fd)) == 0x0f33)) || (((((intel                                                                                                                     _get_drm_devid(fd)) & 0xff00) != 0x1600) ? 0 : ((((intel_get_drm_devid(fd)) & 0x00f0) >> 4) > 3) ? 0 : (((intel_g                                                                                                                     et_drm_devid(fd)) & 0x000f) == 0x2) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0x6) ? 1 : (((intel_get_drm_de                                                                                                                     vid(fd)) & 0x000f) == 0xb) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xa) ? 1 : (((intel_get_drm_devid(fd))                                                                                                                      & 0x000f) == 0xd) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xe) ? 1 : 0) || ((intel_get_drm_devid(fd)) == 0                                                                                                                     x22b0 || (intel_get_drm_devid(fd)) == 0x22b1 || (intel_get_drm_devid(fd)) == 0x22b2 || (intel_get_drm_devid(fd))                                                                                                                      == 0x22b3)))))
Comment 3 Guo Jinxian 2014-05-05 06:07:14 UTC
Cases below failed on ILK too
igt/gem_reset_stats/close-pending-fork-bsd
igt/gem_reset_stats/close-pending-fork-render
igt/gem_reset_stats/close-pending-fork-reverse-render
igt/gem_reset_stats/close-pending-render
igt/gem_reset_stats/close-pending-vebox
igt/gem_reset_stats/params
igt/gem_reset_stats/unrelated-ctx-render
igt/gem_reset_stats/unrelated-ctx-vebox

output:
./gem_reset_stats --run-subtest unrelated-ctx-vebox
IGT-Version: 1.6-gc864279 (x86_64) (Linux: 3.15.0-rc2_drm-intel-fixes_9bbfd2_20140504+ x86_64)
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:813:
Last errno: 0, Success
Test requirement: (!((((intel_get_drm_devid(fd)) == 0x0102 || (intel_get_drm_devid(fd)) == 0x0112 || (intel_get_drm_devid(fd)) == 0x0122 || (intel_get_drm_devid(fd)) == 0x0106 || (intel_get_drm_devid(fd)) == 0x0116 || (intel_get_drm_devid(fd)) == 0x0126 || (intel_get_drm_devid(fd)) == 0x010A) || (((intel_get_drm_devid(fd)) == 0x0152 || (intel_get_drm_devid(fd)) == 0x0162 || (intel_get_drm_devid(fd)) == 0x0156 || (intel_get_drm_devid(fd)) == 0x0166 || (intel_get_drm_devid(fd)) == 0x015a || (intel_get_drm_devid(fd)) == 0x016a) || (((intel_get_drm_devid(fd)) == 0x0402 || (intel_get_drm_devid(fd)) == 0x0406 || (intel_get_drm_devid(fd)) == 0x040A || (intel_get_drm_devid(fd)) == 0x040B || (intel_get_drm_devid(fd)) == 0x040E || (intel_get_drm_devid(fd)) == 0x0C02 || (intel_get_drm_devid(fd)) == 0x0C06 || (intel_get_drm_devid(fd)) == 0x0C0A || (intel_get_drm_devid(fd)) == 0x0C0B || (intel_get_drm_devid(fd)) == 0x0C0E || (intel_get_drm_devid(fd)) == 0x0A02 || (intel_get_drm_devid(fd)) == 0x0A06 || (intel_get_drm_devid(fd)) == 0x0A0A || (intel_get_drm_devid(fd)) == 0x0A0B || (intel_get_drm_devid(fd)) == 0x0A0E || (intel_get_drm_devid(fd)) == 0x0D02 || (intel_get_drm_devid(fd)) == 0x0D06 || (intel_get_drm_devid(fd)) == 0x0D0A || (intel_get_drm_devid(fd)) == 0x0D0B || (intel_get_drm_devid(fd)) == 0x0D0E) || ((intel_get_drm_devid(fd)) == 0x0412 || (intel_get_drm_devid(fd)) == 0x0416 || (intel_get_drm_devid(fd)) == 0x041A || (intel_get_drm_devid(fd)) == 0x041B || (intel_get_drm_devid(fd)) == 0x041E || (intel_get_drm_devid(fd)) == 0x0C12 || (intel_get_drm_devid(fd)) == 0x0C16 || (intel_get_drm_devid(fd)) == 0x0C1A || (intel_get_drm_devid(fd)) == 0x0C1B || (intel_get_drm_devid(fd)) == 0x0C1E || (intel_get_drm_devid(fd)) == 0x0A12 || (intel_get_drm_devid(fd)) == 0x0A16 || (intel_get_drm_devid(fd)) == 0x0A1A || (intel_get_drm_devid(fd)) == 0x0A1B || (intel_get_drm_devid(fd)) == 0x0A1E || (intel_get_drm_devid(fd)) == 0x0D12 || (intel_get_drm_devid(fd)) == 0x0D16 || (intel_get_drm_devid(fd)) == 0x0D1A || (intel_get_drm_devid(fd)) == 0x0D1B || (intel_get_drm_devid(fd)) == 0x0D1E) || ((intel_get_drm_devid(fd)) == 0x0422 || (intel_get_drm_devid(fd)) == 0x0426 || (intel_get_drm_devid(fd)) == 0x042A || (intel_get_drm_devid(fd)) == 0x042B || (intel_get_drm_devid(fd)) == 0x042E || (intel_get_drm_devid(fd)) == 0x0C22 || (intel_get_drm_devid(fd)) == 0x0C26 || (intel_get_drm_devid(fd)) == 0x0C2A || (intel_get_drm_devid(fd)) == 0x0C2B || (intel_get_drm_devid(fd)) == 0x0C2E || (intel_get_drm_devid(fd)) == 0x0A22 || (intel_get_drm_devid(fd)) == 0x0A26 || (intel_get_drm_devid(fd)) == 0x0A2A || (intel_get_drm_devid(fd)) == 0x0A2B || (intel_get_drm_devid(fd)) == 0x0A2E || (intel_get_drm_devid(fd)) == 0x0D22 || (intel_get_drm_devid(fd)) == 0x0D26 || (intel_get_drm_devid(fd)) == 0x0D2A || (intel_get_drm_devid(fd)) == 0x0D2B || (intel_get_drm_devid(fd)) == 0x0D2E)) || ((intel_get_drm_devid(fd)) == 0x0f30 || (intel_get_drm_devid(fd)) == 0x0f31 || (intel_get_drm_devid(fd)) == 0x0f32 || (intel_get_drm_devid(fd)) == 0x0f33)) || (((((intel_get_drm_devid(fd)) & 0xff00) != 0x1600) ? 0 : ((((intel_get_drm_devid(fd)) & 0x00f0) >> 4) > 3) ? 0 : (((intel_get_drm_devid(fd)) & 0x000f) == 0x2) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0x6) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xb) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xa) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xd) ? 1 : (((intel_get_drm_devid(fd)) & 0x000f) == 0xe) ? 1 : 0) || ((intel_get_drm_devid(fd)) == 0x22b0 || (intel_get_drm_devid(fd)) == 0x22b1 || (intel_get_drm_devid(fd)) == 0x22b2 || (intel_get_drm_devid(fd)) == 0x22b3)))))
Subtest unrelated-ctx-vebox: SKIP
Comment 4 Mika Kuoppala 2014-05-05 12:15:57 UTC
You can't run unrelated-ctx-vebox on ILK as there is no such a ring on that hw.

What is the failure in here? Does the test return error code?
Comment 5 Guo Jinxian 2014-05-09 05:02:16 UTC
(In reply to comment #4)
> You can't run unrelated-ctx-vebox on ILK as there is no such a ring on that
> hw.
> 
> What is the failure in here? Does the test return error code?

Here is the output on SNB
 ./gem_reset_stats --run-subtest ban-blt
IGT-Version: 1.6-g8741c22 (x86_64) (Linux: 3.15.0-rc3_drm-intel-fixes_e4c610_20140509+ x86_64)
retrying for ban (9)
retrying for ban (8)
retrying for ban (7)
retrying for ban (6)
retrying for ban (5)
retrying for ban (4)
retrying for ban (3)
retrying for ban (2)
retrying for ban (1)
retrying for ban (0)
Test assertion failure function test_ban, file gem_reset_stats.c:574:
Last errno: 0, Success
Failed assertion: h4 == -EIO
Subtest ban-blt: FAIL
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:820:
Last errno: 0, Success
Test requirement: (!(gem_has_vebox(fd)))

./gem_reset_stats --run-subtest close-pending-fork-bsd
IGT-Version: 1.6-g8741c22 (x86_64) (Linux: 3.15.0-rc3_drm-intel-fixes_e4c610_20140509+ x86_64)
Subtest close-pending-fork-bsd: SUCCESS
Test requirement not met in function gem_require_ring, file ioctl_wrappers.c:820:
Last errno: 0, Success
Test requirement: (!(gem_has_vebox(fd)))
Comment 6 Guo Jinxian 2014-05-09 05:02:47 UTC
Created attachment 98726 [details]
dmesg
Comment 7 Mika Kuoppala 2014-05-09 06:27:26 UTC
For the ban test to work correctly, 

commit 88b4aa8770d7779b7eaad47a0b5a32374f07f476
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Fri Mar 28 18:18:18 2014 +0200

    drm/i915: add flags to i915_ring_stop

is needed. This bug will be fixed when it lands in -fixes
Comment 8 lu hua 2014-05-13 02:48:56 UTC
It also happens on BYT and BDW.
Comment 9 Daniel Vetter 2014-05-15 15:30:24 UTC
Known to not work in -fixes due to lack of debugfs support.

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.