All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR
@ 2022-09-29  8:15 Bhanuprakash Modem
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bhanuprakash Modem @ 2022-09-29  8:15 UTC (permalink / raw)
  To: igt-dev

This Series includes:

* VRR on Non-VRR panel:
	VRR should not be enabled on the Non-VRR panel.
* Monitor Refresh Rate range:
	Read VRR range capability from EDID and check if
	the Kernel is parsing it correctly.

Bhanuprakash Modem (3):
  tests/kms_vrr: Add Negative tests to validate VRR
  tests/kms_vrr: Add a test for VRR range capability
  HAX: Add VRR negative tests to BAT

 tests/intel-ci/fast-feedback.testlist |   4 +
 tests/kms_vrr.c                       | 154 +++++++++++++++++++++++---
 2 files changed, 141 insertions(+), 17 deletions(-)

--
2.37.3

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

* [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR
  2022-09-29  8:15 [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR Bhanuprakash Modem
@ 2022-09-29  8:15 ` Bhanuprakash Modem
  2022-09-29 19:07   ` Navare, Manasi
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 2/3] tests/kms_vrr: Add a test for VRR range capability Bhanuprakash Modem
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Bhanuprakash Modem @ 2022-09-29  8:15 UTC (permalink / raw)
  To: igt-dev

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

Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_vrr.c | 66 ++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 17 deletions(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 8976d4a6..3aa9920a 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -41,10 +41,11 @@
 	(m)->type, (m)->flags
 
 enum {
-	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 {
@@ -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,31 @@ 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);
+		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 +463,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 +498,7 @@ igt_main
 	igt_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 +514,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);
 	}
-- 
2.37.3

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

* [igt-dev] [i-g-t V3 2/3] tests/kms_vrr: Add a test for VRR range capability
  2022-09-29  8:15 [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR Bhanuprakash Modem
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
@ 2022-09-29  8:15 ` Bhanuprakash Modem
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 3/3] HAX: Add VRR negative tests to BAT Bhanuprakash Modem
  2022-09-29  9:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add Negative tests to VRR (rev9) Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Bhanuprakash Modem @ 2022-09-29  8:15 UTC (permalink / raw)
  To: igt-dev

VRR range capability is parsed from EDID and reported to debugfs.
The new tests check if the parsing is correct by reading it from
EDID.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_vrr.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 89 insertions(+), 1 deletion(-)

diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
index 3aa9920a..1cdd6081 100644
--- a/tests/kms_vrr.c
+++ b/tests/kms_vrr.c
@@ -24,6 +24,7 @@
 #include "sw_sync.h"
 #include <fcntl.h>
 #include <signal.h>
+#include "igt_edid.h"
 
 #define NSECS_PER_SEC (1000000000ull)
 
@@ -46,6 +47,7 @@ enum {
 	TEST_SUSPEND = 1 << 2,
 	TEST_FLIPLINE = 1 << 3,
 	TEST_NEGATIVE = 1 << 4,
+	TEST_RANGE = 1 << 5,
 };
 
 typedef struct range {
@@ -451,6 +453,86 @@ test_basic(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
 	igt_remove_fb(data->drm_fd, &data->fb0);
 }
 
+static struct detailed_data_monitor_range
+detailed_timing_get_monitor_range(const struct edid *edid)
+{
+       uint8_t i;
+       struct detailed_data_monitor_range mr = {0, 0};
+
+       for (i = 0; i < DETAILED_TIMINGS_LEN; i++) {
+               struct detailed_non_pixel *other_data;
+               struct detailed_timing timings = edid->detailed_timings[i];
+
+               /*
+                * From EDID Display Range Limits Descriptor specs:
+                *
+                * Bytes        Description
+                *  0–1         00 00 = Display Descriptor
+                *   2          00 = reserved
+                *   3          FD = Display Range Limits Descriptor
+                *   10         01 = No timing information.
+                *
+                */
+               if (timings.pixel_clock[0] != 0x00 ||
+                   timings.pixel_clock[1] != 0x00)
+                       continue;
+
+               other_data = &timings.data.other_data;
+               if (other_data->pad1 != 0x00 ||
+                   other_data->type != EDID_DETAIL_MONITOR_RANGE)
+                       continue;
+
+               /* Check for flag range limits only. */
+               if (other_data->data.range.flags != 0x01)
+                       continue;
+
+               mr = other_data->data.range;
+               break;
+       }
+
+       return mr;
+}
+
+static void
+test_vrr_range(data_t *data, enum pipe pipe,
+		igt_output_t *output, uint32_t flags)
+{
+	uint64_t edid_blob_id;
+	const struct edid *edid;
+	struct detailed_data_monitor_range expected_range;
+	drmModePropertyBlobPtr edid_blob = NULL;
+	drmModeConnector *connector = output->config.connector;
+
+	igt_assert(kmstest_get_property(data->drm_fd, connector->connector_id,
+					DRM_MODE_OBJECT_CONNECTOR, "EDID", NULL,
+					&edid_blob_id, NULL));
+	edid_blob = drmModeGetPropertyBlob(data->drm_fd, edid_blob_id);
+	igt_require_f(edid_blob, "EDID blob is NULL\n");
+
+	edid = (const struct edid *) edid_blob->data;
+	igt_assert(edid);
+
+	expected_range = detailed_timing_get_monitor_range(edid);
+	drmModeFreePropertyBlob(edid_blob);
+
+	igt_assert_f(data->range.min == expected_range.min_vfreq &&
+		     data->range.max == expected_range.max_vfreq,
+		     "Expecting VRR range %d-%d, got %d-%d\n",
+		     expected_range.min_vfreq, expected_range.max_vfreq,
+		     data->range.min, data->range.max);
+
+	igt_info("Monitor range from EDID: %d-%d, Kernel parsed VRR range as: %d-%d\n",
+			expected_range.min_vfreq, expected_range.max_vfreq,
+			data->range.min, data->range.max);
+
+	/* Clean-up */
+	igt_plane_set_fb(data->primary, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	set_vrr_on_pipe(data, pipe, false);
+
+	igt_remove_fb(data->drm_fd, &data->fb0);
+}
+
 /* Runs tests on outputs that are VRR capable. */
 static void
 run_vrr_test(data_t *data, test_t test, uint32_t flags)
@@ -467,7 +549,8 @@ run_vrr_test(data_t *data, test_t test, uint32_t flags)
 		if ((flags & TEST_NEGATIVE) && vrr_capable(output))
 			continue;
 
-		if ((flags & ~TEST_NEGATIVE) && !vrr_capable(output))
+		/* Range test doesn't care about VRR capability. */
+		if ((flags & ~(TEST_RANGE | TEST_NEGATIVE)) && !vrr_capable(output))
 			continue;
 
 		for_each_pipe(&data->display, pipe) {
@@ -518,6 +601,11 @@ igt_main
 	igt_subtest_with_dynamic("negative-basic")
 		run_vrr_test(&data, test_basic, TEST_NEGATIVE);
 
+	igt_describe("Read the monitor RR range from monitor and make sure that "
+		     "Kernel is parsing it properly.");
+	igt_subtest_with_dynamic("parse-vrr-range")
+		run_vrr_test(&data, test_vrr_range, TEST_RANGE);
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 	}
-- 
2.37.3

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

* [igt-dev] [i-g-t V3 3/3] HAX: Add VRR negative tests to BAT
  2022-09-29  8:15 [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR Bhanuprakash Modem
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 2/3] tests/kms_vrr: Add a test for VRR range capability Bhanuprakash Modem
@ 2022-09-29  8:15 ` Bhanuprakash Modem
  2022-09-29  9:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add Negative tests to VRR (rev9) Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Bhanuprakash Modem @ 2022-09-29  8:15 UTC (permalink / raw)
  To: igt-dev

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index bd5538a0..f31e9a24 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -123,6 +123,10 @@ 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@kms_vrr@parse-vrr-range
 igt@i915_pm_backlight@basic-brightness
 igt@i915_pm_rpm@basic-pci-d3-state
 igt@i915_pm_rpm@basic-rte
-- 
2.37.3

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

* [igt-dev] ✗ Fi.CI.BAT: failure for Add Negative tests to VRR (rev9)
  2022-09-29  8:15 [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR Bhanuprakash Modem
                   ` (2 preceding siblings ...)
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 3/3] HAX: Add VRR negative tests to BAT Bhanuprakash Modem
@ 2022-09-29  9:02 ` Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2022-09-29  9:02 UTC (permalink / raw)
  To: Modem, Bhanuprakash; +Cc: igt-dev

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

== Series Details ==

Series: Add Negative tests to VRR (rev9)
URL   : https://patchwork.freedesktop.org/series/100539/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12197 -> IGTPW_7884
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_7884 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_7884, 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_7884/index.html

Participating hosts (45 -> 43)
------------------------------

  Additional (1): fi-rkl-guc 
  Missing    (3): bat-rpls-1 fi-icl-u2 fi-bdw-samus 

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_vrr@negative-basic@pipe-a-dp-2} (NEW):
    - {bat-dg2-11}:       NOTRUN -> [CRASH][1] +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg2-11/igt@kms_vrr@negative-basic@pipe-a-dp-2.html

  * {igt@kms_vrr@negative-basic@pipe-a-edp-1} (NEW):
    - {bat-adlp-6}:       NOTRUN -> [CRASH][2] +1 similar issue
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-adlp-6/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - {bat-jsl-3}:        NOTRUN -> [CRASH][3] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-jsl-3/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - fi-tgl-u2:          NOTRUN -> [CRASH][4] +1 similar issue
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-tgl-u2/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - {bat-jsl-1}:        NOTRUN -> [CRASH][5] +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-jsl-1/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - {fi-jsl-1}:         NOTRUN -> [CRASH][6] +1 similar issue
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-jsl-1/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - {bat-adln-1}:       NOTRUN -> [CRASH][7] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-adln-1/igt@kms_vrr@negative-basic@pipe-a-edp-1.html
    - {bat-rplp-1}:       NOTRUN -> [CRASH][8] +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-rplp-1/igt@kms_vrr@negative-basic@pipe-a-edp-1.html

  * igt@kms_vrr@parse-vrr-range:
    - fi-rkl-11600:       NOTRUN -> [SKIP][9]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-11600/igt@kms_vrr@parse-vrr-range.html
    - bat-dg1-5:          NOTRUN -> [SKIP][10] +1 similar issue
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg1-5/igt@kms_vrr@parse-vrr-range.html
    - fi-adl-ddr5:        NOTRUN -> [SKIP][11]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-adl-ddr5/igt@kms_vrr@parse-vrr-range.html
    - fi-rkl-guc:         NOTRUN -> [SKIP][12]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-guc/igt@kms_vrr@parse-vrr-range.html

  * {igt@kms_vrr@parse-vrr-range@pipe-a-dp-3} (NEW):
    - {bat-dg2-9}:        NOTRUN -> [FAIL][13]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg2-9/igt@kms_vrr@parse-vrr-range@pipe-a-dp-3.html

  * {igt@kms_vrr@parse-vrr-range@pipe-a-edp-1} (NEW):
    - {fi-ehl-2}:         NOTRUN -> [CRASH][14] +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-ehl-2/igt@kms_vrr@parse-vrr-range@pipe-a-edp-1.html

  
#### Suppressed ####

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

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-dp-2:
    - {bat-dg2-11}:       [PASS][15] -> [FAIL][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12197/bat-dg2-11/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-dp-2.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg2-11/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-b-dp-2.html

  * igt@kms_vrr@parse-vrr-range:
    - {bat-adlm-1}:       NOTRUN -> [SKIP][17] +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-adlm-1/igt@kms_vrr@parse-vrr-range.html

  
New tests
---------

  New tests have been introduced between CI_DRM_12197 and IGTPW_7884:

### New IGT tests (5) ###

  * igt@kms_vrr@negative-basic@pipe-a-dp-2:
    - Statuses : 1 crash(s)
    - Exec time: [0.17] s

  * igt@kms_vrr@negative-basic@pipe-a-edp-1:
    - Statuses : 8 crash(s)
    - Exec time: [0.04, 0.08] s

  * igt@kms_vrr@parse-vrr-range@pipe-a-dp-2:
    - Statuses : 1 crash(s)
    - Exec time: [0.00] s

  * igt@kms_vrr@parse-vrr-range@pipe-a-dp-3:
    - Statuses : 1 fail(s)
    - Exec time: [0.01] s

  * igt@kms_vrr@parse-vrr-range@pipe-a-edp-1:
    - Statuses : 8 crash(s)
    - Exec time: [0.00, 0.02] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_lmem_swapping@basic:
    - fi-rkl-guc:         NOTRUN -> [SKIP][18] ([i915#4613]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-guc/igt@gem_lmem_swapping@basic.html

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

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

  * igt@i915_pm_rps@basic-api:
    - fi-rkl-guc:         NOTRUN -> [SKIP][21] ([i915#6621])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-guc/igt@i915_pm_rps@basic-api.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-hsw-4770:        NOTRUN -> [SKIP][22] ([fdo#109271] / [fdo#111827])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-hsw-4770/igt@kms_chamelium@common-hpd-after-suspend.html
    - bat-dg1-5:          NOTRUN -> [SKIP][23] ([fdo#111827])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg1-5/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_chamelium@hdmi-crc-fast:
    - fi-rkl-guc:         NOTRUN -> [SKIP][24] ([fdo#111827]) +8 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-guc/igt@kms_chamelium@hdmi-crc-fast.html

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

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
    - fi-bsw-kefka:       [PASS][26] -> [FAIL][27] ([i915#6298])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12197/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html

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

  * igt@kms_pipe_crc_basic@suspend-read-crc:
    - bat-dg1-5:          NOTRUN -> [SKIP][29] ([i915#4078])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg1-5/igt@kms_pipe_crc_basic@suspend-read-crc.html

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

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

  * igt@kms_vrr@flip-basic:
    - fi-bdw-gvtdvm:      NOTRUN -> [SKIP][32] ([fdo#109271]) +3 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bdw-gvtdvm/igt@kms_vrr@flip-basic.html
    - fi-bsw-kefka:       NOTRUN -> [SKIP][33] ([fdo#109271]) +3 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bsw-kefka/igt@kms_vrr@flip-basic.html
    - fi-hsw-4770:        NOTRUN -> [SKIP][34] ([fdo#109271]) +3 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-hsw-4770/igt@kms_vrr@flip-basic.html
    - fi-tgl-u2:          NOTRUN -> [SKIP][35] ([i915#3555]) +1 similar issue
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-tgl-u2/igt@kms_vrr@flip-basic.html
    - fi-bxt-dsi:         NOTRUN -> [SKIP][36] ([fdo#109271]) +3 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bxt-dsi/igt@kms_vrr@flip-basic.html
    - bat-dg1-5:          NOTRUN -> [SKIP][37] ([i915#1845]) +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg1-5/igt@kms_vrr@flip-basic.html
    - fi-pnv-d510:        NOTRUN -> [SKIP][38] ([fdo#109271]) +3 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-pnv-d510/igt@kms_vrr@flip-basic.html
    - fi-glk-j4005:       NOTRUN -> [SKIP][39] ([fdo#109271]) +3 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-glk-j4005/igt@kms_vrr@flip-basic.html
    - fi-kbl-7567u:       NOTRUN -> [SKIP][40] ([fdo#109271]) +3 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-kbl-7567u/igt@kms_vrr@flip-basic.html
    - fi-rkl-11600:       NOTRUN -> [SKIP][41] ([i915#3555]) +2 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-11600/igt@kms_vrr@flip-basic.html
    - fi-adl-ddr5:        NOTRUN -> [SKIP][42] ([i915#3555]) +2 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-adl-ddr5/igt@kms_vrr@flip-basic.html
    - fi-cfl-guc:         NOTRUN -> [SKIP][43] ([fdo#109271]) +3 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-cfl-guc/igt@kms_vrr@flip-basic.html

  * igt@kms_vrr@flipline:
    - fi-cfl-8700k:       NOTRUN -> [SKIP][44] ([fdo#109271]) +3 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-cfl-8700k/igt@kms_vrr@flipline.html
    - fi-blb-e6850:       NOTRUN -> [SKIP][45] ([fdo#109271]) +3 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-blb-e6850/igt@kms_vrr@flipline.html

  * igt@kms_vrr@negative-basic:
    - fi-skl-6600u:       NOTRUN -> [SKIP][46] ([fdo#109271]) +3 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-skl-6600u/igt@kms_vrr@negative-basic.html
    - fi-snb-2520m:       NOTRUN -> [SKIP][47] ([fdo#109271]) +3 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-snb-2520m/igt@kms_vrr@negative-basic.html
    - fi-rkl-guc:         NOTRUN -> [SKIP][48] ([i915#3555]) +2 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-rkl-guc/igt@kms_vrr@negative-basic.html

  * igt@kms_vrr@parse-vrr-range:
    - fi-ivb-3770:        NOTRUN -> [SKIP][49] ([fdo#109271]) +3 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-ivb-3770/igt@kms_vrr@parse-vrr-range.html
    - fi-elk-e7500:       NOTRUN -> [SKIP][50] ([fdo#109271]) +3 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-elk-e7500/igt@kms_vrr@parse-vrr-range.html
    - fi-bsw-nick:        NOTRUN -> [SKIP][51] ([fdo#109271]) +3 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bsw-nick/igt@kms_vrr@parse-vrr-range.html
    - fi-hsw-g3258:       NOTRUN -> [SKIP][52] ([fdo#109271]) +3 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-hsw-g3258/igt@kms_vrr@parse-vrr-range.html
    - fi-glk-dsi:         NOTRUN -> [SKIP][53] ([fdo#109271]) +3 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-glk-dsi/igt@kms_vrr@parse-vrr-range.html
    - fi-snb-2600:        NOTRUN -> [SKIP][54] ([fdo#109271]) +3 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-snb-2600/igt@kms_vrr@parse-vrr-range.html
    - fi-skl-6700k2:      NOTRUN -> [SKIP][55] ([fdo#109271]) +3 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-skl-6700k2/igt@kms_vrr@parse-vrr-range.html
    - fi-cfl-8109u:       NOTRUN -> [SKIP][56] ([fdo#109271]) +3 similar issues
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-cfl-8109u/igt@kms_vrr@parse-vrr-range.html
    - fi-ilk-650:         NOTRUN -> [SKIP][57] ([fdo#109271]) +3 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-ilk-650/igt@kms_vrr@parse-vrr-range.html
    - fi-bdw-5557u:       NOTRUN -> [SKIP][58] ([fdo#109271]) +3 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-bdw-5557u/igt@kms_vrr@parse-vrr-range.html

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

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

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3@lmem0:
    - {bat-dg2-11}:       [DMESG-WARN][61] ([i915#6816]) -> [PASS][62]
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12197/bat-dg2-11/igt@gem_exec_suspend@basic-s3@lmem0.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg2-11/igt@gem_exec_suspend@basic-s3@lmem0.html

  * igt@i915_selftest@live@gt_engines:
    - bat-dg1-5:          [INCOMPLETE][63] ([i915#4418]) -> [PASS][64]
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12197/bat-dg1-5/igt@i915_selftest@live@gt_engines.html
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/bat-dg1-5/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [INCOMPLETE][65] ([i915#4785]) -> [PASS][66]
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12197/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/fi-hsw-4770/igt@i915_selftest@live@hangcheck.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#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [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#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
  [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#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#6816]: https://gitlab.freedesktop.org/drm/intel/issues/6816
  [i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818


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

  * CI: CI-20190529 -> None
  * IGT: IGT_6668 -> IGTPW_7884

  CI-20190529: 20190529
  CI_DRM_12197: cafa326de8e7860d45639e61bf66ec9c218207b1 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_7884: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_7884/index.html
  IGT_6668: 5f29c9369550164b35b65baaaeba4b370f434cf1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


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

+igt@kms_vrr@negative-basic
+igt@kms_vrr@parse-vrr-range

== Logs ==

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

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

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

* Re: [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR
  2022-09-29  8:15 ` [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
@ 2022-09-29 19:07   ` Navare, Manasi
  2022-09-30  7:57     ` Modem, Bhanuprakash
  0 siblings, 1 reply; 7+ messages in thread
From: Navare, Manasi @ 2022-09-29 19:07 UTC (permalink / raw)
  To: Bhanuprakash Modem; +Cc: igt-dev

On Thu, Sep 29, 2022 at 01:45:45PM +0530, Bhanuprakash Modem wrote:
> 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
> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

This now looks good to me
Do you think, we need to add dmesg debug print in the kernel for this
condition saying enabling without VRR?

Reviewed-by: Manasi Navare<manasi.d.navare@intel.com>

Manasi

> ---
>  tests/kms_vrr.c | 66 ++++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 49 insertions(+), 17 deletions(-)
> 
> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
> index 8976d4a6..3aa9920a 100644
> --- a/tests/kms_vrr.c
> +++ b/tests/kms_vrr.c
> @@ -41,10 +41,11 @@
>  	(m)->type, (m)->flags
>  
>  enum {
> -	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 {
> @@ -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,31 @@ 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);
> +		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 +463,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 +498,7 @@ igt_main
>  	igt_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 +514,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);
>  	}
> -- 
> 2.37.3
> 

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

* Re: [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR
  2022-09-29 19:07   ` Navare, Manasi
@ 2022-09-30  7:57     ` Modem, Bhanuprakash
  0 siblings, 0 replies; 7+ messages in thread
From: Modem, Bhanuprakash @ 2022-09-30  7:57 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: igt-dev

On Fri-30-09-2022 12:37 am, Navare, Manasi wrote:
> On Thu, Sep 29, 2022 at 01:45:45PM +0530, Bhanuprakash Modem wrote:
>> 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
>>
>> Cc: Manasi Navare <manasi.d.navare@intel.com>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> 
> This now looks good to me
> Do you think, we need to add dmesg debug print in the kernel for this
> condition saying enabling without VRR?

I think it would be good if we have that debug print.

- Bhanu

> 
> Reviewed-by: Manasi Navare<manasi.d.navare@intel.com>
> 
> Manasi
> 
>> ---
>>   tests/kms_vrr.c | 66 ++++++++++++++++++++++++++++++++++++-------------
>>   1 file changed, 49 insertions(+), 17 deletions(-)
>>
>> diff --git a/tests/kms_vrr.c b/tests/kms_vrr.c
>> index 8976d4a6..3aa9920a 100644
>> --- a/tests/kms_vrr.c
>> +++ b/tests/kms_vrr.c
>> @@ -41,10 +41,11 @@
>>   	(m)->type, (m)->flags
>>   
>>   enum {
>> -	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 {
>> @@ -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,31 @@ 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);
>> +		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 +463,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 +498,7 @@ igt_main
>>   	igt_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 +514,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);
>>   	}
>> -- 
>> 2.37.3
>>

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

end of thread, other threads:[~2022-09-30  7:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-29  8:15 [igt-dev] [i-g-t V3 0/3] Add Negative tests to VRR Bhanuprakash Modem
2022-09-29  8:15 ` [igt-dev] [i-g-t V3 1/3] tests/kms_vrr: Add Negative tests to validate VRR Bhanuprakash Modem
2022-09-29 19:07   ` Navare, Manasi
2022-09-30  7:57     ` Modem, Bhanuprakash
2022-09-29  8:15 ` [igt-dev] [i-g-t V3 2/3] tests/kms_vrr: Add a test for VRR range capability Bhanuprakash Modem
2022-09-29  8:15 ` [igt-dev] [i-g-t V3 3/3] HAX: Add VRR negative tests to BAT Bhanuprakash Modem
2022-09-29  9:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add Negative tests to VRR (rev9) Patchwork

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.