* [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion
@ 2023-01-03 6:46 Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Swati Sharma @ 2023-01-03 6:46 UTC (permalink / raw)
To: igt-dev
In this patch series, code rework is done. Also, subtests are
converted to dynamic subtests. Flexibility is added to run subtests
on all valid pipe/output combinations.
This series addresses review comments from
https://patchwork.freedesktop.org/series/109648/
Swati Sharma (4):
tests/kms_atomic: Cosmetic changes
tests/kms_atomic: Test cleanup
tests/kms_atomic: Convert tests to dynamic
tests/kms_atomic: Add flexibility to run tests on all pipes
tests/kms_atomic.c | 1031 ++++++++++++++++++++++++--------------------
1 file changed, 562 insertions(+), 469 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
@ 2023-01-03 6:46 ` Swati Sharma
2023-01-03 18:02 ` Kamil Konieczny
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup Swati Sharma
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Swati Sharma @ 2023-01-03 6:46 UTC (permalink / raw)
To: igt-dev
Removed unnecessary newlines and comments. Corrected multi-line
comments. Rephrased test description.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/kms_atomic.c | 129 ++++++++++++++++++++++-----------------------
1 file changed, 63 insertions(+), 66 deletions(-)
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 2a3fb74be..cd1dd9c87 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -27,10 +27,6 @@
* Pekka Paalanen <pekka.paalanen@collabora.co.uk>
*/
-/*
- * Testcase: testing atomic modesetting API
- */
-
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -72,7 +68,6 @@ static inline int damage_rect_height(struct drm_mode_rect *r)
return r->y2 - r->y1;
}
-
static bool plane_filter(enum igt_atomic_plane_properties prop)
{
if ((1 << prop) & IGT_PLANE_COORD_CHANGED_MASK)
@@ -119,8 +114,10 @@ static void plane_check_current_state(igt_plane_t *plane, const uint64_t *values
plane_get_current_state(plane, current_values);
- /* Legacy cursor ioctls create their own, unknowable, internal
- * framebuffer which we can't reason about. */
+ /*
+ * Legacy cursor ioctls create their own, unknowable, internal
+ * framebuffer which we can't reason about.
+ */
if (relax & PLANE_RELAX_FB)
current_values[IGT_PLANE_FB_ID] = values[IGT_PLANE_FB_ID];
@@ -145,9 +142,7 @@ static void plane_commit_atomic_err(igt_plane_t *plane,
uint64_t current_values[IGT_NUM_PLANE_PROPS];
plane_get_current_state(plane, current_values);
-
igt_assert_eq(-err, igt_display_try_commit2(plane->pipe->display, COMMIT_ATOMIC));
-
plane_check_current_state(plane, current_values, relax);
}
@@ -186,9 +181,7 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
if (pipe_values[IGT_CRTC_MODE_ID]) {
mode_prop = drmModeGetPropertyBlob(pipe->display->drm_fd,
pipe_values[IGT_CRTC_MODE_ID]);
-
igt_assert(mode_prop);
-
igt_assert_eq(mode_prop->length,
sizeof(struct drm_mode_modeinfo));
mode = mode_prop->data;
@@ -218,15 +211,16 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
crtc_get_current_state(pipe, current_pipe_values);
- /* Optionally relax the check for MODE_ID: using the legacy SetCrtc
+ /*
+ * Optionally relax the check for MODE_ID: using the legacy SetCrtc
* API can potentially change MODE_ID even if the mode itself remains
- * unchanged. */
+ * unchanged.
+ */
if (relax & CRTC_RELAX_MODE && mode && current_pipe_values[IGT_CRTC_MODE_ID] &&
current_pipe_values[IGT_CRTC_MODE_ID] != pipe_values[IGT_CRTC_MODE_ID]) {
drmModePropertyBlobRes *cur_prop =
drmModeGetPropertyBlob(pipe->display->drm_fd,
current_pipe_values[IGT_CRTC_MODE_ID]);
-
igt_assert(cur_prop);
igt_assert_eq(cur_prop->length, sizeof(struct drm_mode_modeinfo));
@@ -521,8 +515,10 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
igt_plane_set_fb(plane, &fb);
igt_plane_set_position(plane, w/2, h/2);
- /* Enable the overlay plane using the atomic API, and double-check
- * state is what we think it should be. */
+ /*
+ * Enable the overlay plane using the atomic API, and double-check
+ * state is what we think it should be.
+ */
plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Disable the plane and check the state matches the old. */
@@ -530,14 +526,18 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
igt_plane_set_position(plane, 0, 0);
plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- /* Re-enable the plane through the legacy plane API, and verify through
- * atomic. */
+ /*
+ * Re-enable the plane through the legacy plane API, and verify through
+ * atomic.
+ */
igt_plane_set_fb(plane, &fb);
igt_plane_set_position(plane, w/2, h/2);
plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
- /* Restore the plane to its original settings through the legacy plane
- * API, and verify through atomic. */
+ /*
+ * Restore the plane to its original settings through the legacy plane
+ * API, and verify through atomic
+ */
igt_plane_set_fb(plane, NULL);
igt_plane_set_position(plane, 0, 0);
plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
@@ -554,8 +554,10 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
fb->drm_format, I915_TILING_NONE,
0.2, 0.2, 0.2, &fb2);
- /* Flip the primary plane using the atomic API, and double-check
- * state is what we think it should be. */
+ /*
+ * Flip the primary plane using the atomic API, and double-check
+ * state is what we think it should be.
+ */
igt_plane_set_fb(plane, &fb2);
crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
@@ -563,23 +565,30 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
igt_plane_set_fb(plane, fb);
crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- /* Set the plane through the legacy CRTC/primary-plane API, and
- * verify through atomic. */
+ /*
+ * Set the plane through the legacy CRTC/primary-plane API, and
+ * verify through atomic.
+ */
igt_plane_set_fb(plane, &fb2);
crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
- /* Restore the plane to its original settings through the legacy CRTC
- * API, and verify through atomic. */
+ /*
+ * Restore the plane to its original settings through the legacy CRTC
+ * API, and verify through atomic.
+ */
igt_plane_set_fb(plane, fb);
crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
- /* Set the plane through the universal setplane API, and
- * verify through atomic. */
+ /*
+ * Set the plane through the universal setplane API, and
+ * verify through atomic.
+ */
igt_plane_set_fb(plane, &fb2);
plane_commit(plane, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
}
-/* test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
+/*
+ * Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
* free-standing state objects and nothing else.
*/
static void test_only(igt_pipe_t *pipe_obj,
@@ -659,8 +668,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
DRM_FORMAT_MOD_LINEAR,
0.0, 0.0, 0.0, &fb);
- /* Flip the cursor plane using the atomic API, and double-check
- * state is what we think it should be. */
+ /*
+ * Flip the cursor plane using the atomic API, and double-check
+ * state is what we think it should be.
+ */
igt_plane_set_fb(cursor, &fb);
igt_plane_set_position(cursor, x, y);
plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
@@ -670,8 +681,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
igt_plane_set_position(cursor, 0, 0);
plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- /* Re-enable the plane through the legacy cursor API, and verify
- * through atomic. */
+ /*
+ * Re-enable the plane through the legacy cursor API, and verify
+ * through atomic.
+ */
igt_plane_set_fb(cursor, &fb);
igt_plane_set_position(cursor, x, y);
plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
@@ -680,8 +693,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
igt_plane_set_position(cursor, x - 16, y - 16);
plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
- /* Restore the plane to its original settings through the legacy cursor
- * API, and verify through atomic. */
+ /*
+ * Restore the plane to its original settings through the legacy cursor
+ * API, and verify through atomic.
+ */
igt_plane_set_fb(cursor, NULL);
igt_plane_set_position(cursor, 0, 0);
plane_commit(cursor, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
@@ -761,7 +776,7 @@ static void plane_invalid_params_fence(igt_pipe_t *pipe,
igt_plane_set_fence_fd(plane, pipe->display->drm_fd);
plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
- /* Valid fence_fd but invalid CRTC */
+ /* valid fence_fd but invalid CRTC */
fence_fd = sw_sync_timeline_create_fence(timeline, 1);
igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, ~0);
@@ -817,7 +832,6 @@ static void crtc_invalid_params(igt_pipe_t *pipe,
igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
-
/* Restore the CRTC and check the state matches the old. */
igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
@@ -882,11 +896,11 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 1);
- /* Configuration should be valid again */
+ /* configuration should be valid again */
crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
ATOMIC_RELAX_NONE, 0);
- /* Set invalid prop */
+ /* set invalid prop */
igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
/* valid out fence but invalid prop on crtc */
@@ -923,8 +937,10 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
igt_assert(pipe->out_fence_fd != -1);
}
-/* Abuse the atomic ioctl directly in order to test various invalid conditions,
- * which the libdrm wrapper won't allow us to create. */
+/*
+ * Abuse the atomic ioctl directly in order to test various invalid conditions,
+ * which the libdrm wrapper won't allow us to create.
+ */
static void atomic_invalid_params(igt_pipe_t *pipe,
igt_plane_t *plane,
igt_output_t *output,
@@ -1007,7 +1023,6 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
/* Valid property, valid value. */
-
for (i = 0; i < ARRAY_SIZE(props_raw); i++) {
props_raw[i] = pipe->props[IGT_CRTC_MODE_ID];
values_raw[i] = pipe->values[IGT_CRTC_MODE_ID];
@@ -1263,7 +1278,8 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
igt_remove_fb(pipe->display->drm_fd, &fb_2);
}
-static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output, igt_plane_t *primary, struct igt_fb *fb)
+static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
+ igt_plane_t *primary, struct igt_fb *fb)
{
igt_output_set_pipe(output, pipe);
igt_plane_set_fb(primary, fb);
@@ -1296,9 +1312,7 @@ igt_main
igt_fixture {
display.drm_fd = drm_open_driver_master(DRIVER_ANY);
-
kmstest_set_vt_graphics_mode();
-
igt_display_require(&display, display.drm_fd);
igt_require(display.is_atomic);
igt_display_require_output(&display);
@@ -1308,9 +1322,7 @@ igt_main
pipe_obj = &display.pipes[pipe];
primary = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
-
mode = igt_output_get_mode(output);
-
igt_create_pattern_fb(display.drm_fd,
mode->hdisplay, mode->vdisplay,
plane_get_igt_format(primary),
@@ -1322,9 +1334,7 @@ igt_main
igt_subtest("plane-overlay-legacy") {
igt_plane_t *overlay =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
-
igt_require(overlay);
-
atomic_setup(&display, pipe, output, primary, &fb);
plane_overlay(pipe_obj, output, overlay);
}
@@ -1333,16 +1343,14 @@ igt_main
"the legacy and atomic interfaces.");
igt_subtest("plane-primary-legacy") {
atomic_setup(&display, pipe, output, primary, &fb);
-
plane_primary(pipe_obj, primary, &fb);
}
- igt_describe("Verify that the overlay plane can cover the primary one (and "\
+ igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
"vice versa) by changing their zpos property.");
igt_subtest("plane-primary-overlay-mutable-zpos") {
uint32_t format_primary = DRM_FORMAT_ARGB8888;
uint32_t format_overlay = DRM_FORMAT_ARGB1555;
-
igt_plane_t *overlay =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
igt_require(overlay);
@@ -1352,13 +1360,12 @@ igt_main
igt_require(igt_plane_has_format_mod(primary, format_primary, 0x0));
igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
-
igt_output_set_pipe(output, pipe);
plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
format_primary, format_overlay);
}
- igt_describe("Verify the reported zpos property of planes by making sure "\
+ igt_describe("Test to verify the reported zpos property of planes by making sure "\
"only higher zpos planes cover the lower zpos ones.");
igt_subtest("plane-immutable-zpos") {
igt_output_set_pipe(output, pipe);
@@ -1369,7 +1376,6 @@ igt_main
"the free-standing state objects and nothing else.");
igt_subtest("test-only") {
atomic_clear(&display, pipe, primary, output);
-
test_only(pipe_obj, primary, output);
}
@@ -1378,9 +1384,7 @@ igt_main
igt_subtest("plane-cursor-legacy") {
igt_plane_t *cursor =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
-
igt_require(cursor);
-
atomic_setup(&display, pipe, output, primary, &fb);
plane_cursor(pipe_obj, output, cursor);
}
@@ -1388,28 +1392,24 @@ igt_main
igt_describe("Test error handling when invalid plane parameters are passed");
igt_subtest("plane-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
-
plane_invalid_params(pipe_obj, output, primary, &fb);
}
igt_describe("Test error handling when invalid plane fence parameters are passed");
igt_subtest("plane-invalid-params-fence") {
atomic_setup(&display, pipe, output, primary, &fb);
-
plane_invalid_params_fence(pipe_obj, output, primary);
}
igt_describe("Test error handling when invalid crtc parameters are passed");
igt_subtest("crtc-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
-
crtc_invalid_params(pipe_obj, output, primary, &fb);
}
igt_describe("Test error handling when invalid crtc fence parameters are passed");
igt_subtest("crtc-invalid-params-fence") {
atomic_setup(&display, pipe, output, primary, &fb);
-
crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
}
@@ -1418,16 +1418,13 @@ igt_main
"allow us to create.");
igt_subtest("atomic-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
-
atomic_invalid_params(pipe_obj, primary, output, &fb);
}
- igt_describe("Simple test cases to use FB_DAMAGE_CLIPS plane property");
- igt_subtest("atomic_plane_damage") {
+ igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
+ igt_subtest("atomic-plane-damage") {
igt_require(igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS));
-
atomic_setup(&display, pipe, output, primary, &fb);
-
atomic_plane_damage(pipe_obj, primary, &fb);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
@ 2023-01-03 6:46 ` Swati Sharma
2023-01-30 6:35 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic Swati Sharma
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Swati Sharma @ 2023-01-03 6:46 UTC (permalink / raw)
To: igt-dev
Sanitize the system state before starting the subtest
and avoid skips inside tests.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/kms_atomic.c | 83 +++++++++++++++++++++++++++++-----------------
1 file changed, 53 insertions(+), 30 deletions(-)
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index cd1dd9c87..e5502ce36 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -365,27 +365,23 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
static void
plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
- igt_output_t *output)
+ igt_output_t *output, igt_plane_t *primary, int n_planes)
{
cairo_t *cr;
struct igt_fb fb_ref;
- igt_plane_t *primary;
drmModeModeInfo *mode;
igt_pipe_crc_t *pipe_crc;
igt_crc_t ref_crc, new_crc;
int fb_id_lower, fb_id_upper;
- int n_planes = pipe->n_planes;
igt_plane_t *plane_ptr[n_planes];
struct igt_fb fb_lower, fb_upper;
uint32_t w_lower, h_lower, w_upper, h_upper;
memset(plane_ptr, 0, n_planes * sizeof(igt_plane_t *));
- igt_require(n_planes >= 2);
igt_require_pipe_crc(display->drm_fd);
mode = igt_output_get_mode(output);
- primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
/* for lower plane */
w_lower = mode->hdisplay;
@@ -591,17 +587,13 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
* Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
* free-standing state objects and nothing else.
*/
-static void test_only(igt_pipe_t *pipe_obj,
- igt_plane_t *primary,
- igt_output_t *output)
+static void test_only(igt_pipe_t *pipe_obj, igt_plane_t *primary,
+ igt_output_t *output, uint32_t format)
{
drmModeModeInfo *mode = igt_output_get_mode(output);
- uint32_t format = plane_get_igt_format(primary);
struct igt_fb fb;
uint64_t old_plane_values[IGT_NUM_PLANE_PROPS], old_crtc_values[IGT_NUM_CRTC_PROPS];
- igt_require(format != 0);
-
plane_get_current_state(primary, old_plane_values);
crtc_get_current_state(pipe_obj, old_crtc_values);
@@ -1153,7 +1145,7 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
* NOTE: This will result in no update on plane as damage is outside, so
* will see no change on the screen.
*/
- /* Reszie fb_1 to be bigger than plane */
+ /* Resize fb_1 to be bigger than plane */
igt_remove_fb(pipe->display->drm_fd, &fb_1);
igt_create_color_fb(pipe->display->drm_fd, fb->width * 2, fb->height,
fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
@@ -1281,13 +1273,15 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
igt_plane_t *primary, struct igt_fb *fb)
{
+ igt_display_reset(display);
igt_output_set_pipe(output, pipe);
igt_plane_set_fb(primary, fb);
crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
}
-static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary, igt_output_t *output)
+static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary,
+ igt_output_t *output, struct igt_fb *fb)
{
igt_plane_t *plane;
@@ -1298,6 +1292,13 @@ static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *pr
igt_output_set_pipe(output, PIPE_NONE);
crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_remove_fb(display->drm_fd, fb);
+}
+
+/* Returns true if plane supports zpos property. */
+static bool has_zpos(igt_plane_t *plane)
+{
+ return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
}
igt_main
@@ -1334,9 +1335,12 @@ igt_main
igt_subtest("plane-overlay-legacy") {
igt_plane_t *overlay =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
- igt_require(overlay);
+ if (!overlay)
+ continue;
+
atomic_setup(&display, pipe, output, primary, &fb);
plane_overlay(pipe_obj, output, overlay);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test for KMS atomic modesetting on primary plane and ensure coherency between "
@@ -1344,39 +1348,52 @@ igt_main
igt_subtest("plane-primary-legacy") {
atomic_setup(&display, pipe, output, primary, &fb);
plane_primary(pipe_obj, primary, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
"vice versa) by changing their zpos property.");
igt_subtest("plane-primary-overlay-mutable-zpos") {
- uint32_t format_primary = DRM_FORMAT_ARGB8888;
- uint32_t format_overlay = DRM_FORMAT_ARGB1555;
igt_plane_t *overlay =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
- igt_require(overlay);
+ if (!overlay)
+ continue;
- igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
- igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
+ if (!has_zpos(primary) || !has_zpos(overlay))
+ continue;
+
+ if (!igt_plane_has_format_mod(primary, DRM_FORMAT_ARGB8888, 0x0) ||
+ !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
+ continue;
- igt_require(igt_plane_has_format_mod(primary, format_primary, 0x0));
- igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
igt_output_set_pipe(output, pipe);
plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
- format_primary, format_overlay);
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test to verify the reported zpos property of planes by making sure "\
"only higher zpos planes cover the lower zpos ones.");
igt_subtest("plane-immutable-zpos") {
+ int n_planes = pipe_obj->n_planes;
+
+ if (n_planes < 2)
+ continue;
+
igt_output_set_pipe(output, pipe);
- plane_immutable_zpos(&display, pipe_obj, output);
+ plane_immutable_zpos(&display, pipe_obj, output, primary, n_planes);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches "
"the free-standing state objects and nothing else.");
igt_subtest("test-only") {
- atomic_clear(&display, pipe, primary, output);
- test_only(pipe_obj, primary, output);
+ uint32_t format = plane_get_igt_format(primary);
+ if (!format)
+ continue;
+
+ atomic_clear(&display, pipe, primary, output, &fb);
+ test_only(pipe_obj, primary, output, format);
}
igt_describe("Test for KMS atomic modesetting on cursor plane and ensure coherency between "
@@ -1384,33 +1401,39 @@ igt_main
igt_subtest("plane-cursor-legacy") {
igt_plane_t *cursor =
igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
- igt_require(cursor);
+ if (!cursor)
+ continue;
atomic_setup(&display, pipe, output, primary, &fb);
plane_cursor(pipe_obj, output, cursor);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test error handling when invalid plane parameters are passed");
igt_subtest("plane-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
plane_invalid_params(pipe_obj, output, primary, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test error handling when invalid plane fence parameters are passed");
igt_subtest("plane-invalid-params-fence") {
atomic_setup(&display, pipe, output, primary, &fb);
plane_invalid_params_fence(pipe_obj, output, primary);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test error handling when invalid crtc parameters are passed");
igt_subtest("crtc-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
crtc_invalid_params(pipe_obj, output, primary, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test error handling when invalid crtc fence parameters are passed");
igt_subtest("crtc-invalid-params-fence") {
atomic_setup(&display, pipe, output, primary, &fb);
crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test abuse the atomic ioctl directly in order to test "
@@ -1419,19 +1442,19 @@ igt_main
igt_subtest("atomic-invalid-params") {
atomic_setup(&display, pipe, output, primary, &fb);
atomic_invalid_params(pipe_obj, primary, output, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
igt_subtest("atomic-plane-damage") {
- igt_require(igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS));
+ if (!igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS))
+ continue;
atomic_setup(&display, pipe, output, primary, &fb);
atomic_plane_damage(pipe_obj, primary, &fb);
+ atomic_clear(&display, pipe, primary, output, &fb);
}
igt_fixture {
- atomic_clear(&display, pipe, primary, output);
- igt_remove_fb(display.drm_fd, &fb);
-
igt_display_fini(&display);
close(display.drm_fd);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup Swati Sharma
@ 2023-01-03 6:46 ` Swati Sharma
2023-01-30 6:46 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes Swati Sharma
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Swati Sharma @ 2023-01-03 6:46 UTC (permalink / raw)
To: igt-dev
Subtests are converted to dynamic subtests. From the fixture
for_each_pipe_with_valid_output() is removed and put at
subtest level to give flexibility to user to test all pipes/output
combinations. However, restricted to 1pipe/1output combination as originally
written in the test. Code rework is done to accommodate above changes.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/kms_atomic.c | 881 ++++++++++++++++++++++++---------------------
1 file changed, 462 insertions(+), 419 deletions(-)
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index e5502ce36..716045315 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -52,6 +52,15 @@
IGT_TEST_DESCRIPTION("Test atomic modesetting API");
+/* Common test data. */
+typedef struct {
+ igt_display_t display;
+ igt_plane_t *primary;
+ igt_pipe_t *pipe;
+ int drm_fd;
+ igt_fb_t fb;
+} data_t;
+
enum kms_atomic_check_relax {
ATOMIC_RELAX_NONE = 0,
CRTC_RELAX_MODE = (1 << 0),
@@ -282,8 +291,7 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)
}
static void
-plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
- igt_plane_t *primary, igt_plane_t *overlay,
+plane_primary_overlay_mutable_zpos(data_t *data, igt_output_t *output, igt_plane_t *overlay,
uint32_t format_primary, uint32_t format_overlay)
{
struct igt_fb fb_primary, fb_overlay;
@@ -298,17 +306,17 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
uint32_t w_overlay = mode->hdisplay / 2;
uint32_t h_overlay = mode->vdisplay / 2;
- igt_create_color_pattern_fb(pipe->display->drm_fd,
+ igt_create_color_pattern_fb(data->drm_fd,
w, h, format_primary, I915_TILING_NONE,
0.2, 0.2, 0.2, &fb_primary);
- igt_create_color_pattern_fb(pipe->display->drm_fd,
+ igt_create_color_pattern_fb(data->drm_fd,
w_overlay, h_overlay,
format_overlay, I915_TILING_NONE,
0.2, 0.2, 0.2, &fb_overlay);
/* Draw a hole in the overlay */
- cr = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_overlay);
+ cr = igt_get_cairo_ctx(data->drm_fd, &fb_overlay);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
igt_paint_color_alpha(cr, w_overlay / 4, h_overlay / 4,
w_overlay / 2, h_overlay / 2,
@@ -316,33 +324,33 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
igt_put_cairo_ctx(cr);
- igt_plane_set_fb(primary, &fb_primary);
+ igt_plane_set_fb(data->primary, &fb_primary);
igt_plane_set_fb(overlay, &fb_overlay);
igt_plane_set_position(overlay, w_overlay / 2, h_overlay / 2);
- igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 0);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 0);
igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
igt_info("Committing with overlay on top, it has a hole "\
"through which the primary should be seen\n");
- plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
+ igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 0);
igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
- igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 1);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 1);
igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 0);
igt_info("Committing with primary on top, only the primary "\
"should be visible\n");
- plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 1);
+ igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 1);
igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 0);
/* Draw a hole in the primary exactly on top of the overlay plane */
- cr = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_primary);
+ cr = igt_get_cairo_ctx(data->drm_fd, &fb_primary);
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
igt_paint_color_alpha(cr, w_overlay / 2, h_overlay / 2,
w_overlay, h_overlay,
@@ -352,20 +360,19 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
igt_info("Committing with a hole in the primary through "\
"which the underlay should be seen\n");
- plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* reset it back to initial state */
- igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 0);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 0);
igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
- plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
+ igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 0);
igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
}
static void
-plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
- igt_output_t *output, igt_plane_t *primary, int n_planes)
+plane_immutable_zpos(data_t *data, igt_output_t *output, enum pipe pipe, int n_planes)
{
cairo_t *cr;
struct igt_fb fb_ref;
@@ -378,8 +385,7 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
uint32_t w_lower, h_lower, w_upper, h_upper;
memset(plane_ptr, 0, n_planes * sizeof(igt_plane_t *));
-
- igt_require_pipe_crc(display->drm_fd);
+ igt_require_pipe_crc(data->drm_fd);
mode = igt_output_get_mode(output);
@@ -391,36 +397,36 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
w_upper = 64;
h_upper = 64;
- igt_create_color_fb(display->drm_fd,
+ igt_create_color_fb(data->drm_fd,
w_lower, h_lower,
DRM_FORMAT_XRGB8888,
I915_TILING_NONE,
0.0, 0.0, 0.0, &fb_ref);
/* create reference image */
- cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
+ cr = igt_get_cairo_ctx(data->drm_fd, &fb_ref);
igt_assert(cairo_status(cr) == 0);
igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
igt_put_cairo_ctx(cr);
- igt_plane_set_fb(primary, &fb_ref);
- igt_display_commit2(display, COMMIT_ATOMIC);
+ igt_plane_set_fb(data->primary, &fb_ref);
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
/* create the pipe_crc object for this pipe */
- pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
+ pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
IGT_PIPE_CRC_SOURCE_AUTO);
/* get reference crc */
igt_pipe_crc_start(pipe_crc);
- igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
- igt_plane_set_fb(primary, NULL);
+ igt_plane_set_fb(data->primary, NULL);
for (int k = 0; k < n_planes; k++) {
int zpos;
igt_plane_t *temp;
- temp = &display->pipes[pipe->pipe].planes[k];
+ temp = &data->display.pipes[pipe].planes[k];
if (!igt_plane_has_prop(temp, IGT_PLANE_ZPOS))
continue;
@@ -431,14 +437,14 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
plane_ptr[zpos] = temp;
}
- fb_id_lower = igt_create_color_fb(display->drm_fd,
+ fb_id_lower = igt_create_color_fb(data->drm_fd,
w_lower, h_lower,
DRM_FORMAT_XRGB8888,
I915_TILING_NONE,
0.0, 0.0, 1.0, &fb_lower);
igt_assert(fb_id_lower);
- fb_id_upper = igt_create_color_fb(display->drm_fd,
+ fb_id_upper = igt_create_color_fb(data->drm_fd,
w_upper, h_upper,
DRM_FORMAT_XRGB8888,
I915_TILING_NONE,
@@ -481,8 +487,8 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
igt_info("Committing with the plane[%d] underneath "\
"plane[%d]\n", i, (i + 1));
- igt_display_commit2(display, COMMIT_ATOMIC);
- igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc, &new_crc);
+ igt_display_commit2(&data->display, COMMIT_ATOMIC);
+ igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &new_crc);
igt_assert_crc_equal(&ref_crc, &new_crc);
@@ -490,22 +496,20 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
igt_plane_set_fb(plane_upper, NULL);
}
- igt_remove_fb(display->drm_fd, &fb_ref);
- igt_remove_fb(display->drm_fd, &fb_lower);
- igt_remove_fb(display->drm_fd, &fb_upper);
+ igt_remove_fb(data->drm_fd, &fb_ref);
+ igt_remove_fb(data->drm_fd, &fb_lower);
+ igt_remove_fb(data->drm_fd, &fb_upper);
}
-static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *plane)
+static void plane_overlay(data_t *data, igt_output_t *output, igt_plane_t *plane,
+ uint32_t format)
{
- drmModeModeInfo *mode = igt_output_get_mode(output);
- uint32_t format = plane_get_igt_format(plane);
struct igt_fb fb;
+ drmModeModeInfo *mode = igt_output_get_mode(output);
uint32_t w = mode->hdisplay / 2;
uint32_t h = mode->vdisplay / 2;
- igt_require(format != 0);
-
- igt_create_pattern_fb(pipe->display->drm_fd, w, h,
+ igt_create_pattern_fb(data->drm_fd, w, h,
format, I915_TILING_NONE, &fb);
igt_plane_set_fb(plane, &fb);
@@ -538,110 +542,106 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
igt_plane_set_position(plane, 0, 0);
plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
- igt_remove_fb(pipe->display->drm_fd, &fb);
+ igt_remove_fb(data->drm_fd, &fb);
}
-static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *fb)
+static void plane_primary(data_t *data)
{
struct igt_fb fb2;
- igt_create_color_pattern_fb(pipe->display->drm_fd,
- fb->width, fb->height,
- fb->drm_format, I915_TILING_NONE,
+ igt_create_color_pattern_fb(data->drm_fd,
+ data->fb.width, data->fb.height,
+ data->fb.drm_format, I915_TILING_NONE,
0.2, 0.2, 0.2, &fb2);
/*
* Flip the primary plane using the atomic API, and double-check
* state is what we think it should be.
*/
- igt_plane_set_fb(plane, &fb2);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &fb2);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Restore the primary plane and check the state matches the old. */
- igt_plane_set_fb(plane, fb);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Set the plane through the legacy CRTC/primary-plane API, and
* verify through atomic.
*/
- igt_plane_set_fb(plane, &fb2);
- crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Restore the plane to its original settings through the legacy CRTC
* API, and verify through atomic.
*/
- igt_plane_set_fb(plane, fb);
- crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ crtc_commit(data->pipe, data->primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
/*
* Set the plane through the universal setplane API, and
* verify through atomic.
*/
- igt_plane_set_fb(plane, &fb2);
- plane_commit(plane, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &fb2);
+ plane_commit(data->primary, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
}
/*
* Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
* free-standing state objects and nothing else.
*/
-static void test_only(igt_pipe_t *pipe_obj, igt_plane_t *primary,
- igt_output_t *output, uint32_t format)
+static void test_only(data_t *data, igt_output_t *output, enum pipe pipe, uint32_t format)
{
- drmModeModeInfo *mode = igt_output_get_mode(output);
struct igt_fb fb;
uint64_t old_plane_values[IGT_NUM_PLANE_PROPS], old_crtc_values[IGT_NUM_CRTC_PROPS];
+ drmModeModeInfo *mode = igt_output_get_mode(output);
- plane_get_current_state(primary, old_plane_values);
- crtc_get_current_state(pipe_obj, old_crtc_values);
-
+ plane_get_current_state(data->primary, old_plane_values);
+ crtc_get_current_state(data->pipe, old_crtc_values);
igt_assert(!old_crtc_values[IGT_CRTC_MODE_ID]);
- igt_create_pattern_fb(pipe_obj->display->drm_fd,
- mode->hdisplay, mode->vdisplay,
- format, I915_TILING_NONE, &fb);
- igt_plane_set_fb(primary, &fb);
- igt_output_set_pipe(output, pipe_obj->pipe);
+ igt_create_pattern_fb(data->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ format, I915_TILING_NONE, &fb);
+ igt_plane_set_fb(data->primary, &fb);
+ igt_output_set_pipe(output, pipe);
- igt_display_commit_atomic(pipe_obj->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
/* check the state, should still be old state */
- crtc_check_current_state(pipe_obj, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
- plane_check_current_state(primary, old_plane_values, ATOMIC_RELAX_NONE);
+ crtc_check_current_state(data->pipe, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
+ plane_check_current_state(data->primary, old_plane_values, ATOMIC_RELAX_NONE);
/*
* Enable the plane through the legacy CRTC/primary-plane API, and
* verify through atomic.
*/
- crtc_commit(pipe_obj, primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
+ crtc_commit(data->pipe, data->primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
/* Same for disable.. */
- plane_get_current_state(primary, old_plane_values);
- crtc_get_current_state(pipe_obj, old_crtc_values);
+ plane_get_current_state(data->primary, old_plane_values);
+ crtc_get_current_state(data->pipe, old_crtc_values);
- igt_plane_set_fb(primary, NULL);
+ igt_plane_set_fb(data->primary, NULL);
igt_output_set_pipe(output, PIPE_NONE);
- igt_display_commit_atomic(pipe_obj->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
/* for extra stress, go through dpms off/on cycle */
kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_OFF);
kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_ON);
/* check the state, should still be old state */
- crtc_check_current_state(pipe_obj, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
- plane_check_current_state(primary, old_plane_values, ATOMIC_RELAX_NONE);
+ crtc_check_current_state(data->pipe, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
+ plane_check_current_state(data->primary, old_plane_values, ATOMIC_RELAX_NONE);
/* And disable the pipe and remove fb, test complete */
- crtc_commit(pipe_obj, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_remove_fb(pipe_obj->display->drm_fd, &fb);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_remove_fb(data->drm_fd, &fb);
}
-static void plane_cursor(igt_pipe_t *pipe_obj,
- igt_output_t *output,
- igt_plane_t *cursor)
+static void plane_cursor(data_t *data, igt_output_t *output, igt_plane_t *cursor)
{
drmModeModeInfo *mode = igt_output_get_mode(output);
struct igt_fb fb;
@@ -650,12 +650,12 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
int y = mode->vdisplay / 2;
/* Any kernel new enough for atomic, also has the cursor size caps. */
- do_or_die(drmGetCap(pipe_obj->display->drm_fd,
+ do_or_die(drmGetCap(data->drm_fd,
DRM_CAP_CURSOR_WIDTH, &width));
- do_or_die(drmGetCap(pipe_obj->display->drm_fd,
+ do_or_die(drmGetCap(data->drm_fd,
DRM_CAP_CURSOR_HEIGHT, &height));
- igt_create_color_fb(pipe_obj->display->drm_fd,
+ igt_create_color_fb(data->drm_fd,
width, height, DRM_FORMAT_ARGB8888,
DRM_FORMAT_MOD_LINEAR,
0.0, 0.0, 0.0, &fb);
@@ -694,69 +694,64 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
plane_commit(cursor, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
}
-static void plane_invalid_params(igt_pipe_t *pipe,
- igt_output_t *output,
- igt_plane_t *plane,
- struct igt_fb *fb)
+static void plane_invalid_params(data_t *data, igt_output_t *output)
{
struct igt_fb fb2;
/* Pass a series of invalid object IDs for the FB ID. */
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, plane->drm_plane->plane_id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->primary->drm_plane->plane_id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe->crtc_id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->pipe->crtc_id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, output->id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, output->id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe->values[IGT_CRTC_MODE_ID]);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->pipe->values[IGT_CRTC_MODE_ID]);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
/* Valid, but invalid because CRTC_ID is set. */
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, 0);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_fb(plane, fb);
- plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Pass a series of invalid object IDs for the CRTC ID. */
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, plane->drm_plane->plane_id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->primary->drm_plane->plane_id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, fb->fb_id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->fb.fb_id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, output->id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, output->id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe->values[IGT_CRTC_MODE_ID]);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->pipe->values[IGT_CRTC_MODE_ID]);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
/* Valid, but invalid because FB_ID is set. */
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, 0);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_plane_set_fb(plane, fb);
- plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Create a framebuffer too small for the plane configuration. */
- igt_create_pattern_fb(pipe->display->drm_fd,
- fb->width - 1, fb->height - 1,
- fb->drm_format, I915_TILING_NONE, &fb2);
+ igt_create_pattern_fb(data->drm_fd,
+ data->fb.width - 1, data->fb.height - 1,
+ data->fb.drm_format, I915_TILING_NONE, &fb2);
- igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, fb2.fb_id);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, ENOSPC);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, fb2.fb_id);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, ENOSPC);
/* Restore the primary plane and check the state matches the old. */
- igt_plane_set_fb(plane, fb);
- plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
}
-static void plane_invalid_params_fence(igt_pipe_t *pipe,
- igt_output_t *output,
- igt_plane_t *plane)
+static void plane_invalid_params_fence(data_t *data, igt_output_t *output)
{
int timeline, fence_fd;
@@ -765,79 +760,73 @@ static void plane_invalid_params_fence(igt_pipe_t *pipe,
timeline = sw_sync_timeline_create();
/* invalid fence fd */
- igt_plane_set_fence_fd(plane, pipe->display->drm_fd);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_fence_fd(data->primary, data->drm_fd);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
/* valid fence_fd but invalid CRTC */
fence_fd = sw_sync_timeline_create_fence(timeline, 1);
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, ~0);
- igt_plane_set_fence_fd(plane, fence_fd);
- plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, ~0);
+ igt_plane_set_fence_fd(data->primary, fence_fd);
+ plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
sw_sync_timeline_inc(timeline, 1);
- igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe->crtc_id);
- plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->pipe->crtc_id);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
close(fence_fd);
close(timeline);
}
-static void crtc_invalid_params(igt_pipe_t *pipe,
- igt_output_t *output,
- igt_plane_t *plane,
- struct igt_fb *fb)
+static void crtc_invalid_params(data_t *data, igt_output_t *output)
{
- uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
+ uint64_t old_mode_id = data->pipe->values[IGT_CRTC_MODE_ID];
drmModeModeInfo *mode = igt_output_get_mode(output);
/* Pass a series of invalid object IDs for the mode ID. */
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, plane->drm_plane->plane_id);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->primary->drm_plane->plane_id);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, pipe->crtc_id);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->pipe->crtc_id);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, output->id);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, output->id);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->fb.fb_id);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
/* Can we restore mode? */
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, old_mode_id);
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY, ATOMIC_RELAX_NONE, 0);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, old_mode_id);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY, ATOMIC_RELAX_NONE, 0);
/*
* TEST_ONLY cannot be combined with DRM_MODE_PAGE_FLIP_EVENT,
* but DRM_MODE_PAGE_FLIP_EVENT will always generate EINVAL
* without valid crtc, so test it here.
*/
- crtc_commit_atomic_flags_err(pipe, plane,
+ crtc_commit_atomic_flags_err(data->pipe, data->primary,
DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_PAGE_FLIP_EVENT,
ATOMIC_RELAX_NONE, EINVAL);
/* Create a blob which is the wrong size to be a valid mode. */
- igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) - 1);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) - 1);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
- igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
+ igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
/* Restore the CRTC and check the state matches the old. */
- igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
}
-static void crtc_invalid_params_fence(igt_pipe_t *pipe,
- igt_output_t *output,
- igt_plane_t *plane,
- struct igt_fb *fb)
+static void crtc_invalid_params_fence(data_t *data, igt_output_t *output)
{
int timeline, fence_fd;
void *map;
const ptrdiff_t PAGE_SIZE = sysconf(_SC_PAGE_SIZE);
- uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
+ uint64_t old_mode_id = data->pipe->values[IGT_CRTC_MODE_ID];
igt_require_sw_sync();
@@ -847,98 +836,94 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
munmap(map, PAGE_SIZE);
/* invalid out_fence_ptr */
map = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
munmap(map, PAGE_SIZE);
/* invalid out_fence_ptr */
map = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
igt_assert(map != MAP_FAILED);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
- crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
+ crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
munmap(map, PAGE_SIZE);
/* valid in fence but not allowed prop on crtc */
fence_fd = sw_sync_timeline_create_fence(timeline, 1);
- igt_plane_set_fence_fd(plane, fence_fd);
+ igt_plane_set_fence_fd(data->primary, fence_fd);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 0);
- igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_ACTIVE, 0);
+ igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
- crtc_commit_atomic_flags_err(pipe, plane, 0, ATOMIC_RELAX_NONE, EINVAL);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, 0, ATOMIC_RELAX_NONE, EINVAL);
/* valid out fence ptr and flip event but not allowed prop on crtc */
- igt_pipe_request_out_fence(pipe);
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
+ igt_pipe_request_out_fence(data->pipe);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
ATOMIC_RELAX_NONE, EINVAL);
/* valid flip event but not allowed prop on crtc */
- igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
+ igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
ATOMIC_RELAX_NONE, EINVAL);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 1);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_ACTIVE, 1);
/* configuration should be valid again */
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY,
ATOMIC_RELAX_NONE, 0);
/* set invalid prop */
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->fb.fb_id);
/* valid out fence but invalid prop on crtc */
- igt_pipe_request_out_fence(pipe);
- crtc_commit_atomic_flags_err(pipe, plane, 0,
+ igt_pipe_request_out_fence(data->pipe);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, 0,
ATOMIC_RELAX_NONE, EINVAL);
/* valid out fence ptr and flip event but invalid prop on crtc */
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
ATOMIC_RELAX_NONE, EINVAL);
/* valid page flip event but invalid prop on crtc */
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
ATOMIC_RELAX_NONE, EINVAL);
/* successful TEST_ONLY with fences set */
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, old_mode_id);
- crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, old_mode_id);
+ crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY,
ATOMIC_RELAX_NONE, 0);
- igt_assert(pipe->out_fence_fd == -1);
+ igt_assert(data->pipe->out_fence_fd == -1);
close(fence_fd);
close(timeline);
/* reset fences */
- igt_plane_set_fence_fd(plane, -1);
- igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, 0);
- igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fence_fd(data->primary, -1);
+ igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, 0);
+ igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* out fence ptr but not page flip event */
- igt_pipe_request_out_fence(pipe);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_pipe_request_out_fence(data->pipe);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_assert(pipe->out_fence_fd != -1);
+ igt_assert(data->pipe->out_fence_fd != -1);
}
/*
* Abuse the atomic ioctl directly in order to test various invalid conditions,
* which the libdrm wrapper won't allow us to create.
*/
-static void atomic_invalid_params(igt_pipe_t *pipe,
- igt_plane_t *plane,
- igt_output_t *output,
- struct igt_fb *fb)
+static void atomic_invalid_params(data_t *data, igt_output_t *output)
{
- igt_display_t *display = pipe->display;
struct drm_mode_atomic ioc;
uint32_t obj_raw[16]; /* array of objects (sized by count_objs) */
uint32_t num_props_raw[16]; /* array of num props per obj (ditto) */
@@ -949,7 +934,7 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
memset(&ioc, 0, sizeof(ioc));
/* An empty request should do nothing. */
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
obj_raw[i] = 0;
@@ -966,132 +951,132 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
ioc.prop_values_ptr = (uintptr_t) values_raw;
/* Valid pointers, but still should copy nothing. */
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Valid noop, but with event set should fail. */
ioc.flags = DRM_MODE_PAGE_FLIP_EVENT;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
/* Nonsense flags. */
ioc.flags = 0xdeadbeef;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
ioc.flags = 0;
/* Safety check that flags is reset properly. */
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Reserved/MBZ. */
ioc.reserved = 1;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
ioc.reserved = 0;
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Zero is not a valid object ID. */
ioc.count_objs = ARRAY_SIZE(obj_raw);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
/* Invalid object type (not a thing we can set properties on). */
ioc.count_objs = 1;
- obj_raw[0] = pipe->values[IGT_CRTC_MODE_ID];
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
- obj_raw[0] = fb->fb_id;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ obj_raw[0] = data->pipe->values[IGT_CRTC_MODE_ID];
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ obj_raw[0] = data->fb.fb_id;
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
/* Filled object but with no properties; no-op. */
for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
- obj_raw[i] = pipe->crtc_id;
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ obj_raw[i] = data->pipe->crtc_id;
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Pass in all sorts of things other than the property ID. */
num_props_raw[0] = 1;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
- props_raw[0] = pipe->crtc_id;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
- props_raw[0] = plane->drm_plane->plane_id;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ props_raw[0] = data->pipe->crtc_id;
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ props_raw[0] = data->primary->drm_plane->plane_id;
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
props_raw[0] = output->id;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
- props_raw[0] = pipe->values[IGT_CRTC_MODE_ID];
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ props_raw[0] = data->pipe->values[IGT_CRTC_MODE_ID];
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
/* Valid property, valid value. */
for (i = 0; i < ARRAY_SIZE(props_raw); i++) {
- props_raw[i] = pipe->props[IGT_CRTC_MODE_ID];
- values_raw[i] = pipe->values[IGT_CRTC_MODE_ID];
+ props_raw[i] = data->pipe->props[IGT_CRTC_MODE_ID];
+ values_raw[i] = data->pipe->values[IGT_CRTC_MODE_ID];
}
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Setting the same thing multiple times is OK. */
for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
num_props_raw[i] = ARRAY_SIZE(props_raw) / ARRAY_SIZE(obj_raw);
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
ioc.count_objs = ARRAY_SIZE(obj_raw);
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Pass a series of outlandish addresses. */
ioc.objs_ptr = 0;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
ioc.objs_ptr = (uintptr_t) obj_raw;
ioc.count_props_ptr = 0;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
ioc.count_props_ptr = (uintptr_t) num_props_raw;
ioc.props_ptr = 0;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
ioc.props_ptr = (uintptr_t) props_raw;
ioc.prop_values_ptr = 0;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
ioc.prop_values_ptr = (uintptr_t) values_raw;
- do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
+ do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
/* Attempt to overflow and/or trip various boundary conditions. */
ioc.count_objs = UINT32_MAX / sizeof(uint32_t);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
ioc.count_objs = ARRAY_SIZE(obj_raw);
ioc.objs_ptr = UINT64_MAX - sizeof(uint32_t);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
ioc.count_objs = 1;
ioc.objs_ptr = UINT64_MAX - sizeof(uint32_t);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
num_props_raw[0] = UINT32_MAX / sizeof(uint32_t);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
num_props_raw[0] = UINT32_MAX - 1;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
num_props_raw[i] = (UINT32_MAX / ARRAY_SIZE(obj_raw)) + 1;
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
num_props_raw[i] = ARRAY_SIZE(props_raw) / ARRAY_SIZE(obj_raw);
- do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
+ do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
}
-static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *fb)
+static void atomic_plane_damage(data_t *data)
{
struct drm_mode_rect damage[2];
struct igt_fb fb_1, fb_2;
cairo_t *cr_1, *cr_2;
/* Color fb with white rect at center */
- igt_create_color_fb(pipe->display->drm_fd, fb->width, fb->height,
- fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
+ igt_create_color_fb(data->drm_fd, data->fb.width, data->fb.height,
+ data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
&fb_1);
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
- igt_paint_color(cr_1, fb->width/4, fb->height/4, fb->width/2,
- fb->height/2, 1.0, 1.0, 1.0);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
+ igt_paint_color(cr_1, data->fb.width/4, data->fb.height/4, data->fb.width/2,
+ data->fb.height/2, 1.0, 1.0, 1.0);
igt_put_cairo_ctx(cr_1);
/*
* Flip the primary plane to new color fb using atomic API and check the
* state.
*/
- igt_plane_set_fb(plane, &fb_1);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &fb_1);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Change the color of top left clip from center and issue plane update
@@ -1099,35 +1084,35 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
*/
damage[0].x1 = 0;
damage[0].y1 = 0;
- damage[0].x2 = fb->width/2;
- damage[0].y2 = fb->height/2;
+ damage[0].x2 = data->fb.width/2;
+ damage[0].y2 = data->fb.height/2;
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
damage_rect_width(&damage[0]),
damage_rect_height(&damage[0]), 1.0, 0, 0);
igt_put_cairo_ctx(cr_1);
- igt_plane_set_fb(plane, &fb_1);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_1);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage));
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Change the color of top left and bottom right clip from center and
* issue plane update with damage and verify the state.
*/
- igt_create_color_fb(pipe->display->drm_fd, fb->width, fb->height,
- fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
+ igt_create_color_fb(data->drm_fd, data->fb.width, data->fb.height,
+ data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
&fb_2);
- damage[0].x1 = fb->width/2;
+ damage[0].x1 = data->fb.width/2;
damage[0].y1 = 0;
- damage[0].x2 = fb->width;
- damage[0].y2 = fb->height/2;
+ damage[0].x2 = data->fb.width;
+ damage[0].y2 = data->fb.height/2;
- cr_2 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_2);
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
+ cr_2 = igt_get_cairo_ctx(data->drm_fd, &fb_2);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
cairo_set_source_surface(cr_2, fb_1.cairo_surface, 0, 0);
cairo_paint(cr_2);
igt_paint_color(cr_2, damage[0].x1, damage[0].y1,
@@ -1135,10 +1120,10 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
damage_rect_height(&damage[0]), 0, 1.0, 0);
igt_put_cairo_ctx(cr_1);
igt_put_cairo_ctx(cr_2);
- igt_plane_set_fb(plane, &fb_2);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_2);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage));
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Issue plane update with damage with a clip outside of plane src.
@@ -1146,18 +1131,18 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
* will see no change on the screen.
*/
/* Resize fb_1 to be bigger than plane */
- igt_remove_fb(pipe->display->drm_fd, &fb_1);
- igt_create_color_fb(pipe->display->drm_fd, fb->width * 2, fb->height,
- fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
+ igt_remove_fb(data->drm_fd, &fb_1);
+ igt_create_color_fb(data->drm_fd, data->fb.width * 2, data->fb.height,
+ data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
&fb_1);
- damage[0].x1 = fb->width;
+ damage[0].x1 = data->fb.width;
damage[0].y1 = 0;
- damage[0].x2 = fb->width + fb->width/2;
- damage[0].y2 = fb->height/2;
+ damage[0].x2 = data->fb.width + data->fb.width/2;
+ damage[0].y2 = data->fb.height/2;
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
- cr_2 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_2);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
+ cr_2 = igt_get_cairo_ctx(data->drm_fd, &fb_2);
cairo_set_source_surface(cr_1, fb_2.cairo_surface, 0, 0);
cairo_paint(cr_1);
igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
@@ -1165,13 +1150,13 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
damage_rect_height(&damage[0]), 0, 1.0, 0);
igt_put_cairo_ctx(cr_2);
igt_put_cairo_ctx(cr_1);
- igt_plane_set_fb(plane, &fb_1);
- igt_plane_set_size(plane, fb->width, fb->height);
- igt_fb_set_position(&fb_1, plane, 0, 0);
- igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_1);
+ igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
+ igt_fb_set_position(&fb_1, data->primary, 0, 0);
+ igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage));
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Issue a plane update with damage with a clip that overlap with plane
@@ -1179,23 +1164,23 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
* NOTE: Here drm core should take care of intersecting the clip to
* plane src.
*/
- damage[0].x1 = fb->width/2;
+ damage[0].x1 = data->fb.width/2;
damage[0].y1 = 0;
- damage[0].x2 = fb->width/2 + fb->width;
- damage[0].y2 = fb->height/2;
+ damage[0].x2 = data->fb.width/2 + data->fb.width;
+ damage[0].y2 = data->fb.height/2;
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
damage_rect_width(&damage[0]),
damage_rect_height(&damage[0]), 1.0, 1.0, 0);
igt_put_cairo_ctx(cr_1);
- igt_plane_set_fb(plane, &fb_1);
- igt_plane_set_size(plane, fb->width, fb->height);
- igt_fb_set_position(&fb_1, plane, 0, 0);
- igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_1);
+ igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
+ igt_fb_set_position(&fb_1, data->primary, 0, 0);
+ igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage));
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Issue a plane update with damage with two clips one inside plane src
@@ -1203,16 +1188,16 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
* NOTE: This will result in plane update with clip inside plane src.
*/
damage[0].x1 = 0;
- damage[0].y1 = fb->height/2;
- damage[0].x2 = fb->width/2;
- damage[0].y2 = fb->height;
+ damage[0].y1 = data->fb.height/2;
+ damage[0].x2 = data->fb.width/2;
+ damage[0].y2 = data->fb.height;
- damage[1].x1 = fb->width + fb->width/2;
- damage[1].y1 = fb->height/2;
- damage[1].x2 = fb->width * 2;
- damage[1].y2 = fb->height;
+ damage[1].x1 = data->fb.width + data->fb.width/2;
+ damage[1].y1 = data->fb.height/2;
+ damage[1].x2 = data->fb.width * 2;
+ damage[1].y2 = data->fb.height;
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
damage_rect_width(&damage[0]),
damage_rect_height(&damage[0]), 0, 1.0, 1.0);
@@ -1220,13 +1205,13 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
damage_rect_width(&damage[1]),
damage_rect_height(&damage[1]), 0, 1.0, 0);
igt_put_cairo_ctx(cr_1);
- igt_plane_set_fb(plane, &fb_1);
- igt_plane_set_size(plane, fb->width, fb->height);
- igt_fb_set_position(&fb_1, plane, 0, 0);
- igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_1);
+ igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
+ igt_fb_set_position(&fb_1, data->primary, 0, 0);
+ igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage) * 2);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/*
* Issue a plane update with overlapping damage clips. White rect in
@@ -1237,15 +1222,15 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
*/
damage[0].x1 = 0;
damage[0].y1 = 0;
- damage[0].x2 = fb->width/2;
- damage[0].y2 = fb->height/2;
+ damage[0].x2 = data->fb.width/2;
+ damage[0].y2 = data->fb.height/2;
- damage[1].x1 = fb->width/4;
- damage[1].y1 = fb->height/4;
- damage[1].x2 = fb->width/4 + fb->width/2;
- damage[1].y2 = fb->height/4 + fb->height/2;
+ damage[1].x1 = data->fb.width/4;
+ damage[1].y1 = data->fb.height/4;
+ damage[1].x2 = data->fb.width/4 + data->fb.width/2;
+ damage[1].y2 = data->fb.height/4 + data->fb.height/2;
- cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
+ cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
damage_rect_width(&damage[0]),
damage_rect_height(&damage[0]), 1.0, 0, 0);
@@ -1253,46 +1238,55 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
damage_rect_width(&damage[1]),
damage_rect_height(&damage[1]), 1.0, 1.0, 1.0);
igt_put_cairo_ctx(cr_1);
- igt_plane_set_fb(plane, &fb_1);
- igt_plane_set_size(plane, fb->width, fb->height);
- igt_fb_set_position(&fb_1, plane, 0, 0);
- igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
- igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
+ igt_plane_set_fb(data->primary, &fb_1);
+ igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
+ igt_fb_set_position(&fb_1, data->primary, 0, 0);
+ igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
+ igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
sizeof(*damage) * 2);
- crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Restore the primary plane */
- igt_plane_set_fb(plane, fb);
- plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_plane_set_fb(data->primary, &data->fb);
+ plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
/* Remove the fb created for this test */
- igt_remove_fb(pipe->display->drm_fd, &fb_1);
- igt_remove_fb(pipe->display->drm_fd, &fb_2);
+ igt_remove_fb(data->drm_fd, &fb_1);
+ igt_remove_fb(data->drm_fd, &fb_2);
}
-static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
- igt_plane_t *primary, struct igt_fb *fb)
+static void atomic_setup(data_t *data, enum pipe pipe, igt_output_t *output)
{
- igt_display_reset(display);
+ drmModeModeInfo *mode;
+ igt_display_reset(&data->display);
igt_output_set_pipe(output, pipe);
- igt_plane_set_fb(primary, fb);
- crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ data->primary = igt_pipe_get_plane_type(&data->display.pipes[pipe], DRM_PLANE_TYPE_PRIMARY);
+ data->pipe = &data->display.pipes[pipe];
+ mode = igt_output_get_mode(output);
+
+ igt_create_pattern_fb(data->drm_fd,
+ mode->hdisplay, mode->vdisplay,
+ plane_get_igt_format(data->primary),
+ DRM_FORMAT_MOD_LINEAR, &data->fb);
+
+ igt_plane_set_fb(data->primary, &data->fb);
+
+ crtc_commit(data->primary->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
}
-static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary,
- igt_output_t *output, struct igt_fb *fb)
+static void atomic_clear(data_t *data, enum pipe pipe, igt_output_t *output)
{
igt_plane_t *plane;
- for_each_plane_on_pipe(display, pipe, plane) {
+ for_each_plane_on_pipe(&data->display, pipe, plane) {
igt_plane_set_fb(plane, NULL);
igt_plane_set_position(plane, 0, 0);
}
igt_output_set_pipe(output, PIPE_NONE);
- crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
- igt_remove_fb(display->drm_fd, fb);
+ crtc_commit(data->primary->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
+ igt_remove_fb(data->drm_fd, &data->fb);
}
/* Returns true if plane supports zpos property. */
@@ -1303,159 +1297,208 @@ static bool has_zpos(igt_plane_t *plane)
igt_main
{
- igt_display_t display;
enum pipe pipe = PIPE_NONE;
- igt_pipe_t *pipe_obj;
igt_output_t *output = NULL;
- igt_plane_t *primary = NULL;
- drmModeModeInfo *mode;
- struct igt_fb fb;
+ data_t data = { 0 };
igt_fixture {
- display.drm_fd = drm_open_driver_master(DRIVER_ANY);
+ data.drm_fd = drm_open_driver_master(DRIVER_ANY);
kmstest_set_vt_graphics_mode();
- igt_display_require(&display, display.drm_fd);
- igt_require(display.is_atomic);
- igt_display_require_output(&display);
-
- for_each_pipe_with_valid_output(&display, pipe, output)
- break;
-
- pipe_obj = &display.pipes[pipe];
- primary = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
- mode = igt_output_get_mode(output);
- igt_create_pattern_fb(display.drm_fd,
- mode->hdisplay, mode->vdisplay,
- plane_get_igt_format(primary),
- DRM_FORMAT_MOD_LINEAR, &fb);
+ igt_display_require(&data.display, data.drm_fd);
+ igt_require(data.display.is_atomic);
+ igt_display_require_output(&data.display);
}
igt_describe("Test for KMS atomic modesetting on overlay plane and ensure coherency between "
"the legacy and atomic interfaces.");
- igt_subtest("plane-overlay-legacy") {
- igt_plane_t *overlay =
- igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
- if (!overlay)
- continue;
+ igt_subtest_with_dynamic("plane-overlay-legacy") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_plane_t *overlay =
+ igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
+ uint32_t format = plane_get_igt_format(overlay);
- atomic_setup(&display, pipe, output, primary, &fb);
- plane_overlay(pipe_obj, output, overlay);
- atomic_clear(&display, pipe, primary, output, &fb);
+ if (!overlay || !format)
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_overlay(&data, output, overlay, format);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test for KMS atomic modesetting on primary plane and ensure coherency between "
"the legacy and atomic interfaces.");
- igt_subtest("plane-primary-legacy") {
- atomic_setup(&display, pipe, output, primary, &fb);
- plane_primary(pipe_obj, primary, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("plane-primary-legacy") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_primary(&data);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
"vice versa) by changing their zpos property.");
- igt_subtest("plane-primary-overlay-mutable-zpos") {
- igt_plane_t *overlay =
- igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
- if (!overlay)
- continue;
-
- if (!has_zpos(primary) || !has_zpos(overlay))
- continue;
+ igt_subtest_with_dynamic("plane-primary-overlay-mutable-zpos") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_plane_t *overlay =
+ igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
- if (!igt_plane_has_format_mod(primary, DRM_FORMAT_ARGB8888, 0x0) ||
- !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
- continue;
+ atomic_setup(&data, pipe, output);
- igt_output_set_pipe(output, pipe);
- plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
- DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
- atomic_clear(&display, pipe, primary, output, &fb);
+ if (!overlay)
+ continue;
+ if (!has_zpos(data.primary) || !has_zpos(overlay))
+ continue;
+ if (!igt_plane_has_format_mod(data.primary, DRM_FORMAT_ARGB8888, 0x0) ||
+ !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ plane_primary_overlay_mutable_zpos(&data, output, overlay,
+ DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test to verify the reported zpos property of planes by making sure "\
"only higher zpos planes cover the lower zpos ones.");
- igt_subtest("plane-immutable-zpos") {
- int n_planes = pipe_obj->n_planes;
+ igt_subtest_with_dynamic("plane-immutable-zpos") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ int n_planes = data.display.pipes[pipe].n_planes;
- if (n_planes < 2)
- continue;
-
- igt_output_set_pipe(output, pipe);
- plane_immutable_zpos(&display, pipe_obj, output, primary, n_planes);
- atomic_clear(&display, pipe, primary, output, &fb);
+ if (n_planes < 2)
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_immutable_zpos(&data, output, pipe, n_planes);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches "
"the free-standing state objects and nothing else.");
- igt_subtest("test-only") {
- uint32_t format = plane_get_igt_format(primary);
- if (!format)
- continue;
+ igt_subtest_with_dynamic("test-only") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ uint32_t format;
+
+ atomic_setup(&data, pipe, output);
+ format = plane_get_igt_format(data.primary);
- atomic_clear(&display, pipe, primary, output, &fb);
- test_only(pipe_obj, primary, output, format);
+ if (!format)
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_clear(&data, pipe, output);
+ test_only(&data, output, pipe, format);
+ }
+ break;
+ }
}
igt_describe("Test for KMS atomic modesetting on cursor plane and ensure coherency between "
"legacy and atomic interfaces.");
- igt_subtest("plane-cursor-legacy") {
- igt_plane_t *cursor =
- igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
- if (!cursor)
- continue;
- atomic_setup(&display, pipe, output, primary, &fb);
- plane_cursor(pipe_obj, output, cursor);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("plane-cursor-legacy") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_plane_t *cursor =
+ igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_CURSOR);
+
+ if (!cursor)
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_cursor(&data, output, cursor);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test error handling when invalid plane parameters are passed");
- igt_subtest("plane-invalid-params") {
- atomic_setup(&display, pipe, output, primary, &fb);
- plane_invalid_params(pipe_obj, output, primary, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("plane-invalid-params") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_invalid_params(&data, output);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test error handling when invalid plane fence parameters are passed");
- igt_subtest("plane-invalid-params-fence") {
- atomic_setup(&display, pipe, output, primary, &fb);
- plane_invalid_params_fence(pipe_obj, output, primary);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("plane-invalid-params-fence") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ plane_invalid_params_fence(&data, output);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test error handling when invalid crtc parameters are passed");
- igt_subtest("crtc-invalid-params") {
- atomic_setup(&display, pipe, output, primary, &fb);
- crtc_invalid_params(pipe_obj, output, primary, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("crtc-invalid-params") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ crtc_invalid_params(&data, output);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test error handling when invalid crtc fence parameters are passed");
- igt_subtest("crtc-invalid-params-fence") {
- atomic_setup(&display, pipe, output, primary, &fb);
- crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("crtc-invalid-params-fence") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ crtc_invalid_params_fence(&data, output);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test abuse the atomic ioctl directly in order to test "
"various invalid conditions which the libdrm wrapper won't "
"allow us to create.");
- igt_subtest("atomic-invalid-params") {
- atomic_setup(&display, pipe, output, primary, &fb);
- atomic_invalid_params(pipe_obj, primary, output, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("atomic-invalid-params") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_setup(&data, pipe, output);
+ atomic_invalid_params(&data, output);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
- igt_subtest("atomic-plane-damage") {
- if (!igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS))
- continue;
- atomic_setup(&display, pipe, output, primary, &fb);
- atomic_plane_damage(pipe_obj, primary, &fb);
- atomic_clear(&display, pipe, primary, output, &fb);
+ igt_subtest_with_dynamic("atomic-plane-damage") {
+ for_each_pipe_with_valid_output(&data.display, pipe, output) {
+ atomic_setup(&data, pipe, output);
+
+ if (!igt_plane_has_prop(data.primary, IGT_PLANE_FB_DAMAGE_CLIPS))
+ continue;
+ igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
+ atomic_plane_damage(&data);
+ atomic_clear(&data, pipe, output);
+ }
+ break;
+ }
}
igt_fixture {
- igt_display_fini(&display);
- close(display.drm_fd);
+ igt_display_fini(&data.display);
+ close(data.drm_fd);
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
` (2 preceding siblings ...)
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic Swati Sharma
@ 2023-01-03 6:46 ` Swati Sharma
2023-01-30 6:55 ` Modem, Bhanuprakash
2023-01-03 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Test cleanup and dynamic conversion Patchwork
2023-01-03 11:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
5 siblings, 1 reply; 12+ messages in thread
From: Swati Sharma @ 2023-01-03 6:46 UTC (permalink / raw)
To: igt-dev
Extra flag in command line is passed to run subtests on all pipe/output combinations.
However, by default execution is restricted to 1pipe/1output
combination.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/kms_atomic.c | 56 +++++++++++++++++++++++++++++++++++-----------
1 file changed, 43 insertions(+), 13 deletions(-)
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index 716045315..6272e2aa6 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -52,6 +52,8 @@
IGT_TEST_DESCRIPTION("Test atomic modesetting API");
+static bool all_pipes = false;
+
/* Common test data. */
typedef struct {
igt_display_t display;
@@ -1295,7 +1297,23 @@ static bool has_zpos(igt_plane_t *plane)
return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
}
-igt_main
+static int opt_handler(int opt, int opt_index, void *_data)
+{
+ switch (opt) {
+ case 'e':
+ all_pipes = true;
+ break;
+ default:
+ return IGT_OPT_HANDLER_ERROR;
+ }
+
+ return IGT_OPT_HANDLER_SUCCESS;
+}
+
+static const char *help_str =
+ " -e \tRun on all pipes. (By default subtests will run only on one pipe)\n";
+
+igt_main_args("e", NULL, help_str, opt_handler, NULL)
{
enum pipe pipe = PIPE_NONE;
igt_output_t *output = NULL;
@@ -1324,7 +1342,8 @@ igt_main
plane_overlay(&data, output, overlay, format);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1337,7 +1356,8 @@ igt_main
plane_primary(&data);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1362,7 +1382,8 @@ igt_main
DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1379,7 +1400,8 @@ igt_main
plane_immutable_zpos(&data, output, pipe, n_planes);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1398,7 +1420,8 @@ igt_main
atomic_clear(&data, pipe, output);
test_only(&data, output, pipe, format);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1416,7 +1439,8 @@ igt_main
plane_cursor(&data, output, cursor);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1428,7 +1452,8 @@ igt_main
plane_invalid_params(&data, output);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1440,7 +1465,8 @@ igt_main
plane_invalid_params_fence(&data, output);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1452,7 +1478,8 @@ igt_main
crtc_invalid_params(&data, output);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1464,7 +1491,8 @@ igt_main
crtc_invalid_params_fence(&data, output);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1478,7 +1506,8 @@ igt_main
atomic_invalid_params(&data, output);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
@@ -1493,7 +1522,8 @@ igt_main
atomic_plane_damage(&data);
atomic_clear(&data, pipe, output);
}
- break;
+ if (!all_pipes)
+ break;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for Test cleanup and dynamic conversion
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
` (3 preceding siblings ...)
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes Swati Sharma
@ 2023-01-03 10:10 ` Patchwork
2023-01-03 11:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-01-03 10:10 UTC (permalink / raw)
To: Swati Sharma; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 5833 bytes --]
== Series Details ==
Series: Test cleanup and dynamic conversion
URL : https://patchwork.freedesktop.org/series/112358/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12537 -> IGTPW_8288
====================================================
Summary
-------
**WARNING**
Minor unknown changes coming with IGTPW_8288 need to be verified
manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_8288, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
Participating hosts (44 -> 44)
------------------------------
Additional (1): fi-kbl-soraka
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8288:
### IGT changes ###
#### Warnings ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][1] ([i915#5334]) -> [DMESG-FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
Known issues
------------
Here are the changes found in IGTPW_8288 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_gttfill@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271]) +7 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html
- fi-pnv-d510: [PASS][4] -> [FAIL][5] ([i915#7229])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/fi-pnv-d510/igt@gem_exec_gttfill@basic.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-pnv-d510/igt@gem_exec_gttfill@basic.html
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#4613]) +3 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][8] ([i915#1886])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827]) +7 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-kbl-soraka/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [PASS][10] -> [FAIL][11] ([i915#6298])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
- fi-bsw-n3050: [PASS][12] -> [FAIL][13] ([i915#6298])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> [FAIL][14] ([fdo#109271] / [i915#4312])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/fi-apl-guc/igt@runner@aborted.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3003]: https://gitlab.freedesktop.org/drm/intel/issues/3003
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#7077]: https://gitlab.freedesktop.org/drm/intel/issues/7077
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7105 -> IGTPW_8288
CI-20190529: 20190529
CI_DRM_12537: 12e6e0d4999e21d3b510487fb10646fdec3bb6b1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8288: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
IGT_7105: 305e8d105abf033cb850d1fb118e5cbfb6c9cd40 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@kms_atomic@atomic-plane-damage
-igt@kms_atomic@atomic_plane_damage
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
[-- Attachment #2: Type: text/html, Size: 6468 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for Test cleanup and dynamic conversion
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
` (4 preceding siblings ...)
2023-01-03 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Test cleanup and dynamic conversion Patchwork
@ 2023-01-03 11:44 ` Patchwork
5 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2023-01-03 11:44 UTC (permalink / raw)
To: Swati Sharma; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 34502 bytes --]
== Series Details ==
Series: Test cleanup and dynamic conversion
URL : https://patchwork.freedesktop.org/series/112358/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12537_full -> IGTPW_8288_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
Participating hosts (14 -> 11)
------------------------------
Missing (3): pig-skl-6260u pig-kbl-iris pig-glk-j5005
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8288_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@drm_fdinfo@idle@rcs0:
- {shard-rkl}: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-5/igt@drm_fdinfo@idle@rcs0.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-1/igt@drm_fdinfo@idle@rcs0.html
* igt@gem_exec_balancer@invalid-bonds:
- {shard-dg1}: [SKIP][3] ([i915#4036]) -> [SKIP][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-19/igt@gem_exec_balancer@invalid-bonds.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-12/igt@gem_exec_balancer@invalid-bonds.html
* igt@gem_exec_capture@capture-invisible@lmem0:
- {shard-dg1}: [SKIP][5] ([i915#6334]) -> [SKIP][6] +1 similar issue
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-13/igt@gem_exec_capture@capture-invisible@lmem0.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-14/igt@gem_exec_capture@capture-invisible@lmem0.html
* igt@gem_exec_capture@capture-invisible@smem0:
- {shard-rkl}: [SKIP][7] ([i915#6334]) -> [SKIP][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-5/igt@gem_exec_capture@capture-invisible@smem0.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-4/igt@gem_exec_capture@capture-invisible@smem0.html
* igt@i915_query@query-topology-unsupported:
- {shard-tglu-9}: NOTRUN -> [SKIP][9] +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-tglu-9/igt@i915_query@query-topology-unsupported.html
* igt@kms_atomic@plane-primary-overlay-mutable-zpos:
- {shard-dg1}: [SKIP][10] ([i915#404]) -> [SKIP][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-14/igt@kms_atomic@plane-primary-overlay-mutable-zpos.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-18/igt@kms_atomic@plane-primary-overlay-mutable-zpos.html
* igt@kms_atomic_transition@plane-all-modeset-transition:
- {shard-rkl}: [SKIP][12] ([i915#1845] / [i915#4098]) -> [SKIP][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@kms_atomic_transition@plane-all-modeset-transition.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@kms_atomic_transition@plane-all-modeset-transition.html
* igt@kms_plane@pixel-format@pipe-b-planes:
- {shard-rkl}: [PASS][14] -> [SKIP][15] +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-6/igt@kms_plane@pixel-format@pipe-b-planes.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-1/igt@kms_plane@pixel-format@pipe-b-planes.html
* igt@kms_plane@plane-position-hole-dpms@pipe-b-planes:
- {shard-rkl}: [SKIP][16] ([i915#1849]) -> [SKIP][17] +2 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@kms_plane@plane-position-hole-dpms@pipe-b-planes.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-3/igt@kms_plane@plane-position-hole-dpms@pipe-b-planes.html
* igt@kms_properties@plane-properties-legacy:
- {shard-rkl}: NOTRUN -> [SKIP][18]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-1/igt@kms_properties@plane-properties-legacy.html
- {shard-tglu}: NOTRUN -> [SKIP][19]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-tglu-6/igt@kms_properties@plane-properties-legacy.html
New tests
---------
New tests have been introduced between CI_DRM_12537_full and IGTPW_8288_full:
### New IGT tests (43) ###
* igt@kms_atomic@atomic-invalid-params@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@atomic-invalid-params@pipe-a-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@atomic-invalid-params@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@atomic-invalid-params@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@atomic-plane-damage:
- Statuses : 4 skip(s)
- Exec time: [0.0] s
* igt@kms_atomic@atomic-plane-damage@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params-fence@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params-fence@pipe-a-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params-fence@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params-fence@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params@pipe-a-hdmi-a-3:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@crtc-invalid-params@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-cursor-legacy@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-cursor-legacy@pipe-a-edp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-cursor-legacy@pipe-a-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-cursor-legacy@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-cursor-legacy@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-immutable-zpos@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-immutable-zpos@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-immutable-zpos@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-immutable-zpos@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params-fence@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params-fence@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params-fence@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params-fence@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params@pipe-a-edp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-invalid-params@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-overlay-legacy@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-overlay-legacy@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-overlay-legacy@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-overlay-legacy@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-primary-legacy@pipe-a-dp-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-primary-legacy@pipe-a-hdmi-a-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-primary-legacy@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@plane-primary-legacy@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@test-only@pipe-a-hdmi-a-1:
- Statuses : 2 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@test-only@pipe-a-hdmi-a-4:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_atomic@test-only@pipe-a-vga-1:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_8288_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_fair@basic-deadline:
- shard-glk: [PASS][20] -> [FAIL][21] ([i915#2846])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-glk3/igt@gem_exec_fair@basic-deadline.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk4/igt@gem_exec_fair@basic-deadline.html
* igt@gem_exec_fair@basic-none-solo@rcs0:
- shard-glk: NOTRUN -> [FAIL][22] ([i915#2842]) +1 similar issue
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk4/igt@gem_exec_fair@basic-none-solo@rcs0.html
* igt@gem_lmem_swapping@heavy-multi:
- shard-glk: NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#4613])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk2/igt@gem_lmem_swapping@heavy-multi.html
* igt@gem_lmem_swapping@parallel-random-engines:
- shard-apl: NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#4613]) +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl7/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@gem_pwrite@basic-exhaustion:
- shard-glk: NOTRUN -> [WARN][25] ([i915#2658])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk9/igt@gem_pwrite@basic-exhaustion.html
* igt@i915_pipe_stress@stress-xrgb8888-untiled:
- shard-apl: NOTRUN -> [FAIL][26] ([i915#7036])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl3/igt@i915_pipe_stress@stress-xrgb8888-untiled.html
* igt@i915_selftest@live@gt_heartbeat:
- shard-apl: [PASS][27] -> [DMESG-FAIL][28] ([i915#5334])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-apl3/igt@i915_selftest@live@gt_heartbeat.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl7/igt@i915_selftest@live@gt_heartbeat.html
* {igt@kms_atomic@atomic-plane-damage} (NEW):
- {shard-rkl}: NOTRUN -> [SKIP][29] ([i915#4098])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-2/igt@kms_atomic@atomic-plane-damage.html
- shard-snb: NOTRUN -> [SKIP][30] ([fdo#109271])
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-snb2/igt@kms_atomic@atomic-plane-damage.html
* igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#3886]) +4 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk1/igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_mc_ccs.html
* igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_rc_ccs_cc:
- shard-apl: NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#3886]) +3 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl2/igt@kms_ccs@pipe-c-crc-primary-basic-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_cdclk@mode-transition:
- shard-glk: NOTRUN -> [SKIP][33] ([fdo#109271]) +73 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk9/igt@kms_cdclk@mode-transition.html
* igt@kms_chamelium@hdmi-edid-read:
- shard-apl: NOTRUN -> [SKIP][34] ([fdo#109271] / [fdo#111827]) +5 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl3/igt@kms_chamelium@hdmi-edid-read.html
* igt@kms_chamelium@hdmi-hpd:
- shard-glk: NOTRUN -> [SKIP][35] ([fdo#109271] / [fdo#111827]) +6 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk8/igt@kms_chamelium@hdmi-hpd.html
* igt@kms_cursor_crc@cursor-sliding-32x32:
- shard-apl: NOTRUN -> [SKIP][36] ([fdo#109271]) +75 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl6/igt@kms_cursor_crc@cursor-sliding-32x32.html
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [PASS][37] -> [FAIL][38] ([i915#72])
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-glk8/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk8/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1:
- shard-glk: [PASS][39] -> [FAIL][40] ([i915#2122])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-glk7/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk3/igt@kms_flip@flip-vs-expired-vblank-interruptible@a-hdmi-a1.html
* igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf:
- shard-apl: NOTRUN -> [SKIP][41] ([fdo#109271] / [i915#658])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl7/igt@kms_psr2_sf@overlay-plane-move-continuous-exceed-sf.html
* igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area:
- shard-glk: NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#658]) +1 similar issue
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk7/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html
* igt@sysfs_clients@sema-50:
- shard-glk: NOTRUN -> [SKIP][43] ([fdo#109271] / [i915#2994]) +1 similar issue
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk1/igt@sysfs_clients@sema-50.html
#### Possible fixes ####
* igt@drm_read@empty-block:
- {shard-rkl}: [SKIP][44] ([i915#4098]) -> [PASS][45] +2 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@drm_read@empty-block.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@drm_read@empty-block.html
* igt@fbdev@write:
- {shard-rkl}: [SKIP][46] ([i915#2582]) -> [PASS][47]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@fbdev@write.html
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@fbdev@write.html
* igt@gem_create@hog-create@smem0:
- {shard-rkl}: [FAIL][48] ([i915#7679]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@gem_create@hog-create@smem0.html
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-5/igt@gem_create@hog-create@smem0.html
* igt@gem_eio@in-flight-suspend:
- {shard-rkl}: [FAIL][50] ([fdo#103375]) -> [PASS][51]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@gem_eio@in-flight-suspend.html
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-5/igt@gem_eio@in-flight-suspend.html
* igt@gem_eio@unwedge-stress:
- {shard-dg1}: [FAIL][52] ([i915#5784]) -> [PASS][53]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-16/igt@gem_eio@unwedge-stress.html
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-14/igt@gem_eio@unwedge-stress.html
* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][54] ([i915#2842]) -> [PASS][55]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-glk5/igt@gem_exec_fair@basic-pace-share@rcs0.html
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk5/igt@gem_exec_fair@basic-pace-share@rcs0.html
* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [FAIL][56] ([i915#2842]) -> [PASS][57]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-apl6/igt@gem_exec_fair@basic-pace-solo@rcs0.html
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl6/igt@gem_exec_fair@basic-pace-solo@rcs0.html
* igt@gem_exec_reloc@basic-gtt-wc-noreloc:
- {shard-rkl}: [SKIP][58] ([i915#3281]) -> [PASS][59] +7 similar issues
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@gem_exec_reloc@basic-gtt-wc-noreloc.html
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-5/igt@gem_exec_reloc@basic-gtt-wc-noreloc.html
* igt@gem_partial_pwrite_pread@writes-after-reads-uncached:
- shard-apl: [INCOMPLETE][60] ([i915#7708]) -> [PASS][61] +1 similar issue
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-apl2/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl1/igt@gem_partial_pwrite_pread@writes-after-reads-uncached.html
* igt@gem_set_tiling_vs_pwrite:
- {shard-rkl}: [SKIP][62] ([i915#3282]) -> [PASS][63] +3 similar issues
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@gem_set_tiling_vs_pwrite.html
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-5/igt@gem_set_tiling_vs_pwrite.html
* igt@gen9_exec_parse@allowed-single:
- shard-glk: [DMESG-WARN][64] ([i915#5566] / [i915#716]) -> [PASS][65]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-glk4/igt@gen9_exec_parse@allowed-single.html
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-glk6/igt@gen9_exec_parse@allowed-single.html
* igt@gen9_exec_parse@bb-start-param:
- {shard-rkl}: [SKIP][66] ([i915#2527]) -> [PASS][67] +2 similar issues
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@gen9_exec_parse@bb-start-param.html
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-5/igt@gen9_exec_parse@bb-start-param.html
* igt@i915_pm_rpm@fences-dpms:
- {shard-rkl}: [SKIP][68] ([i915#1849]) -> [PASS][69]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-4/igt@i915_pm_rpm@fences-dpms.html
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@i915_pm_rpm@fences-dpms.html
* igt@i915_pm_rpm@system-suspend-devices:
- {shard-rkl}: [FAIL][70] -> [PASS][71]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@i915_pm_rpm@system-suspend-devices.html
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-2/igt@i915_pm_rpm@system-suspend-devices.html
* igt@i915_selftest@live@gt_pm:
- {shard-rkl}: [DMESG-FAIL][72] ([i915#4258]) -> [PASS][73]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-6/igt@i915_selftest@live@gt_pm.html
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-3/igt@i915_selftest@live@gt_pm.html
* igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
- {shard-rkl}: [SKIP][74] ([i915#1845] / [i915#4098]) -> [PASS][75] +16 similar issues
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-5/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html
* igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size:
- shard-apl: [FAIL][76] ([i915#2346]) -> [PASS][77] +1 similar issue
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-apl2/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size.html
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-apl7/igt@kms_cursor_legacy@flip-vs-cursor@atomic-transitions-varying-size.html
* igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a4:
- {shard-dg1}: [FAIL][78] ([i915#79]) -> [PASS][79]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-12/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a4.html
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-12/igt@kms_flip@flip-vs-expired-vblank@c-hdmi-a4.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render:
- {shard-tglu}: [SKIP][80] ([i915#1849]) -> [PASS][81]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-tglu-4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-render.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite:
- {shard-rkl}: [SKIP][82] ([i915#1849] / [i915#4098]) -> [PASS][83] +13 similar issues
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite.html
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite.html
* igt@kms_psr@cursor_mmap_cpu:
- {shard-rkl}: [SKIP][84] ([i915#1072]) -> [PASS][85] +1 similar issue
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-4/igt@kms_psr@cursor_mmap_cpu.html
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@kms_psr@cursor_mmap_cpu.html
* igt@kms_universal_plane@cursor-fb-leak-pipe-a:
- {shard-rkl}: [SKIP][86] ([i915#1845] / [i915#4070] / [i915#4098]) -> [PASS][87]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-2/igt@kms_universal_plane@cursor-fb-leak-pipe-a.html
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@kms_universal_plane@cursor-fb-leak-pipe-a.html
* igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm:
- {shard-tglu}: [SKIP][88] ([i915#7651]) -> [PASS][89] +2 similar issues
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-tglu-6/igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm.html
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-tglu-4/igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm.html
* igt@perf@gen12-mi-rpc:
- {shard-rkl}: [SKIP][90] ([fdo#109289]) -> [PASS][91]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-5/igt@perf@gen12-mi-rpc.html
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-4/igt@perf@gen12-mi-rpc.html
* igt@prime_vgem@basic-fence-flip:
- {shard-rkl}: [SKIP][92] ([fdo#109295] / [i915#3708] / [i915#4098]) -> [PASS][93]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-rkl-3/igt@prime_vgem@basic-fence-flip.html
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-rkl-6/igt@prime_vgem@basic-fence-flip.html
* igt@syncobj_wait@wait-delayed-signal:
- {shard-dg1}: [DMESG-WARN][94] ([i915#1982]) -> [PASS][95]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12537/shard-dg1-14/igt@syncobj_wait@wait-delayed-signal.html
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/shard-dg1-12/igt@syncobj_wait@wait-delayed-signal.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2532]: https://gitlab.freedesktop.org/drm/intel/issues/2532
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
[i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
[i915#3536]: https://gitlab.freedesktop.org/drm/intel/issues/3536
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
[i915#4036]: https://gitlab.freedesktop.org/drm/intel/issues/4036
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
[i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6344]: https://gitlab.freedesktop.org/drm/intel/issues/6344
[i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
[i915#7036]: https://gitlab.freedesktop.org/drm/intel/issues/7036
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7679]: https://gitlab.freedesktop.org/drm/intel/issues/7679
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7707]: https://gitlab.freedesktop.org/drm/intel/issues/7707
[i915#7708]: https://gitlab.freedesktop.org/drm/intel/issues/7708
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7105 -> IGTPW_8288
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_12537: 12e6e0d4999e21d3b510487fb10646fdec3bb6b1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8288: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
IGT_7105: 305e8d105abf033cb850d1fb118e5cbfb6c9cd40 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8288/index.html
[-- Attachment #2: Type: text/html, Size: 32651 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
@ 2023-01-03 18:02 ` Kamil Konieczny
2023-01-30 6:00 ` Modem, Bhanuprakash
0 siblings, 1 reply; 12+ messages in thread
From: Kamil Konieczny @ 2023-01-03 18:02 UTC (permalink / raw)
To: igt-dev
Hi Swati,
On 2023-01-03 at 12:16:55 +0530, Swati Sharma wrote:
> Removed unnecessary newlines and comments. Corrected multi-line
> comments. Rephrased test description.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_atomic.c | 129 ++++++++++++++++++++++-----------------------
> 1 file changed, 63 insertions(+), 66 deletions(-)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index 2a3fb74be..cd1dd9c87 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -27,10 +27,6 @@
> * Pekka Paalanen <pekka.paalanen@collabora.co.uk>
> */
>
> -/*
> - * Testcase: testing atomic modesetting API
> - */
> -
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
> @@ -72,7 +68,6 @@ static inline int damage_rect_height(struct drm_mode_rect *r)
> return r->y2 - r->y1;
> }
>
> -
> static bool plane_filter(enum igt_atomic_plane_properties prop)
> {
> if ((1 << prop) & IGT_PLANE_COORD_CHANGED_MASK)
> @@ -119,8 +114,10 @@ static void plane_check_current_state(igt_plane_t *plane, const uint64_t *values
>
> plane_get_current_state(plane, current_values);
>
> - /* Legacy cursor ioctls create their own, unknowable, internal
> - * framebuffer which we can't reason about. */
> + /*
> + * Legacy cursor ioctls create their own, unknowable, internal
> + * framebuffer which we can't reason about.
> + */
> if (relax & PLANE_RELAX_FB)
> current_values[IGT_PLANE_FB_ID] = values[IGT_PLANE_FB_ID];
>
> @@ -145,9 +142,7 @@ static void plane_commit_atomic_err(igt_plane_t *plane,
> uint64_t current_values[IGT_NUM_PLANE_PROPS];
>
> plane_get_current_state(plane, current_values);
> -
> igt_assert_eq(-err, igt_display_try_commit2(plane->pipe->display, COMMIT_ATOMIC));
> -
imho the old one is more readable.
> plane_check_current_state(plane, current_values, relax);
> }
>
> @@ -186,9 +181,7 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
> if (pipe_values[IGT_CRTC_MODE_ID]) {
> mode_prop = drmModeGetPropertyBlob(pipe->display->drm_fd,
> pipe_values[IGT_CRTC_MODE_ID]);
> -
> igt_assert(mode_prop);
> -
here it is ok (two asserts one after another).
> igt_assert_eq(mode_prop->length,
> sizeof(struct drm_mode_modeinfo));
> mode = mode_prop->data;
> @@ -218,15 +211,16 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
>
> crtc_get_current_state(pipe, current_pipe_values);
>
> - /* Optionally relax the check for MODE_ID: using the legacy SetCrtc
> + /*
> + * Optionally relax the check for MODE_ID: using the legacy SetCrtc
> * API can potentially change MODE_ID even if the mode itself remains
> - * unchanged. */
> + * unchanged.
> + */
> if (relax & CRTC_RELAX_MODE && mode && current_pipe_values[IGT_CRTC_MODE_ID] &&
> current_pipe_values[IGT_CRTC_MODE_ID] != pipe_values[IGT_CRTC_MODE_ID]) {
> drmModePropertyBlobRes *cur_prop =
> drmModeGetPropertyBlob(pipe->display->drm_fd,
> current_pipe_values[IGT_CRTC_MODE_ID]);
> -
> igt_assert(cur_prop);
> igt_assert_eq(cur_prop->length, sizeof(struct drm_mode_modeinfo));
>
> @@ -521,8 +515,10 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
> igt_plane_set_fb(plane, &fb);
> igt_plane_set_position(plane, w/2, h/2);
>
> - /* Enable the overlay plane using the atomic API, and double-check
> - * state is what we think it should be. */
> + /*
> + * Enable the overlay plane using the atomic API, and double-check
> + * state is what we think it should be.
> + */
> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Disable the plane and check the state matches the old. */
> @@ -530,14 +526,18 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
> igt_plane_set_position(plane, 0, 0);
> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - /* Re-enable the plane through the legacy plane API, and verify through
> - * atomic. */
> + /*
> + * Re-enable the plane through the legacy plane API, and verify through
> + * atomic.
> + */
> igt_plane_set_fb(plane, &fb);
> igt_plane_set_position(plane, w/2, h/2);
> plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
>
> - /* Restore the plane to its original settings through the legacy plane
> - * API, and verify through atomic. */
> + /*
> + * Restore the plane to its original settings through the legacy plane
> + * API, and verify through atomic
> + */
> igt_plane_set_fb(plane, NULL);
> igt_plane_set_position(plane, 0, 0);
> plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
> @@ -554,8 +554,10 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
> fb->drm_format, I915_TILING_NONE,
> 0.2, 0.2, 0.2, &fb2);
>
> - /* Flip the primary plane using the atomic API, and double-check
> - * state is what we think it should be. */
> + /*
> + * Flip the primary plane using the atomic API, and double-check
> + * state is what we think it should be.
> + */
> igt_plane_set_fb(plane, &fb2);
> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> @@ -563,23 +565,30 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
> igt_plane_set_fb(plane, fb);
> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - /* Set the plane through the legacy CRTC/primary-plane API, and
> - * verify through atomic. */
> + /*
> + * Set the plane through the legacy CRTC/primary-plane API, and
> + * verify through atomic.
> + */
> igt_plane_set_fb(plane, &fb2);
> crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
>
> - /* Restore the plane to its original settings through the legacy CRTC
> - * API, and verify through atomic. */
> + /*
> + * Restore the plane to its original settings through the legacy CRTC
> + * API, and verify through atomic.
> + */
> igt_plane_set_fb(plane, fb);
> crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
>
> - /* Set the plane through the universal setplane API, and
> - * verify through atomic. */
> + /*
> + * Set the plane through the universal setplane API, and
> + * verify through atomic.
> + */
> igt_plane_set_fb(plane, &fb2);
> plane_commit(plane, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
> }
>
> -/* test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
> +/*
> + * Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
> * free-standing state objects and nothing else.
> */
> static void test_only(igt_pipe_t *pipe_obj,
> @@ -659,8 +668,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
> DRM_FORMAT_MOD_LINEAR,
> 0.0, 0.0, 0.0, &fb);
>
> - /* Flip the cursor plane using the atomic API, and double-check
> - * state is what we think it should be. */
> + /*
> + * Flip the cursor plane using the atomic API, and double-check
> + * state is what we think it should be.
> + */
> igt_plane_set_fb(cursor, &fb);
> igt_plane_set_position(cursor, x, y);
> plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> @@ -670,8 +681,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
> igt_plane_set_position(cursor, 0, 0);
> plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - /* Re-enable the plane through the legacy cursor API, and verify
> - * through atomic. */
> + /*
> + * Re-enable the plane through the legacy cursor API, and verify
> + * through atomic.
> + */
> igt_plane_set_fb(cursor, &fb);
> igt_plane_set_position(cursor, x, y);
> plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
> @@ -680,8 +693,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
> igt_plane_set_position(cursor, x - 16, y - 16);
> plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
>
> - /* Restore the plane to its original settings through the legacy cursor
> - * API, and verify through atomic. */
> + /*
> + * Restore the plane to its original settings through the legacy cursor
> + * API, and verify through atomic.
> + */
> igt_plane_set_fb(cursor, NULL);
> igt_plane_set_position(cursor, 0, 0);
> plane_commit(cursor, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
> @@ -761,7 +776,7 @@ static void plane_invalid_params_fence(igt_pipe_t *pipe,
> igt_plane_set_fence_fd(plane, pipe->display->drm_fd);
> plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
>
> - /* Valid fence_fd but invalid CRTC */
> + /* valid fence_fd but invalid CRTC */
New one introduced small letter at begin of sentence, so imho
old one was correct here.
> fence_fd = sw_sync_timeline_create_fence(timeline, 1);
>
> igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, ~0);
> @@ -817,7 +832,6 @@ static void crtc_invalid_params(igt_pipe_t *pipe,
> igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
> crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
>
> -
> /* Restore the CRTC and check the state matches the old. */
> igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> @@ -882,11 +896,11 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
>
> igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 1);
>
> - /* Configuration should be valid again */
> + /* configuration should be valid again */
Same here, keep old one.
> crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
> ATOMIC_RELAX_NONE, 0);
>
> - /* Set invalid prop */
> + /* set invalid prop */
Same here, keep old one.
> igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
>
> /* valid out fence but invalid prop on crtc */
> @@ -923,8 +937,10 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
> igt_assert(pipe->out_fence_fd != -1);
> }
>
> -/* Abuse the atomic ioctl directly in order to test various invalid conditions,
> - * which the libdrm wrapper won't allow us to create. */
> +/*
> + * Abuse the atomic ioctl directly in order to test various invalid conditions,
> + * which the libdrm wrapper won't allow us to create.
> + */
> static void atomic_invalid_params(igt_pipe_t *pipe,
> igt_plane_t *plane,
> igt_output_t *output,
> @@ -1007,7 +1023,6 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
> do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>
> /* Valid property, valid value. */
> -
> for (i = 0; i < ARRAY_SIZE(props_raw); i++) {
> props_raw[i] = pipe->props[IGT_CRTC_MODE_ID];
> values_raw[i] = pipe->values[IGT_CRTC_MODE_ID];
> @@ -1263,7 +1278,8 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> igt_remove_fb(pipe->display->drm_fd, &fb_2);
> }
>
> -static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output, igt_plane_t *primary, struct igt_fb *fb)
> +static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
> + igt_plane_t *primary, struct igt_fb *fb)
This change is not described in commit message.
> {
> igt_output_set_pipe(output, pipe);
> igt_plane_set_fb(primary, fb);
> @@ -1296,9 +1312,7 @@ igt_main
>
> igt_fixture {
> display.drm_fd = drm_open_driver_master(DRIVER_ANY);
> -
> kmstest_set_vt_graphics_mode();
> -
> igt_display_require(&display, display.drm_fd);
> igt_require(display.is_atomic);
> igt_display_require_output(&display);
> @@ -1308,9 +1322,7 @@ igt_main
>
> pipe_obj = &display.pipes[pipe];
> primary = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
> -
> mode = igt_output_get_mode(output);
> -
> igt_create_pattern_fb(display.drm_fd,
> mode->hdisplay, mode->vdisplay,
> plane_get_igt_format(primary),
> @@ -1322,9 +1334,7 @@ igt_main
> igt_subtest("plane-overlay-legacy") {
> igt_plane_t *overlay =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> -
Keep newline here.
> igt_require(overlay);
> -
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_overlay(pipe_obj, output, overlay);
> }
> @@ -1333,16 +1343,14 @@ igt_main
> "the legacy and atomic interfaces.");
> igt_subtest("plane-primary-legacy") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
Keep newline here.
> plane_primary(pipe_obj, primary, &fb);
> }
>
> - igt_describe("Verify that the overlay plane can cover the primary one (and "\
> + igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
imho old one was better.
> "vice versa) by changing their zpos property.");
> igt_subtest("plane-primary-overlay-mutable-zpos") {
> uint32_t format_primary = DRM_FORMAT_ARGB8888;
> uint32_t format_overlay = DRM_FORMAT_ARGB1555;
> -
Keep newline here.
> igt_plane_t *overlay =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> igt_require(overlay);
> @@ -1352,13 +1360,12 @@ igt_main
>
> igt_require(igt_plane_has_format_mod(primary, format_primary, 0x0));
> igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
> -
> igt_output_set_pipe(output, pipe);
> plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
> format_primary, format_overlay);
> }
>
> - igt_describe("Verify the reported zpos property of planes by making sure "\
> + igt_describe("Test to verify the reported zpos property of planes by making sure "\
imho old one was better.
> "only higher zpos planes cover the lower zpos ones.");
> igt_subtest("plane-immutable-zpos") {
> igt_output_set_pipe(output, pipe);
> @@ -1369,7 +1376,6 @@ igt_main
> "the free-standing state objects and nothing else.");
> igt_subtest("test-only") {
> atomic_clear(&display, pipe, primary, output);
> -
> test_only(pipe_obj, primary, output);
> }
>
> @@ -1378,9 +1384,7 @@ igt_main
> igt_subtest("plane-cursor-legacy") {
> igt_plane_t *cursor =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
> -
Keep newline here.
> igt_require(cursor);
> -
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_cursor(pipe_obj, output, cursor);
> }
> @@ -1388,28 +1392,24 @@ igt_main
> igt_describe("Test error handling when invalid plane parameters are passed");
> igt_subtest("plane-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> plane_invalid_params(pipe_obj, output, primary, &fb);
> }
>
> igt_describe("Test error handling when invalid plane fence parameters are passed");
> igt_subtest("plane-invalid-params-fence") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> plane_invalid_params_fence(pipe_obj, output, primary);
> }
>
> igt_describe("Test error handling when invalid crtc parameters are passed");
> igt_subtest("crtc-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> crtc_invalid_params(pipe_obj, output, primary, &fb);
> }
>
> igt_describe("Test error handling when invalid crtc fence parameters are passed");
> igt_subtest("crtc-invalid-params-fence") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
> }
>
> @@ -1418,16 +1418,13 @@ igt_main
> "allow us to create.");
> igt_subtest("atomic-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> atomic_invalid_params(pipe_obj, primary, output, &fb);
> }
>
> - igt_describe("Simple test cases to use FB_DAMAGE_CLIPS plane property");
> - igt_subtest("atomic_plane_damage") {
> + igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
imho old description is also good, all igt code is "testing something"
so maybe shorten this (?) like:
igt_describe("Simple checks of FB_DAMAGE_CLIPS plane property");
Maybe you want to keep it consistent with other descriptions ? Then it
may go with your change here like:
igt_describe("Test FB_DAMAGE_CLIPS plane property");
or
igt_describe("Use FB_DAMAGE_CLIPS plane property");
> + igt_subtest("atomic-plane-damage") {
-------------------- ^
This changes test name, it is not cosmetic one.
Regards,
Kamil
> igt_require(igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS));
> -
> atomic_setup(&display, pipe, output, primary, &fb);
> -
> atomic_plane_damage(pipe_obj, primary, &fb);
> }
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes
2023-01-03 18:02 ` Kamil Konieczny
@ 2023-01-30 6:00 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-01-30 6:00 UTC (permalink / raw)
To: Kamil Konieczny, igt-dev, Swati Sharma
On Tue-03-01-2023 11:32 pm, Kamil Konieczny wrote:
> Hi Swati,
>
> On 2023-01-03 at 12:16:55 +0530, Swati Sharma wrote:
>> Removed unnecessary newlines and comments. Corrected multi-line
>> comments. Rephrased test description.
>>
>> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
>> ---
>> tests/kms_atomic.c | 129 ++++++++++++++++++++++-----------------------
>> 1 file changed, 63 insertions(+), 66 deletions(-)
>>
>> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
>> index 2a3fb74be..cd1dd9c87 100644
>> --- a/tests/kms_atomic.c
>> +++ b/tests/kms_atomic.c
>> @@ -27,10 +27,6 @@
>> * Pekka Paalanen <pekka.paalanen@collabora.co.uk>
>> */
>>
>> -/*
>> - * Testcase: testing atomic modesetting API
>> - */
>> -
>> #include <unistd.h>
>> #include <stdlib.h>
>> #include <stdio.h>
>> @@ -72,7 +68,6 @@ static inline int damage_rect_height(struct drm_mode_rect *r)
>> return r->y2 - r->y1;
>> }
>>
>> -
>> static bool plane_filter(enum igt_atomic_plane_properties prop)
>> {
>> if ((1 << prop) & IGT_PLANE_COORD_CHANGED_MASK)
>> @@ -119,8 +114,10 @@ static void plane_check_current_state(igt_plane_t *plane, const uint64_t *values
>>
>> plane_get_current_state(plane, current_values);
>>
>> - /* Legacy cursor ioctls create their own, unknowable, internal
>> - * framebuffer which we can't reason about. */
>> + /*
>> + * Legacy cursor ioctls create their own, unknowable, internal
>> + * framebuffer which we can't reason about.
>> + */
>> if (relax & PLANE_RELAX_FB)
>> current_values[IGT_PLANE_FB_ID] = values[IGT_PLANE_FB_ID];
>>
>> @@ -145,9 +142,7 @@ static void plane_commit_atomic_err(igt_plane_t *plane,
>> uint64_t current_values[IGT_NUM_PLANE_PROPS];
>>
>> plane_get_current_state(plane, current_values);
>> -
>> igt_assert_eq(-err, igt_display_try_commit2(plane->pipe->display, COMMIT_ATOMIC));
>> -
>
> imho the old one is more readable.
>
>> plane_check_current_state(plane, current_values, relax);
>> }
>>
>> @@ -186,9 +181,7 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
>> if (pipe_values[IGT_CRTC_MODE_ID]) {
>> mode_prop = drmModeGetPropertyBlob(pipe->display->drm_fd,
>> pipe_values[IGT_CRTC_MODE_ID]);
>> -
>> igt_assert(mode_prop);
>> -
>
> here it is ok (two asserts one after another).
>
>> igt_assert_eq(mode_prop->length,
>> sizeof(struct drm_mode_modeinfo));
>> mode = mode_prop->data;
>> @@ -218,15 +211,16 @@ static void crtc_check_current_state(igt_pipe_t *pipe,
>>
>> crtc_get_current_state(pipe, current_pipe_values);
>>
>> - /* Optionally relax the check for MODE_ID: using the legacy SetCrtc
>> + /*
>> + * Optionally relax the check for MODE_ID: using the legacy SetCrtc
>> * API can potentially change MODE_ID even if the mode itself remains
>> - * unchanged. */
>> + * unchanged.
>> + */
>> if (relax & CRTC_RELAX_MODE && mode && current_pipe_values[IGT_CRTC_MODE_ID] &&
>> current_pipe_values[IGT_CRTC_MODE_ID] != pipe_values[IGT_CRTC_MODE_ID]) {
>> drmModePropertyBlobRes *cur_prop =
>> drmModeGetPropertyBlob(pipe->display->drm_fd,
>> current_pipe_values[IGT_CRTC_MODE_ID]);
>> -
>> igt_assert(cur_prop);
>> igt_assert_eq(cur_prop->length, sizeof(struct drm_mode_modeinfo));
>>
>> @@ -521,8 +515,10 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
>> igt_plane_set_fb(plane, &fb);
>> igt_plane_set_position(plane, w/2, h/2);
>>
>> - /* Enable the overlay plane using the atomic API, and double-check
>> - * state is what we think it should be. */
>> + /*
>> + * Enable the overlay plane using the atomic API, and double-check
>> + * state is what we think it should be.
>> + */
>> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>>
>> /* Disable the plane and check the state matches the old. */
>> @@ -530,14 +526,18 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
>> igt_plane_set_position(plane, 0, 0);
>> plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>>
>> - /* Re-enable the plane through the legacy plane API, and verify through
>> - * atomic. */
>> + /*
>> + * Re-enable the plane through the legacy plane API, and verify through
>> + * atomic.
>> + */
>> igt_plane_set_fb(plane, &fb);
>> igt_plane_set_position(plane, w/2, h/2);
>> plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
>>
>> - /* Restore the plane to its original settings through the legacy plane
>> - * API, and verify through atomic. */
>> + /*
>> + * Restore the plane to its original settings through the legacy plane
>> + * API, and verify through atomic
>> + */
>> igt_plane_set_fb(plane, NULL);
>> igt_plane_set_position(plane, 0, 0);
>> plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
>> @@ -554,8 +554,10 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
>> fb->drm_format, I915_TILING_NONE,
>> 0.2, 0.2, 0.2, &fb2);
>>
>> - /* Flip the primary plane using the atomic API, and double-check
>> - * state is what we think it should be. */
>> + /*
>> + * Flip the primary plane using the atomic API, and double-check
>> + * state is what we think it should be.
>> + */
>> igt_plane_set_fb(plane, &fb2);
>> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>>
>> @@ -563,23 +565,30 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
>> igt_plane_set_fb(plane, fb);
>> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>>
>> - /* Set the plane through the legacy CRTC/primary-plane API, and
>> - * verify through atomic. */
>> + /*
>> + * Set the plane through the legacy CRTC/primary-plane API, and
>> + * verify through atomic.
>> + */
>> igt_plane_set_fb(plane, &fb2);
>> crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
>>
>> - /* Restore the plane to its original settings through the legacy CRTC
>> - * API, and verify through atomic. */
>> + /*
>> + * Restore the plane to its original settings through the legacy CRTC
>> + * API, and verify through atomic.
>> + */
>> igt_plane_set_fb(plane, fb);
>> crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
>>
>> - /* Set the plane through the universal setplane API, and
>> - * verify through atomic. */
>> + /*
>> + * Set the plane through the universal setplane API, and
>> + * verify through atomic.
>> + */
>> igt_plane_set_fb(plane, &fb2);
>> plane_commit(plane, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
>> }
>>
>> -/* test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
>> +/*
>> + * Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
>> * free-standing state objects and nothing else.
>> */
>> static void test_only(igt_pipe_t *pipe_obj,
>> @@ -659,8 +668,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
>> DRM_FORMAT_MOD_LINEAR,
>> 0.0, 0.0, 0.0, &fb);
>>
>> - /* Flip the cursor plane using the atomic API, and double-check
>> - * state is what we think it should be. */
>> + /*
>> + * Flip the cursor plane using the atomic API, and double-check
>> + * state is what we think it should be.
>> + */
>> igt_plane_set_fb(cursor, &fb);
>> igt_plane_set_position(cursor, x, y);
>> plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>> @@ -670,8 +681,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
>> igt_plane_set_position(cursor, 0, 0);
>> plane_commit(cursor, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>>
>> - /* Re-enable the plane through the legacy cursor API, and verify
>> - * through atomic. */
>> + /*
>> + * Re-enable the plane through the legacy cursor API, and verify
>> + * through atomic.
>> + */
>> igt_plane_set_fb(cursor, &fb);
>> igt_plane_set_position(cursor, x, y);
>> plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
>> @@ -680,8 +693,10 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
>> igt_plane_set_position(cursor, x - 16, y - 16);
>> plane_commit(cursor, COMMIT_LEGACY, PLANE_RELAX_FB);
>>
>> - /* Restore the plane to its original settings through the legacy cursor
>> - * API, and verify through atomic. */
>> + /*
>> + * Restore the plane to its original settings through the legacy cursor
>> + * API, and verify through atomic.
>> + */
>> igt_plane_set_fb(cursor, NULL);
>> igt_plane_set_position(cursor, 0, 0);
>> plane_commit(cursor, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
>> @@ -761,7 +776,7 @@ static void plane_invalid_params_fence(igt_pipe_t *pipe,
>> igt_plane_set_fence_fd(plane, pipe->display->drm_fd);
>> plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
>>
>> - /* Valid fence_fd but invalid CRTC */
>> + /* valid fence_fd but invalid CRTC */
>
> New one introduced small letter at begin of sentence, so imho
> old one was correct here.
Generally, comment should start with the capital letter & end with the
period '.'
Example:
/* This is single line comment. */
/*
* This is the example of
* multiline comment.
*/
- Bhanu
>
>> fence_fd = sw_sync_timeline_create_fence(timeline, 1);
>>
>> igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, ~0);
>> @@ -817,7 +832,6 @@ static void crtc_invalid_params(igt_pipe_t *pipe,
>> igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
>> crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
>>
>> -
>> /* Restore the CRTC and check the state matches the old. */
>> igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
>> crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>> @@ -882,11 +896,11 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
>>
>> igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 1);
>>
>> - /* Configuration should be valid again */
>> + /* configuration should be valid again */
>
> Same here, keep old one.
>
>> crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
>> ATOMIC_RELAX_NONE, 0);
>>
>> - /* Set invalid prop */
>> + /* set invalid prop */
>
> Same here, keep old one.
>
>> igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
>>
>> /* valid out fence but invalid prop on crtc */
>> @@ -923,8 +937,10 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
>> igt_assert(pipe->out_fence_fd != -1);
>> }
>>
>> -/* Abuse the atomic ioctl directly in order to test various invalid conditions,
>> - * which the libdrm wrapper won't allow us to create. */
>> +/*
>> + * Abuse the atomic ioctl directly in order to test various invalid conditions,
>> + * which the libdrm wrapper won't allow us to create.
>> + */
>> static void atomic_invalid_params(igt_pipe_t *pipe,
>> igt_plane_t *plane,
>> igt_output_t *output,
>> @@ -1007,7 +1023,6 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
>> do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>>
>> /* Valid property, valid value. */
>> -
>> for (i = 0; i < ARRAY_SIZE(props_raw); i++) {
>> props_raw[i] = pipe->props[IGT_CRTC_MODE_ID];
>> values_raw[i] = pipe->values[IGT_CRTC_MODE_ID];
>> @@ -1263,7 +1278,8 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
>> igt_remove_fb(pipe->display->drm_fd, &fb_2);
>> }
>>
>> -static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output, igt_plane_t *primary, struct igt_fb *fb)
>> +static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
>> + igt_plane_t *primary, struct igt_fb *fb)
>
> This change is not described in commit message.
>
>> {
>> igt_output_set_pipe(output, pipe);
>> igt_plane_set_fb(primary, fb);
>> @@ -1296,9 +1312,7 @@ igt_main
>>
>> igt_fixture {
>> display.drm_fd = drm_open_driver_master(DRIVER_ANY);
>> -
>> kmstest_set_vt_graphics_mode();
>> -
>> igt_display_require(&display, display.drm_fd);
>> igt_require(display.is_atomic);
>> igt_display_require_output(&display);
>> @@ -1308,9 +1322,7 @@ igt_main
>>
>> pipe_obj = &display.pipes[pipe];
>> primary = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
>> -
>> mode = igt_output_get_mode(output);
>> -
>> igt_create_pattern_fb(display.drm_fd,
>> mode->hdisplay, mode->vdisplay,
>> plane_get_igt_format(primary),
>> @@ -1322,9 +1334,7 @@ igt_main
>> igt_subtest("plane-overlay-legacy") {
>> igt_plane_t *overlay =
>> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
>> -
>
> Keep newline here.
>
>> igt_require(overlay);
>> -
>> atomic_setup(&display, pipe, output, primary, &fb);
>> plane_overlay(pipe_obj, output, overlay);
>> }
>> @@ -1333,16 +1343,14 @@ igt_main
>> "the legacy and atomic interfaces.");
>> igt_subtest("plane-primary-legacy") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>
> Keep newline here.
>
>> plane_primary(pipe_obj, primary, &fb);
>> }
>>
>> - igt_describe("Verify that the overlay plane can cover the primary one (and "\
>> + igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
>
> imho old one was better.
>
>> "vice versa) by changing their zpos property.");
>> igt_subtest("plane-primary-overlay-mutable-zpos") {
>> uint32_t format_primary = DRM_FORMAT_ARGB8888;
>> uint32_t format_overlay = DRM_FORMAT_ARGB1555;
>> -
>
> Keep newline here.
>
>> igt_plane_t *overlay =
>> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
>> igt_require(overlay);
>> @@ -1352,13 +1360,12 @@ igt_main
>>
>> igt_require(igt_plane_has_format_mod(primary, format_primary, 0x0));
>> igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
>> -
>> igt_output_set_pipe(output, pipe);
>> plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
>> format_primary, format_overlay);
>> }
>>
>> - igt_describe("Verify the reported zpos property of planes by making sure "\
>> + igt_describe("Test to verify the reported zpos property of planes by making sure "\
>
> imho old one was better.
>
>> "only higher zpos planes cover the lower zpos ones.");
>> igt_subtest("plane-immutable-zpos") {
>> igt_output_set_pipe(output, pipe);
>> @@ -1369,7 +1376,6 @@ igt_main
>> "the free-standing state objects and nothing else.");
>> igt_subtest("test-only") {
>> atomic_clear(&display, pipe, primary, output);
>> -
>> test_only(pipe_obj, primary, output);
>> }
>>
>> @@ -1378,9 +1384,7 @@ igt_main
>> igt_subtest("plane-cursor-legacy") {
>> igt_plane_t *cursor =
>> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
>> -
>
> Keep newline here.
>
>> igt_require(cursor);
>> -
>> atomic_setup(&display, pipe, output, primary, &fb);
>> plane_cursor(pipe_obj, output, cursor);
>> }
>> @@ -1388,28 +1392,24 @@ igt_main
>> igt_describe("Test error handling when invalid plane parameters are passed");
>> igt_subtest("plane-invalid-params") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> plane_invalid_params(pipe_obj, output, primary, &fb);
>> }
>>
>> igt_describe("Test error handling when invalid plane fence parameters are passed");
>> igt_subtest("plane-invalid-params-fence") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> plane_invalid_params_fence(pipe_obj, output, primary);
>> }
>>
>> igt_describe("Test error handling when invalid crtc parameters are passed");
>> igt_subtest("crtc-invalid-params") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> crtc_invalid_params(pipe_obj, output, primary, &fb);
>> }
>>
>> igt_describe("Test error handling when invalid crtc fence parameters are passed");
>> igt_subtest("crtc-invalid-params-fence") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
>> }
>>
>> @@ -1418,16 +1418,13 @@ igt_main
>> "allow us to create.");
>> igt_subtest("atomic-invalid-params") {
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> atomic_invalid_params(pipe_obj, primary, output, &fb);
>> }
>>
>> - igt_describe("Simple test cases to use FB_DAMAGE_CLIPS plane property");
>> - igt_subtest("atomic_plane_damage") {
>> + igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
>
> imho old description is also good, all igt code is "testing something"
> so maybe shorten this (?) like:
> igt_describe("Simple checks of FB_DAMAGE_CLIPS plane property");
> Maybe you want to keep it consistent with other descriptions ? Then it
> may go with your change here like:
> igt_describe("Test FB_DAMAGE_CLIPS plane property");
> or
> igt_describe("Use FB_DAMAGE_CLIPS plane property");
>
>> + igt_subtest("atomic-plane-damage") {
> -------------------- ^
> This changes test name, it is not cosmetic one.
>
> Regards,
> Kamil
>
>> igt_require(igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS));
>> -
>> atomic_setup(&display, pipe, output, primary, &fb);
>> -
>> atomic_plane_damage(pipe_obj, primary, &fb);
>> }
>>
>> --
>> 2.25.1
>>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup Swati Sharma
@ 2023-01-30 6:35 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-01-30 6:35 UTC (permalink / raw)
To: Swati Sharma, igt-dev
Hi Swati,
On Tue-03-01-2023 12:16 pm, Swati Sharma wrote:
> Sanitize the system state before starting the subtest
> and avoid skips inside tests.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_atomic.c | 83 +++++++++++++++++++++++++++++-----------------
> 1 file changed, 53 insertions(+), 30 deletions(-)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index cd1dd9c87..e5502ce36 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -365,27 +365,23 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
>
> static void
> plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> - igt_output_t *output)
> + igt_output_t *output, igt_plane_t *primary, int n_planes)
> {
> cairo_t *cr;
> struct igt_fb fb_ref;
> - igt_plane_t *primary;
> drmModeModeInfo *mode;
> igt_pipe_crc_t *pipe_crc;
> igt_crc_t ref_crc, new_crc;
> int fb_id_lower, fb_id_upper;
> - int n_planes = pipe->n_planes;
> igt_plane_t *plane_ptr[n_planes];
> struct igt_fb fb_lower, fb_upper;
> uint32_t w_lower, h_lower, w_upper, h_upper;
>
> memset(plane_ptr, 0, n_planes * sizeof(igt_plane_t *));
>
> - igt_require(n_planes >= 2);
> igt_require_pipe_crc(display->drm_fd);
>
> mode = igt_output_get_mode(output);
> - primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
>
> /* for lower plane */
> w_lower = mode->hdisplay;
> @@ -591,17 +587,13 @@ static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *f
> * Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
> * free-standing state objects and nothing else.
> */
> -static void test_only(igt_pipe_t *pipe_obj,
> - igt_plane_t *primary,
> - igt_output_t *output)
> +static void test_only(igt_pipe_t *pipe_obj, igt_plane_t *primary,
> + igt_output_t *output, uint32_t format)
> {
> drmModeModeInfo *mode = igt_output_get_mode(output);
> - uint32_t format = plane_get_igt_format(primary);
> struct igt_fb fb;
> uint64_t old_plane_values[IGT_NUM_PLANE_PROPS], old_crtc_values[IGT_NUM_CRTC_PROPS];
>
> - igt_require(format != 0);
> -
> plane_get_current_state(primary, old_plane_values);
> crtc_get_current_state(pipe_obj, old_crtc_values);
>
> @@ -1153,7 +1145,7 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> * NOTE: This will result in no update on plane as damage is outside, so
> * will see no change on the screen.
> */
> - /* Reszie fb_1 to be bigger than plane */
> + /* Resize fb_1 to be bigger than plane */
> igt_remove_fb(pipe->display->drm_fd, &fb_1);
> igt_create_color_fb(pipe->display->drm_fd, fb->width * 2, fb->height,
> fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> @@ -1281,13 +1273,15 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
> igt_plane_t *primary, struct igt_fb *fb)
> {
> + igt_display_reset(display);
> igt_output_set_pipe(output, pipe);
> igt_plane_set_fb(primary, fb);
>
> crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> }
>
> -static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary, igt_output_t *output)
> +static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary,
> + igt_output_t *output, struct igt_fb *fb)
> {
> igt_plane_t *plane;
>
> @@ -1298,6 +1292,13 @@ static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *pr
>
> igt_output_set_pipe(output, PIPE_NONE);
> crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_remove_fb(display->drm_fd, fb);
> +}
> +
> +/* Returns true if plane supports zpos property. */
> +static bool has_zpos(igt_plane_t *plane)
> +{
> + return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
> }
>
> igt_main
> @@ -1334,9 +1335,12 @@ igt_main
> igt_subtest("plane-overlay-legacy") {
> igt_plane_t *overlay =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> - igt_require(overlay);
> + if (!overlay)
> + continue;
"continue" outside the loop?
imho the old one is better. Don't use "continue" outside the loop.
This comment is applicable for the all places in this patch.
> +
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_overlay(pipe_obj, output, overlay);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test for KMS atomic modesetting on primary plane and ensure coherency between "
> @@ -1344,39 +1348,52 @@ igt_main
> igt_subtest("plane-primary-legacy") {
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_primary(pipe_obj, primary, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
> "vice versa) by changing their zpos property.");
> igt_subtest("plane-primary-overlay-mutable-zpos") {
> - uint32_t format_primary = DRM_FORMAT_ARGB8888;
> - uint32_t format_overlay = DRM_FORMAT_ARGB1555;
Better to keep the old one, since it is easy to maintain.
Example:
Maybe in feature if we want to use different formats, we can simply
update at single place.
- Bhanu
> igt_plane_t *overlay =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> - igt_require(overlay);
> + if (!overlay)
> + continue;
>
> - igt_require(igt_plane_has_prop(primary, IGT_PLANE_ZPOS));
> - igt_require(igt_plane_has_prop(overlay, IGT_PLANE_ZPOS));
> + if (!has_zpos(primary) || !has_zpos(overlay))
> + continue;
> +
> + if (!igt_plane_has_format_mod(primary, DRM_FORMAT_ARGB8888, 0x0) ||
> + !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
> + continue;
>
> - igt_require(igt_plane_has_format_mod(primary, format_primary, 0x0));
> - igt_require(igt_plane_has_format_mod(overlay, format_overlay, 0x0));
> igt_output_set_pipe(output, pipe);
> plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
> - format_primary, format_overlay);
> + DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test to verify the reported zpos property of planes by making sure "\
> "only higher zpos planes cover the lower zpos ones.");
> igt_subtest("plane-immutable-zpos") {
> + int n_planes = pipe_obj->n_planes;
> +
> + if (n_planes < 2)
> + continue;
> +
> igt_output_set_pipe(output, pipe);
> - plane_immutable_zpos(&display, pipe_obj, output);
> + plane_immutable_zpos(&display, pipe_obj, output, primary, n_planes);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches "
> "the free-standing state objects and nothing else.");
> igt_subtest("test-only") {
> - atomic_clear(&display, pipe, primary, output);
> - test_only(pipe_obj, primary, output);
> + uint32_t format = plane_get_igt_format(primary);
> + if (!format)
> + continue;
> +
> + atomic_clear(&display, pipe, primary, output, &fb);
> + test_only(pipe_obj, primary, output, format);
> }
>
> igt_describe("Test for KMS atomic modesetting on cursor plane and ensure coherency between "
> @@ -1384,33 +1401,39 @@ igt_main
> igt_subtest("plane-cursor-legacy") {
> igt_plane_t *cursor =
> igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
> - igt_require(cursor);
> + if (!cursor)
> + continue;
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_cursor(pipe_obj, output, cursor);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test error handling when invalid plane parameters are passed");
> igt_subtest("plane-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_invalid_params(pipe_obj, output, primary, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test error handling when invalid plane fence parameters are passed");
> igt_subtest("plane-invalid-params-fence") {
> atomic_setup(&display, pipe, output, primary, &fb);
> plane_invalid_params_fence(pipe_obj, output, primary);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test error handling when invalid crtc parameters are passed");
> igt_subtest("crtc-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> crtc_invalid_params(pipe_obj, output, primary, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test error handling when invalid crtc fence parameters are passed");
> igt_subtest("crtc-invalid-params-fence") {
> atomic_setup(&display, pipe, output, primary, &fb);
> crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test abuse the atomic ioctl directly in order to test "
> @@ -1419,19 +1442,19 @@ igt_main
> igt_subtest("atomic-invalid-params") {
> atomic_setup(&display, pipe, output, primary, &fb);
> atomic_invalid_params(pipe_obj, primary, output, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
> igt_subtest("atomic-plane-damage") {
> - igt_require(igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS));
> + if (!igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS))
> + continue;
> atomic_setup(&display, pipe, output, primary, &fb);
> atomic_plane_damage(pipe_obj, primary, &fb);
> + atomic_clear(&display, pipe, primary, output, &fb);
> }
>
> igt_fixture {
> - atomic_clear(&display, pipe, primary, output);
> - igt_remove_fb(display.drm_fd, &fb);
> -
> igt_display_fini(&display);
> close(display.drm_fd);
> }
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic Swati Sharma
@ 2023-01-30 6:46 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-01-30 6:46 UTC (permalink / raw)
To: Swati Sharma, igt-dev
Hi Swati,
On Tue-03-01-2023 12:16 pm, Swati Sharma wrote:
> Subtests are converted to dynamic subtests. From the fixture
> for_each_pipe_with_valid_output() is removed and put at
> subtest level to give flexibility to user to test all pipes/output
> combinations. However, restricted to 1pipe/1output combination as originally
> written in the test. Code rework is done to accommodate above changes.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/kms_atomic.c | 881 ++++++++++++++++++++++++---------------------
> 1 file changed, 462 insertions(+), 419 deletions(-)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index e5502ce36..716045315 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -52,6 +52,15 @@
>
> IGT_TEST_DESCRIPTION("Test atomic modesetting API");
>
> +/* Common test data. */
> +typedef struct {
> + igt_display_t display;
> + igt_plane_t *primary;
> + igt_pipe_t *pipe;
> + int drm_fd;
> + igt_fb_t fb;
> +} data_t;
> +
> enum kms_atomic_check_relax {
> ATOMIC_RELAX_NONE = 0,
> CRTC_RELAX_MODE = (1 << 0),
> @@ -282,8 +291,7 @@ static uint32_t plane_get_igt_format(igt_plane_t *plane)
> }
>
> static void
> -plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
> - igt_plane_t *primary, igt_plane_t *overlay,
> +plane_primary_overlay_mutable_zpos(data_t *data, igt_output_t *output, igt_plane_t *overlay,
> uint32_t format_primary, uint32_t format_overlay)
> {
> struct igt_fb fb_primary, fb_overlay;
> @@ -298,17 +306,17 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
> uint32_t w_overlay = mode->hdisplay / 2;
> uint32_t h_overlay = mode->vdisplay / 2;
>
> - igt_create_color_pattern_fb(pipe->display->drm_fd,
> + igt_create_color_pattern_fb(data->drm_fd,
> w, h, format_primary, I915_TILING_NONE,
> 0.2, 0.2, 0.2, &fb_primary);
>
> - igt_create_color_pattern_fb(pipe->display->drm_fd,
> + igt_create_color_pattern_fb(data->drm_fd,
> w_overlay, h_overlay,
> format_overlay, I915_TILING_NONE,
> 0.2, 0.2, 0.2, &fb_overlay);
>
> /* Draw a hole in the overlay */
> - cr = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_overlay);
> + cr = igt_get_cairo_ctx(data->drm_fd, &fb_overlay);
> cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> igt_paint_color_alpha(cr, w_overlay / 4, h_overlay / 4,
> w_overlay / 2, h_overlay / 2,
> @@ -316,33 +324,33 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
> cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
> igt_put_cairo_ctx(cr);
>
> - igt_plane_set_fb(primary, &fb_primary);
> + igt_plane_set_fb(data->primary, &fb_primary);
> igt_plane_set_fb(overlay, &fb_overlay);
>
> igt_plane_set_position(overlay, w_overlay / 2, h_overlay / 2);
>
> - igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 0);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 0);
> igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
>
> igt_info("Committing with overlay on top, it has a hole "\
> "through which the primary should be seen\n");
> - plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
> + igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 0);
> igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
>
> - igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 1);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 1);
> igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 0);
>
> igt_info("Committing with primary on top, only the primary "\
> "should be visible\n");
> - plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 1);
> + igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 1);
> igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 0);
>
> /* Draw a hole in the primary exactly on top of the overlay plane */
> - cr = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_primary);
> + cr = igt_get_cairo_ctx(data->drm_fd, &fb_primary);
> cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
> igt_paint_color_alpha(cr, w_overlay / 2, h_overlay / 2,
> w_overlay, h_overlay,
> @@ -352,20 +360,19 @@ plane_primary_overlay_mutable_zpos(igt_pipe_t *pipe, igt_output_t *output,
>
> igt_info("Committing with a hole in the primary through "\
> "which the underlay should be seen\n");
> - plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* reset it back to initial state */
> - igt_plane_set_prop_value(primary, IGT_PLANE_ZPOS, 0);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_ZPOS, 0);
> igt_plane_set_prop_value(overlay, IGT_PLANE_ZPOS, 1);
> - plane_commit(primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - igt_assert_eq_u64(igt_plane_get_prop(primary, IGT_PLANE_ZPOS), 0);
> + igt_assert_eq_u64(igt_plane_get_prop(data->primary, IGT_PLANE_ZPOS), 0);
> igt_assert_eq_u64(igt_plane_get_prop(overlay, IGT_PLANE_ZPOS), 1);
> }
>
> static void
> -plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> - igt_output_t *output, igt_plane_t *primary, int n_planes)
> +plane_immutable_zpos(data_t *data, igt_output_t *output, enum pipe pipe, int n_planes)
> {
> cairo_t *cr;
> struct igt_fb fb_ref;
> @@ -378,8 +385,7 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> uint32_t w_lower, h_lower, w_upper, h_upper;
>
> memset(plane_ptr, 0, n_planes * sizeof(igt_plane_t *));
> -
> - igt_require_pipe_crc(display->drm_fd);
> + igt_require_pipe_crc(data->drm_fd);
>
> mode = igt_output_get_mode(output);
>
> @@ -391,36 +397,36 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> w_upper = 64;
> h_upper = 64;
>
> - igt_create_color_fb(display->drm_fd,
> + igt_create_color_fb(data->drm_fd,
> w_lower, h_lower,
> DRM_FORMAT_XRGB8888,
> I915_TILING_NONE,
> 0.0, 0.0, 0.0, &fb_ref);
>
> /* create reference image */
> - cr = igt_get_cairo_ctx(display->drm_fd, &fb_ref);
> + cr = igt_get_cairo_ctx(data->drm_fd, &fb_ref);
> igt_assert(cairo_status(cr) == 0);
> igt_paint_color(cr, 0, 0, w_lower, h_lower, 0.0, 0.0, 1.0);
> igt_paint_color(cr, w_upper / 2, h_upper / 2, w_upper, h_upper, 1.0, 1.0, 0.0);
> igt_put_cairo_ctx(cr);
> - igt_plane_set_fb(primary, &fb_ref);
> - igt_display_commit2(display, COMMIT_ATOMIC);
> + igt_plane_set_fb(data->primary, &fb_ref);
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
>
> /* create the pipe_crc object for this pipe */
> - pipe_crc = igt_pipe_crc_new(pipe->display->drm_fd, pipe->pipe,
> + pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
> IGT_PIPE_CRC_SOURCE_AUTO);
>
> /* get reference crc */
> igt_pipe_crc_start(pipe_crc);
> - igt_pipe_crc_get_current(display->drm_fd, pipe_crc, &ref_crc);
> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &ref_crc);
>
> - igt_plane_set_fb(primary, NULL);
> + igt_plane_set_fb(data->primary, NULL);
>
> for (int k = 0; k < n_planes; k++) {
> int zpos;
> igt_plane_t *temp;
>
> - temp = &display->pipes[pipe->pipe].planes[k];
> + temp = &data->display.pipes[pipe].planes[k];
>
> if (!igt_plane_has_prop(temp, IGT_PLANE_ZPOS))
> continue;
> @@ -431,14 +437,14 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> plane_ptr[zpos] = temp;
> }
>
> - fb_id_lower = igt_create_color_fb(display->drm_fd,
> + fb_id_lower = igt_create_color_fb(data->drm_fd,
> w_lower, h_lower,
> DRM_FORMAT_XRGB8888,
> I915_TILING_NONE,
> 0.0, 0.0, 1.0, &fb_lower);
> igt_assert(fb_id_lower);
>
> - fb_id_upper = igt_create_color_fb(display->drm_fd,
> + fb_id_upper = igt_create_color_fb(data->drm_fd,
> w_upper, h_upper,
> DRM_FORMAT_XRGB8888,
> I915_TILING_NONE,
> @@ -481,8 +487,8 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
>
> igt_info("Committing with the plane[%d] underneath "\
> "plane[%d]\n", i, (i + 1));
> - igt_display_commit2(display, COMMIT_ATOMIC);
> - igt_pipe_crc_get_current(pipe->display->drm_fd, pipe_crc, &new_crc);
> + igt_display_commit2(&data->display, COMMIT_ATOMIC);
> + igt_pipe_crc_get_current(data->drm_fd, pipe_crc, &new_crc);
>
> igt_assert_crc_equal(&ref_crc, &new_crc);
>
> @@ -490,22 +496,20 @@ plane_immutable_zpos(igt_display_t *display, igt_pipe_t *pipe,
> igt_plane_set_fb(plane_upper, NULL);
> }
>
> - igt_remove_fb(display->drm_fd, &fb_ref);
> - igt_remove_fb(display->drm_fd, &fb_lower);
> - igt_remove_fb(display->drm_fd, &fb_upper);
> + igt_remove_fb(data->drm_fd, &fb_ref);
> + igt_remove_fb(data->drm_fd, &fb_lower);
> + igt_remove_fb(data->drm_fd, &fb_upper);
> }
>
> -static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *plane)
> +static void plane_overlay(data_t *data, igt_output_t *output, igt_plane_t *plane,
> + uint32_t format)
> {
> - drmModeModeInfo *mode = igt_output_get_mode(output);
> - uint32_t format = plane_get_igt_format(plane);
> struct igt_fb fb;
> + drmModeModeInfo *mode = igt_output_get_mode(output);
> uint32_t w = mode->hdisplay / 2;
> uint32_t h = mode->vdisplay / 2;
>
> - igt_require(format != 0);
> -
> - igt_create_pattern_fb(pipe->display->drm_fd, w, h,
> + igt_create_pattern_fb(data->drm_fd, w, h,
> format, I915_TILING_NONE, &fb);
>
> igt_plane_set_fb(plane, &fb);
> @@ -538,110 +542,106 @@ static void plane_overlay(igt_pipe_t *pipe, igt_output_t *output, igt_plane_t *p
> igt_plane_set_position(plane, 0, 0);
> plane_commit(plane, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
>
> - igt_remove_fb(pipe->display->drm_fd, &fb);
> + igt_remove_fb(data->drm_fd, &fb);
> }
>
> -static void plane_primary(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *fb)
> +static void plane_primary(data_t *data)
> {
> struct igt_fb fb2;
>
> - igt_create_color_pattern_fb(pipe->display->drm_fd,
> - fb->width, fb->height,
> - fb->drm_format, I915_TILING_NONE,
> + igt_create_color_pattern_fb(data->drm_fd,
> + data->fb.width, data->fb.height,
> + data->fb.drm_format, I915_TILING_NONE,
> 0.2, 0.2, 0.2, &fb2);
>
> /*
> * Flip the primary plane using the atomic API, and double-check
> * state is what we think it should be.
> */
> - igt_plane_set_fb(plane, &fb2);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &fb2);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Restore the primary plane and check the state matches the old. */
> - igt_plane_set_fb(plane, fb);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Set the plane through the legacy CRTC/primary-plane API, and
> * verify through atomic.
> */
> - igt_plane_set_fb(plane, &fb2);
> - crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Restore the plane to its original settings through the legacy CRTC
> * API, and verify through atomic.
> */
> - igt_plane_set_fb(plane, fb);
> - crtc_commit(pipe, plane, COMMIT_LEGACY, CRTC_RELAX_MODE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + crtc_commit(data->pipe, data->primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
>
> /*
> * Set the plane through the universal setplane API, and
> * verify through atomic.
> */
> - igt_plane_set_fb(plane, &fb2);
> - plane_commit(plane, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &fb2);
> + plane_commit(data->primary, COMMIT_UNIVERSAL, ATOMIC_RELAX_NONE);
> }
>
> /*
> * Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches the
> * free-standing state objects and nothing else.
> */
> -static void test_only(igt_pipe_t *pipe_obj, igt_plane_t *primary,
> - igt_output_t *output, uint32_t format)
> +static void test_only(data_t *data, igt_output_t *output, enum pipe pipe, uint32_t format)
> {
> - drmModeModeInfo *mode = igt_output_get_mode(output);
> struct igt_fb fb;
> uint64_t old_plane_values[IGT_NUM_PLANE_PROPS], old_crtc_values[IGT_NUM_CRTC_PROPS];
> + drmModeModeInfo *mode = igt_output_get_mode(output);
>
> - plane_get_current_state(primary, old_plane_values);
> - crtc_get_current_state(pipe_obj, old_crtc_values);
> -
> + plane_get_current_state(data->primary, old_plane_values);
> + crtc_get_current_state(data->pipe, old_crtc_values);
> igt_assert(!old_crtc_values[IGT_CRTC_MODE_ID]);
>
> - igt_create_pattern_fb(pipe_obj->display->drm_fd,
> - mode->hdisplay, mode->vdisplay,
> - format, I915_TILING_NONE, &fb);
> - igt_plane_set_fb(primary, &fb);
> - igt_output_set_pipe(output, pipe_obj->pipe);
> + igt_create_pattern_fb(data->drm_fd,
> + mode->hdisplay, mode->vdisplay,
> + format, I915_TILING_NONE, &fb);
> + igt_plane_set_fb(data->primary, &fb);
> + igt_output_set_pipe(output, pipe);
>
> - igt_display_commit_atomic(pipe_obj->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> + igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>
> /* check the state, should still be old state */
> - crtc_check_current_state(pipe_obj, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
> - plane_check_current_state(primary, old_plane_values, ATOMIC_RELAX_NONE);
> + crtc_check_current_state(data->pipe, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
> + plane_check_current_state(data->primary, old_plane_values, ATOMIC_RELAX_NONE);
>
> /*
> * Enable the plane through the legacy CRTC/primary-plane API, and
> * verify through atomic.
> */
> - crtc_commit(pipe_obj, primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
> + crtc_commit(data->pipe, data->primary, COMMIT_LEGACY, CRTC_RELAX_MODE);
>
> /* Same for disable.. */
> - plane_get_current_state(primary, old_plane_values);
> - crtc_get_current_state(pipe_obj, old_crtc_values);
> + plane_get_current_state(data->primary, old_plane_values);
> + crtc_get_current_state(data->pipe, old_crtc_values);
>
> - igt_plane_set_fb(primary, NULL);
> + igt_plane_set_fb(data->primary, NULL);
> igt_output_set_pipe(output, PIPE_NONE);
>
> - igt_display_commit_atomic(pipe_obj->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> + igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>
> /* for extra stress, go through dpms off/on cycle */
> kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_OFF);
> kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_ON);
>
> /* check the state, should still be old state */
> - crtc_check_current_state(pipe_obj, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
> - plane_check_current_state(primary, old_plane_values, ATOMIC_RELAX_NONE);
> + crtc_check_current_state(data->pipe, old_crtc_values, old_plane_values, ATOMIC_RELAX_NONE);
> + plane_check_current_state(data->primary, old_plane_values, ATOMIC_RELAX_NONE);
>
> /* And disable the pipe and remove fb, test complete */
> - crtc_commit(pipe_obj, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> - igt_remove_fb(pipe_obj->display->drm_fd, &fb);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_remove_fb(data->drm_fd, &fb);
> }
>
> -static void plane_cursor(igt_pipe_t *pipe_obj,
> - igt_output_t *output,
> - igt_plane_t *cursor)
> +static void plane_cursor(data_t *data, igt_output_t *output, igt_plane_t *cursor)
> {
> drmModeModeInfo *mode = igt_output_get_mode(output);
> struct igt_fb fb;
> @@ -650,12 +650,12 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
> int y = mode->vdisplay / 2;
>
> /* Any kernel new enough for atomic, also has the cursor size caps. */
> - do_or_die(drmGetCap(pipe_obj->display->drm_fd,
> + do_or_die(drmGetCap(data->drm_fd,
> DRM_CAP_CURSOR_WIDTH, &width));
> - do_or_die(drmGetCap(pipe_obj->display->drm_fd,
> + do_or_die(drmGetCap(data->drm_fd,
> DRM_CAP_CURSOR_HEIGHT, &height));
>
> - igt_create_color_fb(pipe_obj->display->drm_fd,
> + igt_create_color_fb(data->drm_fd,
> width, height, DRM_FORMAT_ARGB8888,
> DRM_FORMAT_MOD_LINEAR,
> 0.0, 0.0, 0.0, &fb);
> @@ -694,69 +694,64 @@ static void plane_cursor(igt_pipe_t *pipe_obj,
> plane_commit(cursor, COMMIT_LEGACY, ATOMIC_RELAX_NONE);
> }
>
> -static void plane_invalid_params(igt_pipe_t *pipe,
> - igt_output_t *output,
> - igt_plane_t *plane,
> - struct igt_fb *fb)
> +static void plane_invalid_params(data_t *data, igt_output_t *output)
> {
> struct igt_fb fb2;
>
> /* Pass a series of invalid object IDs for the FB ID. */
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, plane->drm_plane->plane_id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->primary->drm_plane->plane_id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe->crtc_id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->pipe->crtc_id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, output->id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, output->id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, pipe->values[IGT_CRTC_MODE_ID]);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, data->pipe->values[IGT_CRTC_MODE_ID]);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> /* Valid, but invalid because CRTC_ID is set. */
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, 0);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_fb(plane, fb);
> - plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Pass a series of invalid object IDs for the CRTC ID. */
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, plane->drm_plane->plane_id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->primary->drm_plane->plane_id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, fb->fb_id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->fb.fb_id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, output->id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, output->id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe->values[IGT_CRTC_MODE_ID]);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->pipe->values[IGT_CRTC_MODE_ID]);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> /* Valid, but invalid because FB_ID is set. */
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, 0);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_plane_set_fb(plane, fb);
> - plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Create a framebuffer too small for the plane configuration. */
> - igt_create_pattern_fb(pipe->display->drm_fd,
> - fb->width - 1, fb->height - 1,
> - fb->drm_format, I915_TILING_NONE, &fb2);
> + igt_create_pattern_fb(data->drm_fd,
> + data->fb.width - 1, data->fb.height - 1,
> + data->fb.drm_format, I915_TILING_NONE, &fb2);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, fb2.fb_id);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, ENOSPC);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_FB_ID, fb2.fb_id);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, ENOSPC);
>
> /* Restore the primary plane and check the state matches the old. */
> - igt_plane_set_fb(plane, fb);
> - plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> }
>
> -static void plane_invalid_params_fence(igt_pipe_t *pipe,
> - igt_output_t *output,
> - igt_plane_t *plane)
> +static void plane_invalid_params_fence(data_t *data, igt_output_t *output)
> {
> int timeline, fence_fd;
>
> @@ -765,79 +760,73 @@ static void plane_invalid_params_fence(igt_pipe_t *pipe,
> timeline = sw_sync_timeline_create();
>
> /* invalid fence fd */
> - igt_plane_set_fence_fd(plane, pipe->display->drm_fd);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_fence_fd(data->primary, data->drm_fd);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> /* valid fence_fd but invalid CRTC */
> fence_fd = sw_sync_timeline_create_fence(timeline, 1);
>
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, ~0);
> - igt_plane_set_fence_fd(plane, fence_fd);
> - plane_commit_atomic_err(plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, ~0);
> + igt_plane_set_fence_fd(data->primary, fence_fd);
> + plane_commit_atomic_err(data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> sw_sync_timeline_inc(timeline, 1);
> - igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, pipe->crtc_id);
> - plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_prop_value(data->primary, IGT_PLANE_CRTC_ID, data->pipe->crtc_id);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> close(fence_fd);
> close(timeline);
> }
>
> -static void crtc_invalid_params(igt_pipe_t *pipe,
> - igt_output_t *output,
> - igt_plane_t *plane,
> - struct igt_fb *fb)
> +static void crtc_invalid_params(data_t *data, igt_output_t *output)
> {
> - uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
> + uint64_t old_mode_id = data->pipe->values[IGT_CRTC_MODE_ID];
> drmModeModeInfo *mode = igt_output_get_mode(output);
>
> /* Pass a series of invalid object IDs for the mode ID. */
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, plane->drm_plane->plane_id);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->primary->drm_plane->plane_id);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, pipe->crtc_id);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->pipe->crtc_id);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, output->id);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, output->id);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->fb.fb_id);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> /* Can we restore mode? */
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, old_mode_id);
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY, ATOMIC_RELAX_NONE, 0);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, old_mode_id);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY, ATOMIC_RELAX_NONE, 0);
>
> /*
> * TEST_ONLY cannot be combined with DRM_MODE_PAGE_FLIP_EVENT,
> * but DRM_MODE_PAGE_FLIP_EVENT will always generate EINVAL
> * without valid crtc, so test it here.
> */
> - crtc_commit_atomic_flags_err(pipe, plane,
> + crtc_commit_atomic_flags_err(data->pipe, data->primary,
> DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_PAGE_FLIP_EVENT,
> ATOMIC_RELAX_NONE, EINVAL);
>
> /* Create a blob which is the wrong size to be a valid mode. */
> - igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) - 1);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) - 1);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EINVAL);
> + igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode) + 1);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EINVAL);
>
> /* Restore the CRTC and check the state matches the old. */
> - igt_pipe_obj_replace_prop_blob(pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_pipe_obj_replace_prop_blob(data->pipe, IGT_CRTC_MODE_ID, mode, sizeof(*mode));
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> }
>
> -static void crtc_invalid_params_fence(igt_pipe_t *pipe,
> - igt_output_t *output,
> - igt_plane_t *plane,
> - struct igt_fb *fb)
> +static void crtc_invalid_params_fence(data_t *data, igt_output_t *output)
> {
> int timeline, fence_fd;
> void *map;
> const ptrdiff_t PAGE_SIZE = sysconf(_SC_PAGE_SIZE);
> - uint64_t old_mode_id = pipe->values[IGT_CRTC_MODE_ID];
> + uint64_t old_mode_id = data->pipe->values[IGT_CRTC_MODE_ID];
>
> igt_require_sw_sync();
>
> @@ -847,98 +836,94 @@ static void crtc_invalid_params_fence(igt_pipe_t *pipe,
> map = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
> igt_assert(map != MAP_FAILED);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
> munmap(map, PAGE_SIZE);
>
> /* invalid out_fence_ptr */
> map = mmap(NULL, PAGE_SIZE, PROT_EXEC, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
> igt_assert(map != MAP_FAILED);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
> munmap(map, PAGE_SIZE);
>
> /* invalid out_fence_ptr */
> map = mmap(NULL, PAGE_SIZE, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
> igt_assert(map != MAP_FAILED);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> - crtc_commit_atomic_err(pipe, plane, ATOMIC_RELAX_NONE, EFAULT);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, (ptrdiff_t)map);
> + crtc_commit_atomic_err(data->pipe, data->primary, ATOMIC_RELAX_NONE, EFAULT);
> munmap(map, PAGE_SIZE);
>
> /* valid in fence but not allowed prop on crtc */
> fence_fd = sw_sync_timeline_create_fence(timeline, 1);
> - igt_plane_set_fence_fd(plane, fence_fd);
> + igt_plane_set_fence_fd(data->primary, fence_fd);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 0);
> - igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_ACTIVE, 0);
> + igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
>
> - crtc_commit_atomic_flags_err(pipe, plane, 0, ATOMIC_RELAX_NONE, EINVAL);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, 0, ATOMIC_RELAX_NONE, EINVAL);
>
> /* valid out fence ptr and flip event but not allowed prop on crtc */
> - igt_pipe_request_out_fence(pipe);
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
> + igt_pipe_request_out_fence(data->pipe);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
> ATOMIC_RELAX_NONE, EINVAL);
>
> /* valid flip event but not allowed prop on crtc */
> - igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
> + igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
> ATOMIC_RELAX_NONE, EINVAL);
>
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_ACTIVE, 1);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_ACTIVE, 1);
>
> /* configuration should be valid again */
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY,
> ATOMIC_RELAX_NONE, 0);
>
> /* set invalid prop */
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, fb->fb_id);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, data->fb.fb_id);
>
> /* valid out fence but invalid prop on crtc */
> - igt_pipe_request_out_fence(pipe);
> - crtc_commit_atomic_flags_err(pipe, plane, 0,
> + igt_pipe_request_out_fence(data->pipe);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, 0,
> ATOMIC_RELAX_NONE, EINVAL);
>
> /* valid out fence ptr and flip event but invalid prop on crtc */
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
> ATOMIC_RELAX_NONE, EINVAL);
>
> /* valid page flip event but invalid prop on crtc */
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_PAGE_FLIP_EVENT,
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_PAGE_FLIP_EVENT,
> ATOMIC_RELAX_NONE, EINVAL);
>
> /* successful TEST_ONLY with fences set */
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_MODE_ID, old_mode_id);
> - crtc_commit_atomic_flags_err(pipe, plane, DRM_MODE_ATOMIC_TEST_ONLY,
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_MODE_ID, old_mode_id);
> + crtc_commit_atomic_flags_err(data->pipe, data->primary, DRM_MODE_ATOMIC_TEST_ONLY,
> ATOMIC_RELAX_NONE, 0);
> - igt_assert(pipe->out_fence_fd == -1);
> + igt_assert(data->pipe->out_fence_fd == -1);
> close(fence_fd);
> close(timeline);
>
> /* reset fences */
> - igt_plane_set_fence_fd(plane, -1);
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR, 0);
> - igt_pipe_obj_clear_prop_changed(pipe, IGT_CRTC_OUT_FENCE_PTR);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fence_fd(data->primary, -1);
> + igt_pipe_obj_set_prop_value(data->pipe, IGT_CRTC_OUT_FENCE_PTR, 0);
> + igt_pipe_obj_clear_prop_changed(data->pipe, IGT_CRTC_OUT_FENCE_PTR);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* out fence ptr but not page flip event */
> - igt_pipe_request_out_fence(pipe);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_pipe_request_out_fence(data->pipe);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> - igt_assert(pipe->out_fence_fd != -1);
> + igt_assert(data->pipe->out_fence_fd != -1);
> }
>
> /*
> * Abuse the atomic ioctl directly in order to test various invalid conditions,
> * which the libdrm wrapper won't allow us to create.
> */
> -static void atomic_invalid_params(igt_pipe_t *pipe,
> - igt_plane_t *plane,
> - igt_output_t *output,
> - struct igt_fb *fb)
> +static void atomic_invalid_params(data_t *data, igt_output_t *output)
> {
> - igt_display_t *display = pipe->display;
> struct drm_mode_atomic ioc;
> uint32_t obj_raw[16]; /* array of objects (sized by count_objs) */
> uint32_t num_props_raw[16]; /* array of num props per obj (ditto) */
> @@ -949,7 +934,7 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
> memset(&ioc, 0, sizeof(ioc));
>
> /* An empty request should do nothing. */
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
> obj_raw[i] = 0;
> @@ -966,132 +951,132 @@ static void atomic_invalid_params(igt_pipe_t *pipe,
> ioc.prop_values_ptr = (uintptr_t) values_raw;
>
> /* Valid pointers, but still should copy nothing. */
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Valid noop, but with event set should fail. */
> ioc.flags = DRM_MODE_PAGE_FLIP_EVENT;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
>
> /* Nonsense flags. */
> ioc.flags = 0xdeadbeef;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
>
> ioc.flags = 0;
> /* Safety check that flags is reset properly. */
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Reserved/MBZ. */
> ioc.reserved = 1;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EINVAL);
> ioc.reserved = 0;
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Zero is not a valid object ID. */
> ioc.count_objs = ARRAY_SIZE(obj_raw);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>
> /* Invalid object type (not a thing we can set properties on). */
> ioc.count_objs = 1;
> - obj_raw[0] = pipe->values[IGT_CRTC_MODE_ID];
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> - obj_raw[0] = fb->fb_id;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + obj_raw[0] = data->pipe->values[IGT_CRTC_MODE_ID];
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + obj_raw[0] = data->fb.fb_id;
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>
> /* Filled object but with no properties; no-op. */
> for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
> - obj_raw[i] = pipe->crtc_id;
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + obj_raw[i] = data->pipe->crtc_id;
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Pass in all sorts of things other than the property ID. */
> num_props_raw[0] = 1;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> - props_raw[0] = pipe->crtc_id;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> - props_raw[0] = plane->drm_plane->plane_id;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + props_raw[0] = data->pipe->crtc_id;
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + props_raw[0] = data->primary->drm_plane->plane_id;
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> props_raw[0] = output->id;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> - props_raw[0] = pipe->values[IGT_CRTC_MODE_ID];
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + props_raw[0] = data->pipe->values[IGT_CRTC_MODE_ID];
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>
> /* Valid property, valid value. */
> for (i = 0; i < ARRAY_SIZE(props_raw); i++) {
> - props_raw[i] = pipe->props[IGT_CRTC_MODE_ID];
> - values_raw[i] = pipe->values[IGT_CRTC_MODE_ID];
> + props_raw[i] = data->pipe->props[IGT_CRTC_MODE_ID];
> + values_raw[i] = data->pipe->values[IGT_CRTC_MODE_ID];
> }
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Setting the same thing multiple times is OK. */
> for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
> num_props_raw[i] = ARRAY_SIZE(props_raw) / ARRAY_SIZE(obj_raw);
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> ioc.count_objs = ARRAY_SIZE(obj_raw);
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Pass a series of outlandish addresses. */
> ioc.objs_ptr = 0;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> ioc.objs_ptr = (uintptr_t) obj_raw;
> ioc.count_props_ptr = 0;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> ioc.count_props_ptr = (uintptr_t) num_props_raw;
> ioc.props_ptr = 0;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> ioc.props_ptr = (uintptr_t) props_raw;
> ioc.prop_values_ptr = 0;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> ioc.prop_values_ptr = (uintptr_t) values_raw;
> - do_ioctl(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
> + do_ioctl(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc);
>
> /* Attempt to overflow and/or trip various boundary conditions. */
> ioc.count_objs = UINT32_MAX / sizeof(uint32_t);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, ENOENT);
>
> ioc.count_objs = ARRAY_SIZE(obj_raw);
> ioc.objs_ptr = UINT64_MAX - sizeof(uint32_t);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> ioc.count_objs = 1;
> ioc.objs_ptr = UINT64_MAX - sizeof(uint32_t);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> num_props_raw[0] = UINT32_MAX / sizeof(uint32_t);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> num_props_raw[0] = UINT32_MAX - 1;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
>
> for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
> num_props_raw[i] = (UINT32_MAX / ARRAY_SIZE(obj_raw)) + 1;
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> for (i = 0; i < ARRAY_SIZE(obj_raw); i++)
> num_props_raw[i] = ARRAY_SIZE(props_raw) / ARRAY_SIZE(obj_raw);
> - do_ioctl_err(display->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> + do_ioctl_err(data->drm_fd, DRM_IOCTL_MODE_ATOMIC, &ioc, EFAULT);
> }
>
> -static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt_fb *fb)
> +static void atomic_plane_damage(data_t *data)
> {
> struct drm_mode_rect damage[2];
> struct igt_fb fb_1, fb_2;
> cairo_t *cr_1, *cr_2;
>
> /* Color fb with white rect at center */
> - igt_create_color_fb(pipe->display->drm_fd, fb->width, fb->height,
> - fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> + igt_create_color_fb(data->drm_fd, data->fb.width, data->fb.height,
> + data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> &fb_1);
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> - igt_paint_color(cr_1, fb->width/4, fb->height/4, fb->width/2,
> - fb->height/2, 1.0, 1.0, 1.0);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> + igt_paint_color(cr_1, data->fb.width/4, data->fb.height/4, data->fb.width/2,
> + data->fb.height/2, 1.0, 1.0, 1.0);
> igt_put_cairo_ctx(cr_1);
>
> /*
> * Flip the primary plane to new color fb using atomic API and check the
> * state.
> */
> - igt_plane_set_fb(plane, &fb_1);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &fb_1);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Change the color of top left clip from center and issue plane update
> @@ -1099,35 +1084,35 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> */
> damage[0].x1 = 0;
> damage[0].y1 = 0;
> - damage[0].x2 = fb->width/2;
> - damage[0].y2 = fb->height/2;
> + damage[0].x2 = data->fb.width/2;
> + damage[0].y2 = data->fb.height/2;
>
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
> damage_rect_width(&damage[0]),
> damage_rect_height(&damage[0]), 1.0, 0, 0);
> igt_put_cairo_ctx(cr_1);
>
> - igt_plane_set_fb(plane, &fb_1);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_1);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage));
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Change the color of top left and bottom right clip from center and
> * issue plane update with damage and verify the state.
> */
> - igt_create_color_fb(pipe->display->drm_fd, fb->width, fb->height,
> - fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> + igt_create_color_fb(data->drm_fd, data->fb.width, data->fb.height,
> + data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> &fb_2);
>
> - damage[0].x1 = fb->width/2;
> + damage[0].x1 = data->fb.width/2;
> damage[0].y1 = 0;
> - damage[0].x2 = fb->width;
> - damage[0].y2 = fb->height/2;
> + damage[0].x2 = data->fb.width;
> + damage[0].y2 = data->fb.height/2;
>
> - cr_2 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_2);
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> + cr_2 = igt_get_cairo_ctx(data->drm_fd, &fb_2);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> cairo_set_source_surface(cr_2, fb_1.cairo_surface, 0, 0);
> cairo_paint(cr_2);
> igt_paint_color(cr_2, damage[0].x1, damage[0].y1,
> @@ -1135,10 +1120,10 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> damage_rect_height(&damage[0]), 0, 1.0, 0);
> igt_put_cairo_ctx(cr_1);
> igt_put_cairo_ctx(cr_2);
> - igt_plane_set_fb(plane, &fb_2);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_2);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage));
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Issue plane update with damage with a clip outside of plane src.
> @@ -1146,18 +1131,18 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> * will see no change on the screen.
> */
> /* Resize fb_1 to be bigger than plane */
> - igt_remove_fb(pipe->display->drm_fd, &fb_1);
> - igt_create_color_fb(pipe->display->drm_fd, fb->width * 2, fb->height,
> - fb->drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> + igt_remove_fb(data->drm_fd, &fb_1);
> + igt_create_color_fb(data->drm_fd, data->fb.width * 2, data->fb.height,
> + data->fb.drm_format, I915_TILING_NONE, 0.2, 0.2, 0.2,
> &fb_1);
>
> - damage[0].x1 = fb->width;
> + damage[0].x1 = data->fb.width;
> damage[0].y1 = 0;
> - damage[0].x2 = fb->width + fb->width/2;
> - damage[0].y2 = fb->height/2;
> + damage[0].x2 = data->fb.width + data->fb.width/2;
> + damage[0].y2 = data->fb.height/2;
>
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> - cr_2 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_2);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> + cr_2 = igt_get_cairo_ctx(data->drm_fd, &fb_2);
> cairo_set_source_surface(cr_1, fb_2.cairo_surface, 0, 0);
> cairo_paint(cr_1);
> igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
> @@ -1165,13 +1150,13 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> damage_rect_height(&damage[0]), 0, 1.0, 0);
> igt_put_cairo_ctx(cr_2);
> igt_put_cairo_ctx(cr_1);
> - igt_plane_set_fb(plane, &fb_1);
> - igt_plane_set_size(plane, fb->width, fb->height);
> - igt_fb_set_position(&fb_1, plane, 0, 0);
> - igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_1);
> + igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
> + igt_fb_set_position(&fb_1, data->primary, 0, 0);
> + igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage));
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Issue a plane update with damage with a clip that overlap with plane
> @@ -1179,23 +1164,23 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> * NOTE: Here drm core should take care of intersecting the clip to
> * plane src.
> */
> - damage[0].x1 = fb->width/2;
> + damage[0].x1 = data->fb.width/2;
> damage[0].y1 = 0;
> - damage[0].x2 = fb->width/2 + fb->width;
> - damage[0].y2 = fb->height/2;
> + damage[0].x2 = data->fb.width/2 + data->fb.width;
> + damage[0].y2 = data->fb.height/2;
>
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
> damage_rect_width(&damage[0]),
> damage_rect_height(&damage[0]), 1.0, 1.0, 0);
> igt_put_cairo_ctx(cr_1);
> - igt_plane_set_fb(plane, &fb_1);
> - igt_plane_set_size(plane, fb->width, fb->height);
> - igt_fb_set_position(&fb_1, plane, 0, 0);
> - igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_1);
> + igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
> + igt_fb_set_position(&fb_1, data->primary, 0, 0);
> + igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage));
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Issue a plane update with damage with two clips one inside plane src
> @@ -1203,16 +1188,16 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> * NOTE: This will result in plane update with clip inside plane src.
> */
> damage[0].x1 = 0;
> - damage[0].y1 = fb->height/2;
> - damage[0].x2 = fb->width/2;
> - damage[0].y2 = fb->height;
> + damage[0].y1 = data->fb.height/2;
> + damage[0].x2 = data->fb.width/2;
> + damage[0].y2 = data->fb.height;
>
> - damage[1].x1 = fb->width + fb->width/2;
> - damage[1].y1 = fb->height/2;
> - damage[1].x2 = fb->width * 2;
> - damage[1].y2 = fb->height;
> + damage[1].x1 = data->fb.width + data->fb.width/2;
> + damage[1].y1 = data->fb.height/2;
> + damage[1].x2 = data->fb.width * 2;
> + damage[1].y2 = data->fb.height;
>
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
> damage_rect_width(&damage[0]),
> damage_rect_height(&damage[0]), 0, 1.0, 1.0);
> @@ -1220,13 +1205,13 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> damage_rect_width(&damage[1]),
> damage_rect_height(&damage[1]), 0, 1.0, 0);
> igt_put_cairo_ctx(cr_1);
> - igt_plane_set_fb(plane, &fb_1);
> - igt_plane_set_size(plane, fb->width, fb->height);
> - igt_fb_set_position(&fb_1, plane, 0, 0);
> - igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_1);
> + igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
> + igt_fb_set_position(&fb_1, data->primary, 0, 0);
> + igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage) * 2);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /*
> * Issue a plane update with overlapping damage clips. White rect in
> @@ -1237,15 +1222,15 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> */
> damage[0].x1 = 0;
> damage[0].y1 = 0;
> - damage[0].x2 = fb->width/2;
> - damage[0].y2 = fb->height/2;
> + damage[0].x2 = data->fb.width/2;
> + damage[0].y2 = data->fb.height/2;
>
> - damage[1].x1 = fb->width/4;
> - damage[1].y1 = fb->height/4;
> - damage[1].x2 = fb->width/4 + fb->width/2;
> - damage[1].y2 = fb->height/4 + fb->height/2;
> + damage[1].x1 = data->fb.width/4;
> + damage[1].y1 = data->fb.height/4;
> + damage[1].x2 = data->fb.width/4 + data->fb.width/2;
> + damage[1].y2 = data->fb.height/4 + data->fb.height/2;
>
> - cr_1 = igt_get_cairo_ctx(pipe->display->drm_fd, &fb_1);
> + cr_1 = igt_get_cairo_ctx(data->drm_fd, &fb_1);
> igt_paint_color(cr_1, damage[0].x1, damage[0].y1,
> damage_rect_width(&damage[0]),
> damage_rect_height(&damage[0]), 1.0, 0, 0);
> @@ -1253,46 +1238,55 @@ static void atomic_plane_damage(igt_pipe_t *pipe, igt_plane_t *plane, struct igt
> damage_rect_width(&damage[1]),
> damage_rect_height(&damage[1]), 1.0, 1.0, 1.0);
> igt_put_cairo_ctx(cr_1);
> - igt_plane_set_fb(plane, &fb_1);
> - igt_plane_set_size(plane, fb->width, fb->height);
> - igt_fb_set_position(&fb_1, plane, 0, 0);
> - igt_fb_set_size(&fb_1, plane, fb->width, fb->height);
> - igt_plane_replace_prop_blob(plane, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> + igt_plane_set_fb(data->primary, &fb_1);
> + igt_plane_set_size(data->primary, data->fb.width, data->fb.height);
> + igt_fb_set_position(&fb_1, data->primary, 0, 0);
> + igt_fb_set_size(&fb_1, data->primary, data->fb.width, data->fb.height);
> + igt_plane_replace_prop_blob(data->primary, IGT_PLANE_FB_DAMAGE_CLIPS, damage,
> sizeof(*damage) * 2);
> - crtc_commit(pipe, plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + crtc_commit(data->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Restore the primary plane */
> - igt_plane_set_fb(plane, fb);
> - plane_commit(plane, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_plane_set_fb(data->primary, &data->fb);
> + plane_commit(data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
>
> /* Remove the fb created for this test */
> - igt_remove_fb(pipe->display->drm_fd, &fb_1);
> - igt_remove_fb(pipe->display->drm_fd, &fb_2);
> + igt_remove_fb(data->drm_fd, &fb_1);
> + igt_remove_fb(data->drm_fd, &fb_2);
> }
>
> -static void atomic_setup(igt_display_t *display, enum pipe pipe, igt_output_t *output,
> - igt_plane_t *primary, struct igt_fb *fb)
> +static void atomic_setup(data_t *data, enum pipe pipe, igt_output_t *output)
> {
> - igt_display_reset(display);
> + drmModeModeInfo *mode;
> + igt_display_reset(&data->display);
> igt_output_set_pipe(output, pipe);
> - igt_plane_set_fb(primary, fb);
>
> - crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + data->primary = igt_pipe_get_plane_type(&data->display.pipes[pipe], DRM_PLANE_TYPE_PRIMARY);
> + data->pipe = &data->display.pipes[pipe];
> + mode = igt_output_get_mode(output);
> +
> + igt_create_pattern_fb(data->drm_fd,
> + mode->hdisplay, mode->vdisplay,
> + plane_get_igt_format(data->primary),
> + DRM_FORMAT_MOD_LINEAR, &data->fb);
> +
> + igt_plane_set_fb(data->primary, &data->fb);
> +
> + crtc_commit(data->primary->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> }
>
> -static void atomic_clear(igt_display_t *display, enum pipe pipe, igt_plane_t *primary,
> - igt_output_t *output, struct igt_fb *fb)
> +static void atomic_clear(data_t *data, enum pipe pipe, igt_output_t *output)
> {
> igt_plane_t *plane;
>
> - for_each_plane_on_pipe(display, pipe, plane) {
> + for_each_plane_on_pipe(&data->display, pipe, plane) {
> igt_plane_set_fb(plane, NULL);
> igt_plane_set_position(plane, 0, 0);
> }
>
> igt_output_set_pipe(output, PIPE_NONE);
> - crtc_commit(primary->pipe, primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> - igt_remove_fb(display->drm_fd, fb);
> + crtc_commit(data->primary->pipe, data->primary, COMMIT_ATOMIC, ATOMIC_RELAX_NONE);
> + igt_remove_fb(data->drm_fd, &data->fb);
> }
>
> /* Returns true if plane supports zpos property. */
> @@ -1303,159 +1297,208 @@ static bool has_zpos(igt_plane_t *plane)
>
> igt_main
> {
> - igt_display_t display;
> enum pipe pipe = PIPE_NONE;
> - igt_pipe_t *pipe_obj;
> igt_output_t *output = NULL;
> - igt_plane_t *primary = NULL;
> - drmModeModeInfo *mode;
> - struct igt_fb fb;
> + data_t data = { 0 };
>
> igt_fixture {
> - display.drm_fd = drm_open_driver_master(DRIVER_ANY);
> + data.drm_fd = drm_open_driver_master(DRIVER_ANY);
> kmstest_set_vt_graphics_mode();
> - igt_display_require(&display, display.drm_fd);
> - igt_require(display.is_atomic);
> - igt_display_require_output(&display);
> -
> - for_each_pipe_with_valid_output(&display, pipe, output)
> - break;
> -
> - pipe_obj = &display.pipes[pipe];
> - primary = igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_PRIMARY);
> - mode = igt_output_get_mode(output);
> - igt_create_pattern_fb(display.drm_fd,
> - mode->hdisplay, mode->vdisplay,
> - plane_get_igt_format(primary),
> - DRM_FORMAT_MOD_LINEAR, &fb);
> + igt_display_require(&data.display, data.drm_fd);
> + igt_require(data.display.is_atomic);
> + igt_display_require_output(&data.display);
> }
>
> igt_describe("Test for KMS atomic modesetting on overlay plane and ensure coherency between "
> "the legacy and atomic interfaces.");
> - igt_subtest("plane-overlay-legacy") {
> - igt_plane_t *overlay =
> - igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> - if (!overlay)
> - continue;
> + igt_subtest_with_dynamic("plane-overlay-legacy") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
for_each_pipe_with_valid_output() iterates all possible combinations of
pipe/output.
In this test, I understood that we'll abort if we find a valid
pipe/output combo. But in patch [4/4], we are providing the facility to
run on all possible combinations.
Will it be overkill? how about using for_each_pipe_with_single_output()?
- Bhanu
> + igt_plane_t *overlay =
> + igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
> + uint32_t format = plane_get_igt_format(overlay);
>
> - atomic_setup(&display, pipe, output, primary, &fb);
> - plane_overlay(pipe_obj, output, overlay);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + if (!overlay || !format)
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_overlay(&data, output, overlay, format);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test for KMS atomic modesetting on primary plane and ensure coherency between "
> "the legacy and atomic interfaces.");
> - igt_subtest("plane-primary-legacy") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - plane_primary(pipe_obj, primary, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("plane-primary-legacy") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_primary(&data);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test to verify that the overlay plane can cover the primary one (and "\
> "vice versa) by changing their zpos property.");
> - igt_subtest("plane-primary-overlay-mutable-zpos") {
> - igt_plane_t *overlay =
> - igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY);
> - if (!overlay)
> - continue;
> -
> - if (!has_zpos(primary) || !has_zpos(overlay))
> - continue;
> + igt_subtest_with_dynamic("plane-primary-overlay-mutable-zpos") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_plane_t *overlay =
> + igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_OVERLAY);
>
> - if (!igt_plane_has_format_mod(primary, DRM_FORMAT_ARGB8888, 0x0) ||
> - !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
> - continue;
> + atomic_setup(&data, pipe, output);
>
> - igt_output_set_pipe(output, pipe);
> - plane_primary_overlay_mutable_zpos(pipe_obj, output, primary, overlay,
> - DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + if (!overlay)
> + continue;
> + if (!has_zpos(data.primary) || !has_zpos(overlay))
> + continue;
> + if (!igt_plane_has_format_mod(data.primary, DRM_FORMAT_ARGB8888, 0x0) ||
> + !igt_plane_has_format_mod(overlay, DRM_FORMAT_ARGB1555, 0x0))
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + plane_primary_overlay_mutable_zpos(&data, output, overlay,
> + DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test to verify the reported zpos property of planes by making sure "\
> "only higher zpos planes cover the lower zpos ones.");
> - igt_subtest("plane-immutable-zpos") {
> - int n_planes = pipe_obj->n_planes;
> + igt_subtest_with_dynamic("plane-immutable-zpos") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + int n_planes = data.display.pipes[pipe].n_planes;
>
> - if (n_planes < 2)
> - continue;
> -
> - igt_output_set_pipe(output, pipe);
> - plane_immutable_zpos(&display, pipe_obj, output, primary, n_planes);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + if (n_planes < 2)
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_immutable_zpos(&data, output, pipe, n_planes);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test to ensure that DRM_MODE_ATOMIC_TEST_ONLY really only touches "
> "the free-standing state objects and nothing else.");
> - igt_subtest("test-only") {
> - uint32_t format = plane_get_igt_format(primary);
> - if (!format)
> - continue;
> + igt_subtest_with_dynamic("test-only") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + uint32_t format;
> +
> + atomic_setup(&data, pipe, output);
> + format = plane_get_igt_format(data.primary);
>
> - atomic_clear(&display, pipe, primary, output, &fb);
> - test_only(pipe_obj, primary, output, format);
> + if (!format)
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_clear(&data, pipe, output);
> + test_only(&data, output, pipe, format);
> + }
> + break;
> + }
> }
>
> igt_describe("Test for KMS atomic modesetting on cursor plane and ensure coherency between "
> "legacy and atomic interfaces.");
> - igt_subtest("plane-cursor-legacy") {
> - igt_plane_t *cursor =
> - igt_pipe_get_plane_type(pipe_obj, DRM_PLANE_TYPE_CURSOR);
> - if (!cursor)
> - continue;
> - atomic_setup(&display, pipe, output, primary, &fb);
> - plane_cursor(pipe_obj, output, cursor);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("plane-cursor-legacy") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_plane_t *cursor =
> + igt_pipe_get_plane_type(&data.display.pipes[pipe], DRM_PLANE_TYPE_CURSOR);
> +
> + if (!cursor)
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_cursor(&data, output, cursor);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test error handling when invalid plane parameters are passed");
> - igt_subtest("plane-invalid-params") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - plane_invalid_params(pipe_obj, output, primary, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("plane-invalid-params") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_invalid_params(&data, output);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test error handling when invalid plane fence parameters are passed");
> - igt_subtest("plane-invalid-params-fence") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - plane_invalid_params_fence(pipe_obj, output, primary);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("plane-invalid-params-fence") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + plane_invalid_params_fence(&data, output);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test error handling when invalid crtc parameters are passed");
> - igt_subtest("crtc-invalid-params") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - crtc_invalid_params(pipe_obj, output, primary, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("crtc-invalid-params") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + crtc_invalid_params(&data, output);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test error handling when invalid crtc fence parameters are passed");
> - igt_subtest("crtc-invalid-params-fence") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - crtc_invalid_params_fence(pipe_obj, output, primary, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("crtc-invalid-params-fence") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + crtc_invalid_params_fence(&data, output);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test abuse the atomic ioctl directly in order to test "
> "various invalid conditions which the libdrm wrapper won't "
> "allow us to create.");
> - igt_subtest("atomic-invalid-params") {
> - atomic_setup(&display, pipe, output, primary, &fb);
> - atomic_invalid_params(pipe_obj, primary, output, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("atomic-invalid-params") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_setup(&data, pipe, output);
> + atomic_invalid_params(&data, output);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_describe("Test to use FB_DAMAGE_CLIPS plane property");
> - igt_subtest("atomic-plane-damage") {
> - if (!igt_plane_has_prop(primary, IGT_PLANE_FB_DAMAGE_CLIPS))
> - continue;
> - atomic_setup(&display, pipe, output, primary, &fb);
> - atomic_plane_damage(pipe_obj, primary, &fb);
> - atomic_clear(&display, pipe, primary, output, &fb);
> + igt_subtest_with_dynamic("atomic-plane-damage") {
> + for_each_pipe_with_valid_output(&data.display, pipe, output) {
> + atomic_setup(&data, pipe, output);
> +
> + if (!igt_plane_has_prop(data.primary, IGT_PLANE_FB_DAMAGE_CLIPS))
> + continue;
> + igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), igt_output_name(output)) {
> + atomic_plane_damage(&data);
> + atomic_clear(&data, pipe, output);
> + }
> + break;
> + }
> }
>
> igt_fixture {
> - igt_display_fini(&display);
> - close(display.drm_fd);
> + igt_display_fini(&data.display);
> + close(data.drm_fd);
> }
> }
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes Swati Sharma
@ 2023-01-30 6:55 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2023-01-30 6:55 UTC (permalink / raw)
To: Swati Sharma, igt-dev
On Tue-03-01-2023 12:16 pm, Swati Sharma wrote:
> Extra flag in command line is passed to run subtests on all pipe/output combinations.
> However, by default execution is restricted to 1pipe/1output
> combination.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> tests/kms_atomic.c | 56 +++++++++++++++++++++++++++++++++++-----------
> 1 file changed, 43 insertions(+), 13 deletions(-)
>
> diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
> index 716045315..6272e2aa6 100644
> --- a/tests/kms_atomic.c
> +++ b/tests/kms_atomic.c
> @@ -52,6 +52,8 @@
>
> IGT_TEST_DESCRIPTION("Test atomic modesetting API");
>
> +static bool all_pipes = false;
> +
> /* Common test data. */
> typedef struct {
> igt_display_t display;
> @@ -1295,7 +1297,23 @@ static bool has_zpos(igt_plane_t *plane)
> return igt_plane_has_prop(plane, IGT_PLANE_ZPOS);
> }
>
> -igt_main
> +static int opt_handler(int opt, int opt_index, void *_data)
> +{
> + switch (opt) {
> + case 'e':
> + all_pipes = true;
> + break;
> + default:
> + return IGT_OPT_HANDLER_ERROR;
> + }
> +
> + return IGT_OPT_HANDLER_SUCCESS;
> +}
> +
> +static const char *help_str =
> + " -e \tRun on all pipes. (By default subtests will run only on one pipe)\n";
> +
> +igt_main_args("e", NULL, help_str, opt_handler, NULL)
> {
> enum pipe pipe = PIPE_NONE;
> igt_output_t *output = NULL;
> @@ -1324,7 +1342,8 @@ igt_main
> plane_overlay(&data, output, overlay, format);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1337,7 +1356,8 @@ igt_main
> plane_primary(&data);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1362,7 +1382,8 @@ igt_main
> DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB1555);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1379,7 +1400,8 @@ igt_main
> plane_immutable_zpos(&data, output, pipe, n_planes);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1398,7 +1420,8 @@ igt_main
> atomic_clear(&data, pipe, output);
> test_only(&data, output, pipe, format);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1416,7 +1439,8 @@ igt_main
> plane_cursor(&data, output, cursor);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1428,7 +1452,8 @@ igt_main
> plane_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1440,7 +1465,8 @@ igt_main
> plane_invalid_params_fence(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1452,7 +1478,8 @@ igt_main
> crtc_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1464,7 +1491,8 @@ igt_main
> crtc_invalid_params_fence(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1478,7 +1506,8 @@ igt_main
> atomic_invalid_params(&data, output);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
> @@ -1493,7 +1522,8 @@ igt_main
> atomic_plane_damage(&data);
> atomic_clear(&data, pipe, output);
> }
> - break;
> + if (!all_pipes)
> + break;
> }
> }
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-01-30 6:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 6:46 [igt-dev] [PATCH i-g-t 0/4] Test cleanup and dynamic conversion Swati Sharma
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_atomic: Cosmetic changes Swati Sharma
2023-01-03 18:02 ` Kamil Konieczny
2023-01-30 6:00 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_atomic: Test cleanup Swati Sharma
2023-01-30 6:35 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_atomic: Convert tests to dynamic Swati Sharma
2023-01-30 6:46 ` Modem, Bhanuprakash
2023-01-03 6:46 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_atomic: Add flexibility to run tests on all pipes Swati Sharma
2023-01-30 6:55 ` Modem, Bhanuprakash
2023-01-03 10:10 ` [igt-dev] ✓ Fi.CI.BAT: success for Test cleanup and dynamic conversion Patchwork
2023-01-03 11:44 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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.