All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v1] tests/kms_universal_plane: Skip pageflip_test_pipe subtest if pipe has more than 1 primary plane
@ 2022-04-29  1:11 Jessica Zhang
  2022-04-29  1:52 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Jessica Zhang @ 2022-04-29  1:11 UTC (permalink / raw)
  To: igt-dev; +Cc: robdclark, petri.latvala, quic_aravindh

Currently, IGT assumes that the first primary plane it encounters in
display->planes is the primary plane being assigned to the current pipe
in the driver [1]. However, this is not always the case when planes are
being shared between pipes and there are multiple possible primary
planes.

It's possible for IGT to set pipe->plane_primary to a primary plane
that's different from the one being used in the driver, since IGT uses
possible_crtcs to find the primary planes and stops at the first match.

Unfortunately, DRM doesn't expose which primary plane is being used by a
pipe, so let's skip pageflip_test_pipe for cases where there are
multiple possible primary planes.

[1]
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/lib/igt_kms.c#L2305

Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
---
 tests/kms_universal_plane.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 3cb6d704a6ef..95cae2be1aaf 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -470,13 +470,25 @@ static void
 pageflip_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 {
 	pageflip_test_t test = { .data = data };
-	igt_plane_t *primary;
+	igt_plane_t *primary, *plane;
 	struct timeval timeout = { .tv_sec = 0, .tv_usec = 500 };
 	drmEventContext evctx = { .version = 2 };
 
 	fd_set fds;
+	int primary_plane_count = 0;
 	int ret = 0;
 
+	for_each_plane_on_pipe(&data->display, pipe, plane)
+		if (plane->type == DRM_PLANE_TYPE_PRIMARY)
+			primary_plane_count++;
+
+	/*
+	 * Skip subtest when there are multiple primary planes since we
+	 * aren't able to distinguish which primary plane is actually being
+	 * assigned a pipe
+	 */
+	igt_skip_on(primary_plane_count > 1);
+
 	igt_require_pipe(&data->display, pipe);
 
 	igt_output_set_pipe(output, pipe);
-- 
2.31.0

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

end of thread, other threads:[~2022-05-03  3:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  1:11 [igt-dev] [PATCH i-g-t v1] tests/kms_universal_plane: Skip pageflip_test_pipe subtest if pipe has more than 1 primary plane Jessica Zhang
2022-04-29  1:52 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-04-29  3:12 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-04-29 16:53 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_universal_plane: Skip pageflip_test_pipe subtest if pipe has more than 1 primary plane (rev2) Patchwork
2022-04-29 18:36 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-05-02 21:50 ` [igt-dev] [PATCH i-g-t v1] tests/kms_universal_plane: Skip pageflip_test_pipe subtest if pipe has more than 1 primary plane Rob Clark
2022-05-02 22:31   ` Jessica Zhang
2022-05-02 22:42     ` Rob Clark
2022-05-02 23:08       ` Abhinav Kumar
2022-05-03  3:36         ` Rob Clark

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.