[igt-dev] [PATCH i-g-t] tests/kms_plane_multiple: don't disable primary plane
Simon Ser
contact at emersion.fr
Tue Jan 5 15:23:59 UTC 2021
Some drivers such as amdgpu don't support disabling the primary plane
while keeping the CRTC active. Additionally, opening the CRC debugfs
file while the CRTC is inactive will error out.
Keep the primary plane active to accomodate for this.
Signed-off-by: Simon Ser <contact at emersion.fr>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Cc: Mika Kahola <mika.kahola at intel.com>
---
tests/kms_plane_multiple.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 8310981cf9fa..8167e781918a 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -313,12 +313,15 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
prepare_planes(data, pipe, &blue, tiling, c, output);
err = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
+ /* Some drivers can't light up a CRTC without the primary plane
+ * enabled. */
for_each_plane_on_pipe(&data->display, pipe, plane)
- igt_plane_set_fb(plane, NULL);
+ if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+ igt_plane_set_fb(plane, NULL);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
- for (int x = 0; x < c; x++)
+ for (int x = 1; x < c; x++)
igt_remove_fb(data->drm_fd, &data->fb[x]);
} while (!err && c < n_planes);
@@ -340,12 +343,15 @@ test_plane_position_with_output(data_t *data, enum pipe pipe,
igt_pipe_crc_get_current(data->display.drm_fd, data->pipe_crc, &crc);
+ /* Some drivers can't light up a CRTC without the primary plane
+ * enabled. */
for_each_plane_on_pipe(&data->display, pipe, plane)
- igt_plane_set_fb(plane, NULL);
+ if (plane->type != DRM_PLANE_TYPE_PRIMARY)
+ igt_plane_set_fb(plane, NULL);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
- for (int x = 0; x < c; x++)
+ for (int x = 1; x < c; x++)
igt_remove_fb(data->drm_fd, &data->fb[x]);
igt_assert_crc_equal(&data->ref_crc, &crc);
--
2.30.0
More information about the igt-dev
mailing list