Bug 91578 - [HSW] kms_pipe_crc_basic fails due to fifo underruns in combination with VGA output
Summary: [HSW] kms_pipe_crc_basic fails due to fifo underruns in combination with VGA ...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest normal
Assignee: cprigent
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-06 20:04 UTC by Jesse Barnes
Modified: 2016-08-23 12:20 UTC (History)
6 users (show)

See Also:
i915 platform: HSW
i915 features: display/Other


Attachments
Use only one color to run test kms_pipe_crc_basic (4.28 KB, patch)
2015-09-18 09:05 UTC, Mika Kahola
no flags Details | Splinter Review
Increase watermark latencies (2.01 KB, patch)
2015-10-15 11:12 UTC, Mika Kahola
no flags Details | Splinter Review
CxSR plane control register (5.96 KB, patch)
2015-10-20 12:19 UTC, Mika Kahola
no flags Details | Splinter Review
dmesg output (60.07 KB, text/plain)
2015-11-10 12:13 UTC, Mika Kahola
no flags Details
Fix for pipe configs (5.63 KB, text/plain)
2015-11-18 12:05 UTC, Mika Kahola
no flags Details
Rebased fix for pipe configs (5.51 KB, patch)
2015-11-27 07:41 UTC, Mika Kahola
no flags Details | Splinter Review
hswu_4.4.0-rc2+pipe_fix_v2.patch_kern.log (436.62 KB, text/plain)
2015-11-27 14:42 UTC, cprigent
no flags Details
bdw_4.4.0-rc2+pipe_fix_v2.patch_kern.log (1.30 MB, text/plain)
2015-11-27 14:42 UTC, cprigent
no flags Details

Description Jesse Barnes 2015-08-06 20:04:43 UTC
Get this output; not sure where the "Timed out" is coming from; presumably the commit of the new display state fails somewhere?

[root@jbarnes-hsw intel-gpu-tools]$ ./tests/kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence
IGT-Version: 1.11-g1a7d365 (x86_64) (Linux: 4.2.0-rc5+ x86_64)
read-crc-pipe-A-frame-sequence: Testing connector VGA-1 using pipe A
Timed out
Subtest read-crc-pipe-A-frame-sequence failed.
**** DEBUG ****
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-A-frame-sequence: Testing connector VGA-1 using pipe A
display: VGA-1: set_pipe(A)
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: A.0: plane_set_fb(98)
display: commit {
display:     VGA-1: Selecting pipe A
display:     DP-1: Selecting pipe B
display:     DP-2: Selecting pipe C
display:     VGA-1: SetCrtc pipe A, fb 98, panning (0, 0), mode 1024x768
display: }
Timed out
****  END  ****
Comment 1 Jesse Barnes 2015-08-06 20:05:39 UTC
Daniel or Thomas, any thoughts on this one?  At first it was just the pipe B and pipe C tests failing, but then I plugged in another monitor and all pipe CRC frame sequence tests started failing.
Comment 2 Jesse Barnes 2015-08-06 20:06:23 UTC
Christophe, do you see this as well?
Comment 3 Thomas Wood 2015-08-07 09:01:23 UTC
The "Timed out" message likely comes from the reading of the CRC debugfs file. If the read is blocked for more than 5 seconds, the call is aborted and the test fails.
Comment 4 Jesse Barnes 2015-08-07 19:03:27 UTC
More info from today:
  - all tests pass if I remove all connectors before starting the tests
  - tests pass with VGA connected
  - pipe A succeeds after a reboot with DP plugged in, but B and C fail
  - once a failure occurs, all tests start failing until the next reboot
  - if VGA injection is disabled (returning early from the igt_enable_connectors function per Daniel's patch) all tests pass

So seems to be related to VGA handling on HSW somehow.
Comment 5 Mika Kahola 2015-09-09 11:12:39 UTC
When the test fails i.e. reading of the CRC debugfs blocks for more than 5 seconds these errors pop up

[  503.298054] [drm:intel_set_cpu_fifo_underrun_reporting [i915]] *ERROR* uncleared fifo underrun on pipe B
[  503.298063] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe B FIFO underrun
Comment 6 Mika Kahola 2015-09-18 09:05:27 UTC
Created attachment 118343 [details] [review]
Use only one color to run test kms_pipe_crc_basic

I took a step backwards and removed the second color from the test. I can't recall what was the reason why second color was added to the test. Maybe someone remembers why this second color was needed? 

I tested with the following sequence that seems to work for me
- unplug VGA
- unplug DP
- unplug DVI
- plug VGA back
- plug DP back
- plug DVI back

run 'kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence --debug'

The output of the test was the following

IGT-Version: 1.12-gcefd45a (x86_64) (Linux: 4.2.0-rc8-2015-09-16-11.28-drm-intel x86_64)
(kms_pipe_crc_basic:2603) igt-core-DEBUG: Test requirement passed: !igt_run_in_simulation()
Test requirement passed: fd >= 0
Test requirement passed: fd >= 0
Test requirement passed: drmSetMaster(fd) == 0
Test requirement passed: fd >= 0
VT: graphics mode set (mode was 0x0)
Test requirement passed: ctl
Test requirement passed: (written == strlen(cmd) && ret == 0) || errno != ENODEV
display: init {
display:     VGA-1: Selecting pipe A
display:     HDMI-A-1: Selecting pipe B
display:     DP-1: Selecting pipe C
display: }
Starting subtest: read-crc-pipe-A-frame-sequence
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-A-frame-sequence: Testing connector VGA-1 using pipe A
display: VGA-1: set_pipe(A)
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1920, height=1200, format=0x34325258 [bpp=32], tiling=0x0, size=0
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: A.0: plane_set_fb(91)
display: commit {
display:     VGA-1: Selecting pipe A
display:     HDMI-A-1: Selecting pipe B
display:     DP-1: Selecting pipe C
display:     VGA-1: SetCrtc pipe A, fb 91, panning (0, 0), mode 1920x1200
display: }
CRC for this fb: 92b15e48 00000000 00000000 00000000 00000000
display: A.0: plane_set_fb(0)
display: VGA-1: set_pipe(any)
read-crc-pipe-A-frame-sequence: Testing connector HDMI-A-1 using pipe A
display: HDMI-A-1: set_pipe(A)
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1920, height=1200, format=0x34325258 [bpp=32], tiling=0x0, size=0
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: A.0: plane_set_fb(47)
display: commit {
display:     HDMI-A-1: Selecting pipe A
display:     VGA-1: Selecting pipe B
display:     DP-1: Selecting pipe C
display:     HDMI-A-1: SetCrtc pipe A, fb 47, panning (0, 0), mode 1920x1200
display: }
CRC for this fb: 92b15e48 00000000 00000000 00000000 00000000
display: A.0: plane_set_fb(0)
display: HDMI-A-1: set_pipe(any)
read-crc-pipe-A-frame-sequence: Testing connector DP-1 using pipe A
display: DP-1: set_pipe(A)
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1920, height=1200, format=0x34325258 [bpp=32], tiling=0x0, size=0
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: A.0: plane_set_fb(47)
display: commit {
display:     DP-1: Selecting pipe A
display:     VGA-1: Selecting pipe B
display:     HDMI-A-1: Selecting pipe C
display:     DP-1: SetCrtc pipe A, fb 47, panning (0, 0), mode 1920x1200
display: }
CRC for this fb: 92b15e48 00000000 00000000 00000000 00000000
display: A.0: plane_set_fb(0)
display: DP-1: set_pipe(any)
Test requirement passed: valid_connectors
Subtest read-crc-pipe-A-frame-sequence: SUCCESS (0.648s)
Exiting with status code 0
VT: original mode 0x0 restored
Comment 7 Mika Kahola 2015-10-15 11:12:53 UTC
Created attachment 118886 [details] [review]
Increase watermark latencies

Let's try a brute force patch to increase the watermark latencies on Haswell. Please give this patch a go and report if this patch works or not for you.
Comment 8 Mika Kahola 2015-10-20 12:19:18 UTC
Created attachment 119005 [details] [review]
CxSR plane control register

This partially reverts the commit 852eb00dc44ea2b8896e2fa27c6a36a1f697ba5a
that tried to make sure CxSR is disabled around plane enable/disable.

Please, give this patch a go and report back if this would solve the issue here.
Comment 9 Daniel Vetter 2015-10-22 11:32:31 UTC
Also fails on BDW in the Helsinki CI system.
Comment 10 Mika Kahola 2015-10-23 09:53:31 UTC
I did some bisecting and here's the result

git bisect start
# good: [62cf983ad84275f8580c807e5e596216c46773cf] mmc: sdhci-pxav3: fix unbalanced clock issues during probe
git bisect good 62cf983ad84275f8580c807e5e596216c46773cf
# bad: [67e476e80cfa18947f1e10d83896a3bfe8984da9] drm-intel-nightly: 2015y-10m-22d-08h-29m-27s UTC integration manifest
git bisect bad 67e476e80cfa18947f1e10d83896a3bfe8984da9
# good: [234a56c80a6aa7a05fec05d8b7184354d8765b48] Merge tag 'hwmon-for-linus-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
git bisect good 234a56c80a6aa7a05fec05d8b7184354d8765b48
# good: [6b3703f4cb763d57ab26f2ad262a30cc7f87093c] staging: comedi: comedi_fops: remove BUG_ON() in comedi_cleanup()
git bisect good 6b3703f4cb763d57ab26f2ad262a30cc7f87093c
# good: [8bd8fd0a29bfd5ad8e1976edd8c4c40cdb39aa4f] Merge tag 'mfd-for-linus-4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
git bisect good 8bd8fd0a29bfd5ad8e1976edd8c4c40cdb39aa4f
# bad: [9a9952bbd76a13fc2c95c28f09ba1801a3664929] Merge tag 'iommu-updates-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
git bisect bad 9a9952bbd76a13fc2c95c28f09ba1801a3664929
# bad: [73bf1b7be7aab60d7c651402441dd0b0b4991098] Merge branch 'drm-next-4.3' of git://people.freedesktop.org/~agd5f/linux into drm-next
git bisect bad 73bf1b7be7aab60d7c651402441dd0b0b4991098
# bad: [3ff8e5090c337a4eb26952d68587f450e012bd72] Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
git bisect bad 3ff8e5090c337a4eb26952d68587f450e012bd72
# bad: [cd25dd5b766858b730af00d5b2bbaf6ad2b80c27] drm/i915: Update PM interrupts before updating the freq
git bisect bad cd25dd5b766858b730af00d5b2bbaf6ad2b80c27
# good: [a3fbe05a611811ad8413130f63aaa79428b00377] drm/i915: Don't tag kernel batches as user batches
git bisect good a3fbe05a611811ad8413130f63aaa79428b00377
# bad: [6f9c784b7ec2cc9fc9fd7c5a8634b70aadd76015] drm/i915: Don't do PM5/DDR DVFS with multiple pipes
git bisect bad 6f9c784b7ec2cc9fc9fd7c5a8634b70aadd76015
# good: [251ac8621921d3936ea2eff6790fe35b25cf28a4] drm/i915: s/update/compute/ for gmch dpll register functions
git bisect good 251ac8621921d3936ea2eff6790fe35b25cf28a4
# good: [d1c54acd67dc6518629224b68cac17cd5cff1dc3] drm/i915/gtt: Introduce kmap|kunmap for dma page
git bisect good d1c54acd67dc6518629224b68cac17cd5cff1dc3
# good: [350405623ff3f447813eaef2035272bf05281671] drm/i915: Update rps frequencies for BXT
git bisect good 350405623ff3f447813eaef2035272bf05281671
# good: [f015c5518879fb3e578caaa63806617468a24045] drm/i915: Split atomic wm update to pre and post variants
git bisect good f015c5518879fb3e578caaa63806617468a24045
# good: [54f1b6e15db87722aa21035169ce811af9d971fd] drm/i915: Compute display FIFO split dynamically for CHV
git bisect good 54f1b6e15db87722aa21035169ce811af9d971fd
# bad: [852eb00dc44ea2b8896e2fa27c6a36a1f697ba5a] drm/i915: Try to make sure cxsr is disabled around plane enable/disable
git bisect bad 852eb00dc44ea2b8896e2fa27c6a36a1f697ba5a
# good: [26e1fe4fbd4c15919f8cfa9440d70eca5a457ba3] drm/i915: Use the memory latency based WM computation on VLV too
git bisect good 26e1fe4fbd4c15919f8cfa9440d70eca5a457ba3
# first bad commit: [852eb00dc44ea2b8896e2fa27c6a36a1f697ba5a] drm/i915: Try to make sure cxsr is disabled around plane enable/disable

I need to dig a bit deeper as the earlier fix was not enough.
Comment 11 Maarten Lankhorst 2015-11-10 11:41:15 UTC
Using 2 dp connectors and a HDMI output on drm-intel-nightly works for me.
Comment 12 Mika Kahola 2015-11-10 12:13:13 UTC
Created attachment 119538 [details]
dmesg output

running the ./tests/kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence with the latest -nightly. Here's the dmesg output of the test with drm.debug=0x1e 

The test result
IGT-Version: 1.12-g5ec54d8 (x86_64) (Linux: 4.3.0-2015-11-10-13.50-drm-intel x86_64)
read-crc-pipe-A-frame-sequence: Testing connector VGA-1 using pipe A
Timed out: CRC reading
Subtest read-crc-pipe-A-frame-sequence failed.
**** DEBUG ****
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-A-frame-sequence: Testing connector VGA-1 using pipe A
display: VGA-1: set_pipe(A)
Clearing the fb with color (0,00,1,00,0,00)
igt_create_fb_with_bo_size(width=1920, height=1200, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: A.0: plane_set_fb(46)
display: commit {
display:     VGA-1: Selecting pipe A
display:     DP-1: Selecting pipe B
display:     VGA-1: SetCrtc pipe A, fb 46, panning (0, 0), mode 1920x1200
display: }
Timed out: CRC reading
****  END  ****
Subtest read-crc-pipe-A-frame-sequence: FAIL (5,166s)
Comment 13 Mika Kahola 2015-11-18 12:05:17 UTC
Created attachment 119904 [details]
Fix for pipe configs

This patch seems to work ok for me with this test. If you could give it a go and report back if it works for you or not. If yes, then I will clean up this patch and send it for review.
Comment 14 Kimmo Nikkanen 2015-11-25 07:56:23 UTC
Assigning to our QA for verification
Comment 15 Mika Kahola 2015-11-27 07:41:50 UTC
Created attachment 120161 [details] [review]
Rebased fix for pipe configs

Rebased version of the proposed fix to kms_pipe_crc_basic test
Comment 16 cprigent 2015-11-27 13:50:20 UTC
First I confirm tests are Pass with the patch applied on SKL-Y. Note that kernel log contains errors.

I will give the result on HSW and BDW.

root@SKLY4:~/dev/graphic/tools/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence
IGT-Version: 1.12-gd84e624 (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-A-frame-sequence: Testing connector eDP-1 using pipe A
read-crc-pipe-A-frame-sequence: Testing connector HDMI-A-1 using pipe A
read-crc-pipe-A-frame-sequence: Testing connector DP-2 using pipe A
Subtest read-crc-pipe-A-frame-sequence: SUCCESS (6.999s)
root@SKLY4:~/dev/graphic/tools/intel-gpu-tools/tests#
root@SKLY4:~/dev/graphic/tools/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-B-frame-sequence
IGT-Version: 1.12-gd84e624 (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-B-frame-sequence: Testing connector eDP-1 using pipe B
read-crc-pipe-B-frame-sequence: Testing connector HDMI-A-1 using pipe B
read-crc-pipe-B-frame-sequence: Testing connector DP-2 using pipe B
Subtest read-crc-pipe-B-frame-sequence: SUCCESS (6.052s)
root@SKLY4:~/dev/graphic/tools/intel-gpu-tools/tests#
root@SKLY4:~/dev/graphic/tools/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-C-frame-sequence
IGT-Version: 1.12-gd84e624 (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-C-frame-sequence: Testing connector eDP-1 using pipe C
read-crc-pipe-C-frame-sequence: Testing connector HDMI-A-1 using pipe C
read-crc-pipe-C-frame-sequence: Testing connector DP-2 using pipe C
Subtest read-crc-pipe-C-frame-sequence: SUCCESS (7.616s)

Platform: SKY LAKE Y A0 QUAL
CPU : Intel(R) Core(TM) M5-6Y54 @ 1.10GHz 4MB (family: 6, model: 78  stepping: 3)
MCP : SKL-Y  D1  
QDF : QJ9W
CPU : SKL D0
Chipset PCH: Sunrise Point LP C1       
CRB : SKY LAKE Y LPDDR3 RVP3 CRB FAB2
Reworks : All Mandatories + FBS02 & FBS03, O-06
Software 
Linux : Ubuntu 14.04 64 bits
BIOS : SKLSE2R1.R00.B104.B01.1511110114
ME FW : 11.0.0.1191
Ksc (EC FW): 1.20
Kernel 4.4.0-rc2 nighlty 17874a0 from git://anongit.freedesktop.org/drm-intel
  commit 17874a0bd04949ab460431e6017860ab98e0e4d2
  Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
  Date:   Thu Nov 26 18:58:09 2015 +0200
  drm-intel-nightly: 2015y-11m-26d-16h-57m-42s UTC integration manifest
  with patch https://bugs.freedesktop.org/attachment.cgi?id=120161 applied
Mesa 11.0.5 from http://cgit.freedesktop.org/mesa/mesa/
xf86-video-intel - 2.99.917 from http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/
Libdrm - 2.4.65 from http://cgit.freedesktop.org/mesa/drm/
Libva - 1.6.1 from http://cgit.freedesktop.org/libva/
vaapi intel-driver - 1.6.1 from http://cgit.freedesktop.org/vaapi/intel-driver
Cairo - 1.14.2 from http://cgit.freedesktop.org/cairo
Xorg Xserver - 1.17.2 from http://cgit.freedesktop.org/xorg/xserver
DMC 1.23 and GuC 4.3 from https://01.org/linuxgraphics/intel-linux-graphics-firmwares
IGT 1.12-gd84e624 from http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
Monitors: Asus PB287Q (HDMI) and Asus PB238Q (DP)
Comment 17 cprigent 2015-11-27 14:42:04 UTC
Created attachment 120174 [details]
hswu_4.4.0-rc2+pipe_fix_v2.patch_kern.log

HSW: Skip, Fail, Fail
BDW: Pass, Pass, Fail

HSW
---
root@HSWU3:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
Test requirement not met in function test_read_crc, file kms_pipe_crc_basic.c:209:
Test requirement: valid_connectors
No connector found for pipe 0
Subtest read-crc-pipe-A-frame-sequence: SKIP (0.000s)
root@HSWU3:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-B-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-B-frame-sequence: Testing connector DP-1 using pipe B
Timed out: CRC reading
Subtest read-crc-pipe-B-frame-sequence failed.
**** DEBUG ****
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-B-frame-sequence: Testing connector DP-1 using pipe B
display: DP-1: set_pipe(B)
display: commit {
display:     DP-1: Selecting pipe B
display: }
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: B.0: plane_set_fb(49)
display: commit {
display:     DP-1: Selecting pipe B
display:     DP-1: SetCrtc pipe B, fb 49, panning (0, 0), mode 1024x768
display: }
CRC for this fb: bed119d0 00000000 00000000 00000000 00000000
display: B.0: plane_set_fb(0)
display: DP-1: set_pipe(any)
display: DP-1: set_pipe(B)
display: commit {
display:     DP-1: Selecting pipe B
display:     DP-1: SetCrtc pipe B, disabling
display: }
Clearing the fb with color (0.00,1.00,1.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: B.0: plane_set_fb(43)
display: commit {
display: }
Timed out: CRC reading
****  END  ****
Subtest read-crc-pipe-B-frame-sequence: FAIL (5.712s)
root@HSWU3:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-C-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-C-frame-sequence: Testing connector DP-1 using pipe C
Timed out: CRC reading
Subtest read-crc-pipe-C-frame-sequence failed.
**** DEBUG ****
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-C-frame-sequence: Testing connector DP-1 using pipe C
display: DP-1: set_pipe(C)
display: commit {
display:     DP-1: Selecting pipe C
display: }
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: C.0: plane_set_fb(49)
display: commit {
display:     DP-1: Selecting pipe C
display:     DP-1: SetCrtc pipe C, fb 49, panning (0, 0), mode 1024x768
display: }
CRC for this fb: bed119d0 00000000 00000000 00000000 00000000
display: C.0: plane_set_fb(0)
display: DP-1: set_pipe(any)
display: DP-1: set_pipe(C)
display: commit {
display:     DP-1: Selecting pipe C
display:     DP-1: SetCrtc pipe C, disabling
display: }
Clearing the fb with color (0.00,1.00,1.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: C.0: plane_set_fb(43)
display: commit {
display: }
Timed out: CRC reading
****  END  ****
Subtest read-crc-pipe-C-frame-sequence: FAIL (5.700s)

Hardware:
Motherboard: SawTooth Peak
cpu model name : Intel(R) Core(TM) i7-4550U CPU @ 1.50GHz
cpu model : 69
cpu family : 6
Graphic card: Haswell-ULT Integrated Graphics Controller (rev 09)
Software:
Kernel 4.4.0-rc2 nighlty 17874a0 from git://anongit.freedesktop.org/drm-intel
  commit 17874a0bd04949ab460431e6017860ab98e0e4d2
  Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
  Date:   Thu Nov 26 18:58:09 2015 +0200
  drm-intel-nightly: 2015y-11m-26d-16h-57m-42s UTC integration manifest
  with patch https://bugs.freedesktop.org/attachment.cgi?id=120161 applied
Ubuntu 14.04.1 LTS
Bios: HSWLPTU1.86C.0135.R01.1311020052
Libdrm: 2.4.65


BDW-U
-----
root@BDWU1:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-A-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-A-frame-sequence: Testing connector eDP-1 using pipe A
Subtest read-crc-pipe-A-frame-sequence: SUCCESS (3.020s)
root@BDWU1:/usr/local/src/intel-gpu-tools/tests#
root@BDWU1:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-B-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-B-frame-sequence: Testing connector eDP-1 using pipe B
Subtest read-crc-pipe-B-frame-sequence: SUCCESS (3.380s)
root@BDWU1:/usr/local/src/intel-gpu-tools/tests#
root@BDWU1:/usr/local/src/intel-gpu-tools/tests# ./kms_pipe_crc_basic --r read-crc-pipe-C-frame-sequence
IGT-Version: 1.12-NOT-GIT (x86_64) (Linux: 4.4.0-rc2-nightly-patch-91578+ x86_64)
read-crc-pipe-C-frame-sequence: Testing connector eDP-1 using pipe C
read-crc-pipe-C-frame-sequence: Testing connector DP-1 using pipe C
Timed out: CRC reading
Subtest read-crc-pipe-C-frame-sequence failed.
**** DEBUG ****
Test requirement passed: !(pipe >= data->display.n_pipes)
read-crc-pipe-C-frame-sequence: Testing connector eDP-1 using pipe C
display: eDP-1: set_pipe(C)
display: commit {
display:     eDP-1: Selecting pipe C
display:     DP-1: Selecting pipe A
display: }
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: C.0: plane_set_fb(58)
display: commit {
display:     eDP-1: Selecting pipe C
display:     DP-1: Selecting pipe A
display:     eDP-1: SetCrtc pipe C, fb 58, panning (0, 0), mode 1920x1080
display: }
CRC for this fb: d30a1687 00000000 00000000 00000000 00000000
display: C.0: plane_set_fb(0)
display: eDP-1: set_pipe(any)
display: eDP-1: set_pipe(C)
display: commit {
display:     eDP-1: Selecting pipe C
display:     DP-1: Selecting pipe A
display:     eDP-1: SetCrtc pipe C, disabling
display: }
Clearing the fb with color (0.00,1.00,1.00)
igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=7680)
display: C.0: plane_set_fb(51)
display: commit {
display:     eDP-1: Selecting pipe C
display:     DP-1: Selecting pipe A
display:     eDP-1: SetCrtc pipe C, fb 51, panning (0, 0), mode 1920x1080
display: }
CRC for this fb: 1224d6f1 00000000 00000000 00000000 00000000
display: C.0: plane_set_fb(0)
display: eDP-1: set_pipe(any)
read-crc-pipe-C-frame-sequence: Testing connector DP-1 using pipe C
display: DP-1: set_pipe(C)
display: commit {
display:     DP-1: Selecting pipe C
display:     eDP-1: Selecting pipe A
display:     DP-1: SetCrtc pipe C, disabling
display: }
Clearing the fb with color (0.00,1.00,0.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: C.0: plane_set_fb(51)
display: commit {
display:     DP-1: Selecting pipe C
display:     eDP-1: Selecting pipe A
display:     DP-1: SetCrtc pipe C, fb 51, panning (0, 0), mode 1024x768
display: }
CRC for this fb: bed119d0 00000000 00000000 00000000 00000000
display: C.0: plane_set_fb(0)
display: DP-1: set_pipe(any)
display: DP-1: set_pipe(C)
display: commit {
display:     DP-1: Selecting pipe C
display:     eDP-1: Selecting pipe A
display:     DP-1: SetCrtc pipe C, disabling
display: }
Clearing the fb with color (0.00,1.00,1.00)
igt_create_fb_with_bo_size(width=1024, height=768, format=0x34325258 [bpp=32], tiling=0x0, size=0)
igt_create_fb_with_bo_size(handle=1, pitch=4096)
display: C.0: plane_set_fb(51)
display: commit {
display:     eDP-1: Selecting pipe A
display: }
Timed out: CRC reading
****  END  ****
Subtest read-crc-pipe-C-frame-sequence: FAIL (9.704s)

Hardware: 
Motherboard: WhiteTip Mountain
cpu model name : Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz 
cpu model : 61 
cpu family : 6 
Graphic card: Broadwell-U Integrated Graphics (rev 09) 
Kernel 4.4.0-rc2 nighlty 17874a0 from git://anongit.freedesktop.org/drm-intel
  commit 17874a0bd04949ab460431e6017860ab98e0e4d2
  Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
  Date:   Thu Nov 26 18:58:09 2015 +0200
  drm-intel-nightly: 2015y-11m-26d-16h-57m-42s UTC integration manifest
  with patch https://bugs.freedesktop.org/attachment.cgi?id=120161 applied
Ubuntu 14.04.1 LTS
Bios: BDW-E1R1.86C.0125.R00.1506031935 
Libdrm: 2.4.65
Comment 18 cprigent 2015-11-27 14:42:32 UTC
Created attachment 120175 [details]
bdw_4.4.0-rc2+pipe_fix_v2.patch_kern.log
Comment 19 Daniel Vetter 2015-11-28 09:57:45 UTC
Ok, we need to split this bug up.

- has_infoframes mismatch is tracked in bug #93119 - if the test fails only due to that then it's a dupe of that

- let's restrict this one here to hsw crc failures due to fifo underruns. This bug only happens (at least for me) when both a VGA plus either hdmi or dp output are present. VGA alone or any other combo without vga works. I have a patch for this bug, hence will take it over. Because bdw doesn't have vga this bug can't happen there.

If there are any other bugs then we need to track them in other bugzillas (if an applicable is filed already) or file a new one.
Comment 20 Daniel Vetter 2015-11-28 10:06:43 UTC
http://patchwork.freedesktop.org/patch/66442/

This one fixes it for me on my hsw.
Comment 21 Mika Kahola 2015-11-30 07:22:53 UTC
(In reply to Daniel Vetter from comment #20)
> http://patchwork.freedesktop.org/patch/66442/
> 
> This one fixes it for me on my hsw.

This patch seems to work on my hsw as well.
Comment 22 Kimmo Nikkanen 2015-11-30 09:07:22 UTC
Assigning to QA for verification
Comment 23 Daniel Vetter 2015-11-30 14:00:31 UTC
(In reply to Mika Kahola from comment #21)
> (In reply to Daniel Vetter from comment #20)
> > http://patchwork.freedesktop.org/patch/66442/
> > 
> > This one fixes it for me on my hsw.
> 
> This patch seems to work on my hsw as well.

Mika, can you pls smash a tested-by onto the patch on the m-l, and while at it please also review it? Since you've dug around in this for a while I think you're a good candidate. If you have any questions, please ping me on irc. I tried to capture what I discovered while debugging in the commit message, but probably it's a bit too terse.
Comment 24 Mika Kahola 2015-11-30 14:19:22 UTC
(In reply to Daniel Vetter from comment #23)
> (In reply to Mika Kahola from comment #21)
> > (In reply to Daniel Vetter from comment #20)
> > > http://patchwork.freedesktop.org/patch/66442/
> > > 
> > > This one fixes it for me on my hsw.
> > 
> > This patch seems to work on my hsw as well.
> 
> Mika, can you pls smash a tested-by onto the patch on the m-l, and while at
> it please also review it? Since you've dug around in this for a while I
> think you're a good candidate. If you have any questions, please ping me on
> irc. I tried to capture what I discovered while debugging in the commit
> message, but probably it's a bit too terse.

Sure, I can do the review as well.
Comment 25 Daniel Vetter 2015-12-01 08:21:09 UTC
commit 6b6985169017e554d80a8c2befdadbd81d13c2a2
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Nov 28 11:05:39 2015 +0100

    drm/i915: fix fdi related fifo underruns on hsw
Comment 26 Luis Botello 2016-04-20 17:53:52 UTC
I ran this test on a NUC HSW ULT with one DP and one HDMI displays attached and it worked fine. This is my configuration/environment:

Linux distribution: Ubuntu 15.10 64 bits
Kernel: drm-intel-nightly 4.6.0-rc3_d9131d6 from http://cgit.freedesktop.org/drm-intel/
commit d9131d62d18ba94fb3ca019f1156c22b5f4ce23c
Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Date:   Fri Apr 15 14:54:26 2016 +0100
drm-intel-nightly: 2016y-04m-15d-13h-53m-44s UTC integration manifestdrm: tag libdrm-2.4.66-33-gf884af9
      libdrm 2.4.67-25 cc9a53f from git://git.freedesktop.org/git/mesa/drm
mesa 11.1.2 7bcd827 from git://git.freedesktop.org/git/mesa/mesa
cairo 1.15.2 db8a7f1 from git://git.freedesktop.org/git/cairo
xorg/xserver 1.18.0-274 8437955 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.917-634 81029be from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
vaapi/libva 1.7.0-1 2339d10 from git://git.freedesktop.org/git/vaapi/libva
vaapi/intel-driver 1.7.0-8 2c1bec0 from git://git.freedesktop.org/git/vaapi/intel-driver
intel-gpu-tool 1.14 7bd2ac6 from http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git
rendercheck master 44032a7 from http://anongit.freedesktop.org/git/xorg/app/rendercheck.git
Comment 27 cprigent 2016-08-23 12:20:12 UTC
Test is Pass with 4.8-rc3 #f1707bb.
So closed

Platform: NUC D54250WYK 
CPU: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz (family 6, model 69, stepping 1)
Motherboard: H13922-303
GPU: Intel® HD Graphics 5000 - Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)

Software
Bios: WYLPT10H.86A.0042.2016.0704.1441 from https://downloadcenter.intel.com/downloads/eula/26159/BIOS-Update-WYLPT10H-86A-?httpDown=https%3A%2F%2Fdownloadmirror.intel.com%2F26159%2Feng%2FWY0042.bio
Linux distribution: Ubuntu 16.04 64 bits
Kernel: 4.8.0-rc3 f1707bb from http://cgit.freedesktop.org/drm-intel/
  commit f1707bbbf96774eaf799c9578c3558bd065e9749
  Author: Chris Wilson <chris@chris-wilson.co.uk>
  Date:   Mon Aug 22 18:43:40 2016 +0100
  drm-intel-nightly: 2016y-08m-22d-17h-43m-22s UTC integration manifest
libdrm-2.4.70-2 b214b05 from git://anongit.freedesktop.org/mesa/drm
mesa: mesa-11.2.2 3a9f628from git://anongit.freedesktop.org/mesa/mesa
cairo 1.15.2 db8a7f1 from git://anongit.freedesktop.org/cairo
xorg-server-1.18.0- 532 6e5bec2 from git://git.freedesktop.org/git/xorg/xserver
xf86-video-intel 2.99.697 12c14de from git://git.freedesktop.org/git/xorg/driver/xf86-video-intel
libva-1.7.0-45 b27feb9 from git://git.freedesktop.org/git/vaapi/libva 
vaapi-intel-driver: 1.7.0-89 b53fad9 from git://git.freedesktop.org/git/vaapi/intel-driver
Intel-Gpu-Tools 1.15 b0658ce from http://anongit.freedesktop.org/git/xorg/app/intel-gpu-tools.git


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.