Bug 99897 - [IGT] kms_properties produces Failed assertion when checking connector properties
Summary: [IGT] kms_properties produces Failed assertion when checking connector proper...
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-21 22:27 UTC by Luis Botello
Modified: 2017-07-24 22:39 UTC (History)
1 user (show)

See Also:
i915 platform: ALL
i915 features: display/atomic


Attachments

Description Luis Botello 2017-02-21 22:27:06 UTC
HW config
===============================
Processor Number				i7-7500U
Processor Graphics 				Intel® HD Graphics 620
Graphics Base Frequency				300.00 MHz
Graphics Max Dynamic Frequency			1.05 GHz
Graphics Video Max Memory			32 GB
Graphics Output					eDP/DP/HDMI/DVI

SW config
=================================
Kernel version : 4.10.0-rc8-e80b772
commit e80b772bf85da72c46b582e7c4f7b0d861cb4669
    drm-tip: 2017y-02m-14d-22h-44m-17s UTC integration manifest
Component         : drm
	tag       : libdrm-2.4.75-6-gec80fd3
	commit    : ec80fd3
 Component         : cairo
	tag       : 1.15.4-6-g5854dd9
	commit    : 5854dd9
Component         : intel-gpu-tools
	tag       : intel-gpu-tools-1.17-240-gca2ba47
	commit    : ca2ba47

Steps
====================================
./kms_properties --run-subtest connector-properties-atomic
./kms_properties --run-subtest connector-properties-legacy

Output
=====================================
CRITICAL: Test assertion failure function test_properties, file kms_properties.c:136:
(kms_properties:15970) CRITICAL: Failed assertion: ret == 0
(kms_properties:15970) CRITICAL: Last errno: 22, Invalid argument
(kms_properties:15970) CRITICAL: error: -22 != 0
Subtest connector-properties-legacy failed.
**** DEBUG ****
(kms_properties:15970) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1080, format=0x34325258, tiling=0x0, size=0)
(kms_properties:15970) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=1, pitch=7680)
(kms_properties:15970) igt-kms-DEBUG: display: HDMI-A-2: set_pipe(A)
(kms_properties:15970) igt-kms-DEBUG: display: HDMI-A-2: Selecting pipe A
(kms_properties:15970) igt-kms-DEBUG: display: A.0: plane_set_fb(58)
(kms_properties:15970) igt-kms-DEBUG: display: commit {
(kms_properties:15970) igt-kms-DEBUG: display:     HDMI-A-2: Selecting pipe A
(kms_properties:15970) igt-kms-DEBUG: display:     A: Setting mode 1920x1080 from HDMI-A-2
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: A.0, fb 58
(kms_properties:15970) igt-kms-DEBUG: display:     src = (0, 0) 1920 x 1080 dst = (0, 0) 1920 x 1080
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: A.1, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: A.2, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     B: Setting NULL mode
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: B.0, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: B.1, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: B.2, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     C: Setting NULL mode
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: C.0, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: C.1, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     populating plane data: C.2, fb 0
(kms_properties:15970) igt-kms-DEBUG: display:     DP-1: preparing atomic, pipe: None
(kms_properties:15970) igt-kms-DEBUG: display:     HDMI-A-1: preparing atomic, pipe: None
(kms_properties:15970) igt-kms-DEBUG: display:     HDMI-A-2: preparing atomic, pipe: A
(kms_properties:15970) igt-kms-DEBUG: display: }
(kms_properties:15970) INFO: Testing connector properties on output HDMI-A-2 (pipe: A)
(kms_properties:15970) DEBUG: Ignoring property ""EDID""
(kms_properties:15970) DEBUG: Testing property ""DPMS""
(kms_properties:15970) DEBUG: Testing property ""CRTC_ID""
(kms_properties:15970) CRITICAL: Test assertion failure function test_properties, file kms_properties.c:136:
(kms_properties:15970) CRITICAL: Failed assertion: ret == 0
(kms_properties:15970) CRITICAL: Last errno: 22, Invalid argument
(kms_properties:15970) CRITICAL: error: -22 != 0
****  END  ****
Comment 1 Jairo Miramontes 2017-02-21 22:52:46 UTC
Same tests are failing on BXT using the following Config:


========== Kernel Information==========
commit e80b772bf85da72c46b582e7c4f7b0d861cb4669
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Feb 14 23:45:02 2017 +0100

    drm-tip: 2017y-02m-14d-22h-44m-17s UTC integration manifest


Kernel version : 4.10.0-rc8-e80b772
Architecture : source amd64 all

========== Software Information ==========
Component: drm
Url      : http://cgit.freedesktop.org/mesa/drm
Tag      : libdrm-2.4.75-6-gec80fd3
Commit   : ec80fd3
Author   : Chris Wilson <chris@chris-wilson.co.uk>
Age      : 2 days ago

Component: cairo
Url      : http://cgit.freedesktop.org/cairo
Tag      : 1.15.4-6-g5854dd9
Commit   : 5854dd9
Author   : Adrian Johnson <ajohnson@redneon.com>
Age      : 12 days ago

Component: intel-gpu-tools
Url      : https://cgit.freedesktop.org/xorg/app/intel-gpu-tools
Tag      : intel-gpu-tools-1.17-240-gca2ba47
Commit   : ca2ba47
Author   : Chris Wilson <chris@chris-wilson.co.uk>
Age      : 15 hours ago

====================

Ubuntu 16.10 yakkety
Comment 2 Marta Löfstedt 2017-02-24 07:09:18 UTC
This issue has been reproduced on the CI system in Finland. However, I know that:

./tests/kms_properties --run-subtest connector-properties-legacy
 
passed some time before X-mas:

./tests/kms_properties --run-subtest connector-properties-atomic

was skipped for non-atomic drivers.

I have confirmed this with Ubuntu 16.10 Vanilla 4.8 kernel. So, this is a rather new regression. 

On 4.10 kernels:
The connector-properties-atomic subtests, fails for audio property on atomic connector. I.e. the call to drmModeAtomicAddProperty is failing with -EINVAL in drm_atomic_connector_set_property.

The connector-properties-legacy fails down in intel_dp_set_property when I run on my HSW laptop, because CRTC_ID prop is not matches. 

I am suspecting this regression started when atomic was turned on, but I need to verify this with a bisect. Is there any information on the latest kernel this passed on?
Comment 3 Marta Löfstedt 2017-02-24 07:53:48 UTC
If I revert:

commit 8d2b47dde8a097e6fef2ebb5042cbb267cc75adf
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Thu Feb 2 08:41:42 2017 +0100

    drm/i915: Enable atomic support by default on supported platforms.


The connector-properties-legacy pass and connector-properties-atomic is skipped.

I.e. this is an atomic regression.
Comment 4 Maarten Lankhorst 2017-02-28 09:53:12 UTC
Added a workaround for the legacy case. This should make the legacy tests pass again for now, but when i915 specific connector properties are converted this commit should be reverted again.

Leaving the bug open for connector-properties-atomic.

commit a9dcd63441648d3f556ee80b77ea4c5b0c058964
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Mon Feb 27 13:08:41 2017 +0100

    kms_properties: Ignore CRTC_ID for the legacy case
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index a86371c08203..8e2444732f5f 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -74,6 +74,10 @@ static bool ignore_connector_property(const char *name, bool atomic)
            !strcmp(name, "TILE"))
                return true;
 
+       /* FIXME: Remove when all intel connectors are converted to atomic. */
+       if (!atomic && !strcmp(name, "CRTC_ID"))
+               return true;
+
        if (atomic && !strcmp(name, "DPMS"))
                return true;
Comment 5 Maarten Lankhorst 2017-02-28 13:06:39 UTC
Changed to all platforms since all of i915 is affected. :)
Comment 6 Marta Löfstedt 2017-02-28 14:00:06 UTC
After Maartens fix the legacy test still fails.

sudo ./tests/kms_properties --run-subtest connector-properties-legacy
IGT-Version: 1.17-ga9dcd63 (x86_64) (Linux: 4.10.0+ x86_64)
Testing connector properties on output HDMI-A-2 (pipe: A)
(kms_properties:1957) CRITICAL: Test assertion failure function test_properties, file kms_properties.c:140:
(kms_properties:1957) CRITICAL: Failed assertion: ret == 0
(kms_properties:1957) CRITICAL: Last errno: 22, Invalid argument
(kms_properties:1957) CRITICAL: error: -22 != 0
Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [test_properties+0x3be]
  #2 [<unknown>+0x3be]
Subtest connector-properties-legacy failed.
**** DEBUG ****
(kms_properties:1957) igt-fb-DEBUG: igt_create_fb_with_bo_size(width=1920, height=1200, format=0x34325258, tiling=0x0, size=0)
(kms_properties:1957) igt-fb-DEBUG: igt_create_fb_with_bo_size(handle=1, pitch=7680)
(kms_properties:1957) igt-kms-DEBUG: display: HDMI-A-2: set_pipe(A)
(kms_properties:1957) igt-kms-DEBUG: display: HDMI-A-2: Selecting pipe A
(kms_properties:1957) igt-kms-DEBUG: display: A.0: plane_set_fb(72)
(kms_properties:1957) igt-kms-DEBUG: display: commit {
(kms_properties:1957) igt-kms-DEBUG: display:     HDMI-A-2: Selecting pipe A
(kms_properties:1957) igt-kms-DEBUG: display:     A: Setting mode 1920x1200 from HDMI-A-2
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: A.0, fb 72
(kms_properties:1957) igt-kms-DEBUG: display:     src = (0, 0) 1920 x 1200 dst = (0, 0) 1920 x 1200
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: A.1, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: A.2, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     B: Setting NULL mode
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: B.0, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: B.1, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: B.2, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     C: Setting NULL mode
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: C.0, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: C.1, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     populating plane data: C.2, fb 0
(kms_properties:1957) igt-kms-DEBUG: display:     HDMI-A-1: preparing atomic, pipe: None
(kms_properties:1957) igt-kms-DEBUG: display:     DP-1: preparing atomic, pipe: None
(kms_properties:1957) igt-kms-DEBUG: display:     HDMI-A-2: preparing atomic, pipe: A
(kms_properties:1957) igt-kms-DEBUG: display: }
(kms_properties:1957) INFO: Testing connector properties on output HDMI-A-2 (pipe: A)
(kms_properties:1957) DEBUG: Ignoring property "EDID"
(kms_properties:1957) DEBUG: Testing property "DPMS"
(kms_properties:1957) DEBUG: Testing property "link-status"
(kms_properties:1957) CRITICAL: Test assertion failure function test_properties, file kms_properties.c:140:
(kms_properties:1957) CRITICAL: Failed assertion: ret == 0
(kms_properties:1957) CRITICAL: Last errno: 22, Invalid argument
(kms_properties:1957) CRITICAL: error: -22 != 0
****  END  ****
Comment 7 Maarten Lankhorst 2017-03-13 11:18:10 UTC
Oh right, link status property is atomic too. New failure introduced with the link status patches..
Comment 8 Maarten Lankhorst 2017-03-15 13:41:48 UTC
Try 2, blacklist one more property..

Can you retest or close if there's another failure?

commit 32c4b69a9d18ad7ec62f3e656a08f3325fb942c9
Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Date:   Wed Mar 15 14:39:03 2017 +0100

    kms_properties: Blacklist legacy link-status connector property.
    
    This will be fixed by converting all connectors to atomic, but this
    fails for now. Blacklist it just like crtc_id temporarily.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index 8e2444732f5f..591e1a019190 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -75,7 +75,8 @@ static bool ignore_connector_property(const char *name, bool atomic)
 		return true;
 
 	/* FIXME: Remove when all intel connectors are converted to atomic. */
-	if (!atomic && !strcmp(name, "CRTC_ID"))
+	if (!atomic && (!strcmp(name, "CRTC_ID") ||
+			!strcmp(name, "link-status")))
 		return true;
 
 	if (atomic && !strcmp(name, "DPMS"))


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.