Created attachment 90970 [details] dmesg System Environment: -------------------------- Platform: BYT/BDW kernel: (drm-intel-nightly)02905525c3310ba673676f8041d0ff6be4da0e24 Bug detailed description: --------------------------- It fails on BYT and BDW with eDP, If connect VGA, It works well. I can't find out a good commit. run ./kms_cursor_crc --run-subtest cursor-black-invisible-offscreen output: IGT-Version: 1.5-g2a71bff (x86_64) (Linux: 3.13.0-rc4_drm-intel-nightly_074fdf_20131219+ x86_64) Beginning cursor-black-invisible-offscreen on crtc 3, connector 20 .Test assertion failure function do_single_test, file kms_cursor_crc.c:147: Last errno: 0, Success Failed assertion: igt_crc_equal(&crcs[0], &test_data->ref_crc) Subtest cursor-black-invisible-offscreen: FAIL Reproduce steps: ------------------------- 1. ./kms_cursor_crc --run-subtest cursor-black-invisible-offscreen
It's only happens on BYT Following cases also have this issue on BYT: igt/kms_pipe_crc_basic/read-crc-pipe-A igt/kms_pipe_crc_basic/read-crc-pipe-A-frame-sequence igt/kms_pipe_crc_basic/read-crc-pipe-B igt/kms_pipe_crc_basic/read-crc-pipe-B-frame-sequence igt/kms_flip/wf_vblank-vs-modeset igt/kms_flip/wf_vblank-vs-modeset-interruptible igt/kms_flip/rcs-wf_vblank-vs-modeset igt/kms_flip/rcs-wf_vblank-vs-modeset-interruptible igt/kms_flip/rcs-flip-vs-modeset igt/kms_flip/rcs-flip-vs-modeset-interruptible igt/kms_flip/flip-vs-rmfb igt/kms_flip/flip-vs-rmfb-interruptible igt/kms_flip/flip-vs-modeset igt/kms_flip/flip-vs-modeset-vs-hang igt/kms_flip/flip-vs-modeset-vs-hang-interruptible igt/kms_flip/bcs-flip-vs-dpms igt/kms_flip/bcs-flip-vs-modeset igt/kms_flip/bcs-flip-vs-modeset-interruptible
Does it work with an external DP monitor?
(In reply to comment #2) > Does it work with an external DP monitor? DP doesn't work after loading i915 driver.Already reported 2 bugs on jira. https://jira01.devtools.intel.com/browse/VIZ-3323 https://jira01.devtools.intel.com/browse/VIZ-3326
(In reply to comment #3) > (In reply to comment #2) > > Does it work with an external DP monitor? > > DP doesn't work after loading i915 driver.Already reported 2 bugs on jira. > https://jira01.devtools.intel.com/browse/VIZ-3323 > https://jira01.devtools.intel.com/browse/VIZ-3326 also available on this bugzilla: bug#72896 and bug#72897
BDW doesn't currently have any platforms with VGA. The original description says: "If connect VGA, It works well" Does this bug actually apply to BDW?
(In reply to comment #5) > BDW doesn't currently have any platforms with VGA. The original description > says: "If connect VGA, It works well" > > Does this bug actually apply to BDW? This issue only happens on BYT. Sorry for the confusion.
Ok, I've just pushed a patch onto dinq to at least remove the errornous WARN. Please retest with latest -nightly.
It still fail on latest -nightly kernel. output: IGT-Version: 1.5-g9812768 (x86_64) (Linux: 3.14.0-rc6_drm-intel-nightly_b18596_20140314+ x86_64) Beginning cursor-black-invisible-offscreen on pipe A, connector eDP-1 .Test assertion failure function do_single_test, file kms_cursor_crc.c:88: Last errno: 0, Success Failed assertion: igt_crc_equal(&crc, &test_data->ref_crc) Subtest cursor-black-invisible-offscreen: FAIL
A few questions: - Does this happen only on edp or also on other platforms? - What is the health of the basic crc tests (kms_pipe_crc_basic) on byt with edp?
(In reply to comment #9) > A few questions: > > - Does this happen only on edp or also on other platforms? It only happens on edp. It doesn't happen on other platforms. > - What is the health of the basic crc tests (kms_pipe_crc_basic) on byt with > edp? kms_pipe_crc_basic was mentioned in Comment 1.
Antti has been looking at kms_cursor_crc lately, reassigning to him.
So pipe CRC on byt eDP seems completely busted. Anyone got such a machine?
Created attachment 98403 [details] dmesg Subcases of kms_cursor_crc below also fail on BYT. igt/kms_cursor_crc/cursor-128-offscreen igt/kms_cursor_crc/cursor-128-onscreen igt/kms_cursor_crc/cursor-128-random igt/kms_cursor_crc/cursor-128-sliding igt/kms_cursor_crc/cursor-256-offscreen igt/kms_cursor_crc/cursor-256-onscreen igt/kms_cursor_crc/cursor-256-random igt/kms_cursor_crc/cursor-256-sliding igt/kms_cursor_crc/cursor-64-offscreen igt/kms_cursor_crc/cursor-64-onscreen igt/kms_cursor_crc/cursor-64-random igt/kms_cursor_crc/cursor-64-sliding output: IGT-Version: 1.6-gc1404e0 (x86_64) (Linux: 3.15.0-rc2_drm-intel-nightly_08ce66_20140503+ x86_64) Beginning cursor-64-offscreen on pipe A, connector eDP-1 .Test assertion failure function do_single_test, file kms_cursor_crc.c:129: Last errno: 0, Success Failed assertion: igt_crc_equal(&crc, &ref_crc) Subtest cursor-64-offscreen: FAIL
This bug is able to reproduce on HSW ULT too. kernel: -nightly(30c8c9cd8bc88d6ae70f09d403e725b51e0bd7dd) case list: igt/kms_cursor_crc/cursor-128-random igt/kms_cursor_crc/cursor-128-sliding igt/kms_cursor_crc/cursor-256-offscreen igt/kms_cursor_crc/cursor-256-onscreen igt/kms_cursor_crc/cursor-256-random igt/kms_cursor_crc/cursor-256-sliding igt/kms_cursor_crc/cursor-64-offscreen igt/kms_cursor_crc/cursor-64-onscreen igt/kms_cursor_crc/cursor-64-random igt/kms_cursor_crc/cursor-64-sliding output: ./kms_cursor_crc --run-subtest cursor-64-sliding IGT-Version: 1.6-g4bd9fe6 (x86_64) (Linux: 3.15.0-rc3_drm-intel-nightly_30c8c9_20140507+ x86_64) Beginning cursor-64-sliding on pipe A, connector eDP-1 ...Test assertion failure function do_single_test, file kms_cursor_crc.c:129: Last errno: 0, Success Failed assertion: igt_crc_equal(&crc, &ref_crc) Subtest cursor-64-sliding: FAIL
(In reply to comment #13) > Created attachment 98403 [details] > dmesg > > Subcases of kms_cursor_crc below also fail on BYT. > igt/kms_cursor_crc/cursor-128-offscreen > igt/kms_cursor_crc/cursor-128-onscreen > igt/kms_cursor_crc/cursor-128-random > igt/kms_cursor_crc/cursor-128-sliding > igt/kms_cursor_crc/cursor-256-offscreen > igt/kms_cursor_crc/cursor-256-onscreen > igt/kms_cursor_crc/cursor-256-random > igt/kms_cursor_crc/cursor-256-sliding > igt/kms_cursor_crc/cursor-64-offscreen > igt/kms_cursor_crc/cursor-64-onscreen > igt/kms_cursor_crc/cursor-64-random > igt/kms_cursor_crc/cursor-64-sliding > > > output: > IGT-Version: 1.6-gc1404e0 (x86_64) (Linux: > 3.15.0-rc2_drm-intel-nightly_08ce66_20140503+ x86_64) > Beginning cursor-64-offscreen on pipe A, connector eDP-1 > .Test assertion failure function do_single_test, file kms_cursor_crc.c:129: > Last errno: 0, Success > Failed assertion: igt_crc_equal(&crc, &ref_crc) > Subtest cursor-64-offscreen: FAIL Please open a new bug report for the BYT failure. The hsw edp issue is something we know about, but byt should work. So different bug.
This issue still able to reproduce on BDW Case list: igt/kms_cursor_crc/cursor-128-onscreen igt/kms_cursor_crc/cursor-128-random igt/kms_cursor_crc/cursor-128-sliding igt/kms_cursor_crc/cursor-256-onscreen igt/kms_cursor_crc/cursor-256-random igt/kms_cursor_crc/cursor-256-sliding igt/kms_cursor_crc/cursor-64-onscreen igt/kms_cursor_crc/cursor-64-random igt/kms_cursor_crc/cursor-64-sliding Output: ./kms_cursor_crc --run-subtest cursor-64-onscreen IGT-Version: 1.6-gc75dcbd (x86_64) (Linux: 3.15.0-rc6_drm-intel-nightly_de544d_20140523+ x86_64) Beginning cursor-64-onscreen on pipe A, connector eDP-1 ............................ cursor-64-onscreen on pipe A, connector eDP-1: PASSED Beginning cursor-64-onscreen on pipe B, connector eDP-1 .Test assertion failure function do_single_test, file kms_cursor_crc.c:129: Last errno: 0, Success Failed assertion: igt_crc_equal(&crc, &ref_crc) Subtest cursor-64-onscreen: FAIL
The problem is that it takes some time for the CRC value to stabilize. If we wait for 100 vblanks (instead of just one) before getting the pipe CRC, it's very likely that the test won't fail!
Ok, so I did some more investigation... The problem only appears to happen on pipe A. Arthur suggested that some package C state may be interfering with memory/caches, and the HW is calculating CRC the result based on a wrong input. So I did some test, and if we keep the i915_forcewake_user file open, the problem _does not_ happen. The easiest way I found to test this is: - open a terminal - become root - run "irb" - on its prompt, type: "a = File.open("/sys/kernel/debug/dri/0/i915_forcewake_user")" - leave this terminal as it is - open a new terminal - run sudo ./kms_cursor_crc The test will succeed! For the real fix, I guess we have to find a way to prevent deep PC states whenever we're calculating CRCs for pipe A...
Created attachment 107757 [details] output (In reply to Paulo Zanoni from comment #18) > Ok, so I did some more investigation... The problem only appears to happen > on pipe A. Arthur suggested that some package C state may be interfering > with memory/caches, and the HW is calculating CRC the result based on a > wrong input. > > So I did some test, and if we keep the i915_forcewake_user file open, the > problem _does not_ happen. > > The easiest way I found to test this is: > > - open a terminal > - become root > - run "irb" > - on its prompt, type: "a = > File.open("/sys/kernel/debug/dri/0/i915_forcewake_user")" > - leave this terminal as it is > - open a new terminal > - run sudo ./kms_cursor_crc > > The test will succeed! > > For the real fix, I guess we have to find a way to prevent deep PC states > whenever we're calculating CRCs for pipe A... Attached output.
Please test this patch: http://patchwork.freedesktop.org/patch/35237/ It solves the problem for me, on BDW.
(In reply to Paulo Zanoni from comment #20) > Please test this patch: http://patchwork.freedesktop.org/patch/35237/ > > It solves the problem for me, on BDW. Test on latest -nightly kernel, It works well on BDW. It still fails on BYT. Apply this patch and test on BYT, it still fails. output: IGT-Version: 1.8-gbba1cd0 (x86_64) (Linux: 3.17.0_kcloud_1fae80_20141020+ x86_64) Beginning cursor-128x128-offscreen on pipe A, connector eDP-1 .Test assertion failure function do_single_test, file kms_cursor_crc.c:131: Failed assertion: igt_crc_equal(&crc, &ref_crc) Subtest cursor-128x128-offscreen: FAIL (3.246s)
The patch I wrote for HSW/BDW was merged, so now only the BYT problem remains. The BYT fix is certainly going to be different from the HSW/BDW fix. To make things more organized, and reduce the confusion probability it would be nice if we could close this bug, then report a new one just for BYT, redo the tests and list the set of subtests that still fail on BYT, along with their dmesg output. Or we could do this on this bug anyway.
It works well on HSW ULT and BDW, but still fails on BYT. Report bug 85351 to track BYT's fail, and close it.
Verified.Fixed.
Closing old verified.
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.