aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSafayat Ullah <safayat@google.com>2022-08-19 05:37:58 +0000
committerSafayat Ullah <safayat@google.com>2022-08-26 05:20:53 +0000
commitfa6182eda16518761ef26a8f65759d6639b3cc41 (patch)
treed95f632cf1cdaa4f961209e48d52f61b19191558
parentc32657808e25f00ff335f9be55b9cb3c225e686b (diff)
downloadigt-gpu-tools-fa6182eda16518761ef26a8f65759d6639b3cc41.tar.gz
Fix igt_gpu_tools test: kms_atomic#test_only fails
Root cause: If a pipe has multiple primary plane, the test will always fail. Because if the pipe's mode is changed, there will be commit for each of it's primary plane. In this subtest, first primary plane has some change that we want to in the legacy way. But the second primary plane is also making a commit, which is not intended. Fix: If the mode of a pipe is changed, make the commit only for the first primary plane on the pipe. Bug: b/157692504 Test: run kms_atomic test Change-Id: I332aec022a5250342f789b450ffe92e97f06e0e0
-rw-r--r--lib/igt_kms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4dfcc7377..218d3bedb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2804,7 +2804,8 @@ static int igt_primary_plane_commit_legacy(igt_plane_t *primary,
if (!igt_plane_is_prop_changed(primary, IGT_PLANE_FB_ID) &&
!(primary->changed & IGT_PLANE_COORD_CHANGED_MASK) &&
- !igt_pipe_obj_is_prop_changed(primary->pipe, IGT_CRTC_MODE_ID))
+ !(igt_pipe_obj_is_prop_changed(primary->pipe, IGT_CRTC_MODE_ID) &&
+ primary == igt_pipe_get_plane_type(primary->pipe, DRM_PLANE_TYPE_PRIMARY)))
return 0;
crtc_id = pipe->crtc_id;