Skip to contentSkip to conversation

tests/BAT: Reduce reliance on fbcon.

PATCH Superseded Maarten Lankhorst 5 participants 22 messages Oct 10, 2017 – Oct 25, 2017

lore
Share & tools
lore
#0 lore raw

cover tests/BAT: Reduce reliance on fbcon.

https://intel-gfx-ci.01.org/tree/drm-tip/Trybot_1235/ shows what happens in BAT if we make fbcon disable all outputs. debugfs_test.read_all_entries fails, probably in a race with fbcon. I'm hoping to solve this by running the test twice, once with all outputs enabled, other with all disabled. This should increase testing coverage.

pm_backlight fails without output setup, and is fixed by simply attempting to enable all outputs when we detect intel_backlight.

Maarten Lankhorst (2):
tests/debugfs_test: Try to light all outputs to increase chances of finding fails. tests/pm_backlight: Enable all possible outputs to allow tests to succeed.

 tests/debugfs_test.c | 34 ++++++++++++++++++++++++++++++++++
 tests/pm_backlight.c | 27 +++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/2 tests/debugfs_test: Try to light all outputs to increase chances of finding fails.

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

---
 tests/debugfs_test.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
tests/debugfs_test.c +34 -0
index 5e7805e1559e..bf1c5a1b5390 100644
@@ -78,15 +78,48 @@ static void read_and_discard_sysfs_entries(int path_fd)
 igt_main
 {
 	int fd = -1, debugfs;
+	igt_display_t display;
+
 	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_subtest("read_all_entries") {
+		enum pipe pipe;
+
+		/* try to light all pipes */
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
+				igt_output_set_pipe(output, pipe);
+				break;
+			}
+		}
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+		read_and_discard_sysfs_entries(debugfs);
+	}
+
+	igt_subtest("read_all_entries_display_off") {
+		igt_output_t *output;
+
+		for_each_connected_output(&display, output)
+			igt_output_set_pipe(output, PIPE_NONE);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
 		read_and_discard_sysfs_entries(debugfs);
 	}
 
@@ -112,6 +145,7 @@ igt_main
 	}
 
 	igt_fixture {
+		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

PATCH 2/2 tests/pm_backlight: Enable all possible outputs to allow tests to succeed.

In reply to Maarten Lankhorst

If all outputs are disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by enabling all outputs at the start of this test.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
tests/pm_backlight.c +27 -0
index 8258d4e4c124..b365c7f6dc60 100644
@@ -155,13 +155,37 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
+				igt_output_set_pipe(output, pipe);
+				break;
+			}
+		}
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +198,8 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw

Re: [PATCH i-g-t 2/2] tests/pm_backlight: Enable all possible outputs to allow tests to succeed.

Quoted 43 lines · Maarten Lankhorst

If all outputs are disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by enabling all outputs at the start of this test.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
tests/pm_backlight.c +12 -0
index 8258d4e4c124..b365c7f6dc60 100644
@@ -155,13 +155,37 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		for_each_pipe(&display, pipe) {

tests/pm_backlight.c igt_main · line 186

Quoted 10 lines
tests/pm_backlight.c +10 -0
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
+				igt_output_set_pipe(output, pipe);
+				break;
+			}
+		}

Since the test depends on intel_backlight I think we could even look up the correct backlight based on the connector. Would actually guarantee that we manage to light up the correct connector instead of wasting our precious pipes lighting up stuff we don't need.

Quoted 21 lines
tests/pm_backlight.c +5 -0
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +198,8 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

Re: [PATCH i-g-t 2/2] tests/pm_backlight: Enable all possible outputs to allow tests to succeed.

Op 10-10-17 om 18:14 schreef Ville Syrjälä:

Quoted 50 lines · Maarten Lankhorst
Quoted 49 lines

If all outputs are disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by enabling all outputs at the start of this test.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
tests/pm_backlight.c +18 -0
index 8258d4e4c124..b365c7f6dc60 100644
@@ -155,13 +155,37 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
Quoted 8 lines

tests/pm_backlight.c igt_main · line 186

Quoted 4 lines
tests/pm_backlight.c +4 -0
+				igt_output_set_pipe(output, pipe);
+				break;
+			}
+		}

Since the test depends on intel_backlight I think we could even look up the correct backlight based on the connector. Would actually guarantee that we manage to light up the correct connector instead of wasting our precious pipes lighting up stuff we don't need.

Through readlink /sys/class/backlight/intel_backlight/device you mean? Should be doable, but feels hacky..
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#17 lore raw

✗ Fi.CI.BAT: warning for tests/BAT: Reduce reliance on fbcon.

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/BAT: Reduce reliance on fbcon.
URL : https://patchwork.freedesktop.org/series/31671/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build d7c88290ab6a8393dc341b30c7fb5e27d2952901 syncobj: Add a test for SYNCOBJ_CREATE_SIGNALED

with latest DRM-Tip kernel build CI_DRM_3207
d82f454de90a drm-tip: 2017y-10m-10d-18h-40m-34s UTC integration manifest

Testlist changes:
+igt@debugfs_test@read_all_entries_display_off

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> DMESG-WARN (fi-glk-1)
                pass       -> DMESG-WARN (fi-cfl-s)
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-byt-j1900) fdo#101705 +1

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:457s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:469s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:390s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:573s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:288s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:527s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:529s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:542s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:527s
fi-cfl-s         total:289  pass:252  dwarn:5   dfail:0   fail:0   skip:32  time:566s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:638s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:435s
fi-glk-1         total:289  pass:260  dwarn:1   dfail:0   fail:0   skip:28  time:596s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:447s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:419s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:464s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:506s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:475s
fi-kbl-7500u     total:289  pass:263  dwarn:1   dfail:0   fail:1   skip:24  time:496s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:584s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:496s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:592s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:663s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:476s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:656s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:535s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:515s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:482s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:585s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:443s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_315/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH i-g-t 1/2] tests/debugfs_test: Try to light all outputs to increase chances of finding fails.

In reply to Maarten Lankhorst

Quoting Maarten Lankhorst (2017-10-10 17:04:27)

Quoted 7 lines

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

My only argument, but this is just one special case out of many, isn't really an argument but an endorsement.

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

Re: [PATCH i-g-t 2/2] tests/pm_backlight: Enable all possible outputs to allow tests to succeed.

In reply to Maarten Lankhorst
Quoted 59 lines · Maarten Lankhorst

Op 10-10-17 om 18:14 schreef Ville Syrjälä:

Quoted 50 lines · Maarten Lankhorst
Quoted 49 lines

If all outputs are disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by enabling all outputs at the start of this test.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
tests/pm_backlight.c +18 -0
index 8258d4e4c124..b365c7f6dc60 100644
@@ -155,13 +155,37 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
Quoted 8 lines

tests/pm_backlight.c igt_main · line 186

Quoted 4 lines
tests/pm_backlight.c +4 -0
+				igt_output_set_pipe(output, pipe);
+				break;
+			}
+		}

Since the test depends on intel_backlight I think we could even look up the correct backlight based on the connector. Would actually guarantee that we manage to light up the correct connector instead of wasting our precious pipes lighting up stuff we don't need.

Quoted 1 line

Through readlink /sys/class/backlight/intel_backlight/device you mean? Should be doable, but feels hacky..

/sys/class/drm/cardN-whatever/intel_backlight/

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#13 lore raw

PATCH 1/1 tests/pm_backlight: Enable connected output to allow tests to succeed, v2.

If the connected output is disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by reading intel_backlight/device for the output name, and enable that output at start of this test.

Changes since v1:
- Enable the connected output, instead of enabling all outputs.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
tests/pm_backlight.c +34 -0
index 8258d4e4c124..6909f7dc64b3 100644
@@ -155,13 +155,44 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+		igt_output_t *output;
+		bool found = false;
+		char full_name[32] = {};
+		char *name;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		/* should be ../../cardX-$output */
+		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
+		name = basename(full_name);
+
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (strcmp(name + 6, output->name))
+				continue;
+
+			igt_output_set_pipe(output, pipe);
+			found = true;
+			break;
+		}
+
+		igt_assert_f(found, "Could not map \"%s\" to output (%s?)\n", name, name + 6);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +205,8 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH i-g-t 1/2] tests/debugfs_test: Try to light all outputs to increase chances of finding fails.

In reply to Chris Wilson

Op 10-10-17 om 22:12 schreef Chris Wilson:

Quoted 7 lines

Quoting Maarten Lankhorst (2017-10-10 17:04:27)

Quoted 6 lines

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Quoted 6 lines
Quoted 1 line

My only argument, but this is just one special case out of many, isn't really an argument but an endorsement.

-Chris

This test seems to cause a failure in igt..

https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_315/fi-glk-1/igt@debugfs_test@read_all_entries.html

Dhinakaran, any idea about the DP crc failure?

~Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#18 lore raw

✗ Fi.CI.BAT: warning for tests/BAT: Reduce reliance on fbcon. (rev2)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/BAT: Reduce reliance on fbcon. (rev2)
URL : https://patchwork.freedesktop.org/series/31671/
State : warning

== Summary ==

IGT patchset tested on top of latest successful build 136100c2f00b590bc9485100cce012282c1217cf igt/syncobj_wait: Don't close the timeline early in wait_snapshot

with latest DRM-Tip kernel build CI_DRM_3213
36e0e803d3d7 drm-tip: 2017y-10m-11d-11h-31m-33s UTC integration manifest

Testlist changes:
+igt@debugfs_test@read_all_entries_display_off

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> DMESG-WARN (fi-glk-1)
                pass       -> DMESG-WARN (fi-cfl-s)
Test gem_exec_reloc:
        Subgroup basic-gtt-active:
                pass       -> FAIL       (fi-gdg-551) fdo#102582 +2
Test gem_exec_suspend:
        Subgroup basic-s4-devices:
                pass       -> DMESG-WARN (fi-kbl-7500u)

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:457s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:474s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:392s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:577s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:287s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:523s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:516s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:542s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:528s
fi-cfl-s         total:289  pass:252  dwarn:5   dfail:0   fail:0   skip:32  time:574s
fi-cnl-y         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:633s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:444s
fi-gdg-551       total:289  pass:175  dwarn:1   dfail:0   fail:4   skip:109 time:275s
fi-glk-1         total:289  pass:260  dwarn:1   dfail:0   fail:0   skip:28  time:606s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:447s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:463s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:510s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:476s
fi-kbl-7500u     total:289  pass:263  dwarn:2   dfail:0   fail:0   skip:24  time:509s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:582s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:492s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:594s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:666s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:469s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:661s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:539s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:511s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:476s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:585s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_326/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

PATCH v2 2/2 tests/pm_backlight: Enable connected output to allow tests to succeed, v3.

In reply to Maarten Lankhorst

If the connected output is disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by reading intel_backlight/device for the output name, and enable that output at start of this test.

Changes since v1:
- Enable the connected output, instead of enabling all outputs. Changes since v2:
- Set a dummy fb, just in case.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
tests/pm_backlight.c +47 -0
index 8258d4e4c124..0984dac543c6 100644
@@ -155,13 +155,56 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
+	struct igt_fb fb;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+		igt_output_t *output;
+		bool found = false;
+		char full_name[32] = {};
+		char *name;
+		drmModeModeInfo *mode;
+		igt_plane_t *primary;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		/* should be ../../cardX-$output */
+		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
+		name = basename(full_name);
+
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (strcmp(name + 6, output->name))
+				continue;
+
+			found = true;
+			break;
+		}
+
+		igt_assert_f(found, "Could not map \"%s\" to output (%s?)\n", name, name + 6);
+
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+
+		igt_create_pattern_fb(display.drm_fd,
+				      mode->hdisplay, mode->vdisplay,
+				      DRM_FORMAT_XRGB8888,
+				      LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+		primary = igt_output_get_plane(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_fb(primary, &fb);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +217,9 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		igt_remove_fb(display.drm_fd, &fb);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH v2 1/2 tests/debugfs_test: Try to light all outputs to increase chances of finding fails, v2.

In reply to Chris Wilson

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Changes since v1:
- Put framebuffers on all primary planes, to get a crc from i915_sink_src_eDP1.

---
 tests/debugfs_test.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
tests/debugfs_test.c +50 -0
index 5e7805e1559e..d1752728d9bc 100644
@@ -78,15 +78,64 @@ static void read_and_discard_sysfs_entries(int path_fd)
 igt_main
 {
 	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_subtest("read_all_entries") {
+		/* try to light all pipes */
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				igt_plane_t *primary;
+				drmModeModeInfo *mode;
+
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
+				igt_output_set_pipe(output, pipe);
+				primary = igt_output_get_plane(output, DRM_PLANE_TYPE_PRIMARY);
+				mode = igt_output_get_mode(output);
+				igt_create_pattern_fb(display.drm_fd,
+						      mode->hdisplay, mode->vdisplay,
+						      DRM_FORMAT_XRGB8888,
+						      LOCAL_DRM_FORMAT_MOD_NONE, &fb[pipe]);
+
+				igt_plane_set_fb(primary, &fb[pipe]);
+				break;
+			}
+		}
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+		read_and_discard_sysfs_entries(debugfs);
+	}
+
+	igt_subtest("read_all_entries_display_off") {
+		igt_output_t *output;
+		igt_plane_t *plane;
+
+		for_each_connected_output(&display, output)
+			igt_output_set_pipe(output, PIPE_NONE);
+
+		for_each_pipe(&display, pipe)
+			for_each_plane_on_pipe(&display, pipe, plane)
+				igt_plane_set_fb(plane, NULL);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
 		read_and_discard_sysfs_entries(debugfs);
 	}
 
@@ -112,6 +161,7 @@ igt_main
 	}
 
 	igt_fixture {
+		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#19 lore raw

✗ Fi.CI.BAT: failure for tests/BAT: Reduce reliance on fbcon. (rev4)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/BAT: Reduce reliance on fbcon. (rev4)
URL : https://patchwork.freedesktop.org/series/31671/
State : failure

== Summary ==

IGT patchset tested on top of latest successful build 6a79501f2b9f60bdaa659b924f60bb5b6e13cb30 tests: Drop gem_bad_length as redundant

with latest DRM-Tip kernel build CI_DRM_3222
a869721e93a5 drm-tip: 2017y-10m-12d-08h-30m-31s UTC integration manifest

Testlist changes:
+igt@debugfs_test@read_all_entries_display_off

Test debugfs_test:

        Subgroup read_all_entries:
                pass       -> FAIL       (fi-gdg-551)
                pass       -> FAIL       (fi-blb-e6850)
                pass       -> FAIL       (fi-pnv-d510)
                pass       -> FAIL       (fi-bwr-2160)
Test gem_ringfill:
        Subgroup basic-default-hang:
                dmesg-warn -> INCOMPLETE (fi-blb-e6850) fdo#101600

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

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:450s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:473s
fi-blb-e6850     total:156  pass:113  dwarn:0   dfail:0   fail:1   skip:41 
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:576s
fi-bwr-2160      total:289  pass:182  dwarn:0   dfail:0   fail:1   skip:106 time:292s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:526s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:526s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:552s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:537s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:568s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:435s
fi-gdg-551       total:289  pass:177  dwarn:1   dfail:0   fail:2   skip:109 time:277s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:601s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:439s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:470s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:511s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:493s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:582s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:494s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:597s
fi-pnv-d510      total:289  pass:221  dwarn:1   dfail:0   fail:1   skip:66  time:665s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:472s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:657s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:533s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:518s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:486s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:587s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:438s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_334/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

PATCH v3 1/2 tests/debugfs_test: Try to light all outputs to increase chances of finding fails, v3.

In reply to Maarten Lankhorst

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Changes since v1:
- Put framebuffers on all primary planes, to get a crc from i915_sink_src_eDP1. Changes since v2:
- Use igt_output_get_plane_type, not igt_output_get_plane.

---
 tests/debugfs_test.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
tests/debugfs_test.c +50 -0
index 5e7805e1559e..c4f43a65b61b 100644
@@ -78,15 +78,64 @@ static void read_and_discard_sysfs_entries(int path_fd)
 igt_main
 {
 	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_subtest("read_all_entries") {
+		/* try to light all pipes */
+		for_each_pipe(&display, pipe) {
+			igt_output_t *output;
+
+			for_each_valid_output_on_pipe(&display, pipe, output) {
+				igt_plane_t *primary;
+				drmModeModeInfo *mode;
+
+				if (output->pending_pipe != PIPE_NONE)
+					continue;
+
+				igt_output_set_pipe(output, pipe);
+				primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+				mode = igt_output_get_mode(output);
+				igt_create_pattern_fb(display.drm_fd,
+						      mode->hdisplay, mode->vdisplay,
+						      DRM_FORMAT_XRGB8888,
+						      LOCAL_DRM_FORMAT_MOD_NONE, &fb[pipe]);
+
+				igt_plane_set_fb(primary, &fb[pipe]);
+				break;
+			}
+		}
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+		read_and_discard_sysfs_entries(debugfs);
+	}
+
+	igt_subtest("read_all_entries_display_off") {
+		igt_output_t *output;
+		igt_plane_t *plane;
+
+		for_each_connected_output(&display, output)
+			igt_output_set_pipe(output, PIPE_NONE);
+
+		for_each_pipe(&display, pipe)
+			for_each_plane_on_pipe(&display, pipe, plane)
+				igt_plane_set_fb(plane, NULL);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
 		read_and_discard_sysfs_entries(debugfs);
 	}
 
@@ -112,6 +161,7 @@ igt_main
 	}
 
 	igt_fixture {
+		igt_display_fini(&display);
 		close(debugfs);
 		close(fd);
 	}
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#15 lore raw

PATCH v3 2/2 tests/pm_backlight: Enable connected output to allow tests to succeed, v4.

In reply to Maarten Lankhorst

If the connected output is disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by reading intel_backlight/device for the output name, and enable that output at start of this test.

Changes since v1:
- Enable the connected output, instead of enabling all outputs. Changes since v2:
- Set a dummy fb, just in case.
Changes since v3:
- Use igt_output_get_plane_type, not get_plane.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
tests/pm_backlight.c +47 -0
index 8258d4e4c124..a695f90913fd 100644
@@ -155,13 +155,56 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
+	struct igt_fb fb;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+		igt_output_t *output;
+		bool found = false;
+		char full_name[32] = {};
+		char *name;
+		drmModeModeInfo *mode;
+		igt_plane_t *primary;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		/* should be ../../cardX-$output */
+		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
+		name = basename(full_name);
+
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (strcmp(name + 6, output->name))
+				continue;
+
+			found = true;
+			break;
+		}
+
+		igt_assert_f(found, "Could not map \"%s\" to output (%s?)\n", name, name + 6);
+
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+
+		igt_create_pattern_fb(display.drm_fd,
+				      mode->hdisplay, mode->vdisplay,
+				      DRM_FORMAT_XRGB8888,
+				      LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+		primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_fb(primary, &fb);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +217,9 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		igt_remove_fb(display.drm_fd, &fb);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#20 lore raw

✓ Fi.CI.BAT: success for tests/BAT: Reduce reliance on fbcon. (rev6)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/BAT: Reduce reliance on fbcon. (rev6)
URL : https://patchwork.freedesktop.org/series/31671/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 6a79501f2b9f60bdaa659b924f60bb5b6e13cb30 tests: Drop gem_bad_length as redundant

with latest DRM-Tip kernel build CI_DRM_3222
a869721e93a5 drm-tip: 2017y-10m-12d-08h-30m-31s UTC integration manifest

Testlist changes:
+igt@debugfs_test@read_all_entries_display_off

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:461s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:476s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:387s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:574s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:286s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:527s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:531s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:558s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:523s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:569s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:436s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:275s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:606s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:440s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:469s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:506s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:474s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:505s
fi-kbl-7567u     total:289  pass:265  dwarn:4   dfail:0   fail:0   skip:20  time:495s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:596s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:674s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:470s
fi-skl-6700hq    total:289  pass:263  dwarn:0   dfail:0   fail:0   skip:26  time:663s
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:535s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:571s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:478s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:597s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:440s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_335/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v3 2/2
#16 lore raw

Re: [PATCH i-g-t v3 2/2] tests/pm_backlight: Enable connected output to allow tests to succeed, v4.

In reply to Maarten Lankhorst
Quoted 52 lines · Maarten Lankhorst

If the connected output is disabled before this test is run, then the test will fail because actual_brightness stays at 0 instead of the value of the desired brightness. Fix this by reading intel_backlight/device for the output name, and enable that output at start of this test.

Changes since v1:
- Enable the connected output, instead of enabling all outputs. Changes since v2:
- Set a dummy fb, just in case.
Changes since v3:
- Use igt_output_get_plane_type, not get_plane.

Sample failure:
IGT-Version: 1.20-g01c550a27986 (x86_64) (Linux: 4.14.0-rc3-fbconhax+ x86_64)
(pm_backlight:1203) CRITICAL: Test assertion failure function test_and_verify, file pm_backlight.c:111:
(pm_backlight:1203) CRITICAL: Failed assertion: ({ typeof(0) _a = (0); typeof(val - tolerance) _b = (val - tolerance); _a > _b ? _a : _b; }) <= result (pm_backlight:1203) CRITICAL: error: 91200 > 0

---
 tests/pm_backlight.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
tests/pm_backlight.c +14 -0
index 8258d4e4c124..a695f90913fd 100644
@@ -155,13 +155,56 @@ igt_main
 {
 	struct context context = {0};
 	int old;
+	igt_display_t display;
+	struct igt_fb fb;
 
 	igt_skip_on_simulation();
 
 	igt_fixture {
+		enum pipe pipe;
+		igt_output_t *output;
+		bool found = false;
+		char full_name[32] = {};
+		char *name;
+		drmModeModeInfo *mode;
+		igt_plane_t *primary;
+
 		/* Get the max value and skip the whole test if sysfs interface not available */
 		igt_skip_on(backlight_read(&old, "brightness"));
 		igt_assert(backlight_read(&context.max, "max_brightness") > -1);
+
+		/*
+		 * Backlight tests requires the output to be enabled,
+		 * try to enable all.

tests/pm_backlight.c igt_main · line 188

Quoted 10 lines
tests/pm_backlight.c +10 -0
+		 */
+		kmstest_set_vt_graphics_mode();
+		igt_display_init(&display, drm_open_driver(DRIVER_INTEL));
+
+		/* should be ../../cardX-$output */
+		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
+		name = basename(full_name);
+
+		for_each_pipe_with_valid_output(&display, pipe, output) {
+			if (strcmp(name + 6, output->name))

This string magic isn't all that clear here. I think it would have been cleaner to iterate all connected outputs and look for the backlight under each. But I can't be bothered to care that much so

Quoted 39 lines
tests/pm_backlight.c +23 -0
+				continue;
+
+			found = true;
+			break;
+		}
+
+		igt_assert_f(found, "Could not map \"%s\" to output (%s?)\n", name, name + 6);
+
+		igt_output_set_pipe(output, pipe);
+		mode = igt_output_get_mode(output);
+
+		igt_create_pattern_fb(display.drm_fd,
+				      mode->hdisplay, mode->vdisplay,
+				      DRM_FORMAT_XRGB8888,
+				      LOCAL_DRM_FORMAT_MOD_NONE, &fb);
+		primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+		igt_plane_set_fb(primary, &fb);
+
+		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 	}
 
 	igt_subtest("basic-brightness")
@@ -174,5 +217,9 @@ igt_main
 	igt_fixture {
 		/* Restore old brightness */
 		backlight_write(old, "brightness");
+
+		igt_display_fini(&display);
+		igt_remove_fb(display.drm_fd, &fb);
+		close(display.drm_fd);
 	}
 }
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#21 lore raw

✗ Fi.CI.IGT: warning for tests/BAT: Reduce reliance on fbcon. (rev6)

In reply to Maarten Lankhorst
== Series Details ==

== Series Details ==

Series: tests/BAT: Reduce reliance on fbcon. (rev6)
URL : https://patchwork.freedesktop.org/series/31671/
State : warning

== Summary ==

Test kms_setmode:

        Subgroup basic:
                pass       -> FAIL       (shard-hsw) fdo#99912
Test pm_rpm:
        Subgroup drm-resources-equal:
                pass       -> SKIP       (shard-hsw)
Test kms_vblank:
        Subgroup query-forked:
                pass       -> SKIP       (shard-hsw)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-mmap-wc:
                dmesg-warn -> PASS       (shard-hsw) fdo#102614
Test prime_self_import:
        Subgroup reimport-vs-gem_close-race:
                fail       -> PASS       (shard-hsw) fdo#102655

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

shard-hsw total:2552 pass:1438 dwarn:0 dfail:0 fail:9 skip:1105 time:9647s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_335/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v3 1/2
#8 lore raw

Re: [PATCH i-g-t v3 1/2] tests/debugfs_test: Try to light all outputs to increase chances of finding fails, v3.

In reply to Maarten Lankhorst

Quoting Maarten Lankhorst (2017-10-12 11:47:54)

Quoted 8 lines

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Changes since v1:
- Put framebuffers on all primary planes, to get a crc from i915_sink_src_eDP1.

Sure that isn't a problem in our pipe_crc dumper?

Quoted 42 lines

Changes since v2:
- Use igt_output_get_plane_type, not igt_output_get_plane.

---
 tests/debugfs_test.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
tests/debugfs_test.c +16 -0
index 5e7805e1559e..c4f43a65b61b 100644
@@ -78,15 +78,64 @@ static void read_and_discard_sysfs_entries(int path_fd)
 igt_main
 {
        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_subtest("read_all_entries") {
+               /* try to light all pipes */
+               for_each_pipe(&display, pipe) {
+                       igt_output_t *output;
+
+                       for_each_valid_output_on_pipe(&display, pipe, output) {
+                               igt_plane_t *primary;
+                               drmModeModeInfo *mode;
+
+                               if (output->pending_pipe != PIPE_NONE)

tests/debugfs_test.c static void read_and_discard_sysfs_entries(int path_fd) · line 115

Quoted 10 lines
tests/debugfs_test.c +10 -0
+                                       continue;
+
+                               igt_output_set_pipe(output, pipe);
+                               primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+                               mode = igt_output_get_mode(output);
+                               igt_create_pattern_fb(display.drm_fd,
+                                                     mode->hdisplay, mode->vdisplay,
+                                                     DRM_FORMAT_XRGB8888,
+                                                     LOCAL_DRM_FORMAT_MOD_NONE, &fb[pipe]);
+

/* Set a valid fb as some debugfs like to inspect it on a active pipe */

tests/debugfs_test.c static void read_and_discard_sysfs_entries(int path_fd) · line 123

Quoted 8 lines
tests/debugfs_test.c +8 -0
+                               igt_plane_set_fb(primary, &fb[pipe]);
+                               break;
+                       }
+               }
+
+               igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+               read_and_discard_sysfs_entries(debugfs);

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

Re: [PATCH i-g-t 1/2] tests/debugfs_test: Try to light all outputs to increase chances of finding fails.

In reply to Maarten Lankhorst
Quoted 15 lines · Maarten Lankhorst

Op 10-10-17 om 22:12 schreef Chris Wilson:

Quoted 7 lines

Quoting Maarten Lankhorst (2017-10-10 17:04:27)

Quoted 6 lines

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Quoted 6 lines
Quoted 1 line

My only argument, but this is just one special case out of many, isn't really an argument but an endorsement.

-Chris

Quoted 8 lines

This test seems to cause a failure in igt..

https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_315/fi-glk-1/igt@debugfs_test@read_all_entries.html

Dhinakaran, any idea about the DP crc failure?

~Maarten

I accidentally reproduced this by reading the CRC debugfs when eDP was off (pipe was active as per i915_display_info). Wonder if this is an indication that the panel did not really light up in your case. It'd be good to see what's happening on the screen if you have physical access to the machine.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [PATCH i-g-t 1/2] tests/debugfs_test: Try to light all outputs to increase chances of finding fails.

Op 25-10-17 om 03:36 schreef Pandiyan, Dhinakaran:

Quoted 21 lines · Maarten Lankhorst
Quoted 20 lines

Op 10-10-17 om 22:12 schreef Chris Wilson:

Quoted 7 lines

Quoting Maarten Lankhorst (2017-10-10 17:04:27)

Quoted 6 lines

Make sure read_all_entries has all outputs possible enabled, but also add a test that runs with all outputs disabled.

This will maximize coverage of debugfs reading, and allows the test not to be dependent on fbcon for setup.

Quoted 6 lines
Quoted 1 line

My only argument, but this is just one special case out of many, isn't really an argument but an endorsement.

-Chris

This test seems to cause a failure in igt..

https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_315/fi-glk-1/igt@debugfs_test@read_all_entries.html

Dhinakaran, any idea about the DP crc failure?

Quoted 7 lines
Quoted 2 lines

~Maarten

I accidentally reproduced this by reading the CRC debugfs when eDP was off (pipe was active as per i915_display_info). Wonder if this is an indication that the panel did not really light up in your case. It'd be good to see what's happening on the screen if you have physical access to the machine.

Never mind, I've tracked it down to the enable sequence, when I enable the connector butnot the primary plane I get this warning. Once I also enabled the primary plane in the next version I was able to read a CRC. :)

thanks for the help,
Maarten

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx