All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require
@ 2018-11-22  9:36 Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:36 UTC (permalink / raw)
  To: IGT development

Need to extract into a test subgroup to make sure we only skip the
tests that need display support.

v2: Chris pointed out that "read-all-entries" was the original non-kms
tests, and we don't want to skip that if there's no output. Make a
seperate test for this.

Also, that kind of where libraries magically second-guess what the
test might have wanted when it supplies an invalid request is exactly
why I want to fix the igt_display_init API regression.

v3: Actually squash in the hunk that was supposed to do v2 into this
patch (Antonio).

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 tests/debugfs_test.c | 42 ++++++++++++++++++++++++++++--------------
 1 file changed, 28 insertions(+), 14 deletions(-)

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 2e87e4420b15..6a87d90afd0e 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -87,25 +87,16 @@ static void read_and_discard_sysfs_entries(int path_fd, int indent)
 	closedir(dir);
 }
 
-igt_main
+static void kms_tests(int fd, int debugfs)
 {
-	int fd = -1, debugfs;
 	igt_display_t display;
 	struct igt_fb fb[IGT_MAX_PIPES];
 	enum pipe pipe;
 
-	igt_skip_on_simulation();
-
-	igt_fixture {
-		fd = drm_open_driver_master(DRIVER_INTEL);
-		igt_require_gem(fd);
-		debugfs = igt_debugfs_dir(fd);
-
-		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, fd);
-	}
+	igt_fixture
+		igt_display_require(&display, fd);
 
-	igt_subtest("read_all_entries") {
+	igt_subtest("read_all_entries_display_on") {
 		/* try to light all pipes */
 		for_each_pipe(&display, pipe) {
 			igt_output_t *output;
@@ -152,6 +143,30 @@ igt_main
 		read_and_discard_sysfs_entries(debugfs, 0);
 	}
 
+	igt_fixture
+		igt_display_fini(&display);
+}
+
+igt_main
+{
+	int fd = -1, debugfs;
+
+	igt_skip_on_simulation();
+
+	igt_fixture {
+		fd = drm_open_driver_master(DRIVER_INTEL);
+		igt_require_gem(fd);
+		debugfs = igt_debugfs_dir(fd);
+
+		kmstest_set_vt_graphics_mode();
+	}
+
+	igt_subtest("read_all_entries")
+		read_and_discard_sysfs_entries(debugfs, 0);
+
+	igt_subtest_group
+		kms_tests(fd, debugfs);
+
 	igt_subtest("emon_crash") {
 		int i;
 		/*
@@ -174,7 +189,6 @@ igt_main
 	}
 
 	igt_fixture {
-		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
-- 
2.19.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/5] tests: Use igt_display_require
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
@ 2018-11-22  9:36 ` Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 3/5] lib/kms: Drop igt_display_init Daniel Vetter
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:36 UTC (permalink / raw)
  To: IGT development

Remaining tests that have been overlooked and don't need any
invasive changes to limit the skipping to only the relevant parts.

v2: [A rebase gone wrong]

v3: Move the misplaced hunk to the right patch (Antonio).

v4: Rebase, kms_content_protection is new.

v5: Rebase - need to adjust kms_lease.c too.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v3)
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_chamelium.c               |  2 +-
 tests/kms_atomic_interruptible.c  |  4 ++--
 tests/kms_content_protection.c    |  3 ++-
 tests/kms_force_connector_basic.c |  2 +-
 tests/kms_getfb.c                 |  2 +-
 tests/kms_lease.c                 | 10 +++++-----
 tests/kms_plane_alpha_blend.c     |  2 +-
 tests/kms_sequence.c              |  2 +-
 tests/perf_pmu.c                  |  2 +-
 tests/pm_backlight.c              |  2 +-
 tests/prime_mmap_kms.c            |  2 +-
 11 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/lib/igt_chamelium.c b/lib/igt_chamelium.c
index a80ead163846..d136fb04c342 100644
--- a/lib/igt_chamelium.c
+++ b/lib/igt_chamelium.c
@@ -1547,7 +1547,7 @@ static void chamelium_exit_handler(int sig)
 /**
  * chamelium_init:
  * @chamelium: The Chamelium instance to use
- * @drm_fd: a display initialized with #igt_display_init
+ * @drm_fd: a display initialized with #igt_display_require
  *
  * Sets up a connection with a chamelium, using the URL specified in the
  * Chamelium configuration. This must be called first before trying to use the
diff --git a/tests/kms_atomic_interruptible.c b/tests/kms_atomic_interruptible.c
index 8e9d4cb69c4d..be688638973f 100644
--- a/tests/kms_atomic_interruptible.c
+++ b/tests/kms_atomic_interruptible.c
@@ -85,8 +85,8 @@ static void run_plane_test(igt_display_t *display, enum pipe pipe, igt_output_t
 
 	/*
 	 * Make sure we start with everything disabled to force a real modeset.
-	 * igt_display_init only sets sw state, and assumes the first test doesn't care
-	 * about hw state.
+	 * igt_display_require only sets sw state, and assumes the first test
+	 * doesn't care about hw state.
 	 */
 	igt_display_commit2(display, COMMIT_ATOMIC);
 
diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
index ef90ed4c1792..50ae82862949 100644
--- a/tests/kms_content_protection.c
+++ b/tests/kms_content_protection.c
@@ -26,6 +26,7 @@
 #include <fcntl.h>
 #include "igt.h"
 #include "igt_sysfs.h"
+#include "igt_kms.h"
 
 IGT_TEST_DESCRIPTION("Test content protection (HDCP)");
 
@@ -291,7 +292,7 @@ igt_main
 
 		data.drm_fd = drm_open_driver(DRIVER_ANY);
 
-		igt_display_init(&data.display, data.drm_fd);
+		igt_display_require(&data.display, data.drm_fd);
 	}
 
 	igt_subtest("legacy")
diff --git a/tests/kms_force_connector_basic.c b/tests/kms_force_connector_basic.c
index e9325dec9305..b8246e669939 100644
--- a/tests/kms_force_connector_basic.c
+++ b/tests/kms_force_connector_basic.c
@@ -217,7 +217,7 @@ int main(int argc, char **argv)
 
 		/* attempt to use the display */
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, drm_fd);
+		igt_display_require(&display, drm_fd);
 		igt_display_commit(&display);
 		igt_display_fini(&display);
 
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 07ffd79c4613..ca0b01c05e5c 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -116,7 +116,7 @@ static uint32_t get_any_prop_id(int fd)
 {
 	igt_display_t display;
 
-	igt_display_init(&display, fd);
+	igt_display_require(&display, fd);
 	for (int i = 0; i < display.n_outputs; i++) {
 		igt_output_t *output = &display.outputs[i];
 		if (output->props[IGT_CONNECTOR_DPMS] != 0)
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index e98c2a0f3506..cca424598ea7 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -294,7 +294,7 @@ static void simple_lease(data_t *data)
 	/* Create a valid lease */
 	igt_assert_eq(make_lease(data, &lease), 0);
 
-	igt_display_init(&lease.display, lease.fd);
+	igt_display_require(&lease.display, lease.fd);
 
 	/* Set a mode on the leased output */
 	igt_assert_eq(0, prepare_crtc(&lease, data->connector_id, data->crtc_id));
@@ -432,7 +432,7 @@ static void lease_unleased_crtc(data_t *data)
 	/* Create a valid lease */
 	igt_assert_eq(make_lease(data, &lease), 0);
 
-	igt_display_init(&lease.display, lease.fd);
+	igt_display_require(&lease.display, lease.fd);
 
 	/* Find another CRTC that we don't control */
 	bad_crtc_id = 0;
@@ -474,7 +474,7 @@ static void lease_unleased_connector(data_t *data)
 	/* Create a valid lease */
 	igt_assert_eq(make_lease(data, &lease), 0);
 
-	igt_display_init(&lease.display, lease.fd);
+	igt_display_require(&lease.display, lease.fd);
 
 	/* Find another connector that we don't control */
 	bad_connector_id = 0;
@@ -509,7 +509,7 @@ static void lease_revoke(data_t *data)
 	/* Create a valid lease */
 	igt_assert_eq(make_lease(data, &lease), 0);
 
-	igt_display_init(&lease.display, lease.fd);
+	igt_display_require(&lease.display, lease.fd);
 
 	/* Revoke the lease using the master fd */
 	mrl.lessee_id = lease.lessee_id;
@@ -633,7 +633,7 @@ igt_main
 	igt_fixture {
 		data.master.fd = drm_open_driver_master(DRIVER_ANY);
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&data.master.display, data.master.fd);
+		igt_display_require(&data.master.display, data.master.fd);
 	}
 
 	for (f = funcs; f->name; f++) {
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 3fab118ae0e1..1d9d8933d7e2 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -565,7 +565,7 @@ igt_main
 	igt_fixture {
 		data.gfx_fd = drm_open_driver(DRIVER_ANY);
 		igt_require_pipe_crc(data.gfx_fd);
-		igt_display_init(&data.display, data.gfx_fd);
+		igt_display_require(&data.display, data.gfx_fd);
 		igt_require(data.display.is_atomic);
 	}
 
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index c68f7707c7a4..6383b0ca41e4 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -300,7 +300,7 @@ igt_main
 	igt_fixture {
 		fd = drm_open_driver_master(DRIVER_ANY);
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&data.display, fd);
+		igt_display_require(&data.display, fd);
 	}
 
 	for (f = funcs; f->name; f++) {
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index b34bc66ce2c4..21292bf3a2fe 100644
--- a/tests/perf_pmu.c
+++ b/tests/perf_pmu.c
@@ -811,7 +811,7 @@ event_wait(int gem_fd, const struct intel_execution_engine2 *e)
 	igt_skip_on(IS_VALLEYVIEW(devid) || IS_CHERRYVIEW(devid));
 
 	kmstest_set_vt_graphics_mode();
-	igt_display_init(&data.display, gem_fd);
+	igt_display_require(&data.display, gem_fd);
 
 	/**
 	 * We will use the display to render event forwarind so need to
diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index 32808cdf6ca4..054300f6e2e1 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -214,7 +214,7 @@ igt_main
 		 * try to enable all.
 		 */
 		kmstest_set_vt_graphics_mode();
-		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+		igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
 
 		/* should be ../../cardX-$output */
 		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
diff --git a/tests/prime_mmap_kms.c b/tests/prime_mmap_kms.c
index faace4afd478..fdc37214d96d 100644
--- a/tests/prime_mmap_kms.c
+++ b/tests/prime_mmap_kms.c
@@ -248,7 +248,7 @@ igt_main
 
 		igt_require_pipe_crc(gpu.drm_fd);
 
-		igt_display_init(&gpu.display, gpu.drm_fd);
+		igt_display_require(&gpu.display, gpu.drm_fd);
 	}
 
 	igt_subtest("buffer-sharing")
-- 
2.19.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/5] lib/kms: Drop igt_display_init
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
@ 2018-11-22  9:36 ` Daniel Vetter
  2018-11-26 21:37   ` Antonio Argenziano
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: warn if we commit without outputs Daniel Vetter
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:36 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

If you need the high-level functions, then you probably need a
full display. Unexport the non-requiring version, and adjust the
documentation. This also gives us proper docs for the recently
added igt_display_require.

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/igt_kms.c | 14 +++++---------
 lib/igt_kms.h |  1 -
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index d806ccc1e0b9..7214101e2696 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1861,16 +1861,17 @@ static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane
 static void igt_fill_display_format_mod(igt_display_t *display);
 
 /**
- * igt_display_init:
+ * igt_display_require:
  * @display: a pointer to an #igt_display_t structure
  * @drm_fd: a drm file descriptor
  *
  * Initialize @display and allocate the various resources required. Use
  * #igt_display_fini to release the resources when they are no longer required.
  *
- * Returns: true if the display has outputs and pipes available, false otherwise
+ * This function automatically skips if the kernel driver doesn't support any
+ * CRTC or outputs.
  */
-bool igt_display_init(igt_display_t *display, int drm_fd)
+void igt_display_require(igt_display_t *display, int drm_fd)
 {
 	drmModeRes *resources;
 	drmModePlaneRes *plane_resources;
@@ -2034,12 +2035,7 @@ bool igt_display_init(igt_display_t *display, int drm_fd)
 out:
 	LOG_UNINDENT(display);
 
-	return display->n_pipes && display->n_outputs;
-}
-
-void igt_display_require(igt_display_t *display, int drm_fd)
-{
-	igt_require(igt_display_init(display, drm_fd));
+	igt_require(display->n_pipes && display->n_outputs);
 }
 
 /**
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index e6aff339af60..09395360007f 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -382,7 +382,6 @@ struct igt_display {
 	int format_mod_count;
 };
 
-bool igt_display_init(igt_display_t *display, int drm_fd);
 void igt_display_require(igt_display_t *display, int drm_fd);
 void igt_display_fini(igt_display_t *display);
 void igt_display_reset(igt_display_t *display);
-- 
2.19.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/5] lib/kms: warn if we commit without outputs
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 3/5] lib/kms: Drop igt_display_init Daniel Vetter
@ 2018-11-22  9:36 ` Daniel Vetter
  2018-11-26 12:33   ` Arkadiusz Hiler
  2018-11-22  9:37 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: Enable outputs by default in igt_require_display Daniel Vetter
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:36 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

With the high-level helpers requiring outputs there's not point
in silently ignoring issues anymore. Complain about that if it
ever happens.

This reverts

commit 212b71372bfbb73663d872df31118d6b396ada4f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Sep 14 21:03:38 2018 +0100

    lib/kms: Skip no-op display updates

which created an in my opinion serious API issue by silently dropping
possible errors on the floor. Instead of silently second guess what
the test might have wanted to do in the absence of display outputs
it's much better to be explicit, and enforce that.

v2: Improve commit message.

v3: Switch to an assert and update comments, to make it clear this is
igt_display api abuse (Arek).

Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v2)
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/igt_kms.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 7214101e2696..73cea75d19f0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -3292,8 +3292,8 @@ static int do_display_commit(igt_display_t *display,
 	enum pipe pipe;
 	LOG_INDENT(display, "commit");
 
-	if (!display->n_pipes || !display->n_outputs)
-		return 0; /* nothing to do */
+	/* someone managed to bypass igt_display_require, catch them */
+	assert(display->n_pipes && display->n_outputs);
 
 	igt_display_refresh(display);
 
@@ -3345,8 +3345,8 @@ int igt_display_try_commit_atomic(igt_display_t *display, uint32_t flags, void *
 {
 	int ret;
 
-	if (!display->n_pipes || !display->n_outputs)
-		return 0; /* nothing to do */
+	/* someone managed to bypass igt_display_require, catch them */
+	assert(display->n_pipes && display->n_outputs);
 
 	LOG_INDENT(display, "commit");
 
-- 
2.19.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/5] lib/kms: Enable outputs by default in igt_require_display
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
                   ` (2 preceding siblings ...)
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: warn if we commit without outputs Daniel Vetter
@ 2018-11-22  9:37 ` Daniel Vetter
  2018-11-29 17:18   ` Daniel Vetter
  2018-11-23 11:53 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require Patchwork
  2018-11-23 13:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 1 reply; 11+ messages in thread
From: Daniel Vetter @ 2018-11-22  9:37 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

More testing, automatically when using the high-level kms helpers!

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/igt_kms.c                | 6 +++++-
 tests/kms_invalid_dotclock.c | 1 -
 tests/kms_pipe_crc_basic.c   | 2 --
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 73cea75d19f0..be5a5bbbf92d 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2035,7 +2035,11 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 out:
 	LOG_UNINDENT(display);
 
-	igt_require(display->n_pipes && display->n_outputs);
+	if (display->n_pipes && display->n_outputs)
+		igt_enable_connectors(drm_fd);
+	else
+		igt_skip("No KMS driver or no outputs, pipes: %d, outputs: %d\n",
+			 display->n_pipes, display->n_outputs);
 }
 
 /**
diff --git a/tests/kms_invalid_dotclock.c b/tests/kms_invalid_dotclock.c
index 8c4c3122bec1..275007df942d 100644
--- a/tests/kms_invalid_dotclock.c
+++ b/tests/kms_invalid_dotclock.c
@@ -131,7 +131,6 @@ igt_simple_main
 	data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
 	igt_require_intel(data.drm_fd);
 
-	igt_enable_connectors(data.drm_fd);
 	kmstest_set_vt_graphics_mode();
 
 	igt_display_require(&data.display, data.drm_fd);
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 5bc0952fca3d..60802848d3ee 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -181,8 +181,6 @@ igt_main
 	igt_fixture {
 		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
 
-		igt_enable_connectors(data.drm_fd);
-
 		kmstest_set_vt_graphics_mode();
 
 		igt_require_pipe_crc(data.drm_fd);
-- 
2.19.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] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
                   ` (3 preceding siblings ...)
  2018-11-22  9:37 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: Enable outputs by default in igt_require_display Daniel Vetter
@ 2018-11-23 11:53 ` Patchwork
  2018-11-23 13:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-11-23 11:53 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require
URL   : https://patchwork.freedesktop.org/series/52867/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4725 -> IGTPW_2086 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52867/revisions/1/mbox/

== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-WARN (fdo#102614)

    
    ==== Possible fixes ====

    igt@gem_ctx_create@basic-files:
      fi-icl-u2:          DMESG-WARN (fdo#107724) -> PASS

    igt@i915_selftest@live_contexts:
      fi-kbl-7560u:       INCOMPLETE -> PASS

    
  fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
  fdo#107724 https://bugs.freedesktop.org/show_bug.cgi?id=107724


== Participating hosts (51 -> 43) ==

  Missing    (8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-u3 fi-icl-y 


== Build changes ==

    * IGT: IGT_4725 -> IGTPW_2086

  CI_DRM_5185: 08f3cf2314cc0484a5b332e8dc206e778709bf21 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2086: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2086/
  IGT_4725: 9dc7c41d1c600133d6e3e63f1941c2e75d23bd3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@debugfs_test@read_all_entries_display_on

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2086/issues.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

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require
  2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
                   ` (4 preceding siblings ...)
  2018-11-23 11:53 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require Patchwork
@ 2018-11-23 13:18 ` Patchwork
  5 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2018-11-23 13:18 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require
URL   : https://patchwork.freedesktop.org/series/52867/
State : success

== Summary ==

= CI Bug Log - changes from IGT_4725_full -> IGTPW_2086_full =

== Summary - WARNING ==

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

  External URL: https://patchwork.freedesktop.org/api/1.0/series/52867/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Warnings ====

    igt@kms_lease@lease_invalid_crtc:
      shard-snb:          SKIP -> PASS

    igt@perf_pmu@rc6:
      shard-kbl:          SKIP -> PASS

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_ccs@pipe-a-crc-sprite-planes-basic:
      shard-glk:          PASS -> FAIL (fdo#108145)

    igt@kms_ccs@pipe-b-crc-sprite-planes-basic:
      shard-kbl:          PASS -> FAIL (fdo#107725, fdo#108145)

    igt@kms_cursor_crc@cursor-256x256-random:
      shard-apl:          PASS -> FAIL (fdo#103232) +3

    igt@kms_cursor_crc@cursor-256x85-sliding:
      shard-kbl:          PASS -> FAIL (fdo#103232) +3

    igt@kms_cursor_crc@cursor-size-change:
      shard-glk:          PASS -> FAIL (fdo#103232) +4

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
      shard-apl:          PASS -> FAIL (fdo#103167) +2

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-draw-mmap-wc:
      shard-glk:          PASS -> FAIL (fdo#103167) +3

    igt@kms_plane@plane-position-covered-pipe-a-planes:
      shard-glk:          PASS -> FAIL (fdo#103166) +2
      shard-apl:          PASS -> FAIL (fdo#103166)

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    igt@syncobj_wait@wait-all-for-submit-complex:
      shard-snb:          PASS -> INCOMPLETE (fdo#107469, fdo#105411)

    
    ==== Possible fixes ====

    igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-c:
      shard-snb:          INCOMPLETE (fdo#107469, fdo#105411) -> SKIP

    igt@kms_cursor_crc@cursor-128x128-random:
      shard-kbl:          FAIL (fdo#103232) -> PASS +1

    igt@kms_cursor_crc@cursor-64x21-sliding:
      shard-apl:          FAIL (fdo#103232) -> PASS +3
      shard-glk:          FAIL (fdo#103232) -> PASS

    igt@kms_cursor_crc@cursor-64x64-suspend:
      shard-apl:          FAIL (fdo#103232, fdo#103191) -> PASS

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
      shard-apl:          FAIL (fdo#103167) -> PASS
      shard-kbl:          FAIL (fdo#103167) -> PASS

    igt@kms_frontbuffer_tracking@fbc-2p-primscrn-spr-indfb-onoff:
      shard-glk:          FAIL (fdo#103167) -> PASS +4

    igt@kms_pipe_crc_basic@read-crc-pipe-a:
      shard-glk:          DMESG-WARN (fdo#106538, fdo#105763) -> PASS +2

    igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
      shard-glk:          FAIL (fdo#108145) -> PASS

    igt@kms_plane_multiple@atomic-pipe-c-tiling-y:
      shard-glk:          FAIL (fdo#103166) -> PASS +2

    igt@kms_plane_multiple@atomic-pipe-c-tiling-yf:
      shard-apl:          FAIL (fdo#103166) -> PASS +5
      shard-kbl:          FAIL (fdo#103166) -> PASS +2

    
  fdo#103166 https://bugs.freedesktop.org/show_bug.cgi?id=103166
  fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103232 https://bugs.freedesktop.org/show_bug.cgi?id=103232
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105763 https://bugs.freedesktop.org/show_bug.cgi?id=105763
  fdo#106538 https://bugs.freedesktop.org/show_bug.cgi?id=106538
  fdo#107469 https://bugs.freedesktop.org/show_bug.cgi?id=107469
  fdo#107725 https://bugs.freedesktop.org/show_bug.cgi?id=107725
  fdo#108145 https://bugs.freedesktop.org/show_bug.cgi?id=108145
  fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912


== Participating hosts (7 -> 5) ==

  Missing    (2): shard-skl shard-iclb 


== Build changes ==

    * IGT: IGT_4725 -> IGTPW_2086

  CI_DRM_5185: 08f3cf2314cc0484a5b332e8dc206e778709bf21 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_2086: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2086/
  IGT_4725: 9dc7c41d1c600133d6e3e63f1941c2e75d23bd3b @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2086/shards.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 4/5] lib/kms: warn if we commit without outputs
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: warn if we commit without outputs Daniel Vetter
@ 2018-11-26 12:33   ` Arkadiusz Hiler
  0 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2018-11-26 12:33 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: IGT development, Daniel Vetter

On Thu, Nov 22, 2018 at 10:36:59AM +0100, Daniel Vetter wrote:
> With the high-level helpers requiring outputs there's not point
> in silently ignoring issues anymore. Complain about that if it
> ever happens.
> 
> This reverts
> 
> commit 212b71372bfbb73663d872df31118d6b396ada4f
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Fri Sep 14 21:03:38 2018 +0100
> 
>     lib/kms: Skip no-op display updates
> 
> which created an in my opinion serious API issue by silently dropping
> possible errors on the floor. Instead of silently second guess what
> the test might have wanted to do in the absence of display outputs
> it's much better to be explicit, and enforce that.
> 
> v2: Improve commit message.
> 
> v3: Switch to an assert and update comments, to make it clear this is
> igt_display api abuse (Arek).
> 
> Cc: Antonio Argenziano <antonio.argenziano@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (v2)
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
_______________________________________________
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 3/5] lib/kms: Drop igt_display_init
  2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 3/5] lib/kms: Drop igt_display_init Daniel Vetter
@ 2018-11-26 21:37   ` Antonio Argenziano
  2018-11-27  8:46     ` Daniel Vetter
  0 siblings, 1 reply; 11+ messages in thread
From: Antonio Argenziano @ 2018-11-26 21:37 UTC (permalink / raw)
  To: Daniel Vetter, IGT development; +Cc: Daniel Vetter



On 22/11/18 01:36, Daniel Vetter wrote:
> If you need the high-level functions, then you probably need a
> full display. Unexport the non-requiring version, and adjust the
> documentation. This also gives us proper docs for the recently
> added igt_display_require.

I actually liked having init and require to be separate. Are there no 
negative test cases that might play-around with a failing init?

other than that the series LGTM but you might want someone to look at 
[2/5] in details,
Acked-By: Antonio Argenziano


_______________________________________________
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 3/5] lib/kms: Drop igt_display_init
  2018-11-26 21:37   ` Antonio Argenziano
@ 2018-11-27  8:46     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-11-27  8:46 UTC (permalink / raw)
  To: Antonio Argenziano; +Cc: IGT development, Daniel Vetter

On Mon, Nov 26, 2018 at 01:37:03PM -0800, Antonio Argenziano wrote:
> 
> 
> On 22/11/18 01:36, Daniel Vetter wrote:
> > If you need the high-level functions, then you probably need a
> > full display. Unexport the non-requiring version, and adjust the
> > documentation. This also gives us proper docs for the recently
> > added igt_display_require.
> 
> I actually liked having init and require to be separate. Are there no
> negative test cases that might play-around with a failing init?

We dont (yet?) have testcases for the igt_display library itself. For any
kernel tests the summar above explains it: If you want to write
low-level/negative tests of atomic/kms functionality, igt_display is to
high-level to be useful. All those tests use libdrm functions directly
(plus maybe some of the low-level helpers we have, the functions with
kmstest_ prefixes).

> other than that the series LGTM but you might want someone to look at [2/5]
> in details,
> Acked-By: Antonio Argenziano

Thanks for taking a look, I'll pull in the entire series now.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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 5/5] lib/kms: Enable outputs by default in igt_require_display
  2018-11-22  9:37 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: Enable outputs by default in igt_require_display Daniel Vetter
@ 2018-11-29 17:18   ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2018-11-29 17:18 UTC (permalink / raw)
  To: IGT development; +Cc: Daniel Vetter

On Thu, Nov 22, 2018 at 10:37:00AM +0100, Daniel Vetter wrote:
> More testing, automatically when using the high-level kms helpers!
> 
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Ping.

Maarten: I didn't really get your comment on irc that it would be nice to
do this natively in igt_display ...
-Daniel

> ---
>  lib/igt_kms.c                | 6 +++++-
>  tests/kms_invalid_dotclock.c | 1 -
>  tests/kms_pipe_crc_basic.c   | 2 --
>  3 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 73cea75d19f0..be5a5bbbf92d 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -2035,7 +2035,11 @@ void igt_display_require(igt_display_t *display, int drm_fd)
>  out:
>  	LOG_UNINDENT(display);
>  
> -	igt_require(display->n_pipes && display->n_outputs);
> +	if (display->n_pipes && display->n_outputs)
> +		igt_enable_connectors(drm_fd);
> +	else
> +		igt_skip("No KMS driver or no outputs, pipes: %d, outputs: %d\n",
> +			 display->n_pipes, display->n_outputs);
>  }
>  
>  /**
> diff --git a/tests/kms_invalid_dotclock.c b/tests/kms_invalid_dotclock.c
> index 8c4c3122bec1..275007df942d 100644
> --- a/tests/kms_invalid_dotclock.c
> +++ b/tests/kms_invalid_dotclock.c
> @@ -131,7 +131,6 @@ igt_simple_main
>  	data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
>  	igt_require_intel(data.drm_fd);
>  
> -	igt_enable_connectors(data.drm_fd);
>  	kmstest_set_vt_graphics_mode();
>  
>  	igt_display_require(&data.display, data.drm_fd);
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index 5bc0952fca3d..60802848d3ee 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -181,8 +181,6 @@ igt_main
>  	igt_fixture {
>  		data.drm_fd = drm_open_driver_master(DRIVER_ANY);
>  
> -		igt_enable_connectors(data.drm_fd);
> -
>  		kmstest_set_vt_graphics_mode();
>  
>  		igt_require_pipe_crc(data.drm_fd);
> -- 
> 2.19.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
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:[~2018-11-29 17:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-22  9:36 [igt-dev] [PATCH i-g-t 1/5] tests/debugfs: use igt_display_require Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 2/5] tests: Use igt_display_require Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 3/5] lib/kms: Drop igt_display_init Daniel Vetter
2018-11-26 21:37   ` Antonio Argenziano
2018-11-27  8:46     ` Daniel Vetter
2018-11-22  9:36 ` [igt-dev] [PATCH i-g-t 4/5] lib/kms: warn if we commit without outputs Daniel Vetter
2018-11-26 12:33   ` Arkadiusz Hiler
2018-11-22  9:37 ` [igt-dev] [PATCH i-g-t 5/5] lib/kms: Enable outputs by default in igt_require_display Daniel Vetter
2018-11-29 17:18   ` Daniel Vetter
2018-11-23 11:53 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] tests/debugfs: use igt_display_require Patchwork
2018-11-23 13:18 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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.