[igt-dev] [PATCH v2 1/4] tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC

Rodrigo Siqueira Rodrigo.Siqueira at amd.com
Wed Aug 25 14:36:55 UTC 2021


From: Mark Yacoub <markyacoub at google.com>

It is common to find drivers that require the primary plane enabled
whenever the CRTC is (almost all drm_tiny drivers and amdgpu need this).
Nevertheless, kms_atomic_transition does not consider this case and, for
this reason, fails in hardware that has the aforementioned restriction.
Since this is not part of the test, this commit ensures that the test
setup all plane params before committing anything. This commit was
tested on: Delbin, Volteer, Raven, and VKMS.

Changes since V1:
- Update commit message
- Rebase

Cc: Harry Wentland <harry.wentland at amd.com>
Cc: Nicholas Choi <Nicholas.Choi at amd.com>
Cc: Sean Paul <seanpaul at chromium.org>
Cc: Mark Yacoub <markyacoub at chromium.org>
Cc: Melissa Wen <melissa.srw at gmail.com>
Cc: Arkadiusz Hiler <arek at hiler.eu>
Cc: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Mark Yacoub <markyacoub at chromium.org>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
---
 tests/kms_atomic_transition.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index cef6187e..bc0a1c81 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -174,7 +174,7 @@ wm_setup_plane(data_t *data, enum pipe pipe,
 			continue;
 
 		if (!mask || !(parms[i].mask & mask)) {
-			if (plane->values[IGT_PLANE_FB_ID]) {
+			if (plane->values[IGT_PLANE_FB_ID] && plane->type != DRM_PLANE_TYPE_PRIMARY) {
 				igt_plane_set_fb(plane, NULL);
 				planes_set_up++;
 			}
@@ -521,10 +521,10 @@ run_transition_test(data_t *data, enum pipe pipe, igt_output_t *output,
 		igt_output_set_pipe(output, pipe);
 	}
 
-	igt_display_commit2(&data->display, COMMIT_ATOMIC);
-
 	setup_parms(data, pipe, mode, &data->fb, &data->argb_fb, &data->sprite_fb, parms, &iter_max);
 
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
+
 	/*
 	 * In some configurations the tests may not run to completion with all
 	 * sprite planes lit up at 4k resolution, try decreasing width/size of secondary
-- 
2.25.1



More information about the igt-dev mailing list