public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: suresh.kumar.kurmi@intel.com, dnyaneshwar.bhadane@intel.com,
	juha-pekka.heikkila@intel.com, chaitanya.kumar.borah@intel.com
Subject: [igt-dev] [i-g-t, v5] tests/kms_cursor_crc: s/for_each_pipe/for_each_pipe_with_single_output/
Date: Wed, 25 Jan 2023 16:19:16 +0530	[thread overview]
Message-ID: <20230125104916.37626-1-dnyaneshwar.bhadane@intel.com> (raw)
In-Reply-To: <20230112105702.19502-1-dnyaneshwar.bhadane@intel.com>

Changed all testcase to loop over the valid pipe and output connector
combination using for_each_pipe_with_single_output instead of for_each_pipe.
Removed igt_pipe_connector_valid as it is already checked in the above
mentioned loop macro.
Removed redundant assigment in igt_fixture for data->output.

--v1
- Remove cursor size check from the cursor_dpms and cursor_suspend.

--v2
- Used for_each_pipe_with_single_output() to iterate for valid pipe and 
output [Ville]

--v3
- Added for_each_pipe_valid_connector() to check for valid connection.
- pipe variable should initilize with default 0, [Petri]

--v4
- Used for_each_pipe_with_single_output [Bhanuprakash]
- Removed unused assigment to date->output in igt_fixture
- Removed igt_pipe_connector_valid(),It is already verified in the loop macro

--v5
- fixed commit messege.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

---
 tests/kms_cursor_crc.c | 47 ++++++------------------------------------
 1 file changed, 6 insertions(+), 41 deletions(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index d5a4b30b..0b5aac30 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -749,7 +749,7 @@ static void run_size_tests(data_t *data, int w, int h)
 				}
 			}
 
-			for_each_pipe(&data->display, pipe) {
+			for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 				data->pipe = pipe;
 
 				if (require_cursor_size(data, w, h)) {
@@ -774,8 +774,6 @@ static void run_tests_on_pipe(data_t *data)
 	int cursor_size;
 
 	igt_fixture {
-		data->output = igt_get_single_output_for_pipe(&data->display, pipe);
-		igt_require(data->output);
 		data->alpha = 1.0;
 		data->flags = 0;
 	}
@@ -784,16 +782,9 @@ static void run_tests_on_pipe(data_t *data)
 		     "flight to smaller ones to see that the size is applied "
 		     "correctly.");
 	igt_subtest_with_dynamic("cursor-size-change") {
-		for_each_pipe(&data->display, pipe) {
+		for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 			data->pipe = pipe;
 
-			if(!igt_pipe_connector_valid(pipe, data->output)) {
-				igt_debug("Invalid connector on pipe-%s-%s",
-				      kmstest_pipe_name(pipe),
-				      data->output->name);
-				continue;
-			}
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe),
 				      data->output->name)
@@ -805,16 +796,9 @@ static void run_tests_on_pipe(data_t *data)
 	igt_describe("Validates the composition of a fully opaque cursor "
 		     "plane, i.e., alpha channel equal to 1.0.");
 	igt_subtest_with_dynamic("cursor-alpha-opaque") {
-		for_each_pipe(&data->display, pipe) {
+		for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 			data->pipe = pipe;
 
-			if(!igt_pipe_connector_valid(pipe, data->output)) {
-				igt_debug("Invalid connector on pipe-%s-%s",
-				      kmstest_pipe_name(pipe),
-				      data->output->name);
-				continue;
-			}
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe),
 				      data->output->name)
@@ -826,16 +810,9 @@ static void run_tests_on_pipe(data_t *data)
 	igt_describe("Validates the composition of a fully transparent cursor "
 		     "plane, i.e., alpha channel equal to 0.0.");
 	igt_subtest_with_dynamic("cursor-alpha-transparent") {
-		for_each_pipe(&data->display, pipe) {
+		for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 			data->pipe = pipe;
 
-			if(!igt_pipe_connector_valid(pipe, data->output)) {
-				igt_debug("Invalid connector on pipe-%s-%s",
-				      kmstest_pipe_name(pipe),
-				      data->output->name);
-				continue;
-			}
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe),
 				      data->output->name)
@@ -850,16 +827,10 @@ static void run_tests_on_pipe(data_t *data)
 
 	igt_describe("Check random placement of a cursor with DPMS.");
 	igt_subtest_with_dynamic("cursor-dpms") {
-		for_each_pipe(&data->display, pipe) {
+		for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 			data->pipe = pipe;
 			data->flags = TEST_DPMS;
 
-			if (require_cursor_size(data, data->cursor_max_w, data->cursor_max_h)) {
-				igt_debug("Cursor size %dx%d not supported by driver\n",
-					  data->cursor_max_w, data->cursor_max_h);
-				continue;
-			}
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe),
 				      data->output->name)
@@ -871,16 +842,10 @@ static void run_tests_on_pipe(data_t *data)
 
 	igt_describe("Check random placement of a cursor with suspend.");
 	igt_subtest_with_dynamic("cursor-suspend") {
-		for_each_pipe(&data->display, pipe) {
+		for_each_pipe_with_single_output(&data->display, pipe, data->output) {
 			data->pipe = pipe;
 			data->flags = TEST_SUSPEND;
 
-			if (require_cursor_size(data, data->cursor_max_w, data->cursor_max_h)) {
-				igt_debug("Cursor size %dx%d not supported by driver\n",
-					  data->cursor_max_w, data->cursor_max_h);
-				continue;
-			}
-
 			igt_dynamic_f("pipe-%s-%s",
 				      kmstest_pipe_name(pipe),
 				      data->output->name)
-- 
2.35.1

  parent reply	other threads:[~2023-01-25 10:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12 10:57 [igt-dev] [i-g-t] tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test Dnyaneshwar Bhadane
2023-01-12 12:36 ` Ville Syrjälä
2023-01-16  6:42   ` Bhadane, Dnyaneshwar
2023-01-16 10:14     ` Modem, Bhanuprakash
2023-01-12 15:06 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-01-12 21:39 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-01-16 14:32 ` [igt-dev] [PATCH] [i-g-t, v2] " Dnyaneshwar Bhadane
2023-01-16 14:42   ` Petri Latvala
2023-01-23  9:58     ` Bhadane, Dnyaneshwar
2023-01-23 10:15       ` Petri Latvala
2023-01-23 10:39         ` Bhadane, Dnyaneshwar
2023-01-16 15:06 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test (rev2) Patchwork
2023-01-23 15:30 ` [igt-dev] [i-g-t, v3] tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test Dnyaneshwar Bhadane
2023-01-23 16:04   ` Modem, Bhanuprakash
2023-01-23 17:12 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test (rev3) Patchwork
2023-01-24  3:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-01-24 13:03 ` [igt-dev] [i-g-t, v4] tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test Dnyaneshwar Bhadane
2023-01-24 13:39   ` Modem, Bhanuprakash
2023-01-24 15:33 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test (rev4) Patchwork
2023-01-25 10:49 ` Dnyaneshwar Bhadane [this message]
2023-01-25 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: skip pipe on invalid connector in cursor size test (rev5) Patchwork
2023-01-26  1:52 ` [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=20230125104916.37626-1-dnyaneshwar.bhadane@intel.com \
    --to=dnyaneshwar.bhadane@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juha-pekka.heikkila@intel.com \
    --cc=suresh.kumar.kurmi@intel.com \
    /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