Add Negative tests to VRR
cover Add Negative tests to VRR
This Series includes:
* VRR on Non-VRR panel:
VRR should not be enabled on the Non-VRR panel.
Bhanuprakash Modem (2):
tests/kms_vrr: Add Negative tests to validate VRR
HAX: Add VRR negative tests to BAT
tests/intel-ci/fast-feedback.testlist | 3 ++ tests/kms_vrr.c | 70 ++++++++++++++++++++------- 2 files changed, 55 insertions(+), 18 deletions(-)
--
2.38.0
PATCH 1/2 tests/kms_vrr: Add Negative tests to validate VRR
This patch will try to enable VRR on Non-VRR panel. VRR should not be enabled on the Non-VRR panel. It is unlikely to reject the commit/modeset. And the expected behavior is the same as disabling VRR on a VRR capable panel.
V2, V3:
- Fix the condition check to run basic tests
V4:
- Fix the crash in CI (devided by zero)
--- tests/kms_vrr.c | 70 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 18 deletions(-)
tests/kms_vrr.c +52 -18
@@ -41,10 +41,11 @@ (m)->type, (m)->flagsenum { -TEST_NONE =0 , -TEST_DPMS =1 <<0 , -TEST_SUSPEND =1 <<1 , -TEST_FLIPLINE =1 <<2 , +TEST_BASIC =1 <<0 , +TEST_DPMS =1 <<1 , +TEST_SUSPEND =1 <<2 , +TEST_FLIPLINE =1 <<3 , +TEST_NEGATIVE =1 <<4 , }; typedef struct range {
@@ -116,7 +117,7 @@ static uint64_t get_time_ns(void)/* Returns the rate duration in nanoseconds for the given refresh rate. */ static uint64_t rate_from_refresh (uint64_t refresh) { -return NSECS_PER_SEC / refresh; +return refresh ? (NSECS_PER_SEC / refresh) :0 ; }/* Instead of running on default mode, loop through the connector modes
@@ -179,11 +180,16 @@ static vtest_ns_t get_test_rate_ns(range_t range)return vtest_ns; } -/* Returns true if an output supports VRR. */ +/* Returns true if driver supports VRR. */ static bool has_vrr (igt_output_t *output) { -return igt_output_has_prop (output,IGT_CONNECTOR_VRR_CAPABLE ) && -igt_output_get_prop (output,IGT_CONNECTOR_VRR_CAPABLE ); +return igt_output_has_prop (output,IGT_CONNECTOR_VRR_CAPABLE ); +} + +/* Returns true if an output supports VRR. */ +static bool vrr_capable (igt_output_t *output) +{ +return igt_output_get_prop (output,IGT_CONNECTOR_VRR_CAPABLE ); }/* Toggles variable refresh rate on the pipe. */
@@ -398,7 +404,8 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)* Flip will happen right away so returned refresh rate is 50Hz. * if refresh_rate < 40Hz: * h/w will terminate the vblank at Vmax which is obvious. -* So, for now we can safely ignore the lower refresh rates +* So, vblank termination should happen at Vmax, and flip done at +* next Vmin. */ if (flags &TEST_FLIPLINE ) { rate =rate_from_refresh (range.max +5 );
@@ -408,17 +415,33 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags) (range.max + 5), rate, result); } - rate = vtest_ns.mid; - result =flip_and_measure (data, output, pipe, rate,TEST_DURATION_NS ); -igt_assert_f (result >75 , -"Refresh rate (%u Hz) %" PRIu64"ns: Target VRR on threshold not reached, result was %u%%\n" , - ((range.max + range.min) /2 ), rate, result); +if (flags & ~TEST_NEGATIVE ) { + rate = vtest_ns.mid; + result =flip_and_measure (data, output, pipe, rate,TEST_DURATION_NS ); +igt_assert_f (result >75 , +"Refresh rate (%u Hz) %" PRIu64"ns: Target VRR on threshold not reached, result was %u%%\n" , + ((range.max + range.min) /2 ), rate, result); + } -set_vrr_on_pipe (data, pipe, false); +if (flags &TEST_FLIPLINE ) { + rate =rate_from_refresh (range.min -5 ); + result =flip_and_measure (data, output, pipe, rate,TEST_DURATION_NS ); +igt_assert_f (result <50 , +"Refresh rate (%u Hz) %" PRIu64"ns: Target VRR on threshold exceeded, result was %u%%\n" , + (range.min -5 ), rate, result); + } + +/* +* If we request VRR on a non-VRR panel, it is unlikely to reject the +* modeset. And the expected behavior is the same as disabling VRR on +* a VRR capable panel. +*/ +set_vrr_on_pipe (data, pipe, (flags &TEST_NEGATIVE )? true : false); + rate = vtest_ns.mid; result =flip_and_measure (data, output, pipe, rate,TEST_DURATION_NS );igt_assert_f (result <10 , -"Refresh rate (%u Hz) %" PRIu64"ns: Target VRR off threshold exceeded, result was %u%%\n" , - ((range.max + range.min) /2 ), rate, result); +"Refresh rate (%u Hz) %" PRIu64"ns: Target VRR %s threshold exceeded, result was %u%%\n" , + ((range.max + range.min) /2 ), rate, (flags &TEST_NEGATIVE )?"on" :"off" , result);/* Clean-up */ igt_plane_set_fb (data->primary,NULL );
@@ -442,6 +465,13 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)if (!has_vrr (output))continue ; +/* For Negative tests, panel should be non-vrr. */ +if ((flags &TEST_NEGATIVE ) &&vrr_capable (output)) +continue ; + +if ((flags & ~TEST_NEGATIVE ) && !vrr_capable (output)) +continue ; +for_each_pipe (&data->display, pipe) {if (igt_pipe_connector_valid (pipe, output)) { igt_dynamic_f("pipe-%s-%s",
@@ -470,7 +500,7 @@ igt_mainigt_describe ("Tests that VRR is enabled and that the difference between flip " "timestamps converges to the requested rate" ); igt_subtest_with_dynamic("flip-basic") -run_vrr_test (&data, test_basic,0 ); +run_vrr_test (&data, test_basic,TEST_BASIC );igt_describe ("Tests with DPMS that VRR is enabled and that the difference between flip " "timestamps converges to the requested rate." );
@@ -486,6 +516,10 @@ igt_main igt_subtest_with_dynamic("flipline")run_vrr_test (&data, test_basic,TEST_FLIPLINE ); +igt_describe ("Make sure that VRR should not be enabled on the Non-VRR panel." ); + igt_subtest_with_dynamic("negative-basic") +run_vrr_test (&data, test_basic,TEST_NEGATIVE ); + igt_fixture {igt_display_fini (&data.display); }
Signature · 1 line
2.38.0
PATCH 2/2 HAX: Add VRR negative tests to BAT
In reply to Bhanuprakash Modem--- tests/intel-ci/fast-feedback.testlist | 3 +++ 1 file changed, 3 insertions(+)
tests/intel-ci/fast-feedback.testlist +3 -0
@@ -124,6 +124,9 @@ igt@kms_psr@cursor_plane_move igt@kms_psr@sprite_plane_onoff igt@kms_psr@primary_mmap_gtt igt@kms_setmode@basic-clone-single-crtc +igt@kms_vrr@flip-basic +igt@kms_vrr@flipline +igt@kms_vrr@negative-basic igt@i915_pm_backlight@basic-brightness igt@i915_pm_rpm@basic-pci-d3-state igt@i915_pm_rpm@basic-rte
Signature · 1 line
2.38.0
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for Add Negative tests to VRR (rev12)
In reply to Bhanuprakash Modem== Series Details ==
== Series Details ==
Series: Add Negative tests to VRR (rev12)
URL : https://patchwork.freedesktop.org/series/100539/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12374 -> IGTPW_8094
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8094 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8094, 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_8094/index.html
Participating hosts (38 -> 36)
------------------------------
Additional (1): bat-rpls-2
Missing (3): fi-bdw-samus fi-tgl-dsi fi-ilk-650
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8094:
### IGT changes ###
#### Possible regressions ####
* igt@kms_vrr@negative-basic:
- bat-dg1-6: NOTRUN -> [SKIP][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-dg1-6/igt@[email protected]
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.
* igt@kms_vrr@negative-basic:
- {bat-adlm-1}: NOTRUN -> [SKIP][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-adlm-1/igt@[email protected]
- {bat-rpls-1}: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-rpls-1/igt@[email protected]
New tests
---------
New tests have been introduced between CI_DRM_12374 and IGTPW_8094:
### New IGT tests (2) ###
* igt@kms_vrr@negative-basic@pipe-a-dp-2:
- Statuses : 1 pass(s)
- Exec time: [0.0] s
* igt@kms_vrr@negative-basic@pipe-a-edp-1:
- Statuses : 8 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in IGTPW_8094 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [PASS][4] -> [DMESG-FAIL][5] ([i915#5334])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-hsw-4770: NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-hsw-4770/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][7] ([fdo#111827])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-icl-u2/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [SKIP][8] ([fdo#111827])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-rkl-guc/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions:
- fi-bsw-kefka: [PASS][9] -> [FAIL][10] ([i915#6298])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/fi-bsw-kefka/igt@kms_cursor_legacy@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-bsw-kefka/igt@kms_cursor_legacy@[email protected]
* igt@kms_vrr@flip-basic:
- fi-rkl-11600: NOTRUN -> [SKIP][11] ([i915#3555]) +2 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-rkl-11600/igt@[email protected]
- fi-icl-u2: NOTRUN -> [SKIP][12] ([i915#3555]) +1 similar issue
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-icl-u2/igt@[email protected]
- fi-bdw-gvtdvm: NOTRUN -> [SKIP][13] ([fdo#109271]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-bdw-gvtdvm/igt@[email protected]
- fi-bsw-kefka: NOTRUN -> [SKIP][14] ([fdo#109271]) +2 similar issues
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-bsw-kefka/igt@[email protected]
- fi-cfl-guc: NOTRUN -> [SKIP][15] ([fdo#109271]) +2 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-cfl-guc/igt@[email protected]
- fi-hsw-4770: NOTRUN -> [SKIP][16] ([fdo#109271]) +2 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-hsw-4770/igt@[email protected]
- fi-skl-6700k2: NOTRUN -> [SKIP][17] ([fdo#109271]) +2 similar issues
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-skl-6700k2/igt@[email protected]
- fi-cfl-8109u: NOTRUN -> [SKIP][18] ([fdo#109271]) +2 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-cfl-8109u/igt@[email protected]
- bat-adlp-4: NOTRUN -> [SKIP][19] ([i915#3555] / [i915#4579]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-adlp-4/igt@[email protected]
- fi-ivb-3770: NOTRUN -> [SKIP][20] ([fdo#109271]) +2 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-ivb-3770/igt@[email protected]
- fi-elk-e7500: NOTRUN -> [SKIP][21] ([fdo#109271]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-elk-e7500/igt@[email protected]
- fi-bxt-dsi: NOTRUN -> [SKIP][22] ([fdo#109271]) +2 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-bxt-dsi/igt@[email protected]
- fi-glk-j4005: NOTRUN -> [SKIP][23] ([fdo#109271]) +2 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-glk-j4005/igt@[email protected]
* igt@kms_vrr@flipline:
- fi-skl-guc: NOTRUN -> [SKIP][24] ([fdo#109271]) +2 similar issues
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-skl-guc/igt@[email protected]
- bat-dg1-6: NOTRUN -> [SKIP][25] ([i915#1845]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-dg1-6/igt@[email protected]
- fi-cfl-8700k: NOTRUN -> [SKIP][26] ([fdo#109271]) +2 similar issues
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-cfl-8700k/igt@[email protected]
- fi-blb-e6850: NOTRUN -> [SKIP][27] ([fdo#109271]) +2 similar issues
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-blb-e6850/igt@[email protected]
- fi-bsw-nick: NOTRUN -> [SKIP][28] ([fdo#109271]) +2 similar issues
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-bsw-nick/igt@[email protected]
* igt@kms_vrr@negative-basic:
- fi-skl-6600u: NOTRUN -> [SKIP][29] ([fdo#109271]) +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-skl-6600u/igt@[email protected]
- fi-apl-guc: NOTRUN -> [SKIP][30] ([fdo#109271]) +2 similar issues
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-apl-guc/igt@[email protected]
- fi-pnv-d510: NOTRUN -> [SKIP][31] ([fdo#109271]) +2 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-pnv-d510/igt@[email protected]
- fi-snb-2520m: NOTRUN -> [SKIP][32] ([fdo#109271]) +2 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-snb-2520m/igt@[email protected]
- fi-rkl-guc: NOTRUN -> [SKIP][33] ([i915#3555]) +2 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-rkl-guc/igt@[email protected]
- fi-kbl-7567u: NOTRUN -> [SKIP][34] ([fdo#109271]) +2 similar issues
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-kbl-7567u/igt@[email protected]
#### Possible fixes ####
* igt@gem_huc_copy@huc-copy:
- {bat-dg2-8}: [FAIL][35] ([i915#7029]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/bat-dg2-8/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-dg2-8/igt@[email protected]
* igt@i915_selftest@live@execlists:
- fi-icl-u2: [INCOMPLETE][37] -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/fi-icl-u2/igt@i915_selftest@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-icl-u2/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_mocs:
- fi-rkl-guc: [INCOMPLETE][39] ([i915#4983]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/fi-rkl-guc/igt@i915_selftest@live@gt_mocs.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-rkl-guc/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][41] ([i915#4785]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/fi-hsw-4770/igt@i915_selftest@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/fi-hsw-4770/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@migrate:
- {bat-dg2-11}: [DMESG-WARN][43] ([i915#7359]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/bat-dg2-11/igt@i915_selftest@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-dg2-11/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- {bat-rpls-1}: [INCOMPLETE][45] ([i915#4983] / [i915#6257]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12374/bat-rpls-1/igt@i915_selftest@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/bat-rpls-1/igt@i915_selftest@[email protected]
{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#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4258]: https://gitlab.freedesktop.org/drm/intel/issues/4258
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[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#5153]: https://gitlab.freedesktop.org/drm/intel/issues/5153
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6559]: https://gitlab.freedesktop.org/drm/intel/issues/6559
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7029]: https://gitlab.freedesktop.org/drm/intel/issues/7029
[i915#7346]: https://gitlab.freedesktop.org/drm/intel/issues/7346
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7053 -> IGTPW_8094
CI-20190529: 20190529
CI_DRM_12374: 7963775fe0f4b1a4739dd6808abfd7fdf467779c @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8094: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/index.html
IGT_7053: a9e73e6c48ab6632e2adb095cb809118b437fdfd @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@i915_pm_backlight@fade_with_dpms
+igt@i915_pm_backlight@fade_with_suspend
+igt@kms_vrr@negative-basic
-igt@i915_pm_backlight@fade-with-dpms
-igt@i915_pm_backlight@fade-with-suspend
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8094/index.html