[igt-dev] [PATCH i-g-t v1 2/3] tests/kms_universal_plane: Use igt_get_assigned_primary to get the primary plane

Jessica Zhang quic_jesszhan at quicinc.com
Fri May 6 18:14:31 UTC 2022


Currently, pageflip_test_pipe will use igt_output_get_plane_type to get
the primary plane of the pipe and assumes that the primary plane marked
by the driver will also be used by drmModePageFlip to perform the page flip.

This is not necessarily true in cases where there are multiple possible
primary planes.

To fix this, let's use igt_get_assigned_primary to get the primary plane
instead.

Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
---
 tests/kms_universal_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 3cb6d704a6ef..7bd2c667b552 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -483,7 +483,7 @@ pageflip_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 
 	pageflip_test_init(&test, output, pipe);
 
-	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	primary = igt_get_assigned_primary(output, &data->display.pipes[pipe]);
 
 	/* Use legacy API to set a mode with a blue FB */
 	igt_plane_set_fb(primary, &test.blue_fb);
-- 
2.31.0



More information about the igt-dev mailing list