[igt-dev] [PATCH i-g-t 2/9] tests/kms_atomic: Add the test for CRTC_ID/FB_ID mismatch.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Feb 1 15:39:07 UTC 2018


This check was missing, and caused a WARN_ON that dates back to
the original design of atomic.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
Acked-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
Sent to see if it passes shards, doesn't need to be reviewed further.

 tests/kms_atomic.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 9204d7e18698..2e21b53b8c87 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -485,6 +485,10 @@ static void plane_invalid_params(igt_pipe_t *pipe,
 	igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe->values[IGT_CRTC_MODE_ID]);
 	plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
 
+	/* Valid, but invalid because CRTC_ID is set. */
+	igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0);
+	plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+
 	igt_plane_set_fb(plane, fb);
 	plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
@@ -501,6 +505,10 @@ static void plane_invalid_params(igt_pipe_t *pipe,
 	igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe->values[IGT_CRTC_MODE_ID]);
 	plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
 
+	/* Valid, but invalid because FB_ID is set. */
+	igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0);
+	plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+
 	igt_plane_set_fb(plane, fb);
 	plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
 
-- 
2.15.1



More information about the igt-dev mailing list