Bug 89134

Summary: [APL]igt/kms_flip/2x-vblank-vs-dpms-suspend failed
Product: DRI Reporter: Ding Heng <hengx.ding>
Component: DRM/IntelAssignee: Marius Vlad <marius.c.vlad>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: christophe.prigent, intel-gfx-bugs, przanoni
Version: DRI git   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=102095
Whiteboard:
i915 platform: BXT i915 features: display/Other
Attachments:
Description Flags
dmesg none

Description Ding Heng 2015-02-13 08:48:57 UTC
Created attachment 113456 [details]
dmesg

==System Environment==
--------------------------
Regression: yes
Non-working platforms:  BYT
==kernel==
--------------------------
drm-intel-nightly/dbd79c545cbbf63785cbda8d13260b3e827f0f6d(2015-02-13)


==Bug detailed description==
-----------------------------
Affectted cases:
igt/kms_flip/2x-vblank-vs-dpms-suspend
igt/kms_flip/2x-vblank-vs-dpms-suspend-interruptible

 ./kms_flip --run-subtest 2x-vblank-vs-dpms-suspend-interruptible
IGT-Version: 1.9-g9846e7f (x86_64) (Linux: 3.19.0_drm-intel-nightly_dbd79c_20150213+ x86_64)
Using monotonic timestamps
Beginning 2x-vblank-vs-dpms-suspend-interruptible on crtc 20:24, connector 30:42
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
.rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Feb 13 08:45:01 2015
.rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Feb 13 08:45:04 2015
(kms_flip:5415) CRITICAL: Test assertion failure function check_state, file kms_flip.c:640:
(kms_flip:5415) CRITICAL: Failed assertion: timercmp(&es->last_received_ts, &es->current_ts, <)
(kms_flip:5415) CRITICAL: Last errno: 4, Interrupted system call
(kms_flip:5415) CRITICAL: vblank ts before the vblank was issued!
timerdiff -1s, 994769us
Subtest 2x-vblank-vs-dpms-suspend-interruptible: FAIL (1.892s)
root@x-hsw25:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./kms_flip --run-subtest 2x-vblank-vs-dpms-suspend
IGT-Version: 1.9-g9846e7f (x86_64) (Linux: 3.19.0_drm-intel-nightly_dbd79c_20150213+ x86_64)
Using monotonic timestamps
Beginning 2x-vblank-vs-dpms-suspend on crtc 20:24, connector 30:42
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
  1024x768 60 1024 1048 1184 1344 768 771 777 806 0xa 0x40 65000
.rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Feb 13 08:46:07 2015
.rtcwake: wakeup from "mem" using /dev/rtc0 at Fri Feb 13 08:46:10 2015
(kms_flip:5430) CRITICAL: Test assertion failure function check_state, file kms_flip.c:640:
(kms_flip:5430) CRITICAL: Failed assertion: timercmp(&es->last_received_ts, &es->current_ts, <)
(kms_flip:5430) CRITICAL: vblank ts before the vblank was issued!
timerdiff -1s, 994585us
Subtest 2x-vblank-vs-dpms-suspend: FAIL (1.879s)



==Reproduce steps==
---------------------------- 
1. ./kms_flip --run-subtest 2x-vblank-vs-dpms-suspend-interruptible
2. ./kms_flip --run-subtest 2x-vblank-vs-dpms-suspend
Comment 1 Paulo Zanoni 2015-02-23 20:40:45 UTC
Since this is a regression, can you please bisect it?

By the way, the bug description mentions "BYT" as the non-working platform, but the log file and bug title are for HSW.
Comment 2 Ding Heng 2015-02-25 06:31:32 UTC
(In reply to Paulo Zanoni from comment #1)
> Since this is a regression, can you please bisect it?

By the way, the bug
> description mentions "BYT" as the non-working platform, but the log file and
> bug title are for HSW.

Sorry for that. I copy these words from other bugs and modified the content for this bug, sometimes I forgot to modify the platform.

I had re-check these 2 cases on BYT and HSW from 2015-01-22 to 2015-02-12. These 2 cases had never been run on BYT. On HSW, it always fail except on 2015-02-11, subcase 2x-vblank-vs-dpms-suspend success that day, but when I tried to run this case with the kernel that day, it failed. So this bug is not a regression, and platform is only on HSW.
Comment 3 Humberto Israel Perez Rodriguez 2016-02-26 04:18:47 UTC
this test also fail on BXT-P with latest configuration :

Software & Hardware configuration
===================================
Kernel version                      : 4.5.0-rc5-nightly+
Linux distribution                  : Ubuntu 15.10
Architecture                        : 64-bit
Mesa version                        : 11.1.1 (git-330aa44
xf86-video-intel version            : 2.99.917
Xorg-Xserver version                : 1.18.1
DRM version                         : 2.4.66
VAAPI version                       : Intel i965 driver for Intel(R) Broxton - 1.6.3.pre1 (1.6.1-92-gf6fe842)
Cairo version                       : 1.15.2
Bios revision                       : 119.10
KSC revision                        : 1.6
Motherboard model                   : Broxton P
Motherboard type                    : NOTEBOOK Hand Held
Motherboard manufacturer            : Intel Corp.
CPU family                          : Other
CPU information                     : 06/5c
GPU Card                            : Intel Corporation Device 5a84 (rev 03) (prog-if 00 [VGA controller])

 --> Component : intel-gpu-tools 
url : http://cgit.freedesktop.org/xorg/app/intel-gpu-tools 
tag : intel-gpu-tools-1.13 
commit : 2db78a4 
author : Thomas Wood <thomas.wood@intel.com> 
age : 3 months ago 

kernel
======
commit 1a139ead792d8e912aa13d413b9cf59811fde676
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Mon Feb 22 10:48:46 2016 +0200

    drm-intel-nightly: 2016y-02m-22d-08h-48m-06s UTC integration manifest
Comment 4 Marius Vlad 2016-04-13 13:20:43 UTC
Tried running both 2x-vblank-vs-dpms-suspend and  2x-vblank-vs-dpms-suspend-interruptible on a HSW w/ latest nightly and can't reproduce. Could you confirm that this still happens on HSW?
Comment 5 Ville Syrjala 2016-04-13 14:43:33 UTC
Just FYI, the 2x cases are prone to fail unless the two pipes are running at precisely the same refresh rate. Otherwise they'll eventually drift apart causing the test to fail.

Neither does the kernel attempt to minimize the phase difference between the pipes even if the refresh rates are identical. We should probably do that, especially for the "multiple MST streams make up one display" case. Otherwise that could lead to a visible tear between the "panels".
Comment 6 Jari Tahvanainen 2017-03-29 10:09:33 UTC
For record, failures are still there on with 4.10.0-drm-tip-qa-ww9-commit-7f38bb9+ (HSW-1-D54250WYK)

2x-vblank-vs-dpms-suspend	Fail
igt,igt@kms_flip@2x-vblank-vs-dpms-suspend,fail,,"[[ this test was : fail ]]
[[ error ]] (kms_flip:7315) igt-kms-CRITICAL: Test assertion failure function kmstest_unset_all_crtcs, file igt_kms.c:1214:
(kms_flip:7315) igt-kms-CRITICAL: Failed assertion: rc == 0
(kms_flip:7315) igt-kms-CRITICAL: Last errno: 22, Invalid argument
Subtest 2x-vblank-vs-dpms-suspend failed.
**** DEBUG ****
(kms_flip:7315) DEBUG: Test requirement passed: (flags & TEST_HANG) == 0 || !is_wedged(drm_fd)
(kms_flip:7315) DEBUG: Test requirement passed: modes
(kms_flip:7315) INFO: Beginning 2x-vblank-vs-dpms-suspend on pipe A:B, connector HDMI-A-1:DP-1
(kms_flip:7315) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_flip:7315) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=7680)
(kms_flip:7315) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_flip:7315) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=3, pitch=7680)
(kms_flip:7315) igt-kms-INFO:   1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 0x5 0x48 148500
(kms_flip:7315) igt-kms-INFO:   1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 0x5 0x48 148500
(kms_flip:7315) igt-kms-CRITICAL: Test assertion failure function kmstest_unset_all_crtcs, file igt_kms.c:1214:
(kms_flip:7315) igt-kms-CRITICAL: Failed assertion: rc == 0
(kms_flip:7315) igt-kms-CRITICAL: Last errno: 22, Invalid argument
****  END  ****

2x-vblank-vs-dpms-suspend-interruptible		Fail
(kms_flip:9662) igt-kms-CRITICAL: Test assertion failure function kmstest_unset_all_crtcs, file igt_kms.c:1214:
(kms_flip:9662) igt-kms-CRITICAL: Failed assertion: rc == 0
(kms_flip:9662) igt-kms-CRITICAL: Last errno: 22, Invalid argument
Subtest 2x-vblank-vs-dpms-suspend-interruptible failed.
**** DEBUG ****
(kms_flip:9662) DEBUG: Test requirement passed: (flags & TEST_HANG) == 0 || !is_wedged(drm_fd)
(kms_flip:9662) DEBUG: Test requirement passed: modes
(kms_flip:9662) INFO: Beginning 2x-vblank-vs-dpms-suspend-interruptible on pipe A:B, connector HDMI-A-1:DP-1
(kms_flip:9662) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_flip:9662) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=2, pitch=7680)
(kms_flip:9662) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_flip:9662) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=3, pitch=7680)
(kms_flip:9662) igt-kms-INFO:   1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 0x5 0x48 148500
(kms_flip:9662) igt-kms-INFO:   1920x1080 60 1920 2008 2052 2200 1080 1084 1089 1125 0x5 0x48 148500
(kms_flip:9662) igt-kms-CRITICAL: Test assertion failure function kmstest_unset_all_crtcs, file igt_kms.c:1214:
(kms_flip:9662) igt-kms-CRITICAL: Failed assertion: rc == 0
(kms_flip:9662) igt-kms-CRITICAL: Last errno: 22, Invalid argument
****  END  ****
Comment 7 Elizabeth 2017-07-31 20:28:59 UTC
Test Passed on HSW:

Kernel:
Linux version 4.12.0-rc7-drm-tip-ww27-commit-df0182c+
commit df0182c2c95385492772c6e4ace76b463298b8ca 
==============================================================
Component: drm
    tag: libdrm-2.4.81-24-g3095cc8
    commit: 3095cc8eaba1aa87ad38c04ae2b1eabe30f7e16c

Component: cairo
    tag: 1.15.6-2-g57b4050
    commit: 57b40507dda3f58dfc8635548d606b86dc7bcf51

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-57-g6fcc8e8
    commit: 6fcc8e8b247661c7950b998e0b95141ffbd6b833

Component: piglit
    tag: piglit-v1
    commit: c8f4fd9eeb298a2ef0855927f22634f794ef3eff

Hardware:
==============================================================
Processor i5-4250U 
Max Memory Size 16 GB 
Processor Graphics Intel® HD Graphics 5000 
Graphics Base Frequency	200.00 MHz 
Graphics Max Dynamic Frequency	1.00 GHz 
Graphics Video Max Memory	2 GB 
Graphics Output	eDP/DP/HDMI 
Max Resolution (HDMI 1.4)	3280x2000@60Hz 
Max Resolution (DP)	3200x2000@60Hz
Comment 8 Elizabeth 2017-08-23 17:17:35 UTC
On GLK, these tests are failing:
======================================================
igt@kms_flip@2x-vblank-vs-dpms-suspend
igt@kms_flip@2x-vblank-vs-dpms-suspend-interruptible
igt@kms_flip@2x-vblank-vs-modeset-suspend
igt@kms_flip@2x-vblank-vs-modeset-suspend-interruptible
igt@kms_flip@2x-vblank-vs-suspend
igt@kms_flip@2x-vblank-vs-suspend-interruptible
igt@kms_flip@vblank-vs-dpms-suspend
igt@kms_flip@vblank-vs-dpms-suspend-interruptible
igt@kms_flip@vblank-vs-modeset-suspend
igt@kms_flip@vblank-vs-modeset-suspend-interruptible
igt@kms_flip@vblank-vs-suspend
igt@kms_flip@vblank-vs-suspend-interruptible
======================================================
Once the test is started, after the display goes blank the platform never returns, no keyboard nor mouse response.

Gfx stack
=====================================================
Component: drm
    tag: libdrm-2.4.81-46-g9d133dd
    commit: 9d133dd08720d80dfc8ce098bf0972ebd05c454d

Component: cairo
    tag: 1.15.6-14-gf351595
    commit: f3515954e0bc9c9ca413a84a8dd842145cec83a7

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-193-g5a17ee2
    commit: 5a17ee2c8f9013f5db852d27564b837f9f2c5a9f

Component: piglit
    tag: piglit-v1
    commit: 2a7047a32bb3a9a4fad5bea0a8185d63af6bddf3

Kernel info
=====================================================
commit ad6ab9f96437f0cb1f4d8a7840fd9eeb894eb12e
Author:     Gustavo Padovan <gustavo.padovan@collabora.com>
AuthorDate: Fri Aug 18 15:26:42 2017 -0300
Commit:     Gustavo Padovan <gustavo.padovan@collabora.com>
CommitDate: Fri Aug 18 15:26:42 2017 -0300

    drm-tip: 2017y-08m-18d-18h-21m-46s UTC integration manifest
=====================================================
Comment 9 Elizabeth 2017-08-23 21:13:27 UTC
On BXT, these tests are failing:
======================================================
igt@kms_flip@2x-vblank-vs-suspend
igt@kms_flip@2x-vblank-vs-suspend-interruptible
======================================================

And these ones are already passed:
======================================================
igt@kms_flip@2x-vblank-vs-dpms-suspend
igt@kms_flip@2x-vblank-vs-dpms-suspend-interruptible
igt@kms_flip@2x-vblank-vs-modeset-suspend
igt@kms_flip@2x-vblank-vs-modeset-suspend-interruptible
igt@kms_flip@vblank-vs-dpms-suspend
igt@kms_flip@vblank-vs-dpms-suspend-interruptible
igt@kms_flip@vblank-vs-modeset-suspend
igt@kms_flip@vblank-vs-modeset-suspend-interruptible
igt@kms_flip@vblank-vs-suspend
igt@kms_flip@vblank-vs-suspend-interruptible
======================================================

Gfx stack
=====================================================
Component: drm
    tag: libdrm-2.4.81-46-g9d133dd
    commit: 9d133dd08720d80dfc8ce098bf0972ebd05c454d

Component: cairo
    tag: 1.15.6-14-gf351595
    commit: f3515954e0bc9c9ca413a84a8dd842145cec83a7

Component: intel-gpu-tools
    tag: intel-gpu-tools-1.19-193-g5a17ee2
    commit: 5a17ee2c8f9013f5db852d27564b837f9f2c5a9f

Component: piglit
    tag: piglit-v1
    commit: 2a7047a32bb3a9a4fad5bea0a8185d63af6bddf3

Kernel info
=====================================================
commit ad6ab9f96437f0cb1f4d8a7840fd9eeb894eb12e
Author:     Gustavo Padovan <gustavo.padovan@collabora.com>
AuthorDate: Fri Aug 18 15:26:42 2017 -0300
Commit:     Gustavo Padovan <gustavo.padovan@collabora.com>
CommitDate: Fri Aug 18 15:26:42 2017 -0300

    drm-tip: 2017y-08m-18d-18h-21m-46s UTC integration manifest
=====================================================
Comment 10 Elizabeth 2017-09-11 19:49:38 UTC
On GLK these tests are SUCCESS:
======================================================
igt@kms_flip@2x-vblank-vs-dpms-suspend
igt@kms_flip@2x-vblank-vs-dpms-suspend-interruptible
igt@kms_flip@2x-vblank-vs-modeset-suspend
igt@kms_flip@2x-vblank-vs-modeset-suspend-interruptible
igt@kms_flip@vblank-vs-dpms-suspend
igt@kms_flip@vblank-vs-dpms-suspend-interruptible
igt@kms_flip@vblank-vs-modeset-suspend
igt@kms_flip@vblank-vs-modeset-suspend-interruptible
igt@kms_flip@vblank-vs-suspend
igt@kms_flip@vblank-vs-suspend-interruptible
======================================================

And this keep failing with a different assertion:
======================================================
igt@kms_flip@2x-vblank-vs-suspend
igt@kms_flip@2x-vblank-vs-suspend-interruptible
======================================================
Opening a new bug for them.

======================================
             Software
======================================
kernel version              : 4.13.0-drm-tip-ww37-commit-14ea1a9+
hostname                    : GLK-1-GLKRVP1DDR405
architecture                : x86_64
os version                  : Ubuntu 16.10
os codename                 : yakkety
kernel driver               : i915
bios revision               : 60.34
bios release date           : 08/09/2017
ksc                         : 1.41
hardware acceleration       : disabled
swap partition              : enabled on (/dev/sda3)

======================================
        Graphic drivers
======================================
grep: /opt/X11R7/var/log/Xorg.0.log: No such file or directory
libdrm                      : 2.4.70
cairo                       : 1.14.6

======================================
             Hardware
======================================
platform                   : Geminilake
motherboard model          : Geminilake
motherboard id             : GLKRVP1DDR4(05)
form factor                : Hand Held
manufacturer               : IntelCorp.
cpu family                 : Other
cpu family id              : 6
cpu information            : Genuine Intel(R) CPU @ 1.10GHz
gpu card                   : Intel Corporation Device 3185 (rev 03) (prog-if 00 [VGA controller])
memory ram                 : 7.64 GB
max memory ram             : 16 GB
cpu thread                 : 2
cpu core                   : 2
cpu model                  : 122
cpu stepping               : 1
socket                     : Other
hard drive                 : 223GiB (240GB)
current cd clock frequency : 316800 kHz
maximum cd clock frequency : 316800 kHz
displays connected         : eDP-1 DP-1 HDMI-A-2

======================================
             Firmware
======================================
dmc fw loaded             : yes
dmc version               : 1.4
guc fw loaded             : SUCCESS
guc version wanted        : 10.56
guc version found         : 10.56

======================================
             kernel parameters
======================================
quiet drm.debug=0x1e i915.enable_guc_loading=2 i915.enable_guc_submission=2 i915.alpha_support=1 auto panic=1 nmi_watchdog=panic intel_iommu=igfx_off resume=/dev/sda3 fastboot
Comment 11 Elizabeth 2017-10-17 19:49:23 UTC
With IGT-Version: 1.20-g6853f8b (x86_64) (Linux: 4.14.0-rc5-drm-intel-qa-ww42-commit-920fa32+ x86_64) tests is SUCCESS on BXT. Closing.

$ : sudo -E ./kms_flip --r 2x-vblank-vs-dpms-suspend
IGT-Version: 1.20-g6853f8b (x86_64) (Linux: 4.14.0-rc5-drm-intel-qa-ww42-commit-920fa32+ x86_64)
Using monotonic timestamps
Beginning 2x-vblank-vs-dpms-suspend on pipe A:B, connector DP-1:DP-2
  1280x1024 60 1280 1328 1440 1688 1024 1025 1028 1066 0x5 0x40 108000
  1280x1024 60 1280 1328 1440 1688 1024 1025 1028 1066 0x5 0x48 108000
.[cmd] rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Oct 18 14:37:47 2017
.[cmd] rtcwake: assuming RTC uses UTC ...
rtcwake: wakeup from "mem" using /dev/rtc0 at Wed Oct 18 14:38:04 2017

2x-vblank-vs-dpms-suspend on pipe A:B, connector DP-1:DP-2: PASSED

Subtest 2x-vblank-vs-dpms-suspend: SUCCESS (2.923s)

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.