From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V4 3/7] tests/kms_vrr: Move all config constaints to new function
Date: Fri, 1 Dec 2023 19:46:59 +0530 [thread overview]
Message-ID: <20231201141703.3013801-4-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20231201141703.3013801-1-bhanuprakash.modem@intel.com>
No functional change, cleanup only. Move all config checks
to new function.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/kms_vrr.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 1765991c6..4cad663e4 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -483,6 +483,21 @@ static void test_cleanup(data_t *data, enum pipe pipe, igt_output_t *output)
igt_remove_fb(data->drm_fd, &data->fb0);
}
+static bool config_constraint(igt_output_t *output, uint32_t flags)
+{
+ if (!has_vrr(output))
+ return false;
+
+ /* For Negative tests, panel should be non-vrr. */
+ if ((flags & TEST_NEGATIVE) && vrr_capable(output))
+ return false;
+
+ if ((flags & ~TEST_NEGATIVE) && !vrr_capable(output))
+ return false;
+
+ return true;
+}
+
/* Runs tests on outputs that are VRR capable. */
static void
run_vrr_test(data_t *data, test_t test, uint32_t flags)
@@ -492,14 +507,7 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
for_each_connected_output(&data->display, output) {
enum pipe pipe;
- if (!has_vrr(output))
- continue;
-
- /* For Negative tests, panel should be non-vrr. */
- if ((flags & TEST_NEGATIVE) && vrr_capable(output))
- continue;
-
- if ((flags & ~TEST_NEGATIVE) && !vrr_capable(output))
+ if (!config_constraint(output, flags))
continue;
for_each_pipe(&data->display, pipe) {
--
2.40.0
next prev parent reply other threads:[~2023-12-01 14:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 14:16 [igt-dev] [i-g-t V4 0/7] tests/kms_vrr: Add new subtest to switch RR without modeset Bhanuprakash Modem
2023-12-01 14:16 ` [igt-dev] [i-g-t V4 1/7] tests/kms_vrr: Use lib helper to print connector modes Bhanuprakash Modem
2023-12-01 14:16 ` [igt-dev] [i-g-t V4 2/7] tests/kms_vrr: Clear VRR before exit Bhanuprakash Modem
2023-12-01 14:16 ` Bhanuprakash Modem [this message]
2023-12-01 14:17 ` [igt-dev] [i-g-t V4 4/7] tests/kms_vrr: Fix bigjoiner constraint Bhanuprakash Modem
2023-12-01 14:17 ` [igt-dev] [i-g-t V4 5/7] tests/kms_vrr: Fix the logic to calculate expected rate Bhanuprakash Modem
2023-12-01 14:17 ` [igt-dev] [i-g-t V4 6/7] tests/kms_vrr: Add new subtest to switch RR without modeset Bhanuprakash Modem
2023-12-04 2:35 ` Srinivas, Vidya
2023-12-01 14:17 ` [igt-dev] [i-g-t V4 7/7] HAX: DO_NOT_MERGE: test only seamless-rr-switch Bhanuprakash Modem
2023-12-01 17:36 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_vrr: Add new subtest to switch RR without modeset (rev5) Patchwork
2023-12-01 18:56 ` [igt-dev] ✗ CI.xeBAT: failure " Patchwork
2023-12-03 2:14 ` [igt-dev] ✗ Fi.CI.IGT: " Patchwork
2023-12-04 2:31 ` [igt-dev] [i-g-t V4 0/7] tests/kms_vrr: Add new subtest to switch RR without modeset Srinivas, Vidya
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=20231201141703.3013801-4-bhanuprakash.modem@intel.com \
--to=bhanuprakash.modem@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