* [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection
@ 2023-11-15 6:42 Kunal Joshi
2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable " Kunal Joshi
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Kunal Joshi @ 2023-11-15 6:42 UTC (permalink / raw)
To: igt-dev; +Cc: Kunal Joshi
dark screen detection feature when enable will monitor frames
and if black frame is detcted it will raise drm_error, added
two tests for positive (black frame) and negative case (white frame)
Kunal Joshi (2):
lib/igt_debugfs: added helper to enable/disable dark screen detection
tests/kms_pipe_crc_basic: added new subtest for darkscreen detection
lib/igt_debugfs.c | 23 ++++++++++++++++
lib/igt_debugfs.h | 2 ++
tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++-----
3 files changed, 73 insertions(+), 7 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread* [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable dark screen detection 2023-11-15 6:42 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi @ 2023-11-15 6:42 ` Kunal Joshi 2023-11-16 11:40 ` Juha-Pekka Heikkila 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi ` (2 subsequent siblings) 3 siblings, 1 reply; 10+ messages in thread From: Kunal Joshi @ 2023-11-15 6:42 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Nemesa Garg, Arun R Murthy added helper function for dark screen detection v2: Fix indentation (JP) Reduce complexity and redundancy (JP) Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Cc: Nemesa Garg <nemesa.garg@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- lib/igt_debugfs.c | 23 +++++++++++++++++++++++ lib/igt_debugfs.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index a7b54bae5..c4a8b532d 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -743,3 +743,26 @@ void __igt_debugfs_dump(int device, const char *filename, int level) igt_log(IGT_LOG_DOMAIN, level, "%s:\n%s\n", filename, contents); free(contents); } + +bool igt_is_dark_screen_supported(int drm_fd, enum pipe pipe) +{ + char buf[256]; + int dir; + + dir = igt_debugfs_pipe_dir(drm_fd, pipe, O_DIRECTORY); + igt_require_fd(dir); + igt_debugfs_simple_read(dir, "i915_darkscreen_status", buf, sizeof(buf)); + close(dir); + return (*buf == '0' || *buf == '1'); +} + +ssize_t igt_set_dark_screen_detection(int drm_fd, enum pipe pipe, bool enable) +{ + char buf[2]; + int dir; + + snprintf(buf, sizeof(buf), "%d", enable ? 1 : 0); + dir = igt_debugfs_pipe_dir(drm_fd, pipe, O_DIRECTORY); + igt_require_fd(dir); + return igt_sysfs_write(dir, "i915_darkscreen_status", buf, sizeof(buf) - 1); +} diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 3e6194ade..68f25be59 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -77,6 +77,8 @@ void igt_hpd_storm_reset(int fd); bool igt_hpd_storm_detected(int fd); void igt_require_hpd_storm_ctl(int fd); bool igt_ignore_long_hpd(int fd, bool enable); +bool igt_is_dark_screen_supported(int drm_fd, enum pipe pipe); +ssize_t igt_set_dark_screen_detection(int drm_fd, enum pipe pipe, bool enable); /* * Drop caches -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable dark screen detection 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable " Kunal Joshi @ 2023-11-16 11:40 ` Juha-Pekka Heikkila 0 siblings, 0 replies; 10+ messages in thread From: Juha-Pekka Heikkila @ 2023-11-16 11:40 UTC (permalink / raw) To: Kunal Joshi, igt-dev; +Cc: Nemesa Garg, Arun R Murthy On 15.11.2023 8.42, Kunal Joshi wrote: > added helper function for dark screen detection > > v2: Fix indentation (JP) > Reduce complexity and redundancy (JP) > > Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> > Cc: Nemesa Garg <nemesa.garg@intel.com> > Cc: Arun R Murthy <arun.r.murthy@intel.com> > Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> > Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> > Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> > --- > lib/igt_debugfs.c | 23 +++++++++++++++++++++++ > lib/igt_debugfs.h | 2 ++ > 2 files changed, 25 insertions(+) > > diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c > index a7b54bae5..c4a8b532d 100644 > --- a/lib/igt_debugfs.c > +++ b/lib/igt_debugfs.c > @@ -743,3 +743,26 @@ void __igt_debugfs_dump(int device, const char *filename, int level) > igt_log(IGT_LOG_DOMAIN, level, "%s:\n%s\n", filename, contents); > free(contents); > } > + > +bool igt_is_dark_screen_supported(int drm_fd, enum pipe pipe) > +{ > + char buf[256]; > + int dir; > + > + dir = igt_debugfs_pipe_dir(drm_fd, pipe, O_DIRECTORY); > + igt_require_fd(dir); > + igt_debugfs_simple_read(dir, "i915_darkscreen_status", buf, sizeof(buf)); > + close(dir); > + return (*buf == '0' || *buf == '1'); > +} > + > +ssize_t igt_set_dark_screen_detection(int drm_fd, enum pipe pipe, bool enable) > +{ > + char buf[2]; > + int dir; > + > + snprintf(buf, sizeof(buf), "%d", enable ? 1 : 0); > + dir = igt_debugfs_pipe_dir(drm_fd, pipe, O_DIRECTORY); > + igt_require_fd(dir); > + return igt_sysfs_write(dir, "i915_darkscreen_status", buf, sizeof(buf) - 1); Would something like igt_sysfs_write(dir, "i915_darkscreen_status", enable ? "1" : "0", 1); work? Also I think you'll need to close dir before return /Juha-Pekka > +} > diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h > index 3e6194ade..68f25be59 100644 > --- a/lib/igt_debugfs.h > +++ b/lib/igt_debugfs.h > @@ -77,6 +77,8 @@ void igt_hpd_storm_reset(int fd); > bool igt_hpd_storm_detected(int fd); > void igt_require_hpd_storm_ctl(int fd); > bool igt_ignore_long_hpd(int fd, bool enable); > +bool igt_is_dark_screen_supported(int drm_fd, enum pipe pipe); > +ssize_t igt_set_dark_screen_detection(int drm_fd, enum pipe pipe, bool enable); > > /* > * Drop caches ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection 2023-11-15 6:42 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable " Kunal Joshi @ 2023-11-15 6:42 ` Kunal Joshi 2023-11-15 7:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for add new subtests for dark screen detection (rev2) Patchwork 2023-11-15 8:16 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork 3 siblings, 0 replies; 10+ messages in thread From: Kunal Joshi @ 2023-11-15 6:42 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Nemesa Garg, Arun R Murthy dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) v2: Fix indentation (JP) Cc: Nemesa Garg <nemesa.garg@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> --- tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index 94252415b..3c1ad3097 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -47,13 +47,10 @@ typedef struct { struct igt_fb fb; } data_t; -static struct { +typedef struct { double r, g, b; igt_crc_t crc; -} colors[2] = { - { .r = 0.0, .g = 1.0, .b = 0.0 }, - { .r = 0.0, .g = 1.0, .b = 1.0 }, -}; +} color; static bool simulation_constraint(enum pipe pipe) { @@ -92,6 +89,8 @@ enum { TEST_NONBLOCK = 1 << 1, TEST_SUSPEND = 1 << 2, TEST_HANG = 1 << 3, + TEST_DARK_SCREEN = 1 << 4, + TEST_DARK_SCREEN_NEGATIVE = 1 << 5, }; /** @@ -136,6 +135,21 @@ enum { * Test category: functionality test * Functionality: crc, hang * Mega feature: General Display Features + * + * SUBTEST: darkscreen-read-crc + * Description: Test dark screen detection works + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * + * SUBTEST: negative-darkscreen-read-crc + * Description: Test false positives aren't reported by dark screen detection + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * */ static void test_read_crc(data_t *data, enum pipe pipe, igt_output_t *output, unsigned flags) @@ -144,7 +158,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, igt_plane_t *primary; drmModeModeInfo *mode; igt_crc_t *crcs = NULL; - int c, j; + color *colors; + int c, j, no_of_colors; igt_display_reset(display); @@ -153,7 +168,22 @@ static void test_read_crc(data_t *data, enum pipe pipe, primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); - for (c = 0; c < ARRAY_SIZE(colors); c++) { + if (flags & TEST_DARK_SCREEN) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 0.0, .b = 0.0 }; + } else if (flags & TEST_DARK_SCREEN_NEGATIVE) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 1.0, .g = 1.0, .b = 1.0 }; + } else { + no_of_colors = 2; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 1.0, .b = 0.0 }; + colors[1] = (color){ .r = 0.0, .g = 1.0, .b = 1.0 }; + } + + for (c = 0; c < no_of_colors; c++) { char *crc_str; int n_crcs; @@ -229,6 +259,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, } /* Clean-up */ + free(colors); igt_output_set_pipe(output, PIPE_NONE); igt_plane_set_fb(primary, NULL); igt_display_commit(display); @@ -422,6 +453,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) "Suspend test for pipe CRC reads." }, { "hang-read-crc", TEST_HANG, "Hang test for pipe CRC read." }, + {"darkscreen-read-crc", TEST_DARK_SCREEN, + "Test dark screen detection works."}, + {"negative-darkscreen-read-crc", TEST_DARK_SCREEN_NEGATIVE, + "Test false positives aren't reported by dark screen detection."}, }; int i; last_pipe = 0; @@ -475,6 +510,12 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) test_read_crc(&data, pipe, output, 0); igt_disallow_hang(data.drm_fd, hang); + } else if (tests[i].flags & TEST_DARK_SCREEN || tests[i].flags & TEST_DARK_SCREEN_NEGATIVE) { + igt_require_f(igt_is_dark_screen_supported(data.drm_fd, pipe), + "Dark Screen Detection not supported\n"); + igt_set_dark_screen_detection(data.drm_fd, pipe, true); + test_read_crc(&data, pipe, output, tests[i].flags); + igt_set_dark_screen_detection(data.drm_fd, pipe, false); } else { test_read_crc(&data, pipe, output, tests[i].flags); } -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for add new subtests for dark screen detection (rev2) 2023-11-15 6:42 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable " Kunal Joshi 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi @ 2023-11-15 7:36 ` Patchwork 2023-11-15 8:16 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork 3 siblings, 0 replies; 10+ messages in thread From: Patchwork @ 2023-11-15 7:36 UTC (permalink / raw) To: Kunal Joshi; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 11369 bytes --] == Series Details == Series: add new subtests for dark screen detection (rev2) URL : https://patchwork.freedesktop.org/series/125880/ State : failure == Summary == CI Bug Log - changes from IGT_7589 -> IGTPW_10189 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_10189 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_10189, please notify your bug team (lgci.bug.filing@intel.com) 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_10189/index.html Participating hosts (39 -> 39) ------------------------------ Additional (2): fi-kbl-soraka bat-mtlp-8 Missing (2): fi-hsw-4770 fi-snb-2520m Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_10189: ### IGT changes ### #### Possible regressions #### * igt@i915_selftest@live@perf: - fi-kbl-soraka: NOTRUN -> [ABORT][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-kbl-soraka/igt@i915_selftest@live@perf.html Known issues ------------ Here are the changes found in IGTPW_10189 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@debugfs_test@basic-hwmon: - bat-mtlp-8: NOTRUN -> [SKIP][2] ([i915#9318]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@debugfs_test@basic-hwmon.html * igt@gem_huc_copy@huc-copy: - fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html * igt@gem_lmem_swapping@basic: - fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 other tests skip [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html * igt@gem_lmem_swapping@random-engines: - fi-bsw-n3050: NOTRUN -> [SKIP][5] ([fdo#109271]) +8 other tests skip [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-bsw-n3050/igt@gem_lmem_swapping@random-engines.html * igt@gem_lmem_swapping@verify-random: - bat-mtlp-8: NOTRUN -> [SKIP][6] ([i915#4613]) +3 other tests skip [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@gem_lmem_swapping@verify-random.html * igt@gem_mmap@basic: - bat-mtlp-8: NOTRUN -> [SKIP][7] ([i915#4083]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@gem_mmap@basic.html * igt@gem_mmap_gtt@basic: - bat-mtlp-8: NOTRUN -> [SKIP][8] ([i915#4077]) +2 other tests skip [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@gem_mmap_gtt@basic.html * igt@gem_render_tiled_blits@basic: - bat-mtlp-8: NOTRUN -> [SKIP][9] ([i915#4079]) +1 other test skip [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@gem_render_tiled_blits@basic.html * igt@i915_pm_rps@basic-api: - bat-mtlp-8: NOTRUN -> [SKIP][10] ([i915#6621]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@i915_pm_rps@basic-api.html * igt@i915_selftest@live@gt_pm: - fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][11] ([i915#1886]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html * igt@i915_suspend@basic-s3-without-i915: - bat-mtlp-8: NOTRUN -> [SKIP][12] ([i915#6645]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@i915_suspend@basic-s3-without-i915.html * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy: - bat-mtlp-8: NOTRUN -> [SKIP][13] ([i915#5190]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html * igt@kms_addfb_basic@basic-y-tiled-legacy: - bat-mtlp-8: NOTRUN -> [SKIP][14] ([i915#4212]) +8 other tests skip [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_addfb_basic@basic-y-tiled-legacy.html * igt@kms_busy@basic@modeset: - bat-adlp-11: [PASS][15] -> [DMESG-FAIL][16] ([i915#6868]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-adlp-11/igt@kms_busy@basic@modeset.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-adlp-11/igt@kms_busy@basic@modeset.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy: - bat-mtlp-8: NOTRUN -> [SKIP][17] ([i915#4213]) +1 other test skip [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html * igt@kms_dsc@dsc-basic: - fi-kbl-soraka: NOTRUN -> [SKIP][18] ([fdo#109271]) +9 other tests skip [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-kbl-soraka/igt@kms_dsc@dsc-basic.html - bat-mtlp-8: NOTRUN -> [SKIP][19] ([i915#3555] / [i915#3840] / [i915#9159]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_dsc@dsc-basic.html * igt@kms_force_connector_basic@force-load-detect: - bat-mtlp-8: NOTRUN -> [SKIP][20] ([fdo#109285]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_force_connector_basic@force-load-detect.html * igt@kms_force_connector_basic@prune-stale-modes: - bat-mtlp-8: NOTRUN -> [SKIP][21] ([i915#5274]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_force_connector_basic@prune-stale-modes.html * igt@kms_hdmi_inject@inject-audio: - fi-bsw-n3050: NOTRUN -> [FAIL][22] ([IGT#3]) [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/fi-bsw-n3050/igt@kms_hdmi_inject@inject-audio.html * igt@kms_pipe_crc_basic@suspend-read-crc: - bat-rpls-1: NOTRUN -> [SKIP][23] ([i915#1845]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-rpls-1/igt@kms_pipe_crc_basic@suspend-read-crc.html * igt@kms_setmode@basic-clone-single-crtc: - bat-mtlp-8: NOTRUN -> [SKIP][24] ([i915#3555] / [i915#8809]) [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@kms_setmode@basic-clone-single-crtc.html * igt@prime_vgem@basic-fence-mmap: - bat-mtlp-8: NOTRUN -> [SKIP][25] ([i915#3708] / [i915#4077]) +1 other test skip [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@prime_vgem@basic-fence-mmap.html * igt@prime_vgem@basic-fence-read: - bat-mtlp-8: NOTRUN -> [SKIP][26] ([i915#3708]) +2 other tests skip [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-mtlp-8/igt@prime_vgem@basic-fence-read.html #### Possible fixes #### * igt@gem_exec_suspend@basic-s0@smem: - bat-dg2-9: [INCOMPLETE][27] ([i915#9275]) -> [PASS][28] [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-dg2-9/igt@gem_exec_suspend@basic-s0@smem.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-dg2-9/igt@gem_exec_suspend@basic-s0@smem.html * igt@i915_selftest@live@gt_heartbeat: - bat-jsl-1: [DMESG-FAIL][29] ([i915#5334]) -> [PASS][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html * igt@i915_selftest@live@migrate: - bat-rpls-1: [INCOMPLETE][31] ([i915#9667]) -> [PASS][32] [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-rpls-1/igt@i915_selftest@live@migrate.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-rpls-1/igt@i915_selftest@live@migrate.html * igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1: - bat-rplp-1: [ABORT][33] ([i915#8668]) -> [PASS][34] [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html * {igt@kms_psr@psr_cursor_plane_move@edp-1}: - bat-jsl-1: [SKIP][35] ([i915#9648]) -> [PASS][36] +2 other tests pass [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7589/bat-jsl-1/igt@kms_psr@psr_cursor_plane_move@edp-1.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/bat-jsl-1/igt@kms_psr@psr_cursor_plane_move@edp-1.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845 [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886 [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190 [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708 [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840 [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077 [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079 [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083 [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212 [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213 [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613 [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190 [i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274 [i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334 [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621 [i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645 [i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868 [i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668 [i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809 [i915#9159]: https://gitlab.freedesktop.org/drm/intel/issues/9159 [i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275 [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318 [i915#9648]: https://gitlab.freedesktop.org/drm/intel/issues/9648 [i915#9667]: https://gitlab.freedesktop.org/drm/intel/issues/9667 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7589 -> IGTPW_10189 CI-20190529: 20190529 CI_DRM_13876: 46c7c3a2db20f83da3cae4392b36860ebef6623b @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_10189: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/index.html IGT_7589: bfba7de83474a6fee994ba845ab3d9a79bc2b5b0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Testlist changes ---------------- +igt@kms_pipe_crc_basic@darkscreen-read-crc +igt@kms_pipe_crc_basic@negative-darkscreen-read-crc == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/index.html [-- Attachment #2: Type: text/html, Size: 13215 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] ✓ CI.xeBAT: success for add new subtests for dark screen detection (rev2) 2023-11-15 6:42 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi ` (2 preceding siblings ...) 2023-11-15 7:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for add new subtests for dark screen detection (rev2) Patchwork @ 2023-11-15 8:16 ` Patchwork 3 siblings, 0 replies; 10+ messages in thread From: Patchwork @ 2023-11-15 8:16 UTC (permalink / raw) To: Kunal Joshi; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 5475 bytes --] == Series Details == Series: add new subtests for dark screen detection (rev2) URL : https://patchwork.freedesktop.org/series/125880/ State : success == Summary == CI Bug Log - changes from XEIGT_7589_BAT -> XEIGTPW_10189_BAT ==================================================== Summary ------- **SUCCESS** No regressions found. Participating hosts (4 -> 4) ------------------------------ No changes in participating hosts Possible new issues ------------------- Here are the unknown changes that may have been introduced in XEIGTPW_10189_BAT: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@kms_psr@psr_cursor_plane_move}: - bat-dg2-oem2: NOTRUN -> [SKIP][1] +2 other tests skip [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@kms_psr@psr_cursor_plane_move.html Known issues ------------ Here are the changes found in XEIGTPW_10189_BAT that come from known issues: ### IGT changes ### #### Issues hit #### * igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1: - bat-adlp-7: [PASS][2] -> [FAIL][3] ([Intel XE#480]) [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html * igt@xe_exec_fault_mode@many-basic: - bat-dg2-oem2: NOTRUN -> [SKIP][4] ([Intel XE#288]) +17 other tests skip [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@xe_exec_fault_mode@many-basic.html #### Possible fixes #### * igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1: - bat-adlp-7: [FAIL][5] ([Intel XE#480]) -> [PASS][6] +2 other tests pass [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1.html * igt@kms_pipe_crc_basic@hang-read-crc: - bat-dg2-oem2: [INCOMPLETE][7] ([Intel XE#282] / [Intel XE#749]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc.html [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc.html * igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-3: - bat-dg2-oem2: [INCOMPLETE][9] ([Intel XE#282] / [Intel XE#545]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-3.html [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-3.html * {igt@xe_create@create-execqueues-leak}: - bat-atsm-2: [FAIL][11] ([Intel XE#524]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-atsm-2/igt@xe_create@create-execqueues-leak.html [12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-atsm-2/igt@xe_create@create-execqueues-leak.html #### Warnings #### * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12: - bat-dg2-oem2: [TIMEOUT][13] ([Intel XE#430] / [Intel XE#530]) -> [FAIL][14] ([Intel XE#400] / [Intel XE#616]) [13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12.html [14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12.html * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-d-dp-3: - bat-dg2-oem2: [TIMEOUT][15] ([Intel XE#530]) -> [FAIL][16] ([Intel XE#400] / [Intel XE#616]) [15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7589/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-d-dp-3.html [16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-d-dp-3.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282 [Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288 [Intel XE#400]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/400 [Intel XE#430]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/430 [Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480 [Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524 [Intel XE#530]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/530 [Intel XE#545]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/545 [Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616 [Intel XE#749]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/749 Build changes ------------- * IGT: IGT_7589 -> IGTPW_10189 IGTPW_10189: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10189/index.html IGT_7589: bfba7de83474a6fee994ba845ab3d9a79bc2b5b0 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git xe-490-2fe82053d916d09ffcc92bc27294c9eed4e4804b: 2fe82053d916d09ffcc92bc27294c9eed4e4804b == Logs == For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10189/index.html [-- Attachment #2: Type: text/html, Size: 6594 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection @ 2023-11-23 6:29 Kunal Joshi 2023-11-23 6:29 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 0 siblings, 1 reply; 10+ messages in thread From: Kunal Joshi @ 2023-11-23 6:29 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Kunal Joshi (2): lib/igt_debugfs: added helper to enable/disable dark screen detection tests/kms_pipe_crc_basic: added new subtest for darkscreen detection lib/igt_debugfs.c | 39 +++++++++++++++++++++++++++ lib/igt_debugfs.h | 2 ++ tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++----- 3 files changed, 89 insertions(+), 7 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection 2023-11-23 6:29 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi @ 2023-11-23 6:29 ` Kunal Joshi 0 siblings, 0 replies; 10+ messages in thread From: Kunal Joshi @ 2023-11-23 6:29 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Nemesa Garg, Arun R Murthy dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Cc: Nemesa Garg <nemesa.garg@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> --- tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index 94252415b..3c1ad3097 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -47,13 +47,10 @@ typedef struct { struct igt_fb fb; } data_t; -static struct { +typedef struct { double r, g, b; igt_crc_t crc; -} colors[2] = { - { .r = 0.0, .g = 1.0, .b = 0.0 }, - { .r = 0.0, .g = 1.0, .b = 1.0 }, -}; +} color; static bool simulation_constraint(enum pipe pipe) { @@ -92,6 +89,8 @@ enum { TEST_NONBLOCK = 1 << 1, TEST_SUSPEND = 1 << 2, TEST_HANG = 1 << 3, + TEST_DARK_SCREEN = 1 << 4, + TEST_DARK_SCREEN_NEGATIVE = 1 << 5, }; /** @@ -136,6 +135,21 @@ enum { * Test category: functionality test * Functionality: crc, hang * Mega feature: General Display Features + * + * SUBTEST: darkscreen-read-crc + * Description: Test dark screen detection works + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * + * SUBTEST: negative-darkscreen-read-crc + * Description: Test false positives aren't reported by dark screen detection + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * */ static void test_read_crc(data_t *data, enum pipe pipe, igt_output_t *output, unsigned flags) @@ -144,7 +158,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, igt_plane_t *primary; drmModeModeInfo *mode; igt_crc_t *crcs = NULL; - int c, j; + color *colors; + int c, j, no_of_colors; igt_display_reset(display); @@ -153,7 +168,22 @@ static void test_read_crc(data_t *data, enum pipe pipe, primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); - for (c = 0; c < ARRAY_SIZE(colors); c++) { + if (flags & TEST_DARK_SCREEN) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 0.0, .b = 0.0 }; + } else if (flags & TEST_DARK_SCREEN_NEGATIVE) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 1.0, .g = 1.0, .b = 1.0 }; + } else { + no_of_colors = 2; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 1.0, .b = 0.0 }; + colors[1] = (color){ .r = 0.0, .g = 1.0, .b = 1.0 }; + } + + for (c = 0; c < no_of_colors; c++) { char *crc_str; int n_crcs; @@ -229,6 +259,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, } /* Clean-up */ + free(colors); igt_output_set_pipe(output, PIPE_NONE); igt_plane_set_fb(primary, NULL); igt_display_commit(display); @@ -422,6 +453,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) "Suspend test for pipe CRC reads." }, { "hang-read-crc", TEST_HANG, "Hang test for pipe CRC read." }, + {"darkscreen-read-crc", TEST_DARK_SCREEN, + "Test dark screen detection works."}, + {"negative-darkscreen-read-crc", TEST_DARK_SCREEN_NEGATIVE, + "Test false positives aren't reported by dark screen detection."}, }; int i; last_pipe = 0; @@ -475,6 +510,12 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) test_read_crc(&data, pipe, output, 0); igt_disallow_hang(data.drm_fd, hang); + } else if (tests[i].flags & TEST_DARK_SCREEN || tests[i].flags & TEST_DARK_SCREEN_NEGATIVE) { + igt_require_f(igt_is_dark_screen_supported(data.drm_fd, pipe), + "Dark Screen Detection not supported\n"); + igt_set_dark_screen_detection(data.drm_fd, pipe, true); + test_read_crc(&data, pipe, output, tests[i].flags); + igt_set_dark_screen_detection(data.drm_fd, pipe, false); } else { test_read_crc(&data, pipe, output, tests[i].flags); } -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection @ 2023-11-17 7:03 Kunal Joshi 2023-11-17 7:03 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 0 siblings, 1 reply; 10+ messages in thread From: Kunal Joshi @ 2023-11-17 7:03 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Kunal Joshi (2): lib/igt_debugfs: added helper to enable/disable dark screen detection tests/kms_pipe_crc_basic: added new subtest for darkscreen detection lib/igt_debugfs.c | 24 +++++++++++++++++ lib/igt_debugfs.h | 2 ++ tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++----- 3 files changed, 74 insertions(+), 7 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection 2023-11-17 7:03 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi @ 2023-11-17 7:03 ` Kunal Joshi 0 siblings, 0 replies; 10+ messages in thread From: Kunal Joshi @ 2023-11-17 7:03 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Nemesa Garg, Arun R Murthy dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Cc: Nemesa Garg <nemesa.garg@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> --- tests/kms_pipe_crc_basic.c | 55 +++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index 94252415b..3c1ad3097 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -47,13 +47,10 @@ typedef struct { struct igt_fb fb; } data_t; -static struct { +typedef struct { double r, g, b; igt_crc_t crc; -} colors[2] = { - { .r = 0.0, .g = 1.0, .b = 0.0 }, - { .r = 0.0, .g = 1.0, .b = 1.0 }, -}; +} color; static bool simulation_constraint(enum pipe pipe) { @@ -92,6 +89,8 @@ enum { TEST_NONBLOCK = 1 << 1, TEST_SUSPEND = 1 << 2, TEST_HANG = 1 << 3, + TEST_DARK_SCREEN = 1 << 4, + TEST_DARK_SCREEN_NEGATIVE = 1 << 5, }; /** @@ -136,6 +135,21 @@ enum { * Test category: functionality test * Functionality: crc, hang * Mega feature: General Display Features + * + * SUBTEST: darkscreen-read-crc + * Description: Test dark screen detection works + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * + * SUBTEST: negative-darkscreen-read-crc + * Description: Test false positives aren't reported by dark screen detection + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * */ static void test_read_crc(data_t *data, enum pipe pipe, igt_output_t *output, unsigned flags) @@ -144,7 +158,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, igt_plane_t *primary; drmModeModeInfo *mode; igt_crc_t *crcs = NULL; - int c, j; + color *colors; + int c, j, no_of_colors; igt_display_reset(display); @@ -153,7 +168,22 @@ static void test_read_crc(data_t *data, enum pipe pipe, primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); - for (c = 0; c < ARRAY_SIZE(colors); c++) { + if (flags & TEST_DARK_SCREEN) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 0.0, .b = 0.0 }; + } else if (flags & TEST_DARK_SCREEN_NEGATIVE) { + no_of_colors = 1; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 1.0, .g = 1.0, .b = 1.0 }; + } else { + no_of_colors = 2; + colors = (color *)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 1.0, .b = 0.0 }; + colors[1] = (color){ .r = 0.0, .g = 1.0, .b = 1.0 }; + } + + for (c = 0; c < no_of_colors; c++) { char *crc_str; int n_crcs; @@ -229,6 +259,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, } /* Clean-up */ + free(colors); igt_output_set_pipe(output, PIPE_NONE); igt_plane_set_fb(primary, NULL); igt_display_commit(display); @@ -422,6 +453,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) "Suspend test for pipe CRC reads." }, { "hang-read-crc", TEST_HANG, "Hang test for pipe CRC read." }, + {"darkscreen-read-crc", TEST_DARK_SCREEN, + "Test dark screen detection works."}, + {"negative-darkscreen-read-crc", TEST_DARK_SCREEN_NEGATIVE, + "Test false positives aren't reported by dark screen detection."}, }; int i; last_pipe = 0; @@ -475,6 +510,12 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) test_read_crc(&data, pipe, output, 0); igt_disallow_hang(data.drm_fd, hang); + } else if (tests[i].flags & TEST_DARK_SCREEN || tests[i].flags & TEST_DARK_SCREEN_NEGATIVE) { + igt_require_f(igt_is_dark_screen_supported(data.drm_fd, pipe), + "Dark Screen Detection not supported\n"); + igt_set_dark_screen_detection(data.drm_fd, pipe, true); + test_read_crc(&data, pipe, output, tests[i].flags); + igt_set_dark_screen_detection(data.drm_fd, pipe, false); } else { test_read_crc(&data, pipe, output, tests[i].flags); } -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection @ 2023-11-02 6:23 Kunal Joshi 2023-11-02 6:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 0 siblings, 1 reply; 10+ messages in thread From: Kunal Joshi @ 2023-11-02 6:23 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Kunal Joshi (2): lib/igt_debugfs: added helper to enable/disable dark screen detection tests/kms_pipe_crc_basic: added new subtest for darkscreen detection lib/igt_debugfs.c | 41 ++++++++++++++++++++++++++ lib/igt_debugfs.h | 3 ++ tests/kms_pipe_crc_basic.c | 60 +++++++++++++++++++++++++++++++++----- 3 files changed, 96 insertions(+), 8 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection 2023-11-02 6:23 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi @ 2023-11-02 6:23 ` Kunal Joshi 2023-11-14 17:37 ` Juha-Pekka Heikkila 0 siblings, 1 reply; 10+ messages in thread From: Kunal Joshi @ 2023-11-02 6:23 UTC (permalink / raw) To: igt-dev; +Cc: Kunal Joshi, Nemesa Garg, Arun R Murthy dark screen detection feature when enable will monitor frames and if black frame is detcted it will raise drm_error, added two tests for positive (black frame) and negative case (white frame) Cc: Nemesa Garg <nemesa.garg@intel.com> Cc: Arun R Murthy <arun.r.murthy@intel.com> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> --- tests/kms_pipe_crc_basic.c | 60 +++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index d980c3786..479241e79 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -47,13 +47,10 @@ typedef struct { struct igt_fb fb; } data_t; -static struct { +typedef struct { double r, g, b; igt_crc_t crc; -} colors[2] = { - { .r = 0.0, .g = 1.0, .b = 0.0 }, - { .r = 0.0, .g = 1.0, .b = 1.0 }, -}; +} color; static bool simulation_constraint(enum pipe pipe) { @@ -92,6 +89,8 @@ enum { TEST_NONBLOCK = 1 << 1, TEST_SUSPEND = 1 << 2, TEST_HANG = 1 << 3, + TEST_DARK_SCREEN = 1 << 4, + TEST_DARK_SCREEN_NEGATIVE = 1 << 5, }; /** @@ -136,6 +135,21 @@ enum { * Test category: functionality test * Functionality: crc, hang * Mega feature: General Display Features + * + * SUBTEST: darkscreen-read-crc + * Description: Test dark screen detection works + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * + * SUBTEST: negative-darkscreen-read-crc + * Description: Test false positives aren't reported by dark screen detection + * Driver requirement: i915, xe + * Test category: functionality test + * Functionality: crc, hang, darkscreen + * Mega feature: General Display Features + * */ static void test_read_crc(data_t *data, enum pipe pipe, igt_output_t *output, unsigned flags) @@ -144,7 +158,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, igt_plane_t *primary; drmModeModeInfo *mode; igt_crc_t *crcs = NULL; - int c, j; + color *colors; + int c, j, no_of_colors; igt_display_reset(display); @@ -153,7 +168,24 @@ static void test_read_crc(data_t *data, enum pipe pipe, primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); - for (c = 0; c < ARRAY_SIZE(colors); c++) { + if (flags & TEST_DARK_SCREEN) { + no_of_colors = 1; + colors = (color*)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 0.0, .b = 0.0 }; + } + else if (flags & TEST_DARK_SCREEN_NEGATIVE) { + no_of_colors = 1; + colors = (color*)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 1.0, .g = 1.0, .b = 1.0 }; + } + else { + no_of_colors = 2; + colors = (color*)malloc(no_of_colors * sizeof(color)); + colors[0] = (color){ .r = 0.0, .g = 1.0, .b = 0.0 }; + colors[1] = (color){ .r = 0.0, .g = 1.0, .b = 1.0 }; + } + + for (c = 0; c < no_of_colors; c++) { char *crc_str; int n_crcs; @@ -229,6 +261,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, } /* Clean-up */ + free(colors); igt_output_set_pipe(output, PIPE_NONE); igt_plane_set_fb(primary, NULL); igt_display_commit(display); @@ -422,6 +455,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) "Suspend test for pipe CRC reads." }, { "hang-read-crc", TEST_HANG, "Hang test for pipe CRC read." }, + {"darkscreen-read-crc", TEST_DARK_SCREEN, + "Test dark screen detection works."}, + {"negative-darkscreen-read-crc", TEST_DARK_SCREEN_NEGATIVE, + "Test false positives aren't reported by dark screen detection."}, }; int i; last_pipe = 0; @@ -475,7 +512,14 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) test_read_crc(&data, pipe, output, 0); igt_disallow_hang(data.drm_fd, hang); - } else { + } else if (tests[i].flags & TEST_DARK_SCREEN || tests[i].flags & TEST_DARK_SCREEN_NEGATIVE) { + igt_require_f(igt_is_dark_screen_supported(data.drm_fd, pipe), + "Dark Screen Detection not supported\n"); + igt_enable_dark_screen_detection(data.drm_fd, pipe); + test_read_crc(&data, pipe, output, tests[i].flags); + igt_disable_dark_screen_detection(data.drm_fd, pipe); + } + else { test_read_crc(&data, pipe, output, tests[i].flags); } } -- 2.25.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection 2023-11-02 6:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi @ 2023-11-14 17:37 ` Juha-Pekka Heikkila 0 siblings, 0 replies; 10+ messages in thread From: Juha-Pekka Heikkila @ 2023-11-14 17:37 UTC (permalink / raw) To: Kunal Joshi, igt-dev; +Cc: Nemesa Garg, Arun R Murthy This patch has some indentations with spaces. With those fixed you can add Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> On 2.11.2023 8.23, Kunal Joshi wrote: > dark screen detection feature when enable will monitor frames > and if black frame is detcted it will raise drm_error, added > two tests for positive (black frame) and negative case (white frame) > > Cc: Nemesa Garg <nemesa.garg@intel.com> > Cc: Arun R Murthy <arun.r.murthy@intel.com> > Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com> > Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com> > --- > tests/kms_pipe_crc_basic.c | 60 +++++++++++++++++++++++++++++++++----- > 1 file changed, 52 insertions(+), 8 deletions(-) > > diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c > index d980c3786..479241e79 100644 > --- a/tests/kms_pipe_crc_basic.c > +++ b/tests/kms_pipe_crc_basic.c > @@ -47,13 +47,10 @@ typedef struct { > struct igt_fb fb; > } data_t; > > -static struct { > +typedef struct { > double r, g, b; > igt_crc_t crc; > -} colors[2] = { > - { .r = 0.0, .g = 1.0, .b = 0.0 }, > - { .r = 0.0, .g = 1.0, .b = 1.0 }, > -}; > +} color; > > static bool simulation_constraint(enum pipe pipe) > { > @@ -92,6 +89,8 @@ enum { > TEST_NONBLOCK = 1 << 1, > TEST_SUSPEND = 1 << 2, > TEST_HANG = 1 << 3, > + TEST_DARK_SCREEN = 1 << 4, > + TEST_DARK_SCREEN_NEGATIVE = 1 << 5, > }; > > /** > @@ -136,6 +135,21 @@ enum { > * Test category: functionality test > * Functionality: crc, hang > * Mega feature: General Display Features > + * > + * SUBTEST: darkscreen-read-crc > + * Description: Test dark screen detection works > + * Driver requirement: i915, xe > + * Test category: functionality test > + * Functionality: crc, hang, darkscreen > + * Mega feature: General Display Features > + * > + * SUBTEST: negative-darkscreen-read-crc > + * Description: Test false positives aren't reported by dark screen detection > + * Driver requirement: i915, xe > + * Test category: functionality test > + * Functionality: crc, hang, darkscreen > + * Mega feature: General Display Features > + * > */ > static void test_read_crc(data_t *data, enum pipe pipe, > igt_output_t *output, unsigned flags) > @@ -144,7 +158,8 @@ static void test_read_crc(data_t *data, enum pipe pipe, > igt_plane_t *primary; > drmModeModeInfo *mode; > igt_crc_t *crcs = NULL; > - int c, j; > + color *colors; > + int c, j, no_of_colors; > > igt_display_reset(display); > > @@ -153,7 +168,24 @@ static void test_read_crc(data_t *data, enum pipe pipe, > > primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); > > - for (c = 0; c < ARRAY_SIZE(colors); c++) { > + if (flags & TEST_DARK_SCREEN) { > + no_of_colors = 1; > + colors = (color*)malloc(no_of_colors * sizeof(color)); > + colors[0] = (color){ .r = 0.0, .g = 0.0, .b = 0.0 }; > + } > + else if (flags & TEST_DARK_SCREEN_NEGATIVE) { > + no_of_colors = 1; > + colors = (color*)malloc(no_of_colors * sizeof(color)); > + colors[0] = (color){ .r = 1.0, .g = 1.0, .b = 1.0 }; > + } > + else { > + no_of_colors = 2; > + colors = (color*)malloc(no_of_colors * sizeof(color)); > + colors[0] = (color){ .r = 0.0, .g = 1.0, .b = 0.0 }; > + colors[1] = (color){ .r = 0.0, .g = 1.0, .b = 1.0 }; > + } > + > + for (c = 0; c < no_of_colors; c++) { > char *crc_str; > int n_crcs; > > @@ -229,6 +261,7 @@ static void test_read_crc(data_t *data, enum pipe pipe, > } > > /* Clean-up */ > + free(colors); > igt_output_set_pipe(output, PIPE_NONE); > igt_plane_set_fb(primary, NULL); > igt_display_commit(display); > @@ -422,6 +455,10 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) > "Suspend test for pipe CRC reads." }, > { "hang-read-crc", TEST_HANG, > "Hang test for pipe CRC read." }, > + {"darkscreen-read-crc", TEST_DARK_SCREEN, > + "Test dark screen detection works."}, > + {"negative-darkscreen-read-crc", TEST_DARK_SCREEN_NEGATIVE, > + "Test false positives aren't reported by dark screen detection."}, > }; > int i; > last_pipe = 0; > @@ -475,7 +512,14 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) > test_read_crc(&data, pipe, output, 0); > > igt_disallow_hang(data.drm_fd, hang); > - } else { > + } else if (tests[i].flags & TEST_DARK_SCREEN || tests[i].flags & TEST_DARK_SCREEN_NEGATIVE) { > + igt_require_f(igt_is_dark_screen_supported(data.drm_fd, pipe), > + "Dark Screen Detection not supported\n"); > + igt_enable_dark_screen_detection(data.drm_fd, pipe); > + test_read_crc(&data, pipe, output, tests[i].flags); > + igt_disable_dark_screen_detection(data.drm_fd, pipe); > + } > + else { > test_read_crc(&data, pipe, output, tests[i].flags); > } > } ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-11-23 6:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-11-15 6:42 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_debugfs: added helper to enable/disable " Kunal Joshi 2023-11-16 11:40 ` Juha-Pekka Heikkila 2023-11-15 6:42 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 2023-11-15 7:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for add new subtests for dark screen detection (rev2) Patchwork 2023-11-15 8:16 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2023-11-23 6:29 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-23 6:29 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 2023-11-17 7:03 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-17 7:03 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 2023-11-02 6:23 [igt-dev] [PATCH i-g-t 0/2] add new subtests for dark screen detection Kunal Joshi 2023-11-02 6:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_pipe_crc_basic: added new subtest for darkscreen detection Kunal Joshi 2023-11-14 17:37 ` Juha-Pekka Heikkila
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox