Bug 103191 - [CI] igt@kms_pipe_crc_basic@* - fail - CRC mismatch
Summary: [CI] igt@kms_pipe_crc_basic@* - fail - CRC mismatch
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: Other All
: medium major
Assignee: harish.chegondi
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard: ReadyForDev
Keywords:
: 107362 111472 111473 (view as bug list)
Depends on:
Blocks: 103167 103184 103925 105978 110038
  Show dependency treegraph
 
Reported: 2017-10-10 10:54 UTC by Marta Löfstedt
Modified: 2019-11-29 17:28 UTC (History)
3 users (show)

See Also:
i915 platform: BXT, BYT, KBL, SKL
i915 features: display/Other


Attachments
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence test result (8.22 KB, text/html)
2019-04-29 23:26 UTC, harish.chegondi
no flags Details
attachment-2721-0.html (2.25 KB, text/html)
2019-06-27 10:46 UTC, harish.chegondi
no flags Details

Description Marta Löfstedt 2017-10-10 10:54:58 UTC
CI_DRM_3196 APL-shards igt@kms_pipe_crc_basic@hang-read-crc-pipe-C fail on CRC mismatch.

(kms_pipe_crc_basic:1550) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_pipe_crc_basic:1550) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:1550) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest hang-read-crc-pipe-C failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3196/shard-apl2/igt@kms_pipe_crc_basic@hang-read-crc-pipe-C.html
Comment 2 Marta Löfstedt 2017-10-31 12:40:30 UTC
new subtest:
CI_DRM_3300 shard-apl1 igt@kms_pipe_crc_basic@suspend-read-crc-pipe-C.

(kms_pipe_crc_basic:2340) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:346:
(kms_pipe_crc_basic:2340) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:2340) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-C failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3300/shard-apl1/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-C.html
Comment 4 Marta Löfstedt 2017-11-27 07:05:35 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4014/fi-skl-6700k/igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence.html

(kms_pipe_crc_basic:4413) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4413) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4413) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest read-crc-pipe-A-frame-sequence failed.
Comment 5 Marta Löfstedt 2017-11-29 09:23:52 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3404/fi-skl-6700k/igt@kms_pipe_crc_basic@read-crc-pipe-b.html

(kms_pipe_crc_basic:4708) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4708) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4708) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest read-crc-pipe-B failed.
Comment 6 Marta Löfstedt 2017-12-05 06:46:36 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4034/fi-skl-6700k/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
	

(kms_pipe_crc_basic:4731) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4731) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4731) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-A failed.
Comment 7 Marta Löfstedt 2017-12-07 14:39:30 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3474/fi-skl-6700k/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence.html

(kms_pipe_crc_basic:4794) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4794) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4794) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest nonblocking-crc-pipe-B-frame-sequence failed.
Comment 8 Marta Löfstedt 2018-01-02 10:23:45 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4073/fi-skl-6700k2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html


(kms_pipe_crc_basic:4638) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4638) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4638) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-A failed.
Comment 9 Marta Löfstedt 2018-01-30 12:47:55 UTC
Also, on the skl-guc machine:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3697/fi-skl-guc/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

(kms_pipe_crc_basic:3945) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:3945) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:3945) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-A failed.
Comment 10 Marta Löfstedt 2018-02-13 07:12:42 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4249/fi-skl-guc/igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence.html

(kms_pipe_crc_basic:4034) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:356:
(kms_pipe_crc_basic:4034) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4034) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest read-crc-pipe-B-frame-sequence failed.
Comment 11 Marta Löfstedt 2018-02-23 06:34:09 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3826/fi-skl-6700k2/igt@kms_pipe_crc_basic@read-crc-pipe-a.html

(kms_pipe_crc_basic:4341) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_pipe_crc_basic:4341) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4341) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest read-crc-pipe-A failed.
Comment 12 Marta Löfstedt 2018-02-26 07:12:37 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4294/fi-skl-6700k2/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c.html

(kms_pipe_crc_basic:4550) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_pipe_crc_basic:4550) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:4550) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest nonblocking-crc-pipe-C failed.
Comment 13 Marta Löfstedt 2018-03-09 06:28:55 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3898/shard-apl7/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b.html

(kms_pipe_crc_basic:1701) igt-debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file igt_debugfs.c:370:
(kms_pipe_crc_basic:1701) igt-debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:1701) igt-debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest nonblocking-crc-pipe-B failed.
Comment 14 Marta Löfstedt 2018-03-22 06:36:12 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4375/fi-skl-guc/igt@kms_pipe_crc_basic@hang-read-crc-pipe-a.html

(kms_pipe_crc_basic:3973) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:370:
(kms_pipe_crc_basic:3973) igt_debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:3973) igt_debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest hang-read-crc-pipe-A failed.
Comment 15 Francesco Balestrieri 2018-07-03 11:59:53 UTC
Mika, anything to update?
Comment 16 Mika Kahola 2018-07-03 12:42:06 UTC
Not really. These crc !mismatch errors occurs on multiple tests. I had an kernel patch that I tried but on shard runs another kms_* test was failing so no breakthrough yet, I'm afraid.

There is somethign fishy going on while we read out pipe crc's. I just haven't figured out that yet.
Comment 17 Martin Peres 2018-07-24 08:37:50 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4530/fi-byt-clapper/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html

(kms_pipe_crc_basic:3458) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:370:
(kms_pipe_crc_basic:3458) igt_debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:3458) igt_debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-B failed.
Comment 18 Martin Peres 2018-09-14 12:20:27 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_110/fi-icl-u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b.html

Starting subtest: suspend-read-crc-pipe-B
(kms_pipe_crc_basic:1214) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:392:
(kms_pipe_crc_basic:1214) igt_debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:1214) igt_debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Subtest suspend-read-crc-pipe-B failed.
Comment 19 CI Bug Log 2019-04-02 11:56:46 UTC
The CI Bug Log issue associated to this bug has been archived.

New failures matching the above filters will not be associated to this bug anymore.
Comment 20 Martin Peres 2019-04-02 12:07:23 UTC
(In reply to CI Bug Log from comment #19)
> The CI Bug Log issue associated to this bug has been archived.
> 
> New failures matching the above filters will not be associated to this bug
> anymore.

This issue was for shard-apl, CNL and ICL, where the issue was last seen 1.5 months ago after failing every single run.

Now, this bug is still happening a lot, mostly on BYT, but also randomly on gen9 platforms.

Failures in this test are completely unacceptable because it verifies that CRCs are stable across pipes, colors, suspend, and hang. If we cannot get these problems fixed, automated KMS testing on the affected platforms will not be reliable and cannot be used for CI.

Bumping the priority to highest because of this issue.
Comment 21 harish.chegondi 2019-04-09 04:43:38 UTC
Some of the recent tests show a different failure signature:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5890/fi-whl-u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

Starting subtest: suspend-read-crc-pipe-A
(kms_pipe_crc_basic:2862) igt_core-WARNING: [cmd] rtcwake: write error
(kms_pipe_crc_basic:2862) igt_aux-WARNING: rtcwake failed with 1
Check dmesg for further details.
(kms_pipe_crc_basic:2862) igt_aux-CRITICAL: Test assertion failure function suspend_via_rtcwake, file ../lib/igt_aux.c:792:
(kms_pipe_crc_basic:2862) igt_aux-CRITICAL: Failed assertion: ret == 0
(kms_pipe_crc_basic:2862) igt_aux-CRITICAL: error: 1 != 0
Subtest suspend-read-crc-pipe-A failed.
Comment 22 Martin Peres 2019-04-09 12:14:43 UTC
(In reply to harish.chegondi from comment #21)
> Some of the recent tests show a different failure signature:
> 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5890/fi-whl-u/
> igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
> 
> Starting subtest: suspend-read-crc-pipe-A
> (kms_pipe_crc_basic:2862) igt_core-WARNING: [cmd] rtcwake: write error
> (kms_pipe_crc_basic:2862) igt_aux-WARNING: rtcwake failed with 1
> Check dmesg for further details.
> (kms_pipe_crc_basic:2862) igt_aux-CRITICAL: Test assertion failure function
> suspend_via_rtcwake, file ../lib/igt_aux.c:792:
> (kms_pipe_crc_basic:2862) igt_aux-CRITICAL: Failed assertion: ret == 0
> (kms_pipe_crc_basic:2862) igt_aux-CRITICAL: error: 1 != 0
> Subtest suspend-read-crc-pipe-A failed.

This failure is unrelated. Test results are not consistent across runs, as multiple bugs impact their results.

Please use CI Bug Log to find occurrences of this actual bug :)
Comment 23 CI Bug Log 2019-04-10 14:05:15 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT SKL KBL APL: Failed assertion: !mismatch -}
{+ BYT BXT SKL APL KBL WHL: igt@kms_pipe_crc_basic@* - fail - Failed assertion: !mismatch +}

 No new failures caught with the new filter
Comment 24 Martin Peres 2019-04-10 14:06:03 UTC
*** Bug 107362 has been marked as a duplicate of this bug. ***
Comment 25 CI Bug Log 2019-04-10 14:11:12 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BXT SKL APL KBL WHL: igt@kms_pipe_crc_basic@* - fail - Failed assertion: !mismatch -}
{+ BYT BXT SKL APL KBL GLK WHL: igt@kms_pipe_crc_basic@* - fail - Failed assertion: !mismatch +}

New failures caught by the filter:

* https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4939/fi-glk-dsi/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence.html
* https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_5893/fi-glk-dsi/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence.html
* https://intel-gfx-ci.01.org/tree/drm-tip/IGT_4934/fi-glk-dsi/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence.html
Comment 26 Lakshmi 2019-04-15 12:19:23 UTC
@Harish, Any further updates on this bug? As you see this issue blocks few other bugs :).
Comment 27 harish.chegondi 2019-04-16 18:10:04 UTC
(In reply to Lakshmi from comment #26)
> @Harish, Any further updates on this bug? As you see this issue blocks few
> other bugs :).

Lakshmi,

I am trying to setup a BYT sqwaks chromebook to run CI tests to reproduce this issue. I couldn't find any BYT machines on RIL. In an IRC Chat, Ville mentioned that there are some known cxsr related issues on gmch machines which could be related to this issue. He had some commits on his branch:

<vsyrjala> git://github.com/vsyrjala/linux.git g4x_fixes_4

I have been going through his patches to understand them and once I complete CI test setup on a BYT Sqwaks chromebook, I will rebase and test his patches.
Comment 28 Martin Peres 2019-04-16 18:18:21 UTC
(In reply to harish.chegondi from comment #27)
> (In reply to Lakshmi from comment #26)
> > @Harish, Any further updates on this bug? As you see this issue blocks few
> > other bugs :).
> 
> Lakshmi,
> 
> I am trying to setup a BYT sqwaks chromebook to run CI tests to reproduce
> this issue. I couldn't find any BYT machines on RIL. In an IRC Chat, Ville
> mentioned that there are some known cxsr related issues on gmch machines
> which could be related to this issue. He had some commits on his branch:
> 
> <vsyrjala> git://github.com/vsyrjala/linux.git g4x_fixes_4
> 
> I have been going through his patches to understand them and once I complete
> CI test setup on a BYT Sqwaks chromebook, I will rebase and test his patches.

+1 for using CI's trybot as a development tool! You just leveled up!
Comment 29 harish.chegondi 2019-04-22 21:25:44 UTC
(In reply to harish.chegondi from comment #27)
> (In reply to Lakshmi from comment #26)
> > @Harish, Any further updates on this bug? As you see this issue blocks few
> > other bugs :).
> 
> Lakshmi,
> 
> I am trying to setup a BYT sqwaks chromebook to run CI tests to reproduce
> this issue. I couldn't find any BYT machines on RIL. In an IRC Chat, Ville
> mentioned that there are some known cxsr related issues on gmch machines
> which could be related to this issue. He had some commits on his branch:
> 
> <vsyrjala> git://github.com/vsyrjala/linux.git g4x_fixes_4
> 
> I have been going through his patches to understand them and once I complete
> CI test setup on a BYT Sqwaks chromebook, I will rebase and test his patches.

Submitted most of Ville's patches (except the ones that add tracing) to trybot:
https://patchwork.freedesktop.org/series/59739/

The CI  results are : https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_4186/

While the CI tests didn't run on the BYT Squawks Chromebook as I wanted, on a different BYT platform: fi-byt-clapper, the test kms_pipe_crc_basic@suspend-read-crc-pipe-a failed with a similar signature.
Comment 30 harish.chegondi 2019-04-26 23:39:09 UTC
I wasn't able to get the tests running on the BYT-Squawks Chromebook through trybot or the igt-dev mailing list. But, I was able to get a BYT-Squawks Chromebook (Thanks to Brian Wilson), install mrchromebox.tech firmware (Thanks to Arek Hiler), and install Linux on the Chromebook. I ran the IGT tests and was able to reproduce the CRC mismatch failures.

I will start off with Ville's patches and debug the failures.
Comment 31 harish.chegondi 2019-04-29 23:26:06 UTC
Created attachment 144116 [details]
igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence test result

For debugging, I changed the kms_pipe_crc_basic tests to display all three CRCs when the CRCs don't match. In one of my test runs, the first CRC didn't match with the second and third CRCs.


(kms_pipe_crc_basic:13521) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(kms_pipe_crc_basic:13521) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(kms_pipe_crc_basic:13521) igt_debugfs-DEBUG: Opening debugfs directory '/sys/kernel/debug/dri/0'
(kms_pipe_crc_basic:13521) DEBUG: CRC for this fb: 001c1a64 0031d43b 0031d43b 0031d43b 001d5251
(kms_pipe_crc_basic:13521) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:13521) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:13521) igt_debugfs-DEBUG: CRC mismatch at index 0: 0x1c1a64 != 0x7f9a3d
(kms_pipe_crc_basic:13521) igt_debugfs-CRITICAL: Test assertion failure function igt_assert_crc_equal, file ../lib/igt_debugfs.c:419:
(kms_pipe_crc_basic:13521) igt_debugfs-CRITICAL: Failed assertion: !mismatch
(kms_pipe_crc_basic:13521) igt_debugfs-CRITICAL: Last errno: 9, Bad file descriptor
Comment 32 harish.chegondi 2019-04-29 23:43:21 UTC
In another run, I increased the number of CRCs to read to 9. Even in this case, the first CRC read is different from the rest of the CRC. My next step is to find why the first CRC read is different from the rest of the CRCs.

(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 001c1a64 0031d43b 0031d43b 0031d43b 001d5251
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) DEBUG: CRC for this fb: 007f9a3d 001db1a2 001db1a2 001db1a2 0051c483
(kms_pipe_crc_basic:11323) igt_debugfs-DEBUG: CRC mismatch at index 0: 0x1c1a64 != 0x7f9a3d
Comment 33 CI Bug Log 2019-05-02 11:32:41 UTC
A CI Bug Log filter associated to this bug has been updated:

{- BYT BXT SKL APL KBL GLK WHL: igt@kms_pipe_crc_basic@* - fail - Failed assertion: !mismatch -}
{+ BYT BXT SKL APL KBL GLK WHL CML: igt@kms_pipe_crc_basic@* - fail - Failed assertion: !mismatch +}

New failures caught by the filter:

  * https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_272/fi-cml-u/igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence.html
Comment 34 harish.chegondi 2019-05-03 23:24:14 UTC
I turned on the tracing for intel_pipe_crc and ran the tests. Below are few lines from the trace:

intel_pipe_crc: pipe A, frame=64813, scanline=5  crc=0032abc8 001dcb91 001dcb91 001dcb91 004987da
intel_pipe_crc: pipe A, frame=64814, scanline=19 crc=00774d8d 0031d43b 0031d43b 0031d43b 003279d1
intel_pipe_crc: pipe A, frame=64815, scanline=19 crc=007956cd 001db1a2 001db1a2 001db1a2 005450f7
intel_pipe_crc: pipe A, frame=64816, scanline=18 crc=007956cd 001db1a2 001db1a2 001db1a2 005450f7
intel_pipe_crc: pipe A, frame=64817, scanline=17 crc=007956cd 001db1a2 001db1a2 001db1a2 005450f7
intel_pipe_crc: pipe A, frame=64818, scanline=21 crc=007956cd 001db1a2 001db1a2 001db1a2 005450f7

The traces are from display_pipe_crc_irq_handler function (code below) which has comments that the first CRC on all CPUs and also the second CRC in GEN8+ CPUs are incorrect and hence skipped. From the above traces it appears that the second CRC is incorrect even on Bay Trail. As an experiment, I skipped the second CRC as well on all CPUs and now the CRC tests are passing. I will send out a patch with this change.

static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
                                         enum pipe pipe,
                                         u32 crc0, u32 crc1,
                                         u32 crc2, u32 crc3,
                                         u32 crc4)
{
        struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
        struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
        u32 crcs[5] = { crc0, crc1, crc2, crc3, crc4 };

        trace_intel_pipe_crc(crtc, crcs);

        spin_lock(&pipe_crc->lock);
        /*
         * For some not yet identified reason, the first CRC is
         * bonkers. So let's just wait for the next vblank and read
         * out the buggy result.
         *
         * On GEN8+ sometimes the second CRC is bonkers as well, so
         * don't trust that one either.
         */
        if (pipe_crc->skipped <= 0 ||
            (INTEL_GEN(dev_priv) >= 8 && pipe_crc->skipped == 1)) {
                pipe_crc->skipped++;
                spin_unlock(&pipe_crc->lock);
                return;
        }
Comment 35 harish.chegondi 2019-05-14 19:25:20 UTC
After root causing why the tests are failing on the BYT Chromebook, I am focusing on why the tests fail occasionally on shard-skl systems. The test even failed once on a CML-U platform. I borrowed an HP chell Chromebook with an SKL CPU, installed Ubuntu and ran the kms_pipe_crc_basic tests. But so far, I haven't been able to reproduce the test on the SKL HP chell Chromebook. I have been analyzing the dmesg log from the CI test that failed vs the dmesg log from the CI test that was successful.
Comment 36 harish.chegondi 2019-05-16 20:55:43 UTC
Patch to fix these failures on BYT has been posted to the mailing list : https://patchwork.freedesktop.org/series/60697/
Comment 37 harish.chegondi 2019-05-18 02:54:07 UTC
Noticed This error message on BYT Chromebook:
drm:drm_crtc_add_crc_entry] *ERROR* Overflow of CRC buffer, userspace reads too slow.

I updated the below fdo with my observation
https://bugs.freedesktop.org/show_bug.cgi?id=105978#c3
Comment 38 Lakshmi 2019-06-27 10:46:19 UTC
@Harish, any updates on this? Failures on BYT is seen on every run.
Comment 39 harish.chegondi 2019-06-27 10:46:27 UTC
Created attachment 144656 [details]
attachment-2721-0.html

I am out of office until 7/1/2019. Please expect delay in email response.

Thank You,
Harish.
Comment 40 Lakshmi 2019-08-20 13:11:33 UTC
@Harish, Currently this is an Highest priority bug which needs an update everyday (SLA for for highest priority bug is 1 day).

Any updates here? Is the priority and severity correct here? if not can you update?
Comment 41 harish.chegondi 2019-08-21 02:14:37 UTC
(In reply to Lakshmi from comment #40)
> @Harish, Currently this is an Highest priority bug which needs an update
> everyday (SLA for for highest priority bug is 1 day).
> 
> Any updates here? Is the priority and severity correct here? if not can you
> update?

@Lakshmi,

Earlier, I posted a patch to fix these CRC failures on BYT Chromebook. The link is posted in comment # 36. The patch was Acked-by: Jani Nikula, but didn't get a Reviewed-by tag. I should have followed up with the reviewers few days later. While the patch skips two invalid CRCs on BYT making the test pass, the underlying problem of why the first two CRCs are invalid still needs to be investigated which I think is a bigger problem. So, my patch is kind of a workaround on top of already existing workarounds in the code. May be I should rebase my patch on drm-tip and re-send the patch to bring up the discussion again on the mailing list.

This bug should have similar priority (medium) to the other CRC mismatch bugs and all CRC mismatch bugs should be under this parent CRC mismatch bug: Bug 105978 - [META] CRC mismatch.
Comment 42 Lakshmi 2019-08-21 06:56:24 UTC
(In reply to harish.chegondi from comment #41)
> (In reply to Lakshmi from comment #40)
> > @Harish, Currently this is an Highest priority bug which needs an update
> > everyday (SLA for for highest priority bug is 1 day).
> > 
> > Any updates here? Is the priority and severity correct here? if not can you
> > update?
> 
> @Lakshmi,
> 
> Earlier, I posted a patch to fix these CRC failures on BYT Chromebook. The
> link is posted in comment # 36. The patch was Acked-by: Jani Nikula, but
> didn't get a Reviewed-by tag. I should have followed up with the reviewers
> few days later. While the patch skips two invalid CRCs on BYT making the
> test pass, the underlying problem of why the first two CRCs are invalid
> still needs to be investigated which I think is a bigger problem. So, my
> patch is kind of a workaround on top of already existing workarounds in the
> code. May be I should rebase my patch on drm-tip and re-send the patch to
> bring up the discussion again on the mailing list.
> 
> This bug should have similar priority (medium) to the other CRC mismatch
> bugs and all CRC mismatch bugs should be under this parent CRC mismatch bug:
> Bug 105978 - [META] CRC mismatch.

Thanks for taking this bug forward. I have updated the priority and severity based on the comments.
Comment 43 Oleg Vasilev 2019-08-28 10:29:28 UTC
*** Bug 111473 has been marked as a duplicate of this bug. ***
Comment 44 Oleg Vasilev 2019-08-28 10:29:51 UTC
*** Bug 111472 has been marked as a duplicate of this bug. ***
Comment 45 harish.chegondi 2019-10-23 22:56:11 UTC
Rebased the patch and sent it again to the mailing list: 

https://patchwork.freedesktop.org/patch/337264/?series=68427&rev=1
Comment 46 Martin Peres 2019-11-29 17:28:46 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/53.


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.