All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set
@ 2020-04-07 13:16 Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:16 UTC (permalink / raw)
  To: igt-dev

Subtest 'invalid' was depending on a "leftover" mode set by something
external (usually fbcon) in order to work.

Let's make the test more robust by setting the mode explicitly.

v2: set flag for the pipe we are using (Imre)

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/kms_vblank.c | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index a895ab80..7b5f3426 100644
--- a/tests/kms_vblank.c
+++ b/tests/kms_vblank.c
@@ -472,12 +472,26 @@ static void invalid_subtest(data_t *data, int fd)
 {
 	union drm_wait_vblank vbl;
 	unsigned long valid_flags;
+	enum pipe pipe;
+	igt_output_t* output;
+	bool found = false;
+	int base_flags;
+
+	/* we need to have a mode set, otherwise we will get EINVAL no matter what */
+	for_each_pipe_with_single_output(&data->display, pipe, output) {
+		data->pipe = pipe;
+		found = true;
+		break;
+	}
+
+	igt_require_f(found, "No outputs connected = no vblanks\n");
+	prepare_crtc(data, fd, output);
 
-	igt_display_require_output_on_pipe(&data->display, 0);
+	base_flags = _DRM_VBLANK_RELATIVE | kmstest_get_vbl_flag(data->pipe);
 
 	/* First check all is well with a simple query */
 	memset(&vbl, 0, sizeof(vbl));
-	vbl.request.type = DRM_VBLANK_RELATIVE;
+	vbl.request.type = base_flags;
 	igt_assert_eq(wait_vblank(fd, &vbl), 0);
 
 	valid_flags = (_DRM_VBLANK_TYPES_MASK |
@@ -486,7 +500,9 @@ static void invalid_subtest(data_t *data, int fd)
 
 	/* pick some interesting invalid permutations */
 	memset(&vbl, 0, sizeof(vbl));
-	vbl.request.type = _DRM_VBLANK_RELATIVE | ~valid_flags;
+	vbl.request.type = base_flags;
+	vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
+	vbl.request.type |= ~valid_flags;
 	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
 	for (int bit = 0; bit < 32; bit++) {
 		int err;
@@ -495,7 +511,7 @@ static void invalid_subtest(data_t *data, int fd)
 			continue;
 
 		memset(&vbl, 0, sizeof(vbl));
-		vbl.request.type = _DRM_VBLANK_RELATIVE | (1 << bit);
+		vbl.request.type = base_flags | (1 << bit);
 		err = wait_vblank(fd, &vbl);
 		igt_assert_f(err == -EINVAL,
 			     "vblank wait with invalid request.type bit %d [0x%08x] did not report -EINVAL, got %d\n",
@@ -504,10 +520,11 @@ static void invalid_subtest(data_t *data, int fd)
 
 	/* check the maximum pipe, nobody should have that many pipes! */
 	memset(&vbl, 0, sizeof(vbl));
-	vbl.request.type = _DRM_VBLANK_RELATIVE;
+	vbl.request.type = base_flags;
 	vbl.request.type |= _DRM_VBLANK_SECONDARY;
 	vbl.request.type |= _DRM_VBLANK_FLAGS_MASK;
 	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
+	cleanup_crtc(data, fd, output);
 }
 
 igt_main
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
@ 2020-04-07 13:16 ` Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_psr: Set mode before checking if PSR is supported Arkadiusz Hiler
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:16 UTC (permalink / raw)
  To: igt-dev

The test was depending on a leftover mode set by something external
(usually fbcon) in order to work.

Let's create the FB once ahead of any testing, set a mode and check for
DSC support.

Few extra cleanups:
 * remove unused fields in data_t
 * properly free connector
 * don't recreate FB while iterating over pipes

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/kms_dp_dsc.c | 73 +++++++++++++++++++++++++++++++++-------------
 1 file changed, 53 insertions(+), 20 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index e2e3aaa0..7107fe59 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -52,15 +52,11 @@ enum dsc_test_type
 typedef struct {
 	int drm_fd;
 	int debugfs_fd;
-	uint32_t id;
 	igt_display_t display;
 	struct igt_fb fb_test_pattern;
 	igt_output_t *output;
-	int mode_valid;
 	drmModeModeInfo *mode;
 	drmModeConnector *connector;
-	drmModeEncoder *encoder;
-	int crtc;
 	enum pipe pipe;
 	char conn_name[128];
 } data_t;
@@ -168,7 +164,6 @@ static void test_cleanup(data_t *data)
 						    DRM_PLANE_TYPE_PRIMARY);
 		igt_plane_set_fb(primary, NULL);
 		igt_display_commit(&data->display);
-		igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
 	}
 }
 
@@ -185,8 +180,6 @@ static void kms_dp_dsc_exit_handler(int sig)
 static void update_display(data_t *data, enum dsc_test_type test_type)
 {
 	igt_plane_t *primary;
-	data->mode = igt_output_get_mode(data->output);
-	data->connector = data->output->config.connector;
 
 	if (data->connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
 	    data->pipe == PIPE_A) {
@@ -206,11 +199,6 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 		force_dp_dsc_enable(data);
 
 		igt_output_set_pipe(data->output, data->pipe);
-		igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
-				      data->mode->vdisplay,
-				      DRM_FORMAT_XRGB8888,
-				      LOCAL_DRM_FORMAT_MOD_NONE,
-				      &data->fb_test_pattern);
 		primary = igt_output_get_plane_type(data->output,
 						    DRM_PLANE_TYPE_PRIMARY);
 
@@ -236,16 +224,52 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 	}
 }
 
-static void run_test(data_t *data, igt_output_t *output,
-		     enum dsc_test_type test_type)
+static void prepare_output(data_t *data, igt_output_t *output)
 {
+	igt_plane_t *primary;
 	enum pipe pipe;
+	bool found = false;
+	drmModeModeInfo *mode;
 
-	for_each_pipe(&data->display, pipe) {
+	igt_display_reset(&data->display);
 
+	for_each_pipe(&data->display, pipe) {
 		if (igt_pipe_connector_valid(pipe, output)) {
 			data->pipe = pipe;
 			data->output = output;
+			data->connector = data->output->config.connector;
+			found = true;
+			break;
+		}
+	}
+
+	igt_assert_f(found, "No valid pipe for connector %s\n", data->conn_name);
+
+	mode = igt_output_get_mode(data->output);
+
+	igt_output_set_pipe(data->output, data->pipe);
+	igt_create_pattern_fb(data->drm_fd, mode->hdisplay,
+			      mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &data->fb_test_pattern);
+
+	igt_output_set_pipe(data->output, data->pipe);
+	primary = igt_output_get_plane_type(data->output,
+					    DRM_PLANE_TYPE_PRIMARY);
+
+	igt_plane_set_fb(primary, &data->fb_test_pattern);
+	igt_display_commit(&data->display);
+}
+
+static void run_test(data_t *data, enum dsc_test_type test_type)
+{
+	enum pipe pipe;
+
+	for_each_pipe(&data->display, pipe) {
+
+		if (igt_pipe_connector_valid(pipe, data->output)) {
+			data->pipe = pipe;
 			update_display(data, test_type);
 			test_cleanup(data);
 		}
@@ -281,31 +305,40 @@ igt_main
 				if (connector->connection != DRM_MODE_CONNECTED ||
 				    connector->connector_type !=
 				    tests[test_cnt])
-					continue;
+					goto loop_cleanup;
+
 				output = igt_output_from_connector(&data.display, connector);
 				sprintf(data.conn_name, "%s-%d",
 					kmstest_connector_type_str(connector->connector_type),
 					connector->connector_type_id);
+
+				/* we need to have output enabled to do the DSC checks below */
+				prepare_output(&data, output);
+
 				if(!is_dp_dsc_supported(&data)) {
 					igt_debug("DSC not supported on connector %s \n",
 						  data.conn_name);
-					continue;
+					goto loop_cleanup;
 				}
+
 				if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
 				    !is_dp_fec_supported(&data)) {
 					igt_debug("DSC cannot be enabled without FEC on %s\n",
 						  data.conn_name);
-					continue;
+					goto loop_cleanup;
 				}
 				test_conn_cnt++;
-				run_test(&data, output, test_basic_dsc_enable);
+				run_test(&data, test_basic_dsc_enable);
+
+loop_cleanup:
+				drmModeFreeConnector(connector);
+				igt_remove_fb(data.drm_fd, &data.fb_test_pattern);
 			}
 			igt_skip_on(test_conn_cnt == 0);
 		}
 	}
 
 	igt_fixture {
-		drmModeFreeConnector(connector);
 		drmModeFreeResources(res);
 		close(data.debugfs_fd);
 		close(data.drm_fd);
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 3/7] lib/igt_psr: Set mode before checking if PSR is supported
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
@ 2020-04-07 13:16 ` Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init Arkadiusz Hiler
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:16 UTC (permalink / raw)
  To: igt-dev

This check was depending on a leftover mode set by something external
(usually fbcon) in order to work. Let's set the mode for the check
ourselves.

The no_modeset variant is meant for igt_display-less testing, e.g.
fbcon.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/igt_psr.c                    | 57 +++++++++++++++++++++++++++++++-
 lib/igt_psr.h                    |  4 ++-
 tests/i915/i915_pm_dc.c          |  6 ++--
 tests/kms_fbcon_fbt.c            |  4 +--
 tests/kms_frontbuffer_tracking.c |  2 +-
 tests/kms_psr.c                  |  2 +-
 tests/kms_psr2_su.c              |  5 +--
 7 files changed, 69 insertions(+), 11 deletions(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 83ccacdd..3d3ce81b 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -161,13 +161,14 @@ bool psr_disable(int debugfs_fd)
 	return psr_set(debugfs_fd, -1);
 }
 
-bool psr_sink_support(int debugfs_fd, enum psr_mode mode)
+bool psr_sink_support_no_modeset(int debugfs_fd, enum psr_mode mode)
 {
 	char buf[PSR_STATUS_MAX_LEN];
 	int ret;
 
 	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
 				      sizeof(buf));
+
 	if (ret < 1)
 		return false;
 
@@ -182,6 +183,60 @@ bool psr_sink_support(int debugfs_fd, enum psr_mode mode)
 		return strstr(buf, "Sink support: yes [0x03]");
 }
 
+bool psr_sink_support(igt_display_t *display, int debugfs_fd, enum psr_mode mode)
+{
+	int ret;
+
+	/* we need to have a mode active for this check to make sense */
+	igt_output_t *output;
+	enum pipe pipe;
+	bool found = false;
+	int fb_id;
+	igt_fb_t fb;
+	drmModeModeInfo *drm_mode;
+	igt_plane_t *primary;
+
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		drmModeConnectorPtr c = output->config.connector;
+
+		if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+
+		igt_output_set_pipe(output, pipe);
+		found = true;
+
+		break;
+	}
+
+	if (!found) /* no eDP */
+		return false;
+
+	drm_mode = igt_output_get_mode(output);
+
+	fb_id = igt_create_fb(display->drm_fd,
+			      drm_mode->hdisplay,
+			      drm_mode->vdisplay,
+			      DRM_FORMAT_XRGB8888,
+			      LOCAL_DRM_FORMAT_MOD_NONE,
+			      &fb);
+	igt_assert(fb_id);
+
+	primary = igt_output_get_plane_type(output,
+					    DRM_PLANE_TYPE_PRIMARY);
+
+	igt_plane_set_fb(primary, &fb);
+	igt_display_commit(display);
+
+
+	ret = psr_sink_support_no_modeset(debugfs_fd, mode);
+
+	igt_plane_set_fb(primary, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_remove_fb(display->drm_fd, &fb);
+
+	return ret;
+}
+
 #define PSR2_SU_BLOCK_STR_LOOKUP "PSR2 SU blocks:\n0\t"
 
 static bool
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index ca385736..cb10a4f0 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -27,6 +27,7 @@
 #include "igt_debugfs.h"
 #include "igt_core.h"
 #include "igt_aux.h"
+#include "igt_kms.h"
 
 #define PSR_STATUS_MAX_LEN 512
 
@@ -40,7 +41,8 @@ bool psr_wait_update(int debugfs_fd, enum psr_mode mode);
 bool psr_long_wait_update(int debugfs_fd, enum psr_mode mode);
 bool psr_enable(int debugfs_fd, enum psr_mode);
 bool psr_disable(int debugfs_fd);
-bool psr_sink_support(int debugfs_fd, enum psr_mode);
+bool psr_sink_support_no_modeset(int debugfs_fd, enum psr_mode mode);
+bool psr_sink_support(igt_display_t *display, int debugfs_fd, enum psr_mode mode);
 bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
 
 #endif
diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 2dd6191d..0b6f6a96 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -408,14 +408,14 @@ int main(int argc, char *argv[])
 	igt_describe("In this test we make sure that system enters DC3CO "
 		     "when PSR2 is active and system is in SLEEP state");
 	igt_subtest("dc3co-vpb-simulation") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_2));
+		igt_require(psr_sink_support(&data.display, data.debugfs_fd, PSR_MODE_2));
 		test_dc3co_vpb_simulation(&data);
 	}
 
 	igt_describe("This test validates display engine entry to DC5 state "
 		     "while PSR is active");
 	igt_subtest("dc5-psr") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_1));
+		igt_require(psr_sink_support(&data.display, data.debugfs_fd, PSR_MODE_1));
 		data.op_psr_mode = PSR_MODE_1;
 		psr_enable(data.debugfs_fd, data.op_psr_mode);
 		test_dc_state_psr(&data, CHECK_DC5);
@@ -424,7 +424,7 @@ int main(int argc, char *argv[])
 	igt_describe("This test validates display engine entry to DC6 state "
 		     "while PSR is active");
 	igt_subtest("dc6-psr") {
-		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_1));
+		igt_require(psr_sink_support(&data.display, data.debugfs_fd, PSR_MODE_1));
 		data.op_psr_mode = PSR_MODE_1;
 		psr_enable(data.debugfs_fd, data.op_psr_mode);
 		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index ed4cccbe..b8fe42d3 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -207,7 +207,7 @@ static bool psr_wait_until_enabled(int debugfs_fd)
 
 static bool psr_supported_on_chipset(int debugfs_fd)
 {
-	return psr_sink_support(debugfs_fd, PSR_MODE_1);
+	return psr_sink_support_no_modeset(debugfs_fd, PSR_MODE_1);
 }
 
 static bool psr_wait_until_update(int debugfs_fd)
@@ -218,7 +218,7 @@ static bool psr_wait_until_update(int debugfs_fd)
 static void disable_features(int debugfs_fd)
 {
 	igt_set_module_param_int("enable_fbc", 0);
-	if (psr_sink_support(debugfs_fd, PSR_MODE_1))
+	if (psr_sink_support_no_modeset(debugfs_fd, PSR_MODE_1))
 		psr_disable(debugfs_fd);
 }
 
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index c4b4af43..66ca4295 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1411,7 +1411,7 @@ static void setup_psr(void)
 		return;
 	}
 
-	if (!psr_sink_support(drm.debugfs, PSR_MODE_1)) {
+	if (!psr_sink_support(&drm.display, drm.debugfs, PSR_MODE_1)) {
 		igt_info("Can't test PSR: not supported by sink.\n");
 		return;
 	}
diff --git a/tests/kms_psr.c b/tests/kms_psr.c
index 13ed02f4..2fd9976d 100644
--- a/tests/kms_psr.c
+++ b/tests/kms_psr.c
@@ -195,7 +195,7 @@ static void fill_render(data_t *data, uint32_t handle, unsigned char color)
 static bool sink_support(data_t *data, enum psr_mode mode)
 {
 	return data->with_psr_disabled ||
-	       psr_sink_support(data->debugfs_fd, mode);
+	       psr_sink_support(&data->display, data->debugfs_fd, mode);
 }
 
 static bool psr_wait_entry_if_enabled(data_t *data)
diff --git a/tests/kms_psr2_su.c b/tests/kms_psr2_su.c
index 9f40c735..11d464ae 100644
--- a/tests/kms_psr2_su.c
+++ b/tests/kms_psr2_su.c
@@ -243,14 +243,15 @@ igt_main
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		kmstest_set_vt_graphics_mode();
 
-		igt_require_f(psr_sink_support(data.debugfs_fd, PSR_MODE_2),
+		display_init(&data);
+
+		igt_require_f(psr_sink_support(&data.display, data.debugfs_fd, PSR_MODE_2),
 			      "Sink does not support PSR2\n");
 
 		data.bufmgr = drm_intel_bufmgr_gem_init(data.drm_fd, 4096);
 		igt_assert(data.bufmgr);
 		drm_intel_bufmgr_gem_enable_reuse(data.bufmgr);
 
-		display_init(&data);
 
 		/* Test if PSR2 can be enabled */
 		igt_require_f(psr_enable(data.debugfs_fd, PSR_MODE_2),
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_psr: Set mode before checking if PSR is supported Arkadiusz Hiler
@ 2020-04-07 13:16 ` Arkadiusz Hiler
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 5/7] lib/kms: Reprobe connector state after disabling modest Arkadiusz Hiler
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:16 UTC (permalink / raw)
  To: igt-dev

We often end up with a leftover state from fbcon with a mode enabled on
some of the connecters. Let's clean that up.

v2: commit only if we have pipes and outputs

Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 lib/igt_kms.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7f9fafb3..4ffc3ed2 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2066,6 +2066,12 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 	/* Set reasonable default values for every object in the display. */
 	igt_display_reset(display);
 
+	/* Commit those resonable defaults to clean up fbcon/etc leftover state */
+	if (display->n_pipes && display->n_outputs) {
+		igt_display_commit2(display,
+				    display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	}
+
 out:
 	LOG_UNINDENT(display);
 
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 5/7] lib/kms: Reprobe connector state after disabling modest
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (2 preceding siblings ...)
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init Arkadiusz Hiler
@ 2020-04-07 13:16 ` Arkadiusz Hiler
  2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state Arkadiusz Hiler
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:16 UTC (permalink / raw)
  To: igt-dev

With TypeC we don't always get hotplug events for a connector until the
mode is disabled.

Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 lib/igt_kms.c | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4ffc3ed2..9d384fc9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2040,7 +2040,6 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 
 	for (i = 0; i < display->n_outputs; i++) {
 		igt_output_t *output = &display->outputs[i];
-		drmModeConnector *connector;
 
 		/*
 		 * We don't assign each output a pipe unless
@@ -2051,13 +2050,6 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		output->display = display;
 
 		igt_output_refresh(output);
-
-		connector = output->config.connector;
-		if (connector && (!connector->count_modes ||
-		    connector->connection == DRM_MODE_UNKNOWNCONNECTION)) {
-			output->force_reprobe = true;
-			igt_output_refresh(output);
-		}
 	}
 
 	drmModeFreePlaneResources(plane_resources);
@@ -2072,6 +2064,25 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 				    display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
+	/*
+	 * Let's reprobe all connectors to make sure we have up to date stete.
+	 * Some connectors may require disabling modeset to be detected
+	 * correctly.
+	 */
+	for (i = 0; i < display->n_outputs; i++) {
+		igt_output_t *output = &display->outputs[i];
+		drmModeConnector *connector;
+
+		igt_output_refresh(output);
+
+		connector = output->config.connector;
+		if (connector && (!connector->count_modes ||
+		    connector->connection == DRM_MODE_UNKNOWNCONNECTION)) {
+			output->force_reprobe = true;
+			igt_output_refresh(output);
+		}
+	}
+
 out:
 	LOG_UNINDENT(display);
 
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (3 preceding siblings ...)
  2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 5/7] lib/kms: Reprobe connector state after disabling modest Arkadiusz Hiler
@ 2020-04-07 13:19 ` Arkadiusz Hiler
  2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_chamelium: Test HPD for different mode handling scenarios Arkadiusz Hiler
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:19 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

Each tests resets the state to be sure it starts with a clean slate.
Let's add disabling modeset to the pile, to be sure that we get the
hotplug events and the connector state is correct.

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 tests/kms_chamelium.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 08abd961..236e1010 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -273,7 +273,14 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
 static void
 reset_state(data_t *data, struct chamelium_port *port)
 {
-	int p;
+	int p, i;
+
+	for (i = 0; i < data->display.n_outputs; i++) {
+		igt_output_t *output = &data->display.outputs[i];
+		igt_output_set_pipe(output, PIPE_NONE);
+	}
+
+	igt_display_commit2(&data->display, COMMIT_ATOMIC);
 
 	chamelium_reset(data->chamelium);
 
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t 7/7] tests/kms_chamelium: Test HPD for different mode handling scenarios
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (4 preceding siblings ...)
  2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state Arkadiusz Hiler
@ 2020-04-07 13:19 ` Arkadiusz Hiler
  2020-04-07 13:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set Patchwork
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-04-07 13:19 UTC (permalink / raw)
  To: igt-dev; +Cc: Kunal Joshi

The default scenario is now performing all hotplugs with modes disabled
on all connectors. This is the quickest of the tests and represents
userspace not caring about the new display (e.g. explicitly disabled).

*-hpd-enable-disable-mode covers the most common userspace behavior
where each hotplug event is accompanied by a corresponding enabling /
disabling commit.

*-hpd-with-enabled-mode explicitly targets the scenario where we have
mode enabled and never disable it as we do hotplugs to reproduce the
issue we see with TypeC connectors for ICL and TGL.

v2:
 - refresh igt_display output state after reprobing
 - get mode and set pipe only after we have connector plugged in

v3: fix VGA subtest names (Kunal)

Cc: Kunal Joshi <kunal1.joshi@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/issues/323
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Kunal Joshi <kunal1.joshi@intel.com>
---
 lib/igt_kms.c         |   2 +-
 lib/igt_kms.h         |   1 +
 tests/kms_chamelium.c | 315 ++++++++++++++++++++++++++++--------------
 3 files changed, 216 insertions(+), 102 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 9d384fc9..67ca362f 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1666,7 +1666,7 @@ static void igt_display_log_shift(igt_display_t *display, int shift)
 	igt_assert(display->log_shift >= 0);
 }
 
-static void igt_output_refresh(igt_output_t *output)
+void igt_output_refresh(igt_output_t *output)
 {
 	igt_display_t *display = output->display;
 	unsigned long crtc_idx_mask = 0;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index cd3fdbc0..adca59ac 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -423,6 +423,7 @@ igt_plane_t *igt_output_get_plane_type_index(igt_output_t *output,
 					     int plane_type, int index);
 igt_output_t *igt_output_from_connector(igt_display_t *display,
     drmModeConnector *connector);
+void igt_output_refresh(igt_output_t *output);
 const drmModeModeInfo *igt_std_1024_mode_get(void);
 
 igt_plane_t *igt_pipe_get_plane_type(igt_pipe_t *pipe, int plane_type);
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 236e1010..77c203d3 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -45,6 +45,12 @@ enum test_edid {
 };
 #define TEST_EDID_COUNT 5
 
+enum test_modeset_mode {
+	TEST_MODESET_ON,
+	TEST_MODESET_ON_OFF,
+	TEST_MODESET_OFF,
+};
+
 typedef struct {
 	struct chamelium *chamelium;
 	struct chamelium_port **ports;
@@ -111,12 +117,17 @@ reprobe_connector(data_t *data, struct chamelium_port *port)
 {
 	drmModeConnector *connector;
 	drmModeConnection status;
+	igt_output_t *output;
 
 	igt_debug("Reprobing %s...\n", chamelium_port_get_name(port));
 	connector = chamelium_port_get_connector(data->chamelium, port, true);
 	igt_assert(connector);
 	status = connector->connection;
 
+	/* let's make sure that igt_display is up to date too */
+	output = igt_output_from_connector(&data->display, connector);
+	igt_output_refresh(output);
+
 	drmModeFreeConnector(connector);
 	return status;
 }
@@ -294,14 +305,140 @@ reset_state(data_t *data, struct chamelium_port *port)
 	}
 }
 
+static void chamelium_paint_xr24_pattern(uint32_t *data,
+					 size_t width, size_t height,
+					 size_t stride, size_t block_size)
+{
+	uint32_t colors[] = { 0xff000000,
+			      0xffff0000,
+			      0xff00ff00,
+			      0xff0000ff,
+			      0xffffffff };
+	unsigned i, j;
+
+	for (i = 0; i < height; i++)
+		for (j = 0; j < width; j++)
+			*(data + i * stride / 4 + j) = colors[((j / block_size) + (i / block_size)) % 5];
+}
+
+static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t height,
+				    uint32_t fourcc, size_t block_size,
+				    struct igt_fb *fb)
+{
+	int fb_id;
+	void *ptr;
+
+	igt_assert(fourcc == DRM_FORMAT_XRGB8888);
+
+	fb_id = igt_create_fb(data->drm_fd, width, height, fourcc,
+			      LOCAL_DRM_FORMAT_MOD_NONE, fb);
+	igt_assert(fb_id > 0);
+
+	ptr = igt_fb_map_buffer(fb->fd, fb);
+	igt_assert(ptr);
+
+	chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0],
+				     block_size);
+	igt_fb_unmap_buffer(fb, ptr);
+
+	return fb_id;
+}
+
+static void
+enable_output(data_t *data,
+	      struct chamelium_port *port,
+	      igt_output_t *output,
+	      drmModeModeInfo *mode,
+	      struct igt_fb *fb)
+{
+	igt_display_t *display = output->display;
+	igt_plane_t *primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+	drmModeConnector *connector = chamelium_port_get_connector(
+	    data->chamelium, port, false);
+
+	igt_assert(primary);
+
+	igt_plane_set_size(primary, mode->hdisplay, mode->vdisplay);
+	igt_plane_set_fb(primary, fb);
+	igt_output_override_mode(output, mode);
+
+	/* Clear any color correction values that might be enabled */
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0);
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
+	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM))
+		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_CTM, NULL, 0);
+
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
+	if (chamelium_port_get_type(port) == DRM_MODE_CONNECTOR_VGA)
+		usleep(250000);
+
+	drmModeFreeConnector(connector);
+}
+
+static enum pipe get_pipe_for_output(igt_display_t *display, igt_output_t *output)
+{
+	enum pipe pipe;
+
+	for_each_pipe(display, pipe) {
+		if (igt_pipe_connector_valid(pipe, output)) {
+			return pipe;
+		}
+	}
+
+	igt_assert_f(false, "No pipe found for output %s\n",
+		     igt_output_name(output));
+}
+
+static void create_fb_for_mode(data_t *data, struct igt_fb *fb, drmModeModeInfo *mode)
+{
+	int fb_id;
+
+	fb_id = chamelium_get_pattern_fb(data, mode->hdisplay, mode->vdisplay,
+					 DRM_FORMAT_XRGB8888, 64, fb);
+
+	igt_assert(fb_id > 0);
+}
+
+static drmModeModeInfo get_mode_for_port(struct chamelium *chamelium,
+					 struct chamelium_port *port)
+{
+	drmModeConnector *connector = chamelium_port_get_connector(chamelium,
+								   port, false);
+	drmModeModeInfo mode;
+	igt_assert(&connector->modes[0] != NULL);
+	memcpy(&mode, &connector->modes[0], sizeof(mode));
+	drmModeFreeConnector(connector);
+	return mode;
+}
+
+static igt_output_t *get_output_for_port(data_t *data,
+					 struct chamelium_port *port)
+{
+	drmModeConnector *connector = chamelium_port_get_connector(data->chamelium,
+								   port, false);
+	igt_output_t *output = igt_output_from_connector(&data->display,
+							 connector);
+	drmModeFreeConnector(connector);
+	igt_assert(output != NULL);
+	return output;
+}
+
 static const char test_basic_hotplug_desc[] =
 	"Check that we get uevents and updated connector status on "
 	"hotplug and unplug";
 static void
-test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
+test_hotplug(data_t *data, struct chamelium_port *port, int toggle_count,
+	     enum test_modeset_mode modeset_mode)
 {
-	struct udev_monitor *mon = igt_watch_hotplug();
 	int i;
+	enum pipe pipe;
+	struct igt_fb fb = {0};
+	drmModeModeInfo mode;
+	struct udev_monitor *mon = igt_watch_hotplug();
+	igt_output_t *output = get_output_for_port(data, port);
 
 	reset_state(data, NULL);
 	igt_hpd_storm_set_threshold(data->drm_fd, 0);
@@ -316,15 +453,36 @@ test_basic_hotplug(data_t *data, struct chamelium_port *port, int toggle_count)
 						 DRM_MODE_CONNECTED);
 		igt_flush_hotplugs(mon);
 
+		if (modeset_mode == TEST_MODESET_ON_OFF ||
+		    (modeset_mode == TEST_MODESET_ON && i == 0 )) {
+			if (i == 0) {
+				/* We can only get mode and pipe once we are connected */
+				pipe = get_pipe_for_output(&data->display, output);
+				mode = get_mode_for_port(data->chamelium, port);
+				create_fb_for_mode(data, &fb, &mode);
+			}
+
+			igt_output_set_pipe(output, pipe);
+			enable_output(data, port, output, &mode, &fb);
+		}
+
 		/* Now check if we get a hotplug from disconnection */
 		chamelium_unplug(data->chamelium, port);
 
 		wait_for_connector_after_hotplug(data, mon, port,
 						 DRM_MODE_DISCONNECTED);
+
+		igt_flush_hotplugs(mon);
+
+		if (modeset_mode == TEST_MODESET_ON_OFF) {
+			igt_output_set_pipe(output, PIPE_NONE);
+			igt_display_commit2(&data->display, COMMIT_ATOMIC);
+		}
 	}
 
 	igt_cleanup_hotplug(mon);
 	igt_hpd_storm_reset(data->drm_fd);
+	igt_remove_fb(data->drm_fd, &fb);
 }
 
 static const struct edid *get_edid(enum test_edid edid);
@@ -530,10 +688,7 @@ prepare_output(data_t *data, struct chamelium_port *port, enum test_edid edid)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
-	drmModeConnector *connector =
-		chamelium_port_get_connector(data->chamelium, port, false);
 	enum pipe pipe;
-	bool found = false;
 
 	/* The chamelium's default EDID has a lot of resolutions, way more then
 	 * we need to test. Additionally the default EDID doesn't support HDMI
@@ -546,101 +701,17 @@ prepare_output(data_t *data, struct chamelium_port *port, enum test_edid edid)
 
 	igt_display_reset(display);
 
-	output = igt_output_from_connector(display, connector);
+	output = get_output_for_port(data, port);
 
 	/* Refresh pipe to update connected status */
 	igt_output_set_pipe(output, PIPE_NONE);
 
-	for_each_pipe(display, pipe) {
-		if (!igt_pipe_connector_valid(pipe, output))
-			continue;
-
-		found = true;
-		break;
-	}
-
-	igt_assert_f(found, "No pipe found for output %s\n", igt_output_name(output));
-
+	pipe = get_pipe_for_output(display, output);
 	igt_output_set_pipe(output, pipe);
 
-	drmModeFreeConnector(connector);
-
 	return output;
 }
 
-static void
-enable_output(data_t *data,
-	      struct chamelium_port *port,
-	      igt_output_t *output,
-	      drmModeModeInfo *mode,
-	      struct igt_fb *fb)
-{
-	igt_display_t *display = output->display;
-	igt_plane_t *primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
-	drmModeConnector *connector = chamelium_port_get_connector(
-	    data->chamelium, port, false);
-
-	igt_assert(primary);
-
-	igt_plane_set_size(primary, mode->hdisplay, mode->vdisplay);
-	igt_plane_set_fb(primary, fb);
-	igt_output_override_mode(output, mode);
-
-	/* Clear any color correction values that might be enabled */
-	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_DEGAMMA_LUT))
-		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_DEGAMMA_LUT, NULL, 0);
-	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_GAMMA_LUT))
-		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_GAMMA_LUT, NULL, 0);
-	if (igt_pipe_obj_has_prop(primary->pipe, IGT_CRTC_CTM))
-		igt_pipe_obj_replace_prop_blob(primary->pipe, IGT_CRTC_CTM, NULL, 0);
-
-	igt_display_commit2(display, COMMIT_ATOMIC);
-
-	if (chamelium_port_get_type(port) == DRM_MODE_CONNECTOR_VGA)
-		usleep(250000);
-
-	drmModeFreeConnector(connector);
-}
-
-static void chamelium_paint_xr24_pattern(uint32_t *data,
-					 size_t width, size_t height,
-					 size_t stride, size_t block_size)
-{
-	uint32_t colors[] = { 0xff000000,
-			      0xffff0000,
-			      0xff00ff00,
-			      0xff0000ff,
-			      0xffffffff };
-	unsigned i, j;
-
-	for (i = 0; i < height; i++)
-		for (j = 0; j < width; j++)
-			*(data + i * stride / 4 + j) = colors[((j / block_size) + (i / block_size)) % 5];
-}
-
-static int chamelium_get_pattern_fb(data_t *data, size_t width, size_t height,
-				    uint32_t fourcc, size_t block_size,
-				    struct igt_fb *fb)
-{
-	int fb_id;
-	void *ptr;
-
-	igt_assert(fourcc == DRM_FORMAT_XRGB8888);
-
-	fb_id = igt_create_fb(data->drm_fd, width, height, fourcc,
-			      LOCAL_DRM_FORMAT_MOD_NONE, fb);
-	igt_assert(fb_id > 0);
-
-	ptr = igt_fb_map_buffer(fb->fd, fb);
-	igt_assert(ptr);
-
-	chamelium_paint_xr24_pattern(ptr, width, height, fb->strides[0],
-				     block_size);
-	igt_fb_unmap_buffer(fb, ptr);
-
-	return fb_id;
-}
-
 static void do_test_display(data_t *data, struct chamelium_port *port,
 			    igt_output_t *output, drmModeModeInfo *mode,
 			    uint32_t fourcc, enum chamelium_check check,
@@ -2539,13 +2610,27 @@ igt_main
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("dp-hpd", DisplayPort)
-			test_basic_hotplug(&data, port,
-					   HPD_TOGGLE_COUNT_DP_HDMI);
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_DP_HDMI,
+				     TEST_MODESET_OFF);
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("dp-hpd-fast", DisplayPort)
-			test_basic_hotplug(&data, port,
-					   HPD_TOGGLE_COUNT_FAST);
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("dp-hpd-enable-disable-mode", DisplayPort)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("dp-hpd-with-enabled-mode", DisplayPort)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON);
 
 		igt_describe(test_edid_read_desc);
 		connector_subtest("dp-edid-read", DisplayPort) {
@@ -2634,13 +2719,27 @@ igt_main
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("hdmi-hpd", HDMIA)
-			test_basic_hotplug(&data, port,
-					   HPD_TOGGLE_COUNT_DP_HDMI);
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_DP_HDMI,
+				     TEST_MODESET_OFF);
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("hdmi-hpd-fast", HDMIA)
-			test_basic_hotplug(&data, port,
-					   HPD_TOGGLE_COUNT_FAST);
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("hdmi-hpd-enable-disable-mode", HDMIA)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("hdmi-hpd-with-enabled-mode", HDMIA)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON);
 
 		igt_describe(test_edid_read_desc);
 		connector_subtest("hdmi-edid-read", HDMIA) {
@@ -2795,11 +2894,25 @@ igt_main
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("vga-hpd", VGA)
-			test_basic_hotplug(&data, port, HPD_TOGGLE_COUNT_VGA);
+			test_hotplug(&data, port, HPD_TOGGLE_COUNT_VGA,
+				     TEST_MODESET_OFF);
 
 		igt_describe(test_basic_hotplug_desc);
 		connector_subtest("vga-hpd-fast", VGA)
-			test_basic_hotplug(&data, port, HPD_TOGGLE_COUNT_FAST);
+			test_hotplug(&data, port, HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("vga-hpd-enable-disable-mode", VGA)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON_OFF);
+
+		igt_describe(test_basic_hotplug_desc);
+		connector_subtest("vga-hpd-with-enabled-mode", VGA)
+			test_hotplug(&data, port,
+				     HPD_TOGGLE_COUNT_FAST,
+				     TEST_MODESET_ON);
 
 		igt_describe(test_edid_read_desc);
 		connector_subtest("vga-edid-read", VGA) {
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (5 preceding siblings ...)
  2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_chamelium: Test HPD for different mode handling scenarios Arkadiusz Hiler
@ 2020-04-07 13:44 ` Patchwork
  2020-04-07 14:08 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
  2020-04-08 14:15 ` [igt-dev] [PATCH i-g-t 1/7] " Imre Deak
  8 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-04-07 13:44 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set
URL   : https://patchwork.freedesktop.org/series/75615/
State : warning

== Summary ==

Did not get list of undocumented tests for this run, something is wrong!

Other than that, pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/129421 for the overview.

build-containers:build-debian-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/2209478):
  Pulling docker image registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 ...
  Using docker image sha256:594aa868d31ee3304dee8cae8a3433c89a6fcfcf6c7d420c04cce22f60147176 for registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0 ...
  section_end:1586266918:prepare_executor
  section_start:1586266918:prepare_script
  Preparing environment
  Running on runner-j4Lrg1oF-project-3185-concurrent-1 via gst-htz-1...
  section_end:1586266921:prepare_script
  section_start:1586266921:get_sources
  Getting source from Git repository
  Fetching changes...
  Initialized empty Git repository in /builds/gfx-ci/igt-ci-tags/.git/
  Created fresh repository.
  error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)
  fatal: the remote end hung up unexpectedly
  section_end:1586266984:get_sources
  section_start:1586266984:upload_artifacts_on_failure
  Uploading artifacts for failed job
  section_end:1586266985:upload_artifacts_on_failure
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/129421
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (6 preceding siblings ...)
  2020-04-07 13:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set Patchwork
@ 2020-04-07 14:08 ` Patchwork
  2020-04-08 14:15 ` [igt-dev] [PATCH i-g-t 1/7] " Imre Deak
  8 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-04-07 14:08 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set
URL   : https://patchwork.freedesktop.org/series/75615/
State : failure

== Summary ==

CI Bug Log - changes from IGT_5574 -> IGTPW_4425
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_4425 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_4425, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_4425:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_psr@cursor_plane_move:
    - fi-icl-u2:          [PASS][1] -> [SKIP][2] +3 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-icl-u2/igt@kms_psr@cursor_plane_move.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-icl-u2/igt@kms_psr@cursor_plane_move.html

  * igt@kms_psr@sprite_plane_onoff:
    - fi-tgl-y:           [PASS][3] -> [SKIP][4] +3 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-tgl-y/igt@kms_psr@sprite_plane_onoff.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-tgl-y/igt@kms_psr@sprite_plane_onoff.html
    - fi-icl-guc:         [PASS][5] -> [SKIP][6] +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-icl-guc/igt@kms_psr@sprite_plane_onoff.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-icl-guc/igt@kms_psr@sprite_plane_onoff.html
    - fi-cml-s:           [PASS][7] -> [SKIP][8] +3 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-cml-s/igt@kms_psr@sprite_plane_onoff.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-cml-s/igt@kms_psr@sprite_plane_onoff.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_psr@primary_mmap_gtt:
    - {fi-tgl-u}:         [SKIP][9] ([i915#668]) -> [SKIP][10] +3 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-tgl-u/igt@kms_psr@primary_mmap_gtt.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-tgl-u/igt@kms_psr@primary_mmap_gtt.html

  
Known issues
------------

  Here are the changes found in IGTPW_4425 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-skl-6770hq:      [PASS][11] -> [FAIL][12] ([i915#220]) +8 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-skl-6770hq/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-skl-6770hq/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_psr@cursor_plane_move:
    - fi-kbl-r:           [PASS][13] -> [SKIP][14] ([fdo#109271]) +3 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-kbl-r/igt@kms_psr@cursor_plane_move.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-kbl-r/igt@kms_psr@cursor_plane_move.html
    - fi-kbl-soraka:      [PASS][15] -> [SKIP][16] ([fdo#109271]) +3 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-kbl-soraka/igt@kms_psr@cursor_plane_move.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-kbl-soraka/igt@kms_psr@cursor_plane_move.html

  * igt@kms_psr@primary_mmap_gtt:
    - fi-cml-u2:          [PASS][17] -> [SKIP][18] ([fdo#110189]) +3 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-cml-u2/igt@kms_psr@primary_mmap_gtt.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-cml-u2/igt@kms_psr@primary_mmap_gtt.html

  * igt@kms_psr@primary_page_flip:
    - fi-skl-6600u:       [PASS][19] -> [SKIP][20] ([fdo#109271]) +3 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-skl-6600u/igt@kms_psr@primary_page_flip.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

  
#### Possible fixes ####

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-cml-u2:          [DMESG-WARN][21] ([IGT#4]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-cml-u2/igt@kms_chamelium@common-hpd-after-suspend.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-cml-u2/igt@kms_chamelium@common-hpd-after-suspend.html

  
#### Warnings ####

  * igt@kms_psr@cursor_plane_move:
    - fi-whl-u:           [SKIP][23] ([fdo#109271] / [i915#668]) -> [SKIP][24] ([fdo#109271]) +3 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5574/fi-whl-u/igt@kms_psr@cursor_plane_move.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/fi-whl-u/igt@kms_psr@cursor_plane_move.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [IGT#4]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/4
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [i915#220]: https://gitlab.freedesktop.org/drm/intel/issues/220
  [i915#668]: https://gitlab.freedesktop.org/drm/intel/issues/668


Participating hosts (53 -> 47)
------------------------------

  Additional (1): fi-kbl-7560u 
  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5574 -> IGTPW_4425

  CI-20190529: 20190529
  CI_DRM_8264: e0104585f880a64d4a9b40803cf4fb51ab499f7c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4425: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/index.html
  IGT_5574: 15e8ffecfd55d3d632491b73ed981e4467145a4b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@kms_chamelium@dp-hpd-enable-disable-mode
+igt@kms_chamelium@dp-hpd-with-enabled-mode
+igt@kms_chamelium@hdmi-hpd-enable-disable-mode
+igt@kms_chamelium@hdmi-hpd-with-enabled-mode
+igt@kms_chamelium@vga-hpd-enable-disable-mode
+igt@kms_chamelium@vga-hpd-with-enabled-mode

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4425/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set
  2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
                   ` (7 preceding siblings ...)
  2020-04-07 14:08 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
@ 2020-04-08 14:15 ` Imre Deak
  2020-04-08 14:23   ` Imre Deak
  8 siblings, 1 reply; 11+ messages in thread
From: Imre Deak @ 2020-04-08 14:15 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

On Tue, Apr 07, 2020 at 04:16:27PM +0300, Arkadiusz Hiler wrote:
> Subtest 'invalid' was depending on a "leftover" mode set by something
> external (usually fbcon) in order to work.
> 
> Let's make the test more robust by setting the mode explicitly.
> 
> v2: set flag for the pipe we are using (Imre)
> 
> Cc: Imre Deak <imre.deak@intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> ---
>  tests/kms_vblank.c | 27 ++++++++++++++++++++++-----
>  1 file changed, 22 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
> index a895ab80..7b5f3426 100644
> --- a/tests/kms_vblank.c
> +++ b/tests/kms_vblank.c
> @@ -472,12 +472,26 @@ static void invalid_subtest(data_t *data, int fd)
>  {
>  	union drm_wait_vblank vbl;
>  	unsigned long valid_flags;
> +	enum pipe pipe;
> +	igt_output_t* output;
> +	bool found = false;
> +	int base_flags;
> +
> +	/* we need to have a mode set, otherwise we will get EINVAL no matter what */
> +	for_each_pipe_with_single_output(&data->display, pipe, output) {
> +		data->pipe = pipe;
> +		found = true;
> +		break;
> +	}
> +
> +	igt_require_f(found, "No outputs connected = no vblanks\n");
> +	prepare_crtc(data, fd, output);
>  
> -	igt_display_require_output_on_pipe(&data->display, 0);
> +	base_flags = _DRM_VBLANK_RELATIVE | kmstest_get_vbl_flag(data->pipe);
>  
>  	/* First check all is well with a simple query */
>  	memset(&vbl, 0, sizeof(vbl));
> -	vbl.request.type = DRM_VBLANK_RELATIVE;
> +	vbl.request.type = base_flags;
>  	igt_assert_eq(wait_vblank(fd, &vbl), 0);
>  
>  	valid_flags = (_DRM_VBLANK_TYPES_MASK |
> @@ -486,7 +500,9 @@ static void invalid_subtest(data_t *data, int fd)
>  
>  	/* pick some interesting invalid permutations */
>  	memset(&vbl, 0, sizeof(vbl));
> -	vbl.request.type = _DRM_VBLANK_RELATIVE | ~valid_flags;
> +	vbl.request.type = base_flags;
> +	vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
> +	vbl.request.type |= ~valid_flags;

Or just vbl.request.type = base_flags | ~valid_flags; ?

>  	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
>  	for (int bit = 0; bit < 32; bit++) {
>  		int err;
> @@ -495,7 +511,7 @@ static void invalid_subtest(data_t *data, int fd)
>  			continue;
>  
>  		memset(&vbl, 0, sizeof(vbl));
> -		vbl.request.type = _DRM_VBLANK_RELATIVE | (1 << bit);
> +		vbl.request.type = base_flags | (1 << bit);
>  		err = wait_vblank(fd, &vbl);
>  		igt_assert_f(err == -EINVAL,
>  			     "vblank wait with invalid request.type bit %d [0x%08x] did not report -EINVAL, got %d\n",
> @@ -504,10 +520,11 @@ static void invalid_subtest(data_t *data, int fd)
>  
>  	/* check the maximum pipe, nobody should have that many pipes! */
>  	memset(&vbl, 0, sizeof(vbl));
> -	vbl.request.type = _DRM_VBLANK_RELATIVE;
> +	vbl.request.type = base_flags;
>  	vbl.request.type |= _DRM_VBLANK_SECONDARY;
>  	vbl.request.type |= _DRM_VBLANK_FLAGS_MASK;
>  	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);

Semi-unrelated, but not sure what the 'maximum pipe' means, or how this
will pass now if it's not pipe A we use. I think it wants to test a
non-existing or disabled pipe, which needs to be fixed. (as a follow-up)

Reviewed-by: Imre Deak <imre.deak@intel.com>

> +	cleanup_crtc(data, fd, output);
>  }
>  
>  igt_main
> -- 
> 2.24.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set
  2020-04-08 14:15 ` [igt-dev] [PATCH i-g-t 1/7] " Imre Deak
@ 2020-04-08 14:23   ` Imre Deak
  0 siblings, 0 replies; 11+ messages in thread
From: Imre Deak @ 2020-04-08 14:23 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

On Wed, Apr 08, 2020 at 05:15:39PM +0300, Imre Deak wrote:
> On Tue, Apr 07, 2020 at 04:16:27PM +0300, Arkadiusz Hiler wrote:
> > Subtest 'invalid' was depending on a "leftover" mode set by something
> > external (usually fbcon) in order to work.
> > 
> > Let's make the test more robust by setting the mode explicitly.
> > 
> > v2: set flag for the pipe we are using (Imre)
> > 
> > Cc: Imre Deak <imre.deak@intel.com>
> > Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > ---
> >  tests/kms_vblank.c | 27 ++++++++++++++++++++++-----
> >  1 file changed, 22 insertions(+), 5 deletions(-)
> > 
> > diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
> > index a895ab80..7b5f3426 100644
> > --- a/tests/kms_vblank.c
> > +++ b/tests/kms_vblank.c
> > @@ -472,12 +472,26 @@ static void invalid_subtest(data_t *data, int fd)
> >  {
> >  	union drm_wait_vblank vbl;
> >  	unsigned long valid_flags;
> > +	enum pipe pipe;
> > +	igt_output_t* output;
> > +	bool found = false;
> > +	int base_flags;
> > +
> > +	/* we need to have a mode set, otherwise we will get EINVAL no matter what */
> > +	for_each_pipe_with_single_output(&data->display, pipe, output) {
> > +		data->pipe = pipe;
> > +		found = true;
> > +		break;
> > +	}
> > +
> > +	igt_require_f(found, "No outputs connected = no vblanks\n");
> > +	prepare_crtc(data, fd, output);
> >  
> > -	igt_display_require_output_on_pipe(&data->display, 0);
> > +	base_flags = _DRM_VBLANK_RELATIVE | kmstest_get_vbl_flag(data->pipe);
> >  
> >  	/* First check all is well with a simple query */
> >  	memset(&vbl, 0, sizeof(vbl));
> > -	vbl.request.type = DRM_VBLANK_RELATIVE;
> > +	vbl.request.type = base_flags;
> >  	igt_assert_eq(wait_vblank(fd, &vbl), 0);
> >  
> >  	valid_flags = (_DRM_VBLANK_TYPES_MASK |
> > @@ -486,7 +500,9 @@ static void invalid_subtest(data_t *data, int fd)
> >  
> >  	/* pick some interesting invalid permutations */
> >  	memset(&vbl, 0, sizeof(vbl));
> > -	vbl.request.type = _DRM_VBLANK_RELATIVE | ~valid_flags;
> > +	vbl.request.type = base_flags;
> > +	vbl.request.type |= kmstest_get_vbl_flag(data->pipe);
> > +	vbl.request.type |= ~valid_flags;
> 
> Or just vbl.request.type = base_flags | ~valid_flags; ?
> 
> >  	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
> >  	for (int bit = 0; bit < 32; bit++) {
> >  		int err;
> > @@ -495,7 +511,7 @@ static void invalid_subtest(data_t *data, int fd)
> >  			continue;
> >  
> >  		memset(&vbl, 0, sizeof(vbl));
> > -		vbl.request.type = _DRM_VBLANK_RELATIVE | (1 << bit);
> > +		vbl.request.type = base_flags | (1 << bit);
> >  		err = wait_vblank(fd, &vbl);
> >  		igt_assert_f(err == -EINVAL,
> >  			     "vblank wait with invalid request.type bit %d [0x%08x] did not report -EINVAL, got %d\n",
> > @@ -504,10 +520,11 @@ static void invalid_subtest(data_t *data, int fd)
> >  
> >  	/* check the maximum pipe, nobody should have that many pipes! */
> >  	memset(&vbl, 0, sizeof(vbl));
> > -	vbl.request.type = _DRM_VBLANK_RELATIVE;
> > +	vbl.request.type = base_flags;
> >  	vbl.request.type |= _DRM_VBLANK_SECONDARY;
> >  	vbl.request.type |= _DRM_VBLANK_FLAGS_MASK;
> >  	igt_assert_eq(wait_vblank(fd, &vbl), -EINVAL);
> 
> Semi-unrelated, but not sure what the 'maximum pipe' means, or how this
> will pass now if it's not pipe A we use. I think it wants to test a
> non-existing or disabled pipe, which needs to be fixed. (as a follow-up)

It happens to pass, because _DRM_VBLANK_SIGNAL is an invalid flag
nowadays.

> Reviewed-by: Imre Deak <imre.deak@intel.com>
> 
> > +	cleanup_crtc(data, fd, output);
> >  }
> >  
> >  igt_main
> > -- 
> > 2.24.1
> > 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-08 14:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 13:16 [igt-dev] [PATCH i-g-t 1/7] tests/kms_vblank: Make sure that we have a mode set Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 2/7] tests/kms_dp_dsc: Explicitly enable mode before DSC checks Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 3/7] lib/igt_psr: Set mode before checking if PSR is supported Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 4/7] lib/kms: Commit reasonable defaults on display init Arkadiusz Hiler
2020-04-07 13:16 ` [igt-dev] [PATCH i-g-t 5/7] lib/kms: Reprobe connector state after disabling modest Arkadiusz Hiler
2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 6/7] tests/kms_chamelium: Issue disabling modeset when resetting state Arkadiusz Hiler
2020-04-07 13:19 ` [igt-dev] [PATCH i-g-t 7/7] tests/kms_chamelium: Test HPD for different mode handling scenarios Arkadiusz Hiler
2020-04-07 13:44 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [i-g-t,1/7] tests/kms_vblank: Make sure that we have a mode set Patchwork
2020-04-07 14:08 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2020-04-08 14:15 ` [igt-dev] [PATCH i-g-t 1/7] " Imre Deak
2020-04-08 14:23   ` Imre Deak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.