Skip to contentSkip to conversation

tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight

PATCH In review Nidhi Gupta 4 participants 5 messages Sep 29, 2022 – Oct 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight

Since driver can now support multiple eDPs and Debugfs structure for backlight changed per connector the test should then iterate through all eDP connectors.

---
 tests/i915/i915_pm_backlight.c | 110 ++++++++++++++++++++++++---------
 1 file changed, 80 insertions(+), 30 deletions(-)
tests/i915/i915_pm_backlight.c +80 -30
index cafae7f7..bf67b50c 100644
@@ -34,9 +34,12 @@
 #include <errno.h>
 #include <unistd.h>
 #include <time.h>
+#include "igt_device.h"
+#include "igt_device_scan.h"
 
 struct context {
 	int max;
+	const char *path;
 };
 
 
@@ -48,14 +51,14 @@ struct context {
 
 IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
 
-static int backlight_read(int *result, const char *fname)
+static int backlight_read(int *result, const char *fname, struct context *context)
 {
 	int fd;
 	char full[PATH_MAX];
 	char dst[64];
 	int r, e;
 
-	igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+	igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);
 
 	fd = open(full, O_RDONLY);
 	if (fd == -1)
@@ -73,14 +76,14 @@ static int backlight_read(int *result, const char *fname)
 	return errno;
 }
 
-static int backlight_write(int value, const char *fname)
+static int backlight_write(int value, const char *fname, struct context *context)
 {
 	int fd;
 	char full[PATH_MAX];
 	char src[64];
 	int len;
 
-	igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+	igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);
 	fd = open(full, O_WRONLY);
 	if (fd == -1)
 		return -errno;
@@ -100,12 +103,12 @@ static void test_and_verify(struct context *context, int val)
 	const int tolerance = val * TOLERANCE / 100;
 	int result;
 
-	igt_assert_eq(backlight_write(val, "brightness"), 0);
-	igt_assert_eq(backlight_read(&result, "brightness"), 0);
+	igt_assert_eq(backlight_write(val, "brightness", context), 0);
+	igt_assert_eq(backlight_read(&result, "brightness", context), 0);
 	/* Check that the exact value sticks */
 	igt_assert_eq(result, val);
 
-	igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
+	igt_assert_eq(backlight_read(&result, "actual_brightness", context), 0);
 	/* Some rounding may happen depending on hw */
 	igt_assert_f(result >= max(0, val - tolerance) &&
 		     result <= min(context->max, val + tolerance),
@@ -124,16 +127,16 @@ static void test_bad_brightness(struct context *context)
 {
 	int val;
 	/* First write some sane value */
-	backlight_write(context->max / 2, "brightness");
+	backlight_write(context->max / 2, "brightness", context);
 	/* Writing invalid values should fail and not change the value */
-	igt_assert_lt(backlight_write(-1, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(-1, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(context->max + 1, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(context->max + 1, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(INT_MAX, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
 }
 
@@ -186,6 +189,8 @@ igt_main
 	igt_display_t display;
 	igt_output_t *output;
 	struct igt_fb fb;
+	const char *paths[2][50];
+	char path1[PATH_MAX];
 
 	igt_fixture {
 		enum pipe pipe;
@@ -202,10 +207,6 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
 
-		/* 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);
-
 		/* should be ../../cardX-$output */
 		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
 		name = basename(full_name);
@@ -233,22 +234,71 @@ igt_main
 
 		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 		igt_pm_enable_sata_link_power_management();
+
+		memcpy(paths[0], "intel_backlight", 8);
+		for (int i = 0; (i = display.n_outputs); i++) {
+			output = &display.outputs[i];
+			igt_output_set_pipe(output, PIPE_ANY);
+			snprintf(path1, 100 , "card%i-%s-backlight", igt_device_get_card_index(display.drm_fd), igt_output_name(output));
+			int fd = open(path1, O_WRONLY);
+			if (fd == -1)
+				continue;
+			memcpy(paths[1], name, 30);
+			break;
+		}
+		/* Get the max value and skip the whole test if sysfs interface not available */
+		for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
+			memcpy(&context.path, paths[i], 8);
+			igt_skip_on(backlight_read(&old, "brightness", &context));
+			igt_assert(backlight_read(&context.max, "max_brightness", &context) > -1);
+		}
+	}
+	
+	igt_subtest_with_dynamic("basic-brightness") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_brightness(&context);
+			}
+		}
+	}
+	igt_subtest_with_dynamic("bad-brightness") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_bad_brightness(&context);
+			}
+		}
+	}
+
+	igt_subtest_with_dynamic("fade") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade(&context);
+			}
+		}
 	}
 
-	igt_subtest("basic-brightness")
-		test_brightness(&context);
-	igt_subtest("bad-brightness")
-		test_bad_brightness(&context);
-	igt_subtest("fade")
-		test_fade(&context);
-	igt_subtest("fade_with_dpms")
-		test_fade_with_dpms(&context, output);
-	igt_subtest("fade_with_suspend")
-		test_fade_with_suspend(&context, output);
+	igt_subtest_with_dynamic("fade_with_dpms") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade_with_dpms(&context, output);
+			}
+		}
+	}
+
+	igt_subtest_with_dynamic("fade_with_suspend") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade_with_suspend(&context, output);
+			}
+		}
+	}
 
 	igt_fixture {
-		/* Restore old brightness */
-		backlight_write(old, "brightness");
 
 		igt_display_fini(&display);
 		igt_remove_fb(display.drm_fd, &fb);
Signature · 1 line
2.17.1
#1 lore raw

[igt-dev] ✗ GitLab.Pipeline: warning for tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight (rev4)

== Series Details ==

== Series Details ==

Series: tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight (rev4)
URL : https://patchwork.freedesktop.org/series/108246/
State : warning

== Summary ==

Pipeline status: FAILED.

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

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/29197971):

                   from ../lib/drmtest.h:39,
                   from ../lib/igt.h:27,
                   from ../tests/i915/i915_pm_backlight.c:28:
  In function ‘memcpy’,
      inlined from ‘__igt_unique____real_main185’ at ../tests/i915/i915_pm_backlight.c:268:5:
  /usr/arm-linux-gnueabihf/include/bits/string_fortified.h:34:10: error: ‘__builtin___memcpy_chk’ forming offset [9, 12] is out of the bounds [0, 8] of object ‘context’ with type ‘struct context’ [-Werror=array-bounds]
     return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../tests/i915/i915_pm_backlight.c: In function ‘__igt_unique____real_main185’:
  ../tests/i915/i915_pm_backlight.c:187:17: note: ‘context’ declared here
    struct context context = {0};
                   ^~~~~~~

cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed. section_end:1664450886:step_script section_start:1664450886:cleanup_file_variables Cleaning up project directory and file based variables section_end:1664450888:cleanup_file_variables
ERROR: Job failed: exit code 1

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/29197973):

                   from ../lib/drmtest.h:39,
                   from ../lib/igt.h:27,
                   from ../tests/i915/i915_pm_backlight.c:28:
  In function ‘memcpy’,
      inlined from ‘__igt_unique____real_main185’ at ../tests/i915/i915_pm_backlight.c:268:5:
  /usr/mips-linux-gnu/include/bits/string_fortified.h:34:10: error: ‘__builtin___memcpy_chk’ forming offset [9, 12] is out of the bounds [0, 8] of object ‘context’ with type ‘struct context’ [-Werror=array-bounds]
     return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../tests/i915/i915_pm_backlight.c: In function ‘__igt_unique____real_main185’:
  ../tests/i915/i915_pm_backlight.c:187:17: note: ‘context’ declared here
    struct context context = {0};
                   ^~~~~~~

cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed. section_end:1664450896:step_script section_start:1664450896:cleanup_file_variables Cleaning up project directory and file based variables section_end:1664450897:cleanup_file_variables
ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/700897

#2 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight (rev4)

In reply to Nidhi Gupta
== Series Details ==

== Series Details ==

Series: tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight (rev4)
URL : https://patchwork.freedesktop.org/series/108246/
State : failure

== Summary ==

CI Bug Log - changes from IGT_6669 -> IGTPW_7886
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_7886 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_7886, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (46 -> 45)
------------------------------

Missing (1): fi-bdw-samus

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_pm_backlight@basic-brightness:
- fi-skl-6600u: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-skl-6600u/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-skl-6600u/igt@[email protected]
- fi-icl-u2: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-icl-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-icl-u2/igt@[email protected]
- fi-snb-2520m: [PASS][5] -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-snb-2520m/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-snb-2520m/igt@[email protected]
- fi-tgl-u2: [PASS][7] -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-tgl-u2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-tgl-u2/igt@[email protected]
- fi-bxt-dsi: [PASS][9] -> [FAIL][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-bxt-dsi/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-bxt-dsi/igt@[email protected]
- fi-glk-dsi: [PASS][11] -> [FAIL][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-glk-dsi/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-glk-dsi/igt@[email protected]

#### Warnings ####

* igt@i915_pm_backlight@basic-brightness:
- fi-kbl-7567u: [SKIP][13] ([fdo#109271]) -> [FAIL][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-kbl-7567u/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-kbl-7567u/igt@[email protected]
- fi-ilk-650: [SKIP][15] ([fdo#109271]) -> [FAIL][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-ilk-650/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-ilk-650/igt@[email protected]
- fi-adl-ddr5: [SKIP][17] ([i915#1155]) -> [FAIL][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-adl-ddr5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-adl-ddr5/igt@[email protected]
- fi-cfl-guc: [SKIP][19] ([fdo#109271]) -> [FAIL][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-cfl-guc/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-cfl-guc/igt@[email protected]
- fi-bdw-5557u: [SKIP][21] ([fdo#109271]) -> [FAIL][22]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-bdw-5557u/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-bdw-5557u/igt@[email protected]
- fi-rkl-guc: [SKIP][23] ([i915#3012]) -> [FAIL][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-rkl-guc/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-rkl-guc/igt@[email protected]
- fi-cfl-8700k: [SKIP][25] ([fdo#109271]) -> [FAIL][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-cfl-8700k/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-cfl-8700k/igt@[email protected]
- fi-blb-e6850: [SKIP][27] ([fdo#109271]) -> [FAIL][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-blb-e6850/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-blb-e6850/igt@[email protected]
- fi-bsw-nick: [SKIP][29] ([fdo#109271]) -> [FAIL][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-bsw-nick/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-bsw-nick/igt@[email protected]
- fi-bdw-gvtdvm: [SKIP][31] ([fdo#109271]) -> [FAIL][32]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-bdw-gvtdvm/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-bdw-gvtdvm/igt@[email protected]
- fi-bsw-kefka: [SKIP][33] ([fdo#109271]) -> [FAIL][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-bsw-kefka/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-bsw-kefka/igt@[email protected]
- fi-hsw-4770: [SKIP][35] ([fdo#109271] / [i915#3012]) -> [FAIL][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-hsw-4770/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-hsw-4770/igt@[email protected]
- fi-ivb-3770: [SKIP][37] ([fdo#109271]) -> [FAIL][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-ivb-3770/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-ivb-3770/igt@[email protected]
- fi-elk-e7500: [SKIP][39] ([fdo#109271]) -> [FAIL][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-elk-e7500/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-elk-e7500/igt@[email protected]
- fi-hsw-g3258: [SKIP][41] ([fdo#109271] / [i915#3012]) -> [FAIL][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-hsw-g3258/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-hsw-g3258/igt@[email protected]
- fi-pnv-d510: [SKIP][43] ([fdo#109271]) -> [FAIL][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-pnv-d510/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-pnv-d510/igt@[email protected]
- fi-glk-j4005: [SKIP][45] ([fdo#109271]) -> [FAIL][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-glk-j4005/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-glk-j4005/igt@[email protected]
- fi-snb-2600: [SKIP][47] ([fdo#109271]) -> [FAIL][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-snb-2600/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-snb-2600/igt@[email protected]
- fi-rkl-11600: [SKIP][49] ([i915#3012]) -> [FAIL][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-rkl-11600/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-rkl-11600/igt@[email protected]
- bat-dg1-5: [SKIP][51] ([i915#1155]) -> [FAIL][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-dg1-5/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-dg1-5/igt@[email protected]
- fi-skl-6700k2: [SKIP][53] ([fdo#109271]) -> [FAIL][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-skl-6700k2/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-skl-6700k2/igt@[email protected]
- fi-cfl-8109u: [SKIP][55] ([fdo#109271]) -> [FAIL][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-cfl-8109u/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-cfl-8109u/igt@[email protected]

#### Suppressed ####

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

* igt@i915_pm_backlight@basic-brightness:
- {bat-adln-1}: [PASS][57] -> [FAIL][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-adln-1/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-adln-1/igt@[email protected]
- {fi-ehl-2}: [PASS][59] -> [FAIL][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-ehl-2/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-ehl-2/igt@[email protected]
- {bat-adlp-6}: [PASS][61] -> [FAIL][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-adlp-6/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-adlp-6/igt@[email protected]
- {bat-jsl-3}: [PASS][63] -> [FAIL][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-jsl-3/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-jsl-3/igt@[email protected]
- {bat-dg2-11}: [SKIP][65] ([i915#1155]) -> [FAIL][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-dg2-11/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-dg2-11/igt@[email protected]
- {bat-dg2-8}: [SKIP][67] ([i915#1155]) -> [FAIL][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-dg2-8/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-dg2-8/igt@[email protected]
- {bat-adlm-1}: [SKIP][69] ([i915#1155]) -> [FAIL][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-adlm-1/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-adlm-1/igt@[email protected]
- {bat-jsl-1}: [PASS][71] -> [FAIL][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-jsl-1/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-jsl-1/igt@[email protected]
- {fi-jsl-1}: [PASS][73] -> [FAIL][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-jsl-1/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-jsl-1/igt@[email protected]
- {bat-rpls-1}: [SKIP][75] ([i915#1155]) -> [FAIL][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-rpls-1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-rpls-1/igt@[email protected]
- {bat-rplp-1}: [PASS][77] -> [FAIL][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-rplp-1/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-rplp-1/igt@[email protected]
- {bat-dg2-9}: [SKIP][79] ([i915#1155]) -> [FAIL][80]
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-dg2-9/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-dg2-9/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3@smem:
- fi-rkl-11600: [PASS][81] -> [FAIL][82] ([fdo#103375])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-rkl-11600/igt@gem_exec_suspend@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-rkl-11600/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@gem_contexts:
- fi-icl-u2: NOTRUN -> [INCOMPLETE][83] ([i915#4890])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-icl-u2/igt@i915_selftest@live@gem_contexts.html

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-hsw-4770: NOTRUN -> [SKIP][84] ([fdo#109271] / [fdo#111827])
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-hsw-4770/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3@smem:
- {bat-rplp-1}: [DMESG-WARN][85] ([i915#2867]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-rplp-1/igt@gem_exec_suspend@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-rplp-1/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@gt_pm:
- fi-icl-u2: [INCOMPLETE][87] ([i915#4890]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-icl-u2/igt@i915_selftest@live@gt_pm.html
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-icl-u2/igt@i915_selftest@live@gt_pm.html

* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][89] ([i915#4785]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/fi-hsw-4770/igt@i915_selftest@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/fi-hsw-4770/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-2:
- {bat-dg2-11}: [FAIL][91] ([i915#6818]) -> [PASS][92]
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6669/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/bat-dg2-11/igt@kms_pipe_crc_basic@[email protected]

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

[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4890]: https://gitlab.freedesktop.org/drm/intel/issues/4890
[i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818

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

* CI: CI-20190529 -> None
* IGT: IGT_6669 -> IGTPW_7886

CI-20190529: 20190529
CI_DRM_12197: cafa326de8e7860d45639e61bf66ec9c218207b1 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_7886: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/index.html
IGT_6669: 3d2df081c14c251e0269e3510ddc4e9d26ffe925 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7886/index.html

#3 lore raw
In reply to Nidhi Gupta
Quoted 145 lines · Nidhi Gupta

Since driver can now support multiple eDPs and Debugfs structure for backlight changed per connector the test should then iterate through all eDP connectors.

---
 tests/i915/i915_pm_backlight.c | 110 ++++++++++++++++++++++++------- --

 1 file changed, 80 insertions(+), 30 deletions(-)
tests/i915/i915_pm_backlight.c +2 -0
index cafae7f7..bf67b50c 100644
@@ -34,9 +34,12 @@
  #include <errno.h>
  #include <unistd.h>
  #include <time.h>
+#include "igt_device.h"
+#include "igt_device_scan.h"


 struct context {
        int max;
+       const char *path;
 };

tests/i915/i915_pm_backlight.c +0 -0
@@ -48,14 +51,14 @@ struct context {


 IGT_TEST_DESCRIPTION("Basic backlight sysfs test");

tests/i915/i915_pm_backlight.c +1 -1
-static int backlight_read(int *result, const char *fname)
+static int backlight_read(int *result, const char *fname, struct

context *context)
 {
        int fd;
        char full[PATH_MAX];
        char dst[64];
        int r, e;

-       igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+       igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);

        fd = open(full, O_RDONLY);
        if (fd == -1)

tests/i915/i915_pm_backlight.c +0 -0
@@ -73,14 +76,14 @@ static int backlight_read(int *result, const char
 *fname)
         return errno;
  }

tests/i915/i915_pm_backlight.c +1 -1
-static int backlight_write(int value, const char *fname)
+static int backlight_write(int value, const char *fname, struct

context *context)
 {
        int fd;
        char full[PATH_MAX];
        char src[64];
        int len;

-       igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+       igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);
        fd = open(full, O_WRONLY);
        if (fd == -1)
                return -errno;

tests/i915/i915_pm_backlight.c +0 -0
@@ -100,12 +103,12 @@ static void test_and_verify(struct context
 *context, int val)
         const int tolerance = val * TOLERANCE / 100;
         int result;


-       igt_assert_eq(backlight_write(val, "brightness"), 0); -       igt_assert_eq(backlight_read(&result, "brightness"), 0); +       igt_assert_eq(backlight_write(val, "brightness", context), 0);
+       igt_assert_eq(backlight_read(&result, "brightness", context), 0);
        /* Check that the exact value sticks */ igt_assert_eq(result, val);

-       igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
+       igt_assert_eq(backlight_read(&result, "actual_brightness", context), 0);
        /* Some rounding may happen depending on hw */ igt_assert_f(result >= max(0, val - tolerance) && result <= min(context->max, val + tolerance),

tests/i915/i915_pm_backlight.c +1 -1
@@ -124,16 +127,16 @@ static void test_bad_brightness(struct context
 *context)
  {
         int val;
         /* First write some sane value */
-       backlight_write(context->max / 2, "brightness");
+       backlight_write(context->max / 2, "brightness", context);
         /* Writing invalid values should fail and not change the

value */
-       igt_assert_lt(backlight_write(-1, "brightness"), 0); -       backlight_read(&val, "brightness");
+       igt_assert_lt(backlight_write(-1, "brightness", context), 0); +       backlight_read(&val, "brightness", context); igt_assert_eq(val, context->max / 2);
-       igt_assert_lt(backlight_write(context->max + 1, "brightness"), 0);
-       backlight_read(&val, "brightness");
+       igt_assert_lt(backlight_write(context->max + 1, "brightness", context), 0);
+       backlight_read(&val, "brightness", context); igt_assert_eq(val, context->max / 2);
-       igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0); -       backlight_read(&val, "brightness");
+       igt_assert_lt(backlight_write(INT_MAX, "brightness", context), 0);
+       backlight_read(&val, "brightness", context); igt_assert_eq(val, context->max / 2);
 }

tests/i915/i915_pm_backlight.c +2 -0
@@ -186,6 +189,8 @@ igt_main
         igt_display_t display;
         igt_output_t *output;
         struct igt_fb fb;
+       const char *paths[2][50];
+       char path1[PATH_MAX];


        igt_fixture {
                enum pipe pipe;

tests/i915/i915_pm_backlight.c +0 -0
@@ -202,10 +207,6 @@ igt_main
                 kmstest_set_vt_graphics_mode();
                 igt_display_require(&display,
 drm_open_driver(DRIVER_INTEL));


-               /* 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);
-
                /* should be ../../cardX-$output */ igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
                name = basename(full_name);

tests/i915/i915_pm_backlight.c +0 -0
@@ -233,22 +234,71 @@ igt_main

Quoted 8 lines

                igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); igt_pm_enable_sata_link_power_management(); +
+               memcpy(paths[0], "intel_backlight", 8); +               for (int i = 0; (i = display.n_outputs); i++) { +                       output = &display.outputs[i];
+                       igt_output_set_pipe(output, PIPE_ANY);

What igt_output_set_pipe(output, PIPE_ANY) is doing?

Quoted 2 lines

+                       snprintf(path1, 100 , "card%i-%s-backlight", igt_device_get_card_index(display.drm_fd), igt_output_name(output));

I'm not sure if card* can be something else than card0? Definetely it has nothing to do with n_outputs.

Quoted 1 line

+                       int fd = open(path1, O_WRONLY);

You can't expect cardx-xxx-backlight to succeed. There has to be some path (e.g. /sys/dev/char/226\:0/cardx-xxx-backlight). Maybe igt_sysfs_path could be used here?

Quoted 2 lines

+                       if (fd == -1)
+                               continue;

close(fd);

Quoted 1 line

+                       memcpy(paths[1], name, 30);

You have paths[0] = intel_backlight and paths[1] = card0-eDP1? You wanted to copy path1?

Quoted 2 lines

+                       break;
+               }

This loop generally looks strange. You are checking path1 copying variable "name" into paths[1] ?

Quoted 6 lines

+               /* Get the max value and skip the whole test if sysfs interface not available */
+               for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
+                       memcpy(&context.path, paths[i], 8);

is 8 enough? I think you should use pointer here instead of copying it

Quoted 74 lines

+                       igt_skip_on(backlight_read(&old, "brightness", &context));
+                       igt_assert(backlight_read(&context.max, "max_brightness", &context) > -1);
+               }
+       }
+
+       igt_subtest_with_dynamic("basic-brightness") {
+               for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+                       igt_dynamic_f("connector-%zu", j) { +                               memcpy(&context.path, paths[j], 8); +                               test_brightness(&context); +                       }
+               }
+       }
+       igt_subtest_with_dynamic("bad-brightness") {
+               for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+                       igt_dynamic_f("connector-%zu", j) { +                               memcpy(&context.path, paths[j], 8); +                               test_bad_brightness(&context); +                       }
+               }
+       }
+
+       igt_subtest_with_dynamic("fade") {
+               for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+                       igt_dynamic_f("connector-%zu", j) { +                               memcpy(&context.path, paths[j], 8); +                               test_fade(&context);
+                       }
+               }
        }

-       igt_subtest("basic-brightness")
-               test_brightness(&context);
-       igt_subtest("bad-brightness")
-               test_bad_brightness(&context);
-       igt_subtest("fade")
-               test_fade(&context);
-       igt_subtest("fade_with_dpms")
-               test_fade_with_dpms(&context, output);
-       igt_subtest("fade_with_suspend")
-               test_fade_with_suspend(&context, output); +       igt_subtest_with_dynamic("fade_with_dpms") {
+               for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+                       igt_dynamic_f("connector-%zu", j) { +                               memcpy(&context.path, paths[j], 8); +                               test_fade_with_dpms(&context, output);
+                       }
+               }
+       }
+
+       igt_subtest_with_dynamic("fade_with_suspend") { +               for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+                       igt_dynamic_f("connector-%zu", j) { +                               memcpy(&context.path, paths[j], 8); +                               test_fade_with_suspend(&context, output);
+                       }
+               }
+       }

        igt_fixture {
-               /* Restore old brightness */
-               backlight_write(old, "brightness");

                igt_display_fini(&display); igt_remove_fb(display.drm_fd, &fb);

#4 lore raw
In reply to Nidhi Gupta

Hi Nidhi,

Quoted 5 lines · Nidhi Gupta

Since driver can now support multiple eDPs and Debugfs structure for backlight changed per connector the test should then iterate through all eDP connectors.

I will not review kms parts, only some notes about descriptions, see below.

Quoted 129 lines
---
 tests/i915/i915_pm_backlight.c | 110 ++++++++++++++++++++++++---------
 1 file changed, 80 insertions(+), 30 deletions(-)
tests/i915/i915_pm_backlight.c +29 -18
index cafae7f7..bf67b50c 100644
@@ -34,9 +34,12 @@
 #include <errno.h>
 #include <unistd.h>
 #include <time.h>
+#include "igt_device.h"
+#include "igt_device_scan.h"
 
 struct context {
 	int max;
+	const char *path;
 };
 
 
@@ -48,14 +51,14 @@ struct context {
 
 IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
 
-static int backlight_read(int *result, const char *fname)
+static int backlight_read(int *result, const char *fname, struct context *context)
 {
 	int fd;
 	char full[PATH_MAX];
 	char dst[64];
 	int r, e;
 
-	igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+	igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);
 
 	fd = open(full, O_RDONLY);
 	if (fd == -1)
@@ -73,14 +76,14 @@ static int backlight_read(int *result, const char *fname)
 	return errno;
 }
 
-static int backlight_write(int value, const char *fname)
+static int backlight_write(int value, const char *fname, struct context *context)
 {
 	int fd;
 	char full[PATH_MAX];
 	char src[64];
 	int len;
 
-	igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH, fname) < PATH_MAX);
+	igt_assert(snprintf(full, PATH_MAX, "%s/%s/%s", BACKLIGHT_PATH, context->path, fname) < PATH_MAX);
 	fd = open(full, O_WRONLY);
 	if (fd == -1)
 		return -errno;
@@ -100,12 +103,12 @@ static void test_and_verify(struct context *context, int val)
 	const int tolerance = val * TOLERANCE / 100;
 	int result;
 
-	igt_assert_eq(backlight_write(val, "brightness"), 0);
-	igt_assert_eq(backlight_read(&result, "brightness"), 0);
+	igt_assert_eq(backlight_write(val, "brightness", context), 0);
+	igt_assert_eq(backlight_read(&result, "brightness", context), 0);
 	/* Check that the exact value sticks */
 	igt_assert_eq(result, val);
 
-	igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
+	igt_assert_eq(backlight_read(&result, "actual_brightness", context), 0);
 	/* Some rounding may happen depending on hw */
 	igt_assert_f(result >= max(0, val - tolerance) &&
 		     result <= min(context->max, val + tolerance),
@@ -124,16 +127,16 @@ static void test_bad_brightness(struct context *context)
 {
 	int val;
 	/* First write some sane value */
-	backlight_write(context->max / 2, "brightness");
+	backlight_write(context->max / 2, "brightness", context);
 	/* Writing invalid values should fail and not change the value */
-	igt_assert_lt(backlight_write(-1, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(-1, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(context->max + 1, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(context->max + 1, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0);
-	backlight_read(&val, "brightness");
+	igt_assert_lt(backlight_write(INT_MAX, "brightness", context), 0);
+	backlight_read(&val, "brightness", context);
 	igt_assert_eq(val, context->max / 2);
 }
 
@@ -186,6 +189,8 @@ igt_main
 	igt_display_t display;
 	igt_output_t *output;
 	struct igt_fb fb;
+	const char *paths[2][50];
+	char path1[PATH_MAX];
 
 	igt_fixture {
 		enum pipe pipe;
@@ -202,10 +207,6 @@ igt_main
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
 
-		/* 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);
-
 		/* should be ../../cardX-$output */
 		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
 		name = basename(full_name);
@@ -233,22 +234,71 @@ igt_main
 
 		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
 		igt_pm_enable_sata_link_power_management();
+
+		memcpy(paths[0], "intel_backlight", 8);
+		for (int i = 0; (i = display.n_outputs); i++) {
+			output = &display.outputs[i];
+			igt_output_set_pipe(output, PIPE_ANY);
+			snprintf(path1, 100 , "card%i-%s-backlight", igt_device_get_card_index(display.drm_fd), igt_output_name(output));
+			int fd = open(path1, O_WRONLY);
+			if (fd == -1)
+				continue;
+			memcpy(paths[1], name, 30);

tests/i915/i915_pm_backlight.c igt_main · line 256

Quoted 10 lines
tests/i915/i915_pm_backlight.c +10 -0
+			break;
+		}
+		/* Get the max value and skip the whole test if sysfs interface not available */
+		for (size_t i = 0; i < sizeof(paths) / sizeof(paths[0]); i++) {
+			memcpy(&context.path, paths[i], 8);
+			igt_skip_on(backlight_read(&old, "brightness", &context));
+			igt_assert(backlight_read(&context.max, "max_brightness", &context) > -1);
+		}
+	}
+	

Please add here description to new test with igt_describe().

tests/i915/i915_pm_backlight.c igt_main · line 264

Quoted 8 lines
tests/i915/i915_pm_backlight.c +8 -0
+	igt_subtest_with_dynamic("basic-brightness") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_brightness(&context);
+			}
+		}
+	}

Same here plus add newline.

tests/i915/i915_pm_backlight.c igt_main · line 273

Quoted 9 lines
tests/i915/i915_pm_backlight.c +9 -0
+	igt_subtest_with_dynamic("bad-brightness") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_bad_brightness(&context);
+			}
+		}
+	}
+

Same here.

Quoted 9 lines
tests/i915/i915_pm_backlight.c +7 -0
+	igt_subtest_with_dynamic("fade") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade(&context);
+			}
+		}
 	}
 

tests/i915/i915_pm_backlight.c igt_main · line 247

Quoted 10 lines
tests/i915/i915_pm_backlight.c +0 -10
-	igt_subtest("basic-brightness")
-		test_brightness(&context);
-	igt_subtest("bad-brightness")
-		test_bad_brightness(&context);
-	igt_subtest("fade")
-		test_fade(&context);
-	igt_subtest("fade_with_dpms")
-		test_fade_with_dpms(&context, output);
-	igt_subtest("fade_with_suspend")
-		test_fade_with_suspend(&context, output);

btw if you do not mind, please also prepare patch which add descriptions here.

tests/i915/i915_pm_backlight.c igt_main · line 291

Quoted 9 lines
tests/i915/i915_pm_backlight.c +9 -0
+	igt_subtest_with_dynamic("fade_with_dpms") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade_with_dpms(&context, output);
+			}
+		}
+	}
+

Same here.

Regards,
Kamil

Quoted 18 lines
tests/i915/i915_pm_backlight.c +8 -2
+	igt_subtest_with_dynamic("fade_with_suspend") {
+		for (size_t j = 0; j < sizeof(paths) / sizeof(paths[0]); j++) {
+			igt_dynamic_f("connector-%zu", j) {
+				memcpy(&context.path, paths[j], 8);
+				test_fade_with_suspend(&context, output);
+			}
+		}
+	}
 
 	igt_fixture {
-		/* Restore old brightness */
-		backlight_write(old, "brightness");
 
 		igt_display_fini(&display);
 		igt_remove_fb(display.drm_fd, &fb);
Signature · 1 line
2.17.1