From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t v2 1/3] tests/kms_setmode: Drop invalid-clone-single-crtc-stealing subtest
Date: Tue, 23 Jun 2026 13:39:24 +0530 [thread overview]
Message-ID: <20260623080927.3216500-2-jeevan.b@intel.com> (raw)
In-Reply-To: <20260623080927.3216500-1-jeevan.b@intel.com>
Remove the TEST_STEALING subtest and all related code, as it relies on legacy
drmModeSetCrtc() “CRTC stealing” behavior that is not compatible with the
atomic display API, where all modeset changes are applied atomically and
explicitly. This cleanup removes the enum, helper functions, documentation,
related logic, and test registration, aligning the test suite with the atomic
model and isolating the removal from ongoing conversion work.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/kms_setmode.c | 66 ++++++---------------------------------------
1 file changed, 8 insertions(+), 58 deletions(-)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 3adc4534c..5236078e0 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -64,10 +64,6 @@
* SUBTEST: invalid-clone-single-crtc
* Description: Tests the mode by cloning the single crtc by iterating through all
* invalid crtc/connector combinations
- *
- * SUBTEST: invalid-clone-single-crtc-stealing
- * Description: Tests the stealing mode by cloning the single crtc by iterating
- * through all invalid crtc/connector combinations
*/
#define MAX_CONNECTORS 10
@@ -112,7 +108,6 @@ enum test_flags {
TEST_CLONE = 0x02,
TEST_SINGLE_CRTC_CLONE = 0x04,
TEST_EXCLUSIVE_CRTC_CLONE = 0x08,
- TEST_STEALING = 0x10,
TEST_TIMINGS = 0x20,
};
@@ -471,47 +466,6 @@ static void cleanup_crtcs(struct crtc_config *crtcs, int crtc_count)
}
}
-static uint32_t *get_connector_ids(struct crtc_config *crtc)
-{
- uint32_t *ids;
- int i;
-
- ids = malloc(sizeof(*ids) * crtc->connector_count);
- igt_assert(ids);
- for (i = 0; i < crtc->connector_count; i++)
- ids[i] = crtc->cconfs[i].connector->connector_id;
-
- return ids;
-}
-
-static int test_stealing(int fd, struct crtc_config *crtc, uint32_t *ids)
-{
- int i, ret = 0;
-
- if (!crtc->connector_count)
- return drmModeSetCrtc(fd, crtc->crtc_id,
- crtc->fb_info.fb_id, 0, 0,
- ids, crtc->connector_count, &crtc->mode);
-
- for (i = 0; i < crtc->connector_count; ++i) {
- ret = drmModeSetCrtc(fd, crtc->crtc_id,
- crtc->fb_info.fb_id, 0, 0,
- &ids[i], 1, &crtc->mode);
-
- igt_assert_eq(ret, 0);
-
- ret = drmModeSetCrtc(fd, crtc->crtc_id,
- crtc->fb_info.fb_id, 0, 0,
- ids, crtc->connector_count, &crtc->mode);
-
- /* This should fail with -EINVAL */
- if (!ret)
- return 0;
- }
-
- return ret;
-}
-
#define frame_time(km) (1000.0 * (km)->htotal * (km)->vtotal / (km)->clock)
#define line_time(km) (1000.0 * (km)->htotal / (km)->clock)
@@ -689,13 +643,14 @@ retry:
create_fb_for_crtc(crtc, &crtc->fb_info);
paint_fb(&crtc->fb_info, tconf->name, crtc_strs, crtc_count, i);
- ids = get_connector_ids(crtc);
- if (tconf->flags & TEST_STEALING)
- ret = test_stealing(drm_fd, crtc, ids);
- else
- ret = drmModeSetCrtc(drm_fd, crtc->crtc_id,
- crtc->fb_info.fb_id, 0, 0, ids,
- crtc->connector_count, &crtc->mode);
+ ids = malloc(sizeof(*ids) * crtc->connector_count);
+ igt_assert(ids);
+ for (int j = 0; j < crtc->connector_count; j++)
+ ids[j] = crtc->cconfs[j].connector->connector_id;
+
+ ret = drmModeSetCrtc(drm_fd, crtc->crtc_id,
+ crtc->fb_info.fb_id, 0, 0, ids,
+ crtc->connector_count, &crtc->mode);
if (is_intel_device(drm_fd))
intel_drrs_disable_crtc_index(drm_fd, crtc->crtc_idx);
@@ -973,9 +928,6 @@ static void test_combinations(const struct test_config *tconf,
int i;
int crtc_count = get_crtc_count(tconf->resources->count_crtcs, extended);
- if (connector_count > 2 && (tconf->flags & TEST_STEALING))
- return;
-
igt_assert(tconf->resources);
connector_combs.capacity = pow(tconf->resources->count_connectors,
@@ -1075,8 +1027,6 @@ int igt_main_args("det:", NULL, help_str, opt_handler, NULL)
"invalid-clone-exclusive-crtc" },
{ TEST_CLONE | TEST_EXCLUSIVE_CRTC_CLONE,
"clone-exclusive-crtc" },
- { TEST_INVALID | TEST_CLONE | TEST_SINGLE_CRTC_CLONE | TEST_STEALING,
- "invalid-clone-single-crtc-stealing" }
};
int i;
--
2.43.0
next prev parent reply other threads:[~2026-06-23 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 8:09 [PATCH i-g-t v2 0/3] tests/kms_setmode: Convert to igt_display atomic API Jeevan B
2026-06-23 8:09 ` Jeevan B [this message]
2026-06-23 8:09 ` [PATCH i-g-t v2 2/3] tests/kms_setmode: Convert modeset path to " Jeevan B
2026-06-23 8:26 ` Jani Nikula
2026-06-23 8:09 ` [PATCH i-g-t v2 3/3] tests/kms_setmode: Use public igt_display helper APIs Jeevan B
2026-06-23 8:31 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623080927.3216500-2-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox