Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/i915/kms_dsc: add extended flag
Date: Wed, 24 May 2023 14:39:54 +0530	[thread overview]
Message-ID: <20230524090954.289229-1-swati2.sharma@intel.com> (raw)

Add extended flag to limit test execution to one valid pipe-output
combination. By default all tests will run on all valid pipe-output
combinations.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 3ce28f84..b40bcf47 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 extended;
 } data_t;
 
 static int output_format_list[] = {DSC_FORMAT_YCBCR420, DSC_FORMAT_YCBCR444};
@@ -250,13 +251,33 @@ 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->extended)
+			break;
 	}
 }
 
-igt_main
+static int opt_handler(int opt, int opt_index, void *_data)
 {
-	data_t data = {};
+	data_t *data = _data;
 
+	switch (opt) {
+	case 'e':
+		data->extended = true;
+		break;
+	}
+
+	return IGT_OPT_HANDLER_SUCCESS;
+}
+
+/* Limit execution to 1 valid pipe-output combo */
+static const char help_str[] =
+	"  --extended";
+
+static data_t data = {};
+
+igt_main_args("e", 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

             reply	other threads:[~2023-05-24  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-24  9:09 Swati Sharma [this message]
2023-05-24 10:07 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/kms_dsc: add extended flag Patchwork
2023-05-24 18:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-24 18:16 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-05-29 15:15   ` Sharma, Swati2

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=20230524090954.289229-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