Bug 100195

Summary: [Regression] [Bisected] [SKL/GLK] Failed assertion a->crc[i] == b->crc[i] for all igt@kms_chv_cursor_fail subtests
Product: DRI Reporter: Jari Tahvanainen <jari.tahvanainen>
Component: DRM/IntelAssignee: Ville Syrjala <ville.syrjala>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: critical    
Priority: highest CC: christophe.prigent, dorota.czaplejewicz, intel-gfx-bugs
Version: DRI gitKeywords: bisected, regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: GLK, SKL i915 features:
Attachments:
Description Flags
SKL specs none

Description Jari Tahvanainen 2017-03-14 12:17:53 UTC
Created attachment 130214 [details]
SKL specs

igt@kms_chv_cursor_fail subtests start to fail on SKL due to
Bad commit: a5509abda48ecfc133fac6268e83fc1a93dba039 drm/i915: Fix legacy cursor vs. watermarks for ILK-BDW
Good commit: commit 9ce53745

Bisecting was done on my dev-SKL, but below failure data is taken from SKL_NUC6i5SYB (see attachments) for 
commit 7f38bb9ea553c613223b705326c1b8d1a8fc4a90
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Mar 2 22:36:30 2017 +0000
    drm-tip: 2017y-03m-02d-22h-35m-41s UTC integration manifest
Kernel version : 4.10.0-7f38bb9

Stdout	
IGT-Version: 1.17-g8f3164f (x86_64) (Linux: 4.10.0-drm-tip-qa-ww9-commit-7f38bb9+ x86_64)
Beginning pipe-A-128x128-bottom-edge on pipe A, connector HDMI-A-1
Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [igt_assert_crc_equal+0x73]
  #2 [test_edge_pos.constprop.7+0x24b]
  #3 [test_edge.constprop.6+0x126]
  #4 [test_crtc.constprop.2+0x3fc]
  #5 [main+0x590]
  #6 [__libc_start_main+0xf1]
  #7 [_start+0x29]
  #8 [<unknown>+0x29]
Subtest pipe-A-128x128-bottom-edge: FAIL (154.353s)
Stderr	
Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:295:
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: Failed assertion: a->crc[i] == b->crc[i]
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: Last errno: 11, Resource temporarily unavailable
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: error: 0x3bfd4c9e != 0x613f340f
Subtest pipe-A-128x128-bottom-edge failed.
**** DEBUG ****
(kms_chv_cursor_fail:13437) DEBUG: Test requirement passed: data.pipe < data.display.n_pipes
(kms_chv_cursor_fail:13437) DEBUG: Test requirement passed: data.curw <= max_curw && data.curh <= max_curh
(kms_chv_cursor_fail:13437) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=128, height=128, format=0x34325241, tiling=0x0, size=0)
(kms_chv_cursor_fail:13437) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=1, pitch=512)
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: HDMI-A-1: set_pipe(A)
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: HDMI-A-1: Selecting pipe A
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: A.2: plane_set_fb(0)
(kms_chv_cursor_fail:13437) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=3840, height=2160, format=0x34325258, tiling=0x0, size=0)
(kms_chv_cursor_fail:13437) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=15360)
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: A.0: plane_set_fb(138)
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: commit {
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     HDMI-A-1: Selecting pipe A
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     HDMI-A-1: SetCrtc pipe A, fb 138, src (0, 0), mode 3840x2160
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetPlane pipe A, plane 1, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetCursor pipe A, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetCrtc pipe B, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetPlane pipe B, plane 1, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetCursor pipe B, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetCrtc pipe C, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetPlane pipe C, plane 1, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display:     SetCursor pipe C, disabling
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: }
(kms_chv_cursor_fail:13437) igt-debugfs-DEBUG: Using generic frame CRC ABI
(kms_chv_cursor_fail:13437) igt-kms-DEBUG: display: A.2: plane_set_fb(0)
(kms_chv_cursor_fail:13437) INFO: Beginning pipe-A-128x128-bottom-edge on pipe A, connector HDMI-A-1
(kms_chv_cursor_fail:13437) DEBUG: [0] x=3840, y=2032
(kms_chv_cursor_fail:13437) DEBUG: [1] x=3840, y=2048
(kms_chv_cursor_fail:13437) DEBUG: [2] x=3840, y=2064
(kms_chv_cursor_fail:13437) DEBUG: [3] x=3840, y=2080
(kms_chv_cursor_fail:13437) DEBUG: [4] x=3840, y=2096
(kms_chv_cursor_fail:13437) DEBUG: [5] x=3840, y=2112
(kms_chv_cursor_fail:13437) DEBUG: [6] x=3840, y=2128
(kms_chv_cursor_fail:13437) DEBUG: [7] x=3840, y=2144
(kms_chv_cursor_fail:13437) DEBUG: [8] x=3840, y=2160
(kms_chv_cursor_fail:13437) DEBUG: Checking CRCs: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] 
(kms_chv_cursor_fail:13437) DEBUG: [0] x=3344, y=2160
(kms_chv_cursor_fail:13437) DEBUG: [1] x=3344, y=2144
(kms_chv_cursor_fail:13437) DEBUG: [2] x=3344, y=2128
(kms_chv_cursor_fail:13437) DEBUG: [3] x=3344, y=2112
(kms_chv_cursor_fail:13437) DEBUG: [4] x=3344, y=2096
(kms_chv_cursor_fail:13437) DEBUG: [5] x=3344, y=2080
(kms_chv_cursor_fail:13437) DEBUG: [6] x=3344, y=2064
(kms_chv_cursor_fail:13437) DEBUG: [7] x=3344, y=2048
(kms_chv_cursor_fail:13437) DEBUG: [8] x=3344, y=2032
(kms_chv_cursor_fail:13437) DEBUG: Checking CRCs: [0] [1] [2] [3] [4] [5] Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:295:
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: Failed assertion: a->crc[i] == b->crc[i]
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: Last errno: 11, Resource temporarily unavailable
(kms_chv_cursor_fail:13437) igt-debugfs-CRITICAL: error: 0x3bfd4c9e != 0x613f340f
****  END  ****
Environment	
PIGLIT_PLATFORM="mixed_glx_egl" PIGLIT_SOURCE_DIR="/home/gfx/intel-graphics/intel-gpu-tools/piglit"
Command	/home/gfx/intel-graphics/intel-gpu-tools/tests/kms_chv_cursor_fail --run-subtest pipe-A-128x128-bottom-edge
Comment 1 Ville Syrjala 2017-03-14 15:19:03 UTC
https://patchwork.freedesktop.org/series/21226/
Comment 2 Dorota Czaplejewicz 2017-03-16 16:10:36 UTC
This is similar to #100183 #100184 #100185 although different test is in play.
Comment 3 Dorota Czaplejewicz 2017-03-16 18:51:33 UTC
The patch series above doesn't change the failure when applied to drm-tip: 2017y-03m-16d-14h-28m-12s
Comment 4 Jari Tahvanainen 2017-03-17 11:02:44 UTC
Hmmm.... Dorothea, can you please re-check? Did you got the problem reproduced on your SKL (good commit, bad commit)?

For me the latest drm-tip
HEAD is now at e84abc1 drm-tip: 2017y-03m-17d-08h-03m-19s UTC integration manifest
gives for kms_chv_cursor_fail.testlist (having only kms_chv_cursor_fail subcases)
[36/36] fail: 11, dmesg-fail: 25
while e84abc1 with patches
git am 1-2-drm-i915-Extract-intel_wm_plane_visible.patch.mbox
Applying: drm/i915: Extract intel_wm_plane_visible()
git am 2-2-drm-i915-Fix-SKL-cursor-watermarks.patch.mbox
Applying: drm/i915: Fix SKL cursor watermarks
and compilation gives all pass - [36/36] pass: 36

So based on this I would claim that fix works. I verified this with my dev-SKL (i5-6600k), with which I did bisecting, having Ubuntu 16.04 with drm-tip kernel with only one display connected.
connector 48: type HDMI-A-1, status: disconnected
connector 53: type HDMI-A-2, status: disconnected
connector 55: type DP-1, status: connected
        DP branch device present: yes
                Type: VGA
Comment 5 Dorota Czaplejewicz 2017-03-17 19:08:10 UTC
You said "with patches", but it's only possible to download one patch via the link you provided:  	[1/2] drm/i915: Extract intel_wm_plane_visible()

Where can I find the [2/2] patch?
Comment 6 Ville Syrjala 2017-03-17 19:14:15 UTC
(In reply to Dorota Czaplejewicz from comment #5)
> You said "with patches", but it's only possible to download one patch via
> the link you provided:  	[1/2] drm/i915: Extract intel_wm_plane_visible()
> 
> Where can I find the [2/2] patch?

It's hiding behind the 'rev 1' button, because pw got confused by Jari's reply.
Comment 7 Dorota Czaplejewicz 2017-03-17 19:42:14 UTC
After applying both patches on top of drm-tip: 2017y-03m-17d-15h-12m-48s , the tests pass again.

Sorry for the mistake.
Comment 8 Dorota Czaplejewicz 2017-03-18 20:48:43 UTC
Bugs #100183 #100184 #100185 are not related - the patch set doesn't fix them.
Comment 9 Ander Conselvan de Oliveira 2017-03-22 13:57:05 UTC
*** Bug 100301 has been marked as a duplicate of this bug. ***
Comment 10 maria guadalupe 2017-03-22 23:11:15 UTC
This issue still happen on GLK whit the next configuration;

Kernel version : 4.11.0-rc2-6aefe8d
commit 6aefe8d3baa2d94246dd20ba33c77758b6de9ccc


Component         : drm
	tag       : libdrm-2.4.75-11-g19c4cfc


Component         : cairo
	tag       : 1.15.4-11-gcffa452


Component         : intel-gpu-tools
	tag       : intel-gpu-tools-1.18-16-g5635ea9


Component         : piglit
	commit    : 4ad26d8
	

IGT tests 
===============================
igt@kms_chv_cursor_fail subtests

Result
===============================
FAIL
Comment 11 Ander Conselvan de Oliveira 2017-03-23 07:21:50 UTC
(In reply to maria guadalupe from comment #10)
> This issue still happen on GLK whit the next configuration;
> 
> Kernel version : 4.11.0-rc2-6aefe8d
> commit 6aefe8d3baa2d94246dd20ba33c77758b6de9ccc

I can't find that commit in drm-tip. Can you check your kernel includes

commit 93aa2a1c25e562cc0ca69c3175333fe33fdf055b
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Mar 14 17:10:50 2017 +0200

    drm/i915: Fix SKL cursor watermarks

and test again.
Comment 12 Chris Wilson 2017-03-23 08:25:25 UTC
commit 93aa2a1c25e562cc0ca69c3175333fe33fdf055b
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Tue Mar 14 17:10:50 2017 +0200

    drm/i915: Fix SKL cursor watermarks
Comment 13 maria guadalupe 2017-03-24 20:00:12 UTC
(In reply to Chris Wilson from comment #12)
> commit 93aa2a1c25e562cc0ca69c3175333fe33fdf055b
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Tue Mar 14 17:10:50 2017 +0200
> 
>     drm/i915: Fix SKL cursor watermarks

I tested whit the next configuration, and the results was success 

IGT tests 
===============================
igt@kms_chv_cursor_fail subtests

Actial Result
===============================
SUCCESS 

======================================
             Software
======================================
kernel version            : 4.11.0-rc1drm-tip-ww12-commit-93aa2a1+
architecture              : x86_64
os version                : Ubuntu 16.10
os codename               : yakkety
kernel driver             : i915
bios revision             : 32.30
bios release date         : 01/24/2017
ksc                       : 1.9

======================================
        Graphic drivers
======================================
modesetting               : modesetting_drv.so
xorg-xserver              : 1.18.4
libdrm                    : 2.4.75
cairo                     : 1.15.5
xserver                   : X.Org X Server 1.18.4
intel-gpu-tools (tag)     : intel-gpu-tools-1.18-25-gb1fa6c8
intel-gpu-tools (commit)  : b1fa6c8

======================================
             Hardware
======================================
platform                  : Geminilake
motherboard model         : Geminilake
motherboard id            : GLKRVP1DDR4(05)
form factor               : Hand Held
manufacturer              : IntelCorp.
cpu family                : Other
cpu family id             : 6
cpu information           : Genuine Intel(R) CPU @ 1.10GHz
gpu card                  : Intel Corporation Device 3184 (rev 01) (prog-if 00 [VGA controller])
max memory ram            : 16 GB
xdpyinfo:  unable to open display ":0".
cpu thread                : 4
cpu core                  : 4
cpu model                 : 122
cpu stepping              : 0
socket                    : Other
hard drive                : 74GiB (80GB)

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.