[igt-dev] [PATCH i-g-t v1 3/3] tests/kms_rotation_crc: Use igt_get_assigned_primary to get the primary plane
Jessica Zhang
quic_jesszhan at quicinc.com
Fri May 6 18:14:32 UTC 2022
Currently, test_plane_rotation calls igt_output_get_plane_type to get
the plane with the corresponding type then calls drmModePageFlip when
the plane is a primary plane.
This will cause issues in cases where there are multiple primary planes
as the primary plane taken from igt_output_get_plane_type might not be
the primary plane being assigned to the pipe by the driver.
To fix this, let's use igt_get_assigned_primary to get the assigned
primary plane of the driver.
Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
---
tests/kms_rotation_crc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index 50869a08a275..db93c28f843c 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -513,7 +513,11 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
igt_output_set_pipe(output, pipe);
- plane = igt_output_get_plane_type(output, plane_type);
+ if (plane_type == DRM_PLANE_TYPE_PRIMARY)
+ plane = igt_get_assigned_primary(output, &data->display.pipes[pipe]);
+ else
+ plane = igt_output_get_plane_type(output, plane_type);
+
igt_require(igt_plane_has_prop(plane, IGT_PLANE_ROTATION));
igt_require(igt_plane_has_rotation(plane, data->rotation));
/* CHV can't rotate and reflect simultaneously */
--
2.31.0
More information about the igt-dev
mailing list