All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
@ 2022-09-07 13:15 Nidhi Gupta
  2022-09-07 13:57 ` Hogander, Jouni
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Nidhi Gupta @ 2022-09-07 13:15 UTC (permalink / raw)
  To: igt-dev; +Cc: Nidhi Gupta

Added a new subtest as a part of i915_pm_backlight to validate
dual panel support.

Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/i915/i915_pm_backlight.c | 74 +++++++++++++++++++++++++++++++++-
 1 file changed, 73 insertions(+), 1 deletion(-)

diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index cafae7f7..d4b25f3f 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -42,6 +42,7 @@ struct context {
 
 #define TOLERANCE 5 /* percent */
 #define BACKLIGHT_PATH "/sys/class/backlight/intel_backlight"
+#define BACKLIGHT_PATH_DUAL "/sys/class/backlight/card0-eDP-2-backlight"
 
 #define FADESTEPS 10
 #define FADESPEED 100 /* milliseconds between steps */
@@ -94,7 +95,52 @@ static int backlight_write(int value, const char *fname)
 
 	return 0;
 }
+static int backlight_read_dual(int *result, const char *fname)
+{
+        int fd;
+        char full[PATH_MAX];
+        char dst[64];
+        int r, e;
+
+        igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH_DUAL, fname) < PATH_MAX);
+
+        fd = open(full, O_RDONLY);
+        if (fd == -1)
+                return -errno;
+
+        r = read(fd, dst, sizeof(dst));
+        e = errno;
+        close(fd);
+
+        if (r < 0)
+                return -e;
+
+        errno = 0;
+        *result = strtol(dst, NULL, 10);
+        return errno;
+}
+
+static int backlight_write_dual(int value, const char *fname)
+{
+        int fd;
+        char full[PATH_MAX];
+        char src[64];
+        int len;
+
+        igt_assert(snprintf(full, PATH_MAX, "%s/%s", BACKLIGHT_PATH_DUAL, fname) < PATH_MAX);
+        fd = open(full, O_WRONLY);
+        if (fd == -1)
+                return -errno;
 
+        len = snprintf(src, sizeof(src), "%i", value);
+        len = write(fd, src, len);
+        close(fd);
+
+        if (len < 0)
+                return len;
+
+        return 0;
+}
 static void test_and_verify(struct context *context, int val)
 {
 	const int tolerance = val * TOLERANCE / 100;
@@ -112,7 +158,6 @@ static void test_and_verify(struct context *context, int val)
 		     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
 		     result, val, tolerance);
 }
-
 static void test_brightness(struct context *context)
 {
 	test_and_verify(context, 0);
@@ -120,6 +165,31 @@ static void test_brightness(struct context *context)
 	test_and_verify(context, context->max / 2);
 }
 
+static void test_and_verify_dual(struct context *context, int val)
+{
+        const int tolerance = val * TOLERANCE / 100;
+        int result;
+
+        igt_assert_eq(backlight_write_dual(val, "brightness"), 0);
+        igt_assert_eq(backlight_read_dual(&result, "brightness"), 0);
+        /* Check that the exact value sticks */
+        igt_assert_eq(result, val);
+
+        igt_assert_eq(backlight_read_dual(&result, "actual_brightness"), 0);
+        /* Some rounding may happen depending on hw */
+        igt_assert_f(result >= max(0, val - tolerance) &&
+                     result <= min(context->max, val + tolerance),
+                     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
+                     result, val, tolerance);
+}
+
+static void test_brightness_dual(struct context *context)
+{
+        test_and_verify_dual(context, 0);
+        test_and_verify_dual(context, context->max);
+        test_and_verify_dual(context, context->max / 2);
+}
+
 static void test_bad_brightness(struct context *context)
 {
 	int val;
@@ -237,6 +307,8 @@ igt_main
 
 	igt_subtest("basic-brightness")
 		test_brightness(&context);
+	igt_subtest("basic-brightness-dual")
+		test_brightness_dual(&context);
 	igt_subtest("bad-brightness")
 		test_bad_brightness(&context);
 	igt_subtest("fade")
-- 
2.36.0

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

* Re: [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
  2022-09-07 13:15 [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight Nidhi Gupta
@ 2022-09-07 13:57 ` Hogander, Jouni
  2022-09-07 14:07 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2022-09-07 20:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Hogander, Jouni @ 2022-09-07 13:57 UTC (permalink / raw)
  To: igt-dev, Gupta, Nidhi1

On Wed, 2022-09-07 at 18:45 +0530, Nidhi Gupta wrote:
> Added a new subtest as a part of i915_pm_backlight to validate
> dual panel support.
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
>  tests/i915/i915_pm_backlight.c | 74
> +++++++++++++++++++++++++++++++++-
>  1 file changed, 73 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/i915/i915_pm_backlight.c
> b/tests/i915/i915_pm_backlight.c
> index cafae7f7..d4b25f3f 100644
> --- a/tests/i915/i915_pm_backlight.c
> +++ b/tests/i915/i915_pm_backlight.c
> @@ -42,6 +42,7 @@ struct context {
>  
>  #define TOLERANCE 5 /* percent */
>  #define BACKLIGHT_PATH "/sys/class/backlight/intel_backlight"
> +#define BACKLIGHT_PATH_DUAL "/sys/class/backlight/card0-eDP-2-
> backlight"
>  
>  #define FADESTEPS 10
>  #define FADESPEED 100 /* milliseconds between steps */
> @@ -94,7 +95,52 @@ static int backlight_write(int value, const char
> *fname)
>  
>         return 0;
>  }
> +static int backlight_read_dual(int *result, const char *fname)
> +{
> +        int fd;
> +        char full[PATH_MAX];
> +        char dst[64];
> +        int r, e;
> +
> +        igt_assert(snprintf(full, PATH_MAX, "%s/%s",
> BACKLIGHT_PATH_DUAL, fname) < PATH_MAX);
> +
> +        fd = open(full, O_RDONLY);
> +        if (fd == -1)
> +                return -errno;
> +
> +        r = read(fd, dst, sizeof(dst));
> +        e = errno;
> +        close(fd);
> +
> +        if (r < 0)
> +                return -e;
> +
> +        errno = 0;
> +        *result = strtol(dst, NULL, 10);
> +        return errno;
> +}
> +
> +static int backlight_write_dual(int value, const char *fname)
> +{
> +        int fd;
> +        char full[PATH_MAX];
> +        char src[64];
> +        int len;
> +
> +        igt_assert(snprintf(full, PATH_MAX, "%s/%s",
> BACKLIGHT_PATH_DUAL, fname) < PATH_MAX);/sys/class/backlight/card0-
> eDP-2-backlight
> +        fd = open(full, O_WRONLY);
> +        if (fd == -1)
> +                return -errno;
>  
> +        len = snprintf(src, sizeof(src), "%i", value);
> +        len = write(fd, src, len);
> +        close(fd);
> +
> +        if (len < 0)
> +                return len;
> +
> +        return 0;
> +}

Instead of duplicating these functions maybe you could have path as a
parameter i.e. int backlight_write/read_dual(int value, const char
*path, const char *fname)

>  static void test_and_verify(struct context *context, int val)
>  {
>         const int tolerance = val * TOLERANCE / 100;
> @@ -112,7 +158,6 @@ static void test_and_verify(struct context
> *context, int val)
>                      "actual_brightness [%d] did not match expected
> brightness [%d +- %d]\n",
>                      result, val, tolerance);
>  }
> -
>  static void test_brightness(struct context *context)
>  {
>         test_and_verify(context, 0);
> @@ -120,6 +165,31 @@ static void test_brightness(struct context
> *context)
>         test_and_verify(context, context->max / 2);
>  }
>  
> +static void test_and_verify_dual(struct context *context, int val)
> +{
> +        const int tolerance = val * TOLERANCE / 100;
> +        int result;
> +
> +        igt_assert_eq(backlight_write_dual(val, "brightness"), 0);
> +        igt_assert_eq(backlight_read_dual(&result, "brightness"),
> 0);
> +        /* Check that the exact value sticks */
> +        igt_assert_eq(result, val);
> +
> +        igt_assert_eq(backlight_read_dual(&result,
> "actual_brightness"), 0);
> +        /* Some rounding may happen depending on hw */
> +        igt_assert_f(result >= max(0, val - tolerance) &&
> +                     result <= min(context->max, val + tolerance),
> +                     "actual_brightness [%d] did not match expected
> brightness [%d +- %d]\n",
> +                     result, val, tolerance);
> +}

You could consider adding path (/sys/class/backlight/intel_backlight
and /sys/class/backlight/card0-eDP-2-backlight) into context. That way
you can drop this function completely and just slightly modify existing
test_and_verify.

> +
> +static void test_brightness_dual(struct context *context)
> +{
> +        test_and_verify_dual(context, 0);
> +        test_and_verify_dual(context, context->max);
> +        test_and_verify_dual(context, context->max / 2);
> +}
> +
>  static void test_bad_brightness(struct context *context)
>  {
>         int val;
> @@ -237,6 +307,8 @@ igt_main
>  
>         igt_subtest("basic-brightness")
>                 test_brightness(&context);
> +       igt_subtest("basic-brightness-dual")
> +               test_brightness_dual(&context);
>         igt_subtest("bad-brightness")
>                 test_bad_brightness(&context);
>         igt_subtest("fade")

You could consider adding like:

static const char *paths[] = {
	"/sys/class/backlight/intel_backlight",
	"/sys/class/backlight/card0-eDP-2-backlight"
};

Then iterate that array and add subtests:

 context.path = path;
 igt_subtest_f("basic-brightness%s", edp_name(path))
	test_brightness(&context);

where edp is returning either "-edp1" or "-edp2" or alternatively
<empty> for edp1 and "-dual" for edp2 if you prefer that one.

BR,

Jouni Högander

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
  2022-09-07 13:15 [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight Nidhi Gupta
  2022-09-07 13:57 ` Hogander, Jouni
@ 2022-09-07 14:07 ` Patchwork
  2022-09-07 20:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-09-07 14:07 UTC (permalink / raw)
  To: Nidhi Gupta; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 8806 bytes --]

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_12088 -> IGTPW_7753
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (43 -> 41)
------------------------------

  Additional (1): fi-rkl-11600 
  Missing    (3): fi-bdw-samus fi-icl-u2 bat-dg2-9 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - fi-rkl-11600:       NOTRUN -> [SKIP][1] ([i915#2190])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-rkl-11600:       NOTRUN -> [SKIP][2] ([i915#4613]) +3 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_tiled_pread_basic:
    - fi-rkl-11600:       NOTRUN -> [SKIP][3] ([i915#3282])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-rkl-11600:       NOTRUN -> [SKIP][4] ([i915#3012])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_selftest@live@gem:
    - fi-blb-e6850:       NOTRUN -> [DMESG-FAIL][5] ([i915#4528])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-blb-e6850/igt@i915_selftest@live@gem.html

  * igt@i915_selftest@live@requests:
    - fi-pnv-d510:        [PASS][6] -> [DMESG-FAIL][7] ([i915#4528])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/fi-pnv-d510/igt@i915_selftest@live@requests.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-pnv-d510/igt@i915_selftest@live@requests.html

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-rkl-11600:       NOTRUN -> [INCOMPLETE][8] ([i915#5982])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@i915_suspend@basic-s3-without-i915.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-hsw-4770:        NOTRUN -> [SKIP][9] ([fdo#109271] / [fdo#111827])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html
    - fi-rkl-guc:         NOTRUN -> [SKIP][10] ([fdo#111827])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-guc/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-rkl-11600:       NOTRUN -> [SKIP][11] ([fdo#111827]) +7 similar issues
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
    - fi-rkl-11600:       NOTRUN -> [SKIP][12] ([i915#4103])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-rkl-11600:       NOTRUN -> [SKIP][13] ([fdo#109285] / [i915#4098])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_psr@sprite_plane_onoff:
    - fi-rkl-11600:       NOTRUN -> [SKIP][14] ([i915#1072]) +3 similar issues
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@kms_psr@sprite_plane_onoff.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-rkl-11600:       NOTRUN -> [SKIP][15] ([i915#3555] / [i915#4098])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-read:
    - fi-rkl-11600:       NOTRUN -> [SKIP][16] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@prime_vgem@basic-read.html

  * igt@prime_vgem@basic-userptr:
    - fi-rkl-11600:       NOTRUN -> [SKIP][17] ([fdo#109295] / [i915#3301] / [i915#3708])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-11600/igt@prime_vgem@basic-userptr.html

  * igt@runner@aborted:
    - fi-pnv-d510:        NOTRUN -> [FAIL][18] ([fdo#109271] / [i915#2403] / [i915#4312])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-pnv-d510/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s0@smem:
    - {bat-rplp-1}:       [DMESG-WARN][19] ([i915#2867]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/bat-rplp-1/igt@gem_exec_suspend@basic-s0@smem.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/bat-rplp-1/igt@gem_exec_suspend@basic-s0@smem.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [INCOMPLETE][21] ([i915#4785]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@requests:
    - fi-blb-e6850:       [DMESG-FAIL][23] ([i915#4528]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/fi-blb-e6850/igt@i915_selftest@live@requests.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-blb-e6850/igt@i915_selftest@live@requests.html
    - {bat-rpls-1}:       [INCOMPLETE][25] ([i915#4983] / [i915#6257] / [i915#6380]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/bat-rpls-1/igt@i915_selftest@live@requests.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/bat-rpls-1/igt@i915_selftest@live@requests.html

  * igt@i915_selftest@live@workarounds:
    - fi-rkl-guc:         [INCOMPLETE][27] ([i915#4983]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/fi-rkl-guc/igt@i915_selftest@live@workarounds.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/fi-rkl-guc/igt@i915_selftest@live@workarounds.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
  [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
  [i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
  [i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6380]: https://gitlab.freedesktop.org/drm/intel/issues/6380


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6648 -> IGTPW_7753

  CI-20190529: 20190529
  CI_DRM_12088: 3a1b2f4abc391edf8a58ff90fa9908ce0abac22c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_7753: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/index.html
  IGT_6648: 3c9079c0b97445fbfc903b9c5a1d69707b80af80 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

+igt@i915_pm_backlight@basic-brightness-dual

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 10465 bytes --]

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

* [igt-dev] ✗ Fi.CI.IGT: failure for tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
  2022-09-07 13:15 [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight Nidhi Gupta
  2022-09-07 13:57 ` Hogander, Jouni
  2022-09-07 14:07 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
@ 2022-09-07 20:05 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-09-07 20:05 UTC (permalink / raw)
  To: Nidhi Gupta; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 28682 bytes --]

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_12088_full -> IGTPW_7753_full
====================================================

Summary
-------

  **FAILURE**

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

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

Participating hosts (12 -> 9)
------------------------------

  Missing    (3): pig-skl-6260u pig-kbl-iris pig-glk-j5005 

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@i915_pm_backlight@basic-brightness-dual} (NEW):
    - shard-tglb:         NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb5/igt@i915_pm_backlight@basic-brightness-dual.html
    - shard-iclb:         NOTRUN -> [FAIL][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb3/igt@i915_pm_backlight@basic-brightness-dual.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-snb:          [PASS][3] -> [INCOMPLETE][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-snb5/igt@perf_pmu@cpu-hotplug.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-snb6/igt@perf_pmu@cpu-hotplug.html

  
#### Suppressed ####

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

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes:
    - {shard-tglu}:       [PASS][5] -> [SKIP][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-tglu-5/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglu-3/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-b-planes.html

  
New tests
---------

  New tests have been introduced between CI_DRM_12088_full and IGTPW_7753_full:

### New IGT tests (3) ###

  * igt@i915_pm_backlight@basic-brightness-dual:
    - Statuses : 2 fail(s) 3 skip(s)
    - Exec time: [0.0, 0.03] s

  * igt@kms_atomic_transition@plane-use-after-nonblocking-unbind-fencing@pipe-a-dp-1:
    - Statuses : 1 pass(s)
    - Exec time: [0.14] s

  * igt@kms_atomic_transition@plane-use-after-nonblocking-unbind-fencing@pipe-b-dp-1:
    - Statuses : 1 pass(s)
    - Exec time: [0.44] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@drm_buddy@all:
    - shard-iclb:         NOTRUN -> [SKIP][7] ([i915#6433])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb6/igt@drm_buddy@all.html
    - shard-tglb:         NOTRUN -> [SKIP][8] ([i915#6433])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb2/igt@drm_buddy@all.html

  * igt@gem_ctx_persistence@legacy-engines-queued:
    - shard-snb:          NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#1099])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-snb5/igt@gem_ctx_persistence@legacy-engines-queued.html

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [PASS][10] -> [FAIL][11] ([i915#5784])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-tglb1/igt@gem_eio@unwedge-stress.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb3/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-bb-first:
    - shard-iclb:         [PASS][12] -> [SKIP][13] ([i915#4525]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb2/igt@gem_exec_balancer@parallel-bb-first.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb6/igt@gem_exec_balancer@parallel-bb-first.html

  * igt@gem_exec_fair@basic-pace@vcs1:
    - shard-iclb:         NOTRUN -> [FAIL][14] ([i915#2842])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@gem_exec_fair@basic-pace@vcs1.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [PASS][15] -> [SKIP][16] ([i915#2190])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-tglb5/igt@gem_huc_copy@huc-copy.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb7/igt@gem_huc_copy@huc-copy.html

  * igt@i915_suspend@forcewake:
    - shard-apl:          NOTRUN -> [DMESG-WARN][17] ([i915#180])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl1/igt@i915_suspend@forcewake.html

  * igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#3886]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl8/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][19] ([i915#3689])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb6/igt@kms_ccs@pipe-c-missing-ccs-buffer-y_tiled_ccs.html

  * igt@kms_ccs@pipe-d-bad-rotation-90-yf_tiled_ccs:
    - shard-iclb:         NOTRUN -> [SKIP][20] ([fdo#109278])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb3/igt@kms_ccs@pipe-d-bad-rotation-90-yf_tiled_ccs.html
    - shard-tglb:         NOTRUN -> [SKIP][21] ([fdo#111615] / [i915#3689])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb6/igt@kms_ccs@pipe-d-bad-rotation-90-yf_tiled_ccs.html

  * igt@kms_chamelium@dp-frame-dump:
    - shard-snb:          NOTRUN -> [SKIP][22] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-snb2/igt@kms_chamelium@dp-frame-dump.html

  * igt@kms_chamelium@hdmi-crc-single:
    - shard-iclb:         NOTRUN -> [SKIP][23] ([fdo#109284] / [fdo#111827])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb1/igt@kms_chamelium@hdmi-crc-single.html
    - shard-tglb:         NOTRUN -> [SKIP][24] ([fdo#109284] / [fdo#111827])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb3/igt@kms_chamelium@hdmi-crc-single.html
    - shard-glk:          NOTRUN -> [SKIP][25] ([fdo#109271] / [fdo#111827])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk3/igt@kms_chamelium@hdmi-crc-single.html

  * igt@kms_chamelium@hdmi-edid-read:
    - shard-apl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl7/igt@kms_chamelium@hdmi-edid-read.html

  * igt@kms_content_protection@dp-mst-lic-type-1:
    - shard-iclb:         NOTRUN -> [SKIP][27] ([i915#3116])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb7/igt@kms_content_protection@dp-mst-lic-type-1.html
    - shard-tglb:         NOTRUN -> [SKIP][28] ([i915#3116] / [i915#3299])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb1/igt@kms_content_protection@dp-mst-lic-type-1.html

  * igt@kms_cursor_crc@cursor-suspend@pipe-b-dp-1:
    - shard-apl:          [PASS][29] -> [DMESG-WARN][30] ([i915#180])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-apl4/igt@kms_cursor_crc@cursor-suspend@pipe-b-dp-1.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl8/igt@kms_cursor_crc@cursor-suspend@pipe-b-dp-1.html

  * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
    - shard-glk:          [PASS][31] -> [FAIL][32] ([i915#72])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk3/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk5/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html

  * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [PASS][33] -> [FAIL][34] ([i915#79])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk7/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk8/igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@2x-wf_vblank-ts-check:
    - shard-iclb:         NOTRUN -> [SKIP][35] ([fdo#109274])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb5/igt@kms_flip@2x-wf_vblank-ts-check.html
    - shard-tglb:         NOTRUN -> [SKIP][36] ([fdo#109274] / [fdo#111825] / [i915#3637])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb5/igt@kms_flip@2x-wf_vblank-ts-check.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][37] ([i915#2672] / [i915#3555])
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb3/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-downscaling@pipe-a-default-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([i915#2672]) +7 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb7/igt@kms_flip_scaled_crc@flip-64bpp-4tile-to-32bpp-4tiledg2rcccs-downscaling@pipe-a-valid-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-valid-mode:
    - shard-glk:          [PASS][39] -> [FAIL][40] ([i915#1888])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk1/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-valid-mode.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk9/igt@kms_flip_scaled_crc@flip-64bpp-linear-to-32bpp-linear-downscaling@pipe-a-valid-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([i915#3555]) +1 similar issue
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-xtile-to-16bpp-xtile-downscaling@pipe-a-default-mode.html

  * igt@kms_frontbuffer_tracking@fbc-tiling-4:
    - shard-tglb:         NOTRUN -> [SKIP][42] ([i915#5439])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-tiling-4.html
    - shard-iclb:         NOTRUN -> [SKIP][43] ([i915#5438])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-tiling-4.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff:
    - shard-glk:          NOTRUN -> [SKIP][44] ([fdo#109271]) +8 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html
    - shard-tglb:         NOTRUN -> [SKIP][45] ([i915#6497])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-onoff.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-shrfb-plflip-blt:
    - shard-tglb:         NOTRUN -> [SKIP][46] ([fdo#109280] / [fdo#111825])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb1/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-shrfb-plflip-blt.html
    - shard-iclb:         NOTRUN -> [SKIP][47] ([fdo#109280])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb7/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-shrfb-plflip-blt.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area:
    - shard-apl:          NOTRUN -> [SKIP][48] ([fdo#109271] / [i915#658])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl1/igt@kms_psr2_sf@plane-move-sf-dmg-area.html

  * igt@kms_rotation_crc@sprite-rotation-270:
    - shard-snb:          NOTRUN -> [SKIP][49] ([fdo#109271]) +67 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-snb4/igt@kms_rotation_crc@sprite-rotation-270.html

  * igt@prime_nv_api@i915_self_import_to_different_fd:
    - shard-apl:          NOTRUN -> [SKIP][50] ([fdo#109271]) +48 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl7/igt@prime_nv_api@i915_self_import_to_different_fd.html

  * igt@prime_nv_test@nv_write_i915_gtt_mmap_read:
    - shard-iclb:         NOTRUN -> [SKIP][51] ([fdo#109291])
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html
    - shard-tglb:         NOTRUN -> [SKIP][52] ([fdo#109291])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb6/igt@prime_nv_test@nv_write_i915_gtt_mmap_read.html

  * igt@sysfs_clients@recycle:
    - shard-apl:          NOTRUN -> [SKIP][53] ([fdo#109271] / [i915#2994])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl7/igt@sysfs_clients@recycle.html

  
#### Possible fixes ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [SKIP][54] ([i915#658]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb3/igt@feature_discovery@psr2.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@feature_discovery@psr2.html

  * igt@gem_ctx_exec@basic-nohangcheck:
    - shard-tglb:         [FAIL][56] ([i915#6268]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-tglb2/igt@gem_ctx_exec@basic-nohangcheck.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb2/igt@gem_ctx_exec@basic-nohangcheck.html

  * igt@gem_ctx_isolation@preservation-s3@rcs0:
    - shard-apl:          [DMESG-WARN][58] ([i915#180]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-apl8/igt@gem_ctx_isolation@preservation-s3@rcs0.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-apl6/igt@gem_ctx_isolation@preservation-s3@rcs0.html

  * igt@gem_exec_balancer@parallel-balancer:
    - shard-iclb:         [SKIP][60] ([i915#4525]) -> [PASS][61] +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb3/igt@gem_exec_balancer@parallel-balancer.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@gem_exec_balancer@parallel-balancer.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [FAIL][62] ([i915#2842]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-tglb5/igt@gem_exec_fair@basic-flow@rcs0.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-tglb3/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-iclb:         [FAIL][64] ([i915#2842]) -> [PASS][65]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb5/igt@gem_exec_fair@basic-pace@vecs0.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-glk:          [DMESG-WARN][66] ([i915#5566] / [i915#716]) -> [PASS][67]
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk3/igt@gen9_exec_parse@allowed-single.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk8/igt@gen9_exec_parse@allowed-single.html

  * igt@kms_cursor_legacy@flip-vs-cursor@toggle:
    - shard-iclb:         [FAIL][68] ([i915#2346]) -> [PASS][69] +2 similar issues
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor@toggle.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb3/igt@kms_cursor_legacy@flip-vs-cursor@toggle.html

  * igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1:
    - shard-iclb:         [SKIP][70] ([i915#5176]) -> [PASS][71] +1 similar issue
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb3/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb6/igt@kms_plane_scaling@plane-scaler-with-clipping-clamping-pixel-formats@pipe-b-edp-1.html

  * igt@kms_psr@psr2_no_drrs:
    - shard-iclb:         [SKIP][72] ([fdo#109441]) -> [PASS][73] +3 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb5/igt@kms_psr@psr2_no_drrs.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

  * igt@kms_psr_stress_test@invalidate-primary-flip-overlay:
    - shard-iclb:         [SKIP][74] ([i915#5519]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb4/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb7/igt@kms_psr_stress_test@invalidate-primary-flip-overlay.html

  * igt@perf@polling-parameterized:
    - shard-glk:          [FAIL][76] ([i915#5639]) -> [PASS][77]
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk9/igt@perf@polling-parameterized.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk3/igt@perf@polling-parameterized.html

  
#### Warnings ####

  * igt@gem_exec_balancer@parallel-ordering:
    - shard-iclb:         [FAIL][78] ([i915#6117]) -> [SKIP][79] ([i915#4525])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb1/igt@gem_exec_balancer@parallel-ordering.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb6/igt@gem_exec_balancer@parallel-ordering.html

  * igt@gem_softpin@evict-single-offset:
    - shard-glk:          [FAIL][80] ([i915#1888] / [i915#4171]) -> [FAIL][81] ([i915#4171])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-glk2/igt@gem_softpin@evict-single-offset.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-glk9/igt@gem_softpin@evict-single-offset.html

  * igt@kms_psr2_sf@cursor-plane-move-continuous-sf:
    - shard-iclb:         [SKIP][82] ([i915#2920]) -> [SKIP][83] ([i915#658])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb2/igt@kms_psr2_sf@cursor-plane-move-continuous-sf.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb5/igt@kms_psr2_sf@cursor-plane-move-continuous-sf.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area:
    - shard-iclb:         [SKIP][84] ([i915#2920]) -> [SKIP][85] ([fdo#111068] / [i915#658]) +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb2/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb5/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area.html

  * igt@kms_psr2_su@page_flip-p010:
    - shard-iclb:         [SKIP][86] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [FAIL][87] ([i915#5939])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12088/shard-iclb7/igt@kms_psr2_su@page_flip-p010.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/shard-iclb2/igt@kms_psr2_su@page_flip-p010.html

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

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109314]: https://bugs.freedesktop.org/show_bug.cgi?id=109314
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110542]: https://bugs.freedesktop.org/show_bug.cgi?id=110542
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1063]: https://gitlab.freedesktop.org/drm/intel/issues/1063
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2435]: https://gitlab.freedesktop.org/drm/intel/issues/2435
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2530]: https://gitlab.freedesktop.org/drm/intel/issues/2530
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
  [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3323]: https://gitlab.freedesktop.org/drm/intel/issues/3323
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3376]: https://gitlab.freedesktop.org/drm/intel/issues/3376
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3528]: https://gitlab.freedesktop.org/drm/intel/issues/3528
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4171]: https://gitlab.freedesktop.org/drm/intel/issues/4171
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#5122]: https://gitlab.freedesktop.org/drm/intel/issues/5122
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5438]: https://gitlab.freedesktop.org/drm/intel/issues/5438
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5519]: https://gitlab.freedesktop.org/drm/intel/issues/5519
  [i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
  [i915#5639]: https://gitlab.freedesktop.org/drm/intel/issues/5639
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#5939]: https://gitlab.freedesktop.org/drm/intel/issues/5939
  [i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
  [i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6355]: https://gitlab.freedesktop.org/drm/intel/issues/6355
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6637]: https://gitlab.freedesktop.org/drm/intel/issues/6637
  [i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
  [i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6648 -> IGTPW_7753
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_12088: 3a1b2f4abc391edf8a58ff90fa9908ce0abac22c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_7753: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7753/index.html
  IGT_6648: 3c9079c0b97445fbfc903b9c5a1d69707b80af80 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 28106 bytes --]

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

* Re: [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
  2022-09-21  8:58 [igt-dev] [RFC, i-g-t] " Nidhi Gupta
@ 2022-09-22  9:31 ` Hogander, Jouni
  0 siblings, 0 replies; 6+ messages in thread
From: Hogander, Jouni @ 2022-09-22  9:31 UTC (permalink / raw)
  To: igt-dev, Gupta, Nidhi1

On Wed, 2022-09-21 at 14:28 +0530, Nidhi Gupta wrote:
> -Since driver can now support multiple eDPs and Debugfs structure for
> backlight changed per connector the test should then iterate through
> all eDP connectors.
> -backlight with dpms cycle of on and off with all the eDP connected.

These are clearly two separate patches. I would suggest splitting.


> Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
> ---
>  tests/i915/i915_pm_backlight.c | 204 +++++++++++++++++++++++++------
> --
>  1 file changed, 156 insertions(+), 48 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_backlight.c
> b/tests/i915/i915_pm_backlight.c
> index cafae7f7..951ee048 100644
> --- a/tests/i915/i915_pm_backlight.c
> +++ b/tests/i915/i915_pm_backlight.c
> @@ -36,19 +36,77 @@
>  #include <time.h>
>  
>  struct context {
> +       int drm_fd;
> +       igt_display_t display;
>         int max;
>  };
>  
> +//typedef struct data {
> +//     igt_display_t display;
> +//     int drm_fd;
> +//} data_t;
> +
>  

Just remove if not used.

>  #define TOLERANCE 5 /* percent */
>  #define BACKLIGHT_PATH "/sys/class/backlight/intel_backlight"
> -
> +#define BACKLIGHT_BRIGHTNESS "brightness"
> +#define BACKLIGHT_ACTUAL_BRIGHTNESS "actual_brightness"
>  #define FADESTEPS 10
>  #define FADESPEED 100 /* milliseconds between steps */
>  
>  IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
>  
> -static int backlight_read(int *result, const char *fname)
> +static int backlight_read(int *result, int drm_fd, char
> *connector_name)
> +{
> +       char buf[20];
> +       int fd, e, r;
> +
> +       fd = igt_debugfs_connector_dir(drm_fd, connector_name,
> O_RDONLY);

Why you are using debugfs? Isn't it sysfs interface you want to use?

> +
> +       if (fd < 0) {
> +               igt_info("Couldn't open connector %s debugfs
> directory\n",
> +                        connector_name);
> +               return false;

On error you return "< 0". Maybe fd as it is?
 
> +       }
> +
> +       r = igt_debugfs_simple_read(fd, BACKLIGHT_BRIGHTNESS, buf,
> sizeof(buf));
> +       e = errno;
> +       close(fd);
> +
> +       if (r < 0)
> +               return -e;
> +
> +       errno = 0;

I don't see a reason to set errno here as you are already setting it
below? Honestly: I do not understand why errno is used in this testcase
at all as it's value is not really used. Maybe igt is using it for some
reporting? I'm fine if you want to keep it though.

> +       *result = strtol(buf, NULL, 0);
> +       return errno = 0;
> +}
> +
> +static int read_actual_backlight(int *result, int drm_fd, char
> *connector_name)

You should combine read_actual_backlight, backlight_read and
> +{
> +       char buf[20];
> +       int fd, e, r;
> +
> +       fd = igt_debugfs_connector_dir(drm_fd, connector_name,
> O_RDONLY);
> +
> +       if (fd < 0) {
> +               igt_info("Couldn't open connector %s debugfs
> directory\n",
> +                        connector_name);
> +               return false;
> +       }
> +
> +       r = igt_debugfs_simple_read(fd, BACKLIGHT_ACTUAL_BRIGHTNESS,
> buf, sizeof(buf));
> +       e = errno;
> +       close(fd);
> +
> +       if (r < 0)
> +               return -e;
> +
> +       errno = 0;
> +       *result = strtol(buf, NULL, 0);
> +       return errno;
> +}
> +
> +/*static int backlight_read(int *result, const char *fname)
>  {
>         int fd;
>         char full[PATH_MAX];
> @@ -72,6 +130,7 @@ static int backlight_read(int *result, const char
> *fname)
>         *result = strtol(dst, NULL, 10);
>         return errno;
>  }
> +*/

Again just remove.

>  
>  static int backlight_write(int value, const char *fname)
>  {
> @@ -99,18 +158,25 @@ 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);
> -       /* Check that the exact value sticks */
> -       igt_assert_eq(result, val);
> -
> -       igt_assert_eq(backlight_read(&result, "actual_brightness"),
> 0);
> -       /* Some rounding may happen depending on hw */
> -       igt_assert_f(result >= max(0, val - tolerance) &&
> -                    result <= min(context->max, val + tolerance),
> -                    "actual_brightness [%d] did not match expected
> brightness [%d +- %d]\n",
> -                    result, val, tolerance);
> +       igt_output_t *output;
> +       enum pipe pipe;
> +
> +       for_each_pipe_with_valid_output(&context->display, pipe,
> output) {

 for_each_pipe_with_single_output

> +               if (output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP)
> +                       continue;
> +
> +               igt_assert_eq(backlight_write(val, "brightness"), 0);

Shouldn't you write both panels separately?

> +               igt_assert_eq(backlight_read(&result, context-
> >drm_fd, output->name), 0);
> +               /* Check that the exact value sticks */
> +               igt_assert_eq(result, val);
> +
> +               igt_assert_eq(read_actual_backlight(&result, context-
> >drm_fd, output->name), 0);
> +               /* Some rounding may happen depending on hw */
> +               igt_assert_f(result >= max(0, val - tolerance) &&
> +                            result <= min(context->max, val +
> tolerance),
> +                            "actual_brightness [%d] did not match
> expected brightness [%d +- %d]\n",
> +                             result, val, tolerance);
> +       }
>  }
>  
>  static void test_brightness(struct context *context)
> @@ -123,52 +189,68 @@ static void test_brightness(struct context
> *context)
>  static void test_bad_brightness(struct context *context)
>  {
>         int val;
> -       /* First write some sane value */
> -       backlight_write(context->max / 2, "brightness");
> -       /* Writing invalid values should fail and not change the
> value */
> -       igt_assert_lt(backlight_write(-1, "brightness"), 0);
> -       backlight_read(&val, "brightness");
> -       igt_assert_eq(val, context->max / 2);
> -       igt_assert_lt(backlight_write(context->max + 1,
> "brightness"), 0);
> -       backlight_read(&val, "brightness");
> -       igt_assert_eq(val, context->max / 2);
> -       igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0);
> -       backlight_read(&val, "brightness");
> -       igt_assert_eq(val, context->max / 2);
> +       igt_output_t *output;
> +       enum pipe pipe;
> +
> +       for_each_pipe_with_valid_output(&context->display, pipe,
> output) {

for_each_pipe_with_single_output

> +               if (output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP)
> +                       continue;
> +               /* First write some sane value */
> +               backlight_write(context->max / 2, "brightness");
> +               /* Writing invalid values should fail and not change
> the value */
> +               igt_assert_lt(backlight_write(-1, "brightness"), 0);
> +               backlight_read(&val, context->drm_fd, output->name);
> +               igt_assert_eq(val, context->max / 2);
> +               igt_assert_lt(backlight_write(context->max + 1,
> "brightness"), 0);
> +               backlight_read(&val, context->drm_fd, output->name);
> +               igt_assert_eq(val, context->max / 2);
> +               igt_assert_lt(backlight_write(INT_MAX, "brightness"),
> 0);
> +               backlight_read(&val, context->drm_fd, output->name);
> +               igt_assert_eq(val, context->max / 2);
> +       }
>  }
>  
>  static void test_fade(struct context *context)
>  {
>         int i;
>         static const struct timespec ts = { .tv_sec = 0, .tv_nsec =
> FADESPEED*1000000 };
> +       igt_output_t *output;
> +       enum pipe pipe;
>  
> -       /* Fade out, then in */
> -       for (i = context->max; i > 0; i -= context->max / FADESTEPS)
> {
> -               test_and_verify(context, i);
> -               nanosleep(&ts, NULL);
> -       }
> -       for (i = 0; i <= context->max; i += context->max / FADESTEPS)
> {
> -               test_and_verify(context, i);
> -               nanosleep(&ts, NULL);
> +       for_each_pipe_with_valid_output(&context->display, pipe,
> output) {
> +               if (output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP)
> +                       continue;
> +
> +               /* Fade out, then in */
> +               for (i = context->max; i > 0; i -= context->max /
> FADESTEPS) {
> +                       test_and_verify(context, i);
> +                       nanosleep(&ts, NULL);
> +               }
> +               for (i = 0; i <= context->max; i += context->max /
> FADESTEPS) {
> +                       test_and_verify(context, i);
> +                       nanosleep(&ts, NULL);
> +               }
>         }
>  }
>  
>  static void
>  test_fade_with_dpms(struct context *context, igt_output_t *output)
>  {
> -       igt_require(igt_setup_runtime_pm(output->display->drm_fd));
>  
> -       kmstest_set_connector_dpms(output->display->drm_fd,
> -                                  output->config.connector,
> -                                  DRM_MODE_DPMS_OFF);
> -
>        igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPEN
> DED));
> +               igt_require(igt_setup_runtime_pm(output->display-
> >drm_fd));
>  
> -       kmstest_set_connector_dpms(output->display->drm_fd,
> -                                  output->config.connector,
> -                                  DRM_MODE_DPMS_ON);
> -
>        igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_ACTIVE)
> );
> +               kmstest_set_connector_dpms(output->display->drm_fd,
> +                                          output->config.connector,
> +                                          DRM_MODE_DPMS_OFF);
> +               igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STA
> TUS_SUSPENDED));
> +
> +               kmstest_set_connector_dpms(output->display->drm_fd,
> +                                          output->config.connector,
> +                                          DRM_MODE_DPMS_ON);
> +               igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STAT
> US_ACTIVE));
> +
> +               test_fade(context);
>  
> -       test_fade(context);
>  }
>  
>  static void
> @@ -179,9 +261,32 @@ test_fade_with_suspend(struct context *context,
> igt_output_t *output)
>         test_fade(context);
>  }
>  
> +static void test_backlight_dpms_cycle(struct context *context,
> igt_output_t *output)
> +{
> +       int result;
> +       enum pipe pipe;
> +
> +       for_each_pipe_with_valid_output(output->display, pipe,
> output) {
> +               if (output->config.connector->connector_type !=
> DRM_MODE_CONNECTOR_eDP)
> +                       continue;
> +
> +               igt_info("Testing backlight dpms on %s\n", output-
> >name);
> +
> +               backlight_write(context->max / 2, "brightness");
> +               usleep(100000);
> +               backlight_read(&result, context->drm_fd, output-
> >name);
> +
> +               kmstest_set_connector_dpms(output->display->drm_fd,
> output->config.connector, DRM_MODE_DPMS_OFF);
> +               kmstest_set_connector_dpms(output->display->drm_fd,
> output->config.connector, DRM_MODE_DPMS_ON);
> +               usleep(100000);
> +
> +               igt_assert_eq(read_actual_backlight(&result, context-
> >drm_fd, output->name), 0);
> +       }
> +}
> +
>  igt_main
>  {
> -       struct context context = {0};
> +       struct context context;
>         int old;
>         igt_display_t display;
>         igt_output_t *output;
> @@ -200,11 +305,12 @@ igt_main
>                  * try to enable all.
>                  */
>                 kmstest_set_vt_graphics_mode();
> -               igt_display_require(&display,
> drm_open_driver(DRIVER_INTEL));
> +               //igt_display_require(&display,
> drm_open_driver(DRIVER_INTEL));
> +               igt_display_require(&context.display,
> context.drm_fd);
>  
>                 /* 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);
> +               igt_skip_on(backlight_read(&old, context.drm_fd,
> output->name));
> +               igt_assert(backlight_read(&context.max,
> context.drm_fd, output->name) > -1);
>  
>                 /* should be ../../cardX-$output */
>                 igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device",
> full_name, sizeof(full_name) - 1));
> @@ -245,6 +351,8 @@ igt_main
>                 test_fade_with_dpms(&context, output);
>         igt_subtest("fade_with_suspend")
>                 test_fade_with_suspend(&context, output);
> +       igt_subtest("backlight_dpms_cycle")
> +               test_backlight_dpms_cycle(&context, output);
>  
>         igt_fixture {
>                 /* Restore old brightness */


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

* [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight
@ 2022-09-21  8:58 Nidhi Gupta
  2022-09-22  9:31 ` Hogander, Jouni
  0 siblings, 1 reply; 6+ messages in thread
From: Nidhi Gupta @ 2022-09-21  8:58 UTC (permalink / raw)
  To: igt-dev; +Cc: 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.
-backlight with dpms cycle of on and off with all the eDP connected.

Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com>
---
 tests/i915/i915_pm_backlight.c | 204 +++++++++++++++++++++++++--------
 1 file changed, 156 insertions(+), 48 deletions(-)

diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index cafae7f7..951ee048 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -36,19 +36,77 @@
 #include <time.h>
 
 struct context {
+	int drm_fd;
+	igt_display_t display;
 	int max;
 };
 
+//typedef struct data {
+//	igt_display_t display;
+//	int drm_fd;
+//} data_t;
+
 
 #define TOLERANCE 5 /* percent */
 #define BACKLIGHT_PATH "/sys/class/backlight/intel_backlight"
-
+#define BACKLIGHT_BRIGHTNESS "brightness"
+#define BACKLIGHT_ACTUAL_BRIGHTNESS "actual_brightness"
 #define FADESTEPS 10
 #define FADESPEED 100 /* milliseconds between steps */
 
 IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
 
-static int backlight_read(int *result, const char *fname)
+static int backlight_read(int *result, int drm_fd, char *connector_name)
+{
+	char buf[20];
+	int fd, e, r;
+
+	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
+
+	if (fd < 0) {
+		igt_info("Couldn't open connector %s debugfs directory\n",
+			 connector_name);
+		return false;
+	}
+
+	r = igt_debugfs_simple_read(fd, BACKLIGHT_BRIGHTNESS, buf, sizeof(buf));
+	e = errno;
+	close(fd);
+
+	if (r < 0)
+		return -e;
+
+	errno = 0;
+	*result = strtol(buf, NULL, 0);
+	return errno = 0;
+}
+
+static int read_actual_backlight(int *result, int drm_fd, char *connector_name)
+{
+	char buf[20];
+	int fd, e, r;
+
+	fd = igt_debugfs_connector_dir(drm_fd, connector_name, O_RDONLY);
+
+	if (fd < 0) {
+		igt_info("Couldn't open connector %s debugfs directory\n",
+			 connector_name);
+		return false;
+	}
+
+	r = igt_debugfs_simple_read(fd, BACKLIGHT_ACTUAL_BRIGHTNESS, buf, sizeof(buf));
+	e = errno;
+	close(fd);
+
+	if (r < 0)
+		return -e;
+
+	errno = 0;
+	*result = strtol(buf, NULL, 0);
+	return errno;
+}
+
+/*static int backlight_read(int *result, const char *fname)
 {
 	int fd;
 	char full[PATH_MAX];
@@ -72,6 +130,7 @@ static int backlight_read(int *result, const char *fname)
 	*result = strtol(dst, NULL, 10);
 	return errno;
 }
+*/
 
 static int backlight_write(int value, const char *fname)
 {
@@ -99,18 +158,25 @@ 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);
-	/* Check that the exact value sticks */
-	igt_assert_eq(result, val);
-
-	igt_assert_eq(backlight_read(&result, "actual_brightness"), 0);
-	/* Some rounding may happen depending on hw */
-	igt_assert_f(result >= max(0, val - tolerance) &&
-		     result <= min(context->max, val + tolerance),
-		     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
-		     result, val, tolerance);
+	igt_output_t *output;
+	enum pipe pipe;
+
+	for_each_pipe_with_valid_output(&context->display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+
+		igt_assert_eq(backlight_write(val, "brightness"), 0);
+		igt_assert_eq(backlight_read(&result, context->drm_fd, output->name), 0);
+		/* Check that the exact value sticks */
+		igt_assert_eq(result, val);
+
+		igt_assert_eq(read_actual_backlight(&result, context->drm_fd, output->name), 0);
+		/* Some rounding may happen depending on hw */
+		igt_assert_f(result >= max(0, val - tolerance) &&
+			     result <= min(context->max, val + tolerance),
+			     "actual_brightness [%d] did not match expected brightness [%d +- %d]\n",
+			      result, val, tolerance);
+	}
 }
 
 static void test_brightness(struct context *context)
@@ -123,52 +189,68 @@ static void test_brightness(struct context *context)
 static void test_bad_brightness(struct context *context)
 {
 	int val;
-	/* First write some sane value */
-	backlight_write(context->max / 2, "brightness");
-	/* Writing invalid values should fail and not change the value */
-	igt_assert_lt(backlight_write(-1, "brightness"), 0);
-	backlight_read(&val, "brightness");
-	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(context->max + 1, "brightness"), 0);
-	backlight_read(&val, "brightness");
-	igt_assert_eq(val, context->max / 2);
-	igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0);
-	backlight_read(&val, "brightness");
-	igt_assert_eq(val, context->max / 2);
+	igt_output_t *output;
+	enum pipe pipe;
+
+	for_each_pipe_with_valid_output(&context->display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+		/* First write some sane value */
+		backlight_write(context->max / 2, "brightness");
+		/* Writing invalid values should fail and not change the value */
+		igt_assert_lt(backlight_write(-1, "brightness"), 0);
+		backlight_read(&val, context->drm_fd, output->name);
+		igt_assert_eq(val, context->max / 2);
+		igt_assert_lt(backlight_write(context->max + 1, "brightness"), 0);
+		backlight_read(&val, context->drm_fd, output->name);
+		igt_assert_eq(val, context->max / 2);
+		igt_assert_lt(backlight_write(INT_MAX, "brightness"), 0);
+		backlight_read(&val, context->drm_fd, output->name);
+		igt_assert_eq(val, context->max / 2);
+	}
 }
 
 static void test_fade(struct context *context)
 {
 	int i;
 	static const struct timespec ts = { .tv_sec = 0, .tv_nsec = FADESPEED*1000000 };
+	igt_output_t *output;
+	enum pipe pipe;
 
-	/* Fade out, then in */
-	for (i = context->max; i > 0; i -= context->max / FADESTEPS) {
-		test_and_verify(context, i);
-		nanosleep(&ts, NULL);
-	}
-	for (i = 0; i <= context->max; i += context->max / FADESTEPS) {
-		test_and_verify(context, i);
-		nanosleep(&ts, NULL);
+	for_each_pipe_with_valid_output(&context->display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+
+		/* Fade out, then in */
+		for (i = context->max; i > 0; i -= context->max / FADESTEPS) {
+			test_and_verify(context, i);
+			nanosleep(&ts, NULL);
+		}
+		for (i = 0; i <= context->max; i += context->max / FADESTEPS) {
+			test_and_verify(context, i);
+			nanosleep(&ts, NULL);
+		}
 	}
 }
 
 static void
 test_fade_with_dpms(struct context *context, igt_output_t *output)
 {
-	igt_require(igt_setup_runtime_pm(output->display->drm_fd));
 
-	kmstest_set_connector_dpms(output->display->drm_fd,
-				   output->config.connector,
-				   DRM_MODE_DPMS_OFF);
-	igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
+		igt_require(igt_setup_runtime_pm(output->display->drm_fd));
 
-	kmstest_set_connector_dpms(output->display->drm_fd,
-				   output->config.connector,
-				   DRM_MODE_DPMS_ON);
-	igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_ACTIVE));
+		kmstest_set_connector_dpms(output->display->drm_fd,
+					   output->config.connector,
+					   DRM_MODE_DPMS_OFF);
+		igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
+
+		kmstest_set_connector_dpms(output->display->drm_fd,
+					   output->config.connector,
+					   DRM_MODE_DPMS_ON);
+		igt_assert(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_ACTIVE));
+
+		test_fade(context);
 
-	test_fade(context);
 }
 
 static void
@@ -179,9 +261,32 @@ test_fade_with_suspend(struct context *context, igt_output_t *output)
 	test_fade(context);
 }
 
+static void test_backlight_dpms_cycle(struct context *context, igt_output_t *output)
+{
+	int result;
+	enum pipe pipe;
+
+	for_each_pipe_with_valid_output(output->display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			continue;
+
+		igt_info("Testing backlight dpms on %s\n", output->name);
+
+		backlight_write(context->max / 2, "brightness");
+		usleep(100000);
+		backlight_read(&result, context->drm_fd, output->name);
+
+		kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_OFF);
+		kmstest_set_connector_dpms(output->display->drm_fd, output->config.connector, DRM_MODE_DPMS_ON);
+		usleep(100000);
+
+		igt_assert_eq(read_actual_backlight(&result, context->drm_fd, output->name), 0);
+	}
+}
+
 igt_main
 {
-	struct context context = {0};
+	struct context context;
 	int old;
 	igt_display_t display;
 	igt_output_t *output;
@@ -200,11 +305,12 @@ igt_main
 		 * try to enable all.
 		 */
 		kmstest_set_vt_graphics_mode();
-		igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
+		//igt_display_require(&display, drm_open_driver(DRIVER_INTEL));
+		igt_display_require(&context.display, context.drm_fd);
 
 		/* 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);
+		igt_skip_on(backlight_read(&old, context.drm_fd, output->name));
+		igt_assert(backlight_read(&context.max, context.drm_fd, output->name) > -1);
 
 		/* should be ../../cardX-$output */
 		igt_assert_lt(12, readlink(BACKLIGHT_PATH "/device", full_name, sizeof(full_name) - 1));
@@ -245,6 +351,8 @@ igt_main
 		test_fade_with_dpms(&context, output);
 	igt_subtest("fade_with_suspend")
 		test_fade_with_suspend(&context, output);
+	igt_subtest("backlight_dpms_cycle")
+		test_backlight_dpms_cycle(&context, output);
 
 	igt_fixture {
 		/* Restore old brightness */
-- 
2.36.0

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

end of thread, other threads:[~2022-09-22  9:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 13:15 [igt-dev] [RFC, i-g-t] tests/i915/i915_pm_backlight: Add new subtest to validate dual panel backlight Nidhi Gupta
2022-09-07 13:57 ` Hogander, Jouni
2022-09-07 14:07 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-09-07 20:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-21  8:58 [igt-dev] [RFC, i-g-t] " Nidhi Gupta
2022-09-22  9:31 ` Hogander, Jouni

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