Bug 103167

Summary: [CI] igt@kms_frontbuffer_tracking@* - fail - CRC mismatch
Product: DRI Reporter: Marta Löfstedt <marta.lofstedt>
Component: DRM/IntelAssignee: Maarten Lankhorst <bugs>
Status: RESOLVED MOVED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: high CC: bugs, chris, edoars, intel-gfx-bugs, jan.steffens, jefferym, lakshminarayana.vudum, martin.peres, tjaalton, vicamo
Version: DRI git   
Hardware: Other   
OS: All   
Whiteboard: ReadyForDev
i915 platform: ALL i915 features: display/Other
Bug Depends on: 103191    
Bug Blocks: 105978    
Attachments:
Description Flags
kms_draw_crc chamelium hack none

Description Marta Löfstedt 2017-10-09 12:47:46 UTC
CI_DRM_3191 APL-shard 

(kms_frontbuffer_tracking:1549) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:1549) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-shrfb-scaledprimary failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3191/shard-apl5/igt@kms_frontbuffer_tracking@fbc-shrfb-scaledprimary.html
Comment 1 Marta Löfstedt 2017-10-10 08:11:46 UTC
Also,

igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3198/shard-apl7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html
Comment 2 Marta Löfstedt 2017-10-12 13:30:38 UTC
Here is a werid result:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3215/shard-apl5/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render.html

the igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render has been skipped on all other runs, but nn CI_DRM_3215:

(kms_frontbuffer_tracking:1408) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:1408) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-rgb565-draw-render failed.
Comment 8 Marta Löfstedt 2017-10-31 08:46:33 UTC
new subtest on:
CI_DRM_3297 shard-apl3 igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc

(kms_frontbuffer_tracking:3159) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:3159) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-offscren-pri-shrfb-draw-mmap-wc failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3297/shard-apl3/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-wc.html
Comment 9 Marta Löfstedt 2017-10-31 08:55:31 UTC
new subtest on:
CI_DRM_3297 shard-apl6 igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu

(kms_frontbuffer_tracking:3069) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:3069) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-rgb101010-draw-mmap-cpu failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3297/shard-apl6/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-cpu.html
Comment 10 Marta Löfstedt 2017-11-06 07:03:24 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3313/shard-apl6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt.html

(kms_frontbuffer_tracking:1484) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:1484) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-indfb-msflip-blt failed.
Comment 11 Marta Löfstedt 2017-11-09 07:13:42 UTC
new subtest APL-shards CI_DRM_3321:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3321/shard-apl8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt.html


(kms_frontbuffer_tracking:2760) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:2760) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-pri-shrfb-draw-blt failed.
Comment 12 Marta Löfstedt 2017-11-09 08:42:04 UTC
From IGT patchwork:
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_479/shard-hsw5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt.html

(kms_frontbuffer_tracking:1527) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:1527) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-shrfb-plflip-blt failed.
Comment 14 Marta Löfstedt 2017-11-17 07:17:28 UTC
new subtest APL-shards:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3353/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu.html

(kms_frontbuffer_tracking:1889) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_frontbuffer_tracking:1889) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-spr-indfb-draw-mmap-cpu failed.
Comment 15 Marta Löfstedt 2017-11-20 06:36:26 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3357/shard-apl2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-wc.html

(kms_frontbuffer_tracking:2642) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:353:
(kms_frontbuffer_tracking:2642) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-pri-shrfb-draw-mmap-wc failed.
Comment 16 Marta Löfstedt 2017-11-21 07:23:58 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3363/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-cpu.html

(kms_frontbuffer_tracking:6951) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:353:
(kms_frontbuffer_tracking:6951) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-pri-shrfb-draw-mmap-cpu failed.
Comment 17 Marta Löfstedt 2017-11-27 08:22:58 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3387/shard-hsw5/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-mmap-wc.html

(kms_frontbuffer_tracking:3026) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:3026) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-rgb101010-draw-mmap-wc failed.
Comment 18 Marta Löfstedt 2017-11-27 08:23:40 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3386/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html

(kms_frontbuffer_tracking:3924) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:3924) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-pri-shrfb-draw-render failed.
Comment 19 Marta Löfstedt 2017-11-27 08:24:30 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3392/shard-apl6/igt@kms_frontbuffer_tracking@fbc-modesetfrombusy.html

(kms_frontbuffer_tracking:5563) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:5563) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-modesetfrombusy failed.
Comment 20 Marta Löfstedt 2017-11-30 13:20:21 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7359/fi-glk-1/igt@kms_frontbuffer_tracking@basic.html

(kms_frontbuffer_tracking:3883) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:3883) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest basic failed.
Comment 22 Marta Löfstedt 2018-01-18 06:49:57 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4152/shard-apl5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-onoff.html

(kms_frontbuffer_tracking:1494) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:1494) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-cur-indfb-onoff failed.
Comment 23 Marta Löfstedt 2018-01-23 07:30:21 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3671/shard-apl6/igt@kms_frontbuffer_tracking@fbc-tilingchange.html

(kms_frontbuffer_tracking:1649) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:1649) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-tilingchange failed.
Comment 24 Marta Löfstedt 2018-01-25 06:41:24 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4177/shard-apl4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-wc.html

(kms_frontbuffer_tracking:3974) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:3974) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-pri-indfb-draw-mmap-wc failed.
Comment 26 Marta Löfstedt 2018-02-06 07:44:35 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4221/shard-apl3/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc.html

(kms_frontbuffer_tracking:2650) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_frontbuffer_tracking:2650) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-cur-indfb-draw-mmap-wc failed.
Comment 27 Marta Löfstedt 2018-02-26 07:14:10 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4291/shard-hsw5/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu.html

(kms_frontbuffer_tracking:18072) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:18072) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-2p-primscrn-pri-shrfb-draw-mmap-cpu failed.
Comment 28 Maarten Lankhorst 2018-02-28 17:15:14 UTC
I don't know about the other failures, but it seems to be a likely kernel bug.

(gdb) print wanted_crc->pipe
$30 = {frame = 499876, has_valid_frame = true, n_words = 5, crc = {1044464, 3225721, 3326078, 8267257, 1803845, 0, 0, 0, 0, 0}}

(gdb) print *(igt_crc_t*)0x5555557d0750
$31 = {frame = 511353, has_valid_frame = true, n_words = 5, crc = {1044464, 1044464, 792567, 1044464, 6966348, 0, 0, 0, 0, 0}}

(Calling drmModeDirtyFB() on the whole fb, and collecting crc again)

(gdb) print *(igt_crc_t*)0x5555557d0750
$34 = {frame = 513283, has_valid_frame = true, n_words = 5, crc = {1044464, 3225721, 3326078, 8267257, 1803845, 0, 0, 0, 0, 0}}

Which is what we want. So guessing a coherency bug?
Comment 29 Maarten Lankhorst 2018-02-28 17:15:39 UTC
Note that the subtest already calls drmModeDirtyFB, so the extra dirtyfb should be a noop.
Comment 30 Maarten Lankhorst 2018-02-28 18:25:39 UTC
Chris any idea?
Comment 31 Hector Velazquez 2018-03-01 15:47:58 UTC
This tests has failing on SKL/BXT/KBL/GLK QA 
Tests List:

igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc

(kms_frontbuffer_tracking:15773) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:15773) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-2p-primscrn-pri-shrfb-draw-mmap-wc failed.
. . .

software:
IGT-Version: 1.21-g1fb30f1 (x86_64) (Linux: 4.16.0-rc2-drm-intel-qa-ww8-commit-562dc33+ x86_64)

this bug has moved from bug 101178
Comment 32 Marta Löfstedt 2018-03-02 07:00:09 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3858/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-mmap-gtt.html

(kms_frontbuffer_tracking:1592) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:1592) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-offscren-pri-shrfb-draw-mmap-gtt failed.
Comment 33 Hector Velazquez 2018-03-06 18:08:36 UTC
This tests has failing on CNL QA 
Tests List:
igt@kms_frontbuffer_tracking@fbc-2p-pri-indfb-multidraw
igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc

output sample:
. . .
(kms_frontbuffer_tracking:788) igt-debugfs-DEBUG: CRC mismatch at index 0: 0xc687dbbd != 0x89a333d
(kms_frontbuffer_tracking:788) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:788) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_frontbuffer_tracking:788) igt-core-INFO: Stack trace:
(kms_frontbuffer_tracking:788) igt-core-INFO:   #0 [__igt_fail_assert+0x101]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #1 [igt_assert_crc_equal+0xa8]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #2 [do_crc_assertions.part.32+0x58]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #3 [__do_assertions+0x229]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #4 [draw_subtest+0x12d]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #5 [main+0x112d]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #6 [__libc_start_main+0xf1]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #7 [_start+0x29]
(kms_frontbuffer_tracking:788) igt-core-INFO:   #8 [<unknown>+0x29]
. . .

software:
IGT-Version: 1.21-g68fb759 (x86_64) (Linux: 4.16.0-rc4-drm-intel-qa-ww10-commit-a994c52+ x86_64)
Comment 34 Martin Peres 2018-03-07 14:53:50 UTC
Starting from IGT_4329/CI_DRM_3880, we have seen igt@kms_frontbuffer_tracking@fbc-suspend constantly fail on APL and KBL:

(kms_frontbuffer_tracking:1712) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:1712) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-suspend failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3880/shard-apl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3880/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html
Comment 35 Hector Velazquez 2018-03-07 21:14:41 UTC
This tests has failing on CNL QA 
Tests List:
igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw

output sample:
. . .
(kms_frontbuffer_tracking:778) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:778) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_frontbuffer_tracking:778) igt-core-INFO: Stack trace:
(kms_frontbuffer_tracking:778) igt-core-INFO:   #0 [__igt_fail_assert+0x101]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #1 [igt_assert_crc_equal+0xa8]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #2 [do_crc_assertions.part.32+0x58]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #3 [__do_assertions+0x21a]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #4 [main+0x2cf9]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #5 [__libc_start_main+0xf1]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #6 [_start+0x29]
(kms_frontbuffer_tracking:778) igt-core-INFO:   #7 [<unknown>+0x29]
. . .

software:
IGT-Version: 1.21-ge3a0ed9 (x86_64) (Linux: 4.16.0-rc4-drm-intel-qa-ww10-commit-8a4eb45+ x86_64)
Comment 36 Marta Löfstedt 2018-03-09 06:30:12 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3897/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html

(kms_frontbuffer_tracking:1791) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:1791) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-spr-indfb-draw-render failed.
Comment 37 Marta Löfstedt 2018-03-12 10:04:56 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3909/shard-apl1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-blt.html

(kms_frontbuffer_tracking:1743) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_frontbuffer_tracking:1743) igt-debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-spr-indfb-draw-blt failed.
Comment 38 Marta Löfstedt 2018-03-12 10:29:56 UTC
Note we are now pulling in data from full CNL and CFL runs on BAT machines:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-suspend.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-rgb565-draw-pwrite.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-rgb565-draw-mmap-wc.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-rgb565-draw-mmap-cpu.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-rgb565-draw-blt.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-2p-pri-indfb-multidraw.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-1p-primscrn-pri-indfb-draw-render.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbcdrrs-1p-pri-indfb-multidraw.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cfl-s2/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-mmap-wc.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-indfb-draw-blt.html
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3903/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbc-2p-pri-indfb-multidraw.html
Comment 39 Marta Löfstedt 2018-03-15 07:11:11 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3927/shard-apl5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-plflip-blt.html

(kms_frontbuffer_tracking:2718) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:370:
(kms_frontbuffer_tracking:2718) igt_debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-1p-primscrn-indfb-plflip-blt failed.
Comment 41 Maarten Lankhorst 2018-03-16 15:04:07 UTC
https://patchwork.freedesktop.org/series/40102/
Comment 43 Marta Löfstedt 2018-03-26 06:44:05 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3974/shard-apl7/igt@kms_frontbuffer_tracking@fbc-rgb101010-draw-blt.html

(kms_frontbuffer_tracking:1440) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:370:
(kms_frontbuffer_tracking:1440) igt_debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-rgb101010-draw-blt failed.
Comment 46 Marta Löfstedt 2018-04-06 08:52:20 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_12/fi-cnl-y3/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-pwrite.html

(kms_frontbuffer_tracking:1421) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:370:
(kms_frontbuffer_tracking:1421) igt_debugfs-CRITICAL: Failed assertion: !mismatch
Subtest fbc-2p-primscrn-pri-shrfb-draw-pwrite failed.
Comment 48 Jani Saarinen 2018-04-12 17:35:52 UTC
Reference: https://patchwork.freedesktop.org/series/41634/
Comment 49 Marta Löfstedt 2018-04-13 05:42:16 UTC
(In reply to Jani Saarinen from comment #48)
> Reference: https://patchwork.freedesktop.org/series/41634/

Jani, the patch did not fix the CRC mismatch problem:
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8683/shard-apl7/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-mmap-gtt.html
https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8683/shard-snb4/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

Jani, please don't put PW links in bugs, until you know that the developers are please with the results.
Comment 50 Jani Saarinen 2018-04-13 07:18:51 UTC
This was just to say , hey there might be fix not sure if that fixes anything, but could. Same like test this please.
Comment 51 Maarten Lankhorst 2018-04-13 12:58:15 UTC
It's a related race condition, but the patch doesn't appear to fix the issue here, still thought it was worth mentioning this bug as inspiration. :)
The fact it doesn't fix it, means it should probably be a references link
Comment 52 Maarten Lankhorst 2018-06-29 08:09:25 UTC
commit 457209595789a3acd57990e2e9dade95bbea8fba (HEAD -> drm-intel-next-queued, drm-intel/for-linux-next, drm-intel/drm-intel-next-queued)
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Jun 25 18:37:58 2018 +0200

    drm/i915: Remove delayed FBC activation.

commit c9855a561afa5b21db7f2218f0b7baaa555fa90c
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Jun 25 18:37:57 2018 +0200

    drm/i915: Block enabling FBC until flips have been completed

And it's gone!
Comment 53 Francesco Balestrieri 2018-07-08 07:16:01 UTC
Closing, thanks
Comment 54 Martin Peres 2018-09-04 07:58:45 UTC
(In reply to Maarten Lankhorst from comment #52)
> commit 457209595789a3acd57990e2e9dade95bbea8fba (HEAD ->
> drm-intel-next-queued, drm-intel/for-linux-next,
> drm-intel/drm-intel-next-queued)
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Mon Jun 25 18:37:58 2018 +0200
> 
>     drm/i915: Remove delayed FBC activation.
> 
> commit c9855a561afa5b21db7f2218f0b7baaa555fa90c
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date:   Mon Jun 25 18:37:57 2018 +0200
> 
>     drm/i915: Block enabling FBC until flips have been completed
> 
> And it's gone!

I wish it were the case, but it is still happening every single run:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4760/shard-glk6/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-plflip-blt.html

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4761/shard-glk5/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-shrfb-plflip-blt.html

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4762/fi-byt-clapper/igt@kms_frontbuffer_tracking@basic.html

https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_101/fi-icl-u/igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-shrfb-draw-blt.html

https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_101/fi-icl-u/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu.html

...
Comment 56 Maarten Lankhorst 2019-01-22 18:39:54 UTC
If I run the test often enough on my geminilake nuc, I get the CRC mismatch.

I did some testing with chamelium, but the downloaded reference and failed images are identical so the CRC mismatch might be on a single frame only.

It happens on the nop tests, which is weird. So it's not related to any of the features being tested in kms_frontbuffer_tracking.
Comment 57 Maarten Lankhorst 2019-01-25 16:55:24 UTC
To completely rule out HW fail, I've tried dumping all frames from the chamelium from the moment the CRC turns on. I get a CRC mismatch on screen enable, even though it shouldn't. The test basically collects the reference CRC, then collects the same CRC after preparing the test to see if the CRC matches. Except as I can tell the same fb is flipped and the screen CRC should match.

According to the chamelium, the output was never different so the CRC mismatch is bogus. No FIFO underrun was detected either, weird..
Comment 58 Maarten Lankhorst 2019-01-25 16:58:01 UTC
The reference CRC appears to be correct in this test failure, so it's also not accidentally from the black screen we set the blue FB.
Comment 59 Martin Peres 2019-04-03 08:19:27 UTC
https://bugs.freedesktop.org/show_bug.cgi?id=103191 is blocking all the gen9 + BYT issues as the failure rate is similar. 

The ICL issues are for sure unrelated, so we should investigate them now.
Comment 60 Lakshmi 2019-04-09 07:33:40 UTC
@Maarten, Any updates here?
Comment 61 Daniel Vetter 2019-04-15 08:50:30 UTC
See also bug #103184
Comment 62 Maarten Lankhorst 2019-04-15 09:10:52 UTC
Just an update:

https://patchwork.freedesktop.org/series/59490/

If connected to a configured chamelium, it will dump the whole captured data when a CRC mismatch happened, including the reference frame.

We wait for 2 extra vblanks before stopping the capture, so we're certain that the failing frame is captured.

What I do notice on re-icl-u when running fbc-*draw* I get a failure in the multidraw test.

Downloading the png's shows that the the reference image is blue, and the captured images are all black except the last frame which matches the reference frame. I think this is because when stopping the capture we will do some chamelium calls, which might flush the caches.
Comment 63 Maarten Lankhorst 2019-04-25 10:55:44 UTC
Worst case scenario is we show old frontbuffer contents while the screen is idle because incorrect invalidation.
Comment 64 James Ausmus 2019-04-25 20:56:15 UTC
*** Bug 110378 has been marked as a duplicate of this bug. ***
Comment 65 Jani Saarinen 2019-05-28 06:21:01 UTC
Maarten, this WIP still with you you, please update latest.
Comment 66 Maarten Lankhorst 2019-05-28 11:07:24 UTC
Created attachment 144360 [details] [review]
kms_draw_crc chamelium hack

I was able to reproduce it on ICL much better with a 3840x256 framebuffer.

This adds draw-dirtyfb-* to kms_draw_crc, based on how kms_frontbuffer_tracking works.

After setup, it runs the following loop 25 times, and if a chamelium is attached, dumps all (scaled to 1920x1080) frames to p$pid-frame-$n.png, with the reference (3840x256) fb to p$pid-reference.png:

	for (i = 0; i < 5; i++) {
		rect = pat1_get_rect(&fb, i);

		igt_draw_rect_fb(drm_fd, bufmgr, NULL, &fb, method,
				 rect.x, rect.y, rect.w, rect.h, rect.color);
		gem_set_domain(drm_fd, fb.gem_handle, I915_GEM_DOMAIN_GTT, 0);
		igt_dirty_fb(drm_fd, &fb);
		igt_wait_for_vblank(drm_fd, ms.pipe);

		igt_pipe_crc_collect_crc(pipe_crc, &crc);
		check_crc_equal(&ref_crc[i], &fb_ref[i], &crc, &fb, &display, plane, &panic_fb);
	}

With this I can clearly see a black line on ICL for a few frames, presumably when FBC gets enabled. The CRC mismatch doesn't occur without FBC. (echo 0 > /sys/module/i915/parameters/enable_fbc)
Comment 67 Jani Saarinen 2019-06-26 15:26:27 UTC
Still work ongoing, discussion with HW team
Comment 68 Jani Saarinen 2019-09-13 13:59:55 UTC
*** Bug 111484 has been marked as a duplicate of this bug. ***
Comment 69 Maarten Lankhorst 2019-10-30 11:51:24 UTC
*** Bug 112163 has been marked as a duplicate of this bug. ***
Comment 70 Martin Peres 2019-11-29 17:28:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/intel/issues/49.

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.