Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH v2] tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC.
@ 2021-04-16 17:27 Mark Yacoub
  2021-04-16 18:21 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC. (rev4) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mark Yacoub @ 2021-04-16 17:27 UTC (permalink / raw)
  To: igt-dev; +Cc: seanpaul, petri.latvala, Mark Yacoub

From: Mark Yacoub <markyacoub@google.com>

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.

=== Changes from v1 ===
Remove product names from commit message

Cc: Nicholas.Kazlauskas@amd.com
---
 tests/kms_atomic_transition.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index be60940d..172e6cec 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -173,7 +173,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++;
 			}
@@ -520,10 +520,9 @@ 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.31.1.368.gbe11c130af-goog

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [igt-dev] [PATCH v2] tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC.
@ 2021-04-13 16:35 Mark Yacoub
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Yacoub @ 2021-04-13 16:35 UTC (permalink / raw)
  To: igt-dev; +Cc: seanpaul, petri.latvala, Mark Yacoub

From: Mark Yacoub <markyacoub@google.com>

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.

=== Changes from v1 ===
Remove product names from commit message

Cc: khaled.almahallawy@intel.com
Change-Id: Ice483e988b1ad8837e8a1efe824078f406edec80
---
 tests/kms_atomic_transition.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index be60940d..172e6cec 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -173,7 +173,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++;
 			}
@@ -520,10 +520,9 @@ 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.31.1.295.g9ea45b61b8-goog

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-23 17:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-16 17:27 [igt-dev] [PATCH v2] tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC Mark Yacoub
2021-04-16 18:21 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC. (rev4) Patchwork
2021-04-16 19:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-04-22  6:13 ` [igt-dev] [PATCH v2] tests/kms_atomic_transition: Enable Primary Plane on Enabling CRTC Petri Latvala
2021-04-22 14:08   ` Kazlauskas, Nicholas
2021-04-22 14:24   ` Ville Syrjälä
2021-04-23 17:26     ` Mark Yacoub
  -- strict thread matches above, loose matches on Subject: below --
2021-04-13 16:35 Mark Yacoub

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox