Thread (2 messages) 2 messages, 2 authors, 2021-03-23

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

From: Mark Yacoub <hidden>
Date: 2021-03-22 21:41:46
Subsystem: the rest · Maintainer: Linus Torvalds

From: Mark Yacoub <redacted>

Setup all plane params before committing anything.
Do not disable Primary Plane whenever a CRTC is getting enabled.

AMD Driver requires the primary plane to be enabled whenever the CRTC is, otherwise
drm_mode_cursor_universal may end up trying to enable the cursor plane while all other
planes are disabled, which is not supported by the hardware.

Tested on Delbin and Volteer with no regression or added latency.
---
 tests/kms_atomic_transition.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index d28a8cdf..51d7795b 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -134,7 +134,7 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
 		int i = plane->index;
 
 		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++;
 			}
@@ -478,9 +478,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 		igt_output_set_pipe(output, pipe);
 	}
 
-	igt_display_commit2(display, COMMIT_ATOMIC);
-
 	setup_parms(display, pipe, mode, &fb, &argb_fb, &sprite_fb, parms, &iter_max);
+	igt_display_commit2(display, COMMIT_ATOMIC);
 
 	/*
 	 * In some configurations the tests may not run to completion with all
-- 
2.31.0.rc2.261.g7f71774620-goog

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help