From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v3] tests/i915/kms_dsc: add limited flag
Date: Wed, 31 May 2023 14:44:22 +0530 [thread overview]
Message-ID: <20230531091422.368128-1-swati2.sharma@intel.com> (raw)
Add limited flag to restrict test execution to one valid pipe-output
combination. By default all tests will run on all valid pipe-output
combinations.
v2: -rename extended to limited (Kamil)
v3: -add -l in help_str (Zbigniew)
-remove static from data_t (Zbigniew)
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
tests/i915/kms_dsc.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 3ce28f84..3b0ce0d2 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -51,6 +51,7 @@ typedef struct {
int input_bpc;
int disp_ver;
enum pipe pipe;
+ bool limited;
} data_t;
static int output_format_list[] = {DSC_FORMAT_YCBCR420, DSC_FORMAT_YCBCR444};
@@ -250,13 +251,34 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
igt_dynamic_f("pipe-%s-%s%s", kmstest_pipe_name(data->pipe), data->output->name, name)
update_display(data, test_type);
+
+ if (data->limited)
+ break;
}
}
-igt_main
+static int opt_handler(int opt, int opt_index, void *_data)
{
- data_t data = {};
+ data_t *data = _data;
+
+ switch (opt) {
+ case 'l':
+ data->limited = true;
+ break;
+ default:
+ return IGT_OPT_HANDLER_ERROR;
+ }
+
+ return IGT_OPT_HANDLER_SUCCESS;
+}
+
+static const char help_str[] =
+ " --limited|-l\t\tLimit execution to 1 valid pipe-output combo\n";
+data_t data = {};
+
+igt_main_args("l", NULL, help_str, opt_handler, &data)
+{
igt_fixture {
data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
data.devid = intel_get_drm_devid(data.drm_fd);
--
2.25.1
next reply other threads:[~2023-05-31 9:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 9:14 Swati Sharma [this message]
2023-05-31 10:46 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/kms_dsc: add limited flag (rev2) Patchwork
2023-06-01 6:50 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-06-02 22:20 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20230531091422.368128-1-swati2.sharma@intel.com \
--to=swati2.sharma@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