From: Nidhi Gupta <nidhi1.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Nidhi Gupta <nidhi1.gupta@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/i915/kms_fbcon_fbt: Execute test on multiple modes
Date: Tue, 9 May 2023 07:32:28 +0530 [thread overview]
Message-ID: <20230509020228.25780-1-nidhi1.gupta@intel.com> (raw)
In present situation the test is executing only for single mode,
execute the test for the next mode supported by the connector if
the first one is invalid to enable fbc.
Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
tests/i915/kms_fbcon_fbt.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/i915/kms_fbcon_fbt.c
index 831ec867..543426d1 100644
--- a/tests/i915/kms_fbcon_fbt.c
+++ b/tests/i915/kms_fbcon_fbt.c
@@ -37,6 +37,7 @@ IGT_TEST_DESCRIPTION("Test the relationship between fbcon and the frontbuffer "
"tracking infrastructure.");
#define MAX_CONNECTORS 32
+int j = 0;
struct drm_info {
int fd, debugfs_fd;
@@ -164,14 +165,14 @@ typedef bool (*connector_possible_fn)(drmModeConnectorPtr connector);
static void set_mode_for_one_screen(struct drm_info *drm,
connector_possible_fn connector_possible)
{
- int i, rc;
+ int rc;
uint32_t crtc_id;
drmModeModeInfoPtr mode;
uint32_t buffer_id;
drmModeConnectorPtr c = NULL;
- for (i = 0; i < drm->res->count_connectors; i++) {
- c = drm->connectors[i];
+ for (;j < drm->res->count_connectors; j++) {
+ c = drm->connectors[j];
if (c->connection == DRM_MODE_CONNECTED && c->count_modes &&
connector_possible(c)) {
@@ -179,7 +180,7 @@ static void set_mode_for_one_screen(struct drm_info *drm,
break;
}
}
- igt_require_f(i < drm->res->count_connectors,
+ igt_require_f(j < drm->res->count_connectors,
"No connector available\n");
crtc_id = kmstest_find_crtc_for_connector(drm->fd, drm->res, c, 0);
@@ -348,7 +349,12 @@ static void subtest(struct drm_info *drm, struct feature *feature, bool suspend)
set_mode_for_one_screen(drm, feature->connector_possible_fn);
wait_user("Screen set.");
- igt_assert(feature->wait_until_enabled(drm->debugfs_fd));
+ if (!(feature->wait_until_enabled(drm->debugfs_fd))) {
+ ++j;
+ set_mode_for_one_screen(drm, feature->connector_possible_fn);
+ wait_user("Screen set for next mode.");
+ igt_assert(feature->wait_until_enabled(drm->debugfs_fd));
+ }
if (suspend) {
igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
--
2.39.0
next reply other threads:[~2023-05-09 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 2:02 Nidhi Gupta [this message]
2023-05-09 2:36 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/kms_fbcon_fbt: Execute test on multiple modes Patchwork
2023-05-09 8:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-09 8:45 ` [igt-dev] [PATCH i-g-t] " Hogander, Jouni
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=20230509020228.25780-1-nidhi1.gupta@intel.com \
--to=nidhi1.gupta@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