Skip to contentSkip to conversation

RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8

PATCH New Jeevan B 2 participants 3 messages Oct 3, 2023

lore
Share & tools
lore

Jeevan B

author
#0 lore raw

PATCH 1/1 RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8

Add new test to valdiate deep sleep state (PKGC-8) for extended vblank scenario.

cc Mohammed Thasleem <[email protected]>
---
 tests/intel/kms_pm_dc.c | 72 +++++++++++++++++++++++++++++++++++++----
 1 file changed, 66 insertions(+), 6 deletions(-)
tests/intel/kms_pm_dc.c +66 -6
index 1e9ca5d6c..5739dc432 100644
@@ -95,6 +95,13 @@
  * Functionality: dpms, pm_dc
  * Mega feature: Display Power
  * Test category: functionality test
+ *
+ * SUBTEST: pkgc-8
+ * Description: This test validatess display engine entry to PKGC-8 state
+ * Driver requirement: i915, xe
+ * Functionality: dpms, pm_dc
+ * Mega feature: Display Power
+ * Test category: functionality test
  */
 
 /* DC State Flags */
@@ -171,7 +178,7 @@ static void cleanup_dc_psr(data_t *data)
 	igt_remove_fb(data->drm_fd, &data->fb_white);
 }
 
-static void cleanup_dc3co_fbs(data_t *data)
+static void cleanup_vpb_fbs(data_t *data)
 {
 	igt_plane_t *primary;
 
@@ -190,17 +197,17 @@ static void paint_rectangles(data_t *data,
 			     igt_fb_t *fb)
 {
 	cairo_t *cr = igt_get_cairo_ctx(data->drm_fd, fb);
-	int i, l = mode->hdisplay / 3;
-	int rows_remaining = mode->hdisplay % 3;
+	int i, l = mode->vdisplay / 3;
+	int rows_remaining = mode->vdisplay % 3;
 
 	/* Paint 3 solid rectangles. */
 	for (i = 0 ; i < 3; i++) {
-		igt_paint_color(cr, i * l, 0, l, mode->vdisplay,
+		igt_paint_color(cr, i * l, 0, l, mode->hdisplay,
 				colors[i].r, colors[i].g, colors[i].b);
 	}
 
 	if (rows_remaining > 0)
-		igt_paint_color(cr, i * l, 0, rows_remaining, mode->vdisplay,
+		igt_paint_color(cr, i * l, 0, rows_remaining, mode->hdisplay,
 				colors[i - 1].r, colors[i - 1].g,
 				colors[i - 1].b);
 
@@ -393,7 +400,7 @@ static void test_dc3co_vpb_simulation(data_t *data)
 	setup_dc3co(data);
 	setup_videoplayback(data);
 	check_dc3co_with_videoplayback_like_load(data);
-	cleanup_dc3co_fbs(data);
+	cleanup_vpb_fbs(data);
 }
 
 static void psr_dpms(data_t *data, int mode)
@@ -601,6 +608,49 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
 	return get_dc_counter(str);
 }
 
+static unsigned int read_pkgc8_counter(int debugfs_root_fd)
+{
+        char buf[4096];
+        char *str;
+        int len;
+
+        len = igt_sysfs_read(debugfs_root_fd, PACKAGE_CSTATE_PATH, buf, sizeof(buf) - 1);
+        igt_skip_on_f(len < 0, "PKGC state file not found\n");
+        buf[len] = '\0';
+        str = strstr(buf, "Package C8");
+        igt_skip_on_f(!str, "PKGC8 is not supported.\n");
+
+        return get_dc_counter(str);
+}
+
+static void test_deep_pkgc_state(data_t *data)
+{
+	igt_plane_t *primary;
+	int pre_val, cur_val;
+	time_t secs = 6;
+        time_t startTime = time(NULL);
+
+	pre_val = read_pkgc8_counter(data->debugfs_root_fd);
+	psr_dpms(data, DRM_MODE_DPMS_OFF);
+	setup_videoplayback(data);
+        primary = igt_output_get_plane_type(data->output,
+                                            DRM_PLANE_TYPE_PRIMARY);
+        igt_plane_set_fb(primary, NULL);
+
+        while (time(NULL) - startTime < secs) {
+                igt_plane_set_fb(primary, &data->fb_rgb);
+                igt_display_commit(&data->display);
+
+                igt_plane_set_fb(primary, &data->fb_rgr);
+                igt_display_commit(&data->display);
+        }
+
+	cur_val = read_pkgc8_counter(data->debugfs_root_fd);
+	psr_dpms(data, DRM_MODE_DPMS_ON);
+	igt_assert_f(cur_val > pre_val, "PKGC8 is not achieved.\n");
+	cleanup_vpb_fbs(data);
+}
+
 static void test_pkgc_state_dpms(data_t *data)
 {
 	unsigned int timeout_sec = 6;
@@ -736,6 +786,16 @@ igt_main
 		test_dc9_dpms(&data);
 	}
 
+	igt_describe("This test validates display engine entry to PKGC8 state");
+	igt_subtest("pkgc-8") {
+		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
+			      "PC8+ residencies not supported\n");
+		if (intel_display_ver(data.devid) >= 14)
+			test_deep_pkgc_state(&data);
+		else
+			igt_skip("PKGC Not supported on this platform");
+	}
+
 	igt_fixture {
 		free(data.debugfs_dump);
 		close(data.debugfs_fd);
Signature · 1 line
2.25.1
#1 lore raw

[igt-dev] ✓ CI.xeBAT: success for RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8

== Series Details ==

== Series Details ==

Series: RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8
URL : https://patchwork.freedesktop.org/series/124547/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7508_BAT -> XEIGTPW_9907_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (4 -> 3)
------------------------------

Missing (1): bat-dg2-oem2

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_flip@basic-flip-vs-wf_vblank@a-edp1:
- bat-adlp-7: [PASS][1] -> [FAIL][2] ([Intel XE#480]) +1 other test fail
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7508/bat-adlp-7/igt@kms_flip@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9907/bat-adlp-7/igt@kms_flip@[email protected]

#### Possible fixes ####

* {igt@xe_create@create-execqueues-noleak}:
- bat-adlp-7: [FAIL][3] ([Intel XE#524]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7508/bat-adlp-7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9907/bat-adlp-7/igt@[email protected]

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

[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524

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

* IGT: IGT_7508 -> IGTPW_9907
* Linux: xe-404-22fcf2404f56a8e7aea6734298e0b2b265136313 -> xe-410-02ab43e36623665d8644d46162bd4ec5eeb68489

IGTPW_9907: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/index.html
IGT_7508: f366406b05ca6b3d16eaa734a91e0833bd159f54 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-404-22fcf2404f56a8e7aea6734298e0b2b265136313: 22fcf2404f56a8e7aea6734298e0b2b265136313 xe-410-02ab43e36623665d8644d46162bd4ec5eeb68489: 02ab43e36623665d8644d46162bd4ec5eeb68489

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_9907/index.html

#2 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8

In reply to Jeevan B
== Series Details ==

== Series Details ==

Series: RFC: tests/intel/kms_pm_dc: Add new test to validate PKGC-8
URL : https://patchwork.freedesktop.org/series/124547/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13702 -> IGTPW_9907
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_9907, please notify your bug team ([email protected]) 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_9907/index.html

Participating hosts (37 -> 39)
------------------------------

Additional (4): fi-skl-guc fi-hsw-4770 bat-adlm-1 bat-adlp-6
Missing (2): fi-kbl-soraka fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@workarounds:
- bat-adlm-1: NOTRUN -> [DMESG-FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@i915_selftest@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-adlp-6: NOTRUN -> [SKIP][2] ([i915#9318])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-6/igt@[email protected]
- bat-adlm-1: NOTRUN -> [SKIP][3] ([i915#3826])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@fbdev@eof:
- bat-adlm-1: NOTRUN -> [SKIP][4] ([i915#2582]) +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@fbdev@info:
- bat-adlm-1: NOTRUN -> [SKIP][5] ([i915#1849] / [i915#2582])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@gem_lmem_swapping@basic:
- fi-skl-guc: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#4613]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-skl-guc/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-adlm-1: NOTRUN -> [SKIP][7] ([i915#4613]) +3 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-adlp-6: NOTRUN -> [SKIP][8] ([i915#3282])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-6/igt@gem_tiled_pread_basic.html
- bat-adlm-1: NOTRUN -> [SKIP][9] ([i915#3282])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@gem_tiled_pread_basic.html

* igt@i915_pm_rps@basic-api:
- bat-adlm-1: NOTRUN -> [SKIP][10] ([i915#6621])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@i915_selftest@live@requests:
- bat-mtlp-8: [PASS][11] -> [ABORT][12] ([i915#9414])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-mtlp-8/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-mtlp-8/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- bat-mtlp-6: NOTRUN -> [SKIP][13] ([i915#6645])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-mtlp-6/igt@[email protected]

* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-hsw-4770: NOTRUN -> [SKIP][14] ([fdo#109271]) +13 other tests skip
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-hsw-4770/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adlp-6: NOTRUN -> [SKIP][15] ([i915#4103] / [i915#5608]) +1 other test skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-6/igt@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size:
- bat-adlm-1: NOTRUN -> [SKIP][16] ([i915#1845]) +17 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]
- bat-adlp-11: [PASS][17] -> [DMESG-WARN][18] ([i915#6868])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-adlp-11/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-11/igt@[email protected]

* igt@kms_dsc@dsc-basic:
- fi-skl-guc: NOTRUN -> [SKIP][19] ([fdo#109271]) +12 other tests skip
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-skl-guc/igt@[email protected]
- bat-adlp-6: NOTRUN -> [SKIP][20] ([i915#3555] / [i915#3840])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-6/igt@[email protected]

* igt@kms_flip@basic-plain-flip:
- bat-adlm-1: NOTRUN -> [SKIP][21] ([i915#3637]) +3 other tests skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-adlm-1: NOTRUN -> [SKIP][22] ([fdo#109285])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]
- bat-adlp-6: NOTRUN -> [SKIP][23] ([fdo#109285])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- bat-adlm-1: NOTRUN -> [SKIP][24] ([i915#1849])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@kms_hdmi_inject@inject-audio:
- fi-skl-guc: NOTRUN -> [FAIL][25] ([IGT#3])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-skl-guc/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-dp-5:
- bat-adlp-11: [PASS][26] -> [ABORT][27] ([i915#8668])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-mtlp-6: NOTRUN -> [SKIP][28] ([i915#1845] / [i915#4078])
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-mtlp-6/igt@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-vga-1:
- fi-hsw-4770: NOTRUN -> [DMESG-WARN][29] ([i915#8841]) +6 other tests dmesg-warn
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-hsw-4770/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@cursor_plane_move:
- bat-adlm-1: NOTRUN -> [SKIP][30] ([i915#1072]) +3 other tests skip
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@kms_psr@cursor_plane_move.html

* igt@kms_psr@sprite_plane_onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][31] ([fdo#109271] / [i915#1072]) +3 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_setmode@basic-clone-single-crtc:
- bat-adlm-1: NOTRUN -> [SKIP][32] ([i915#3555])
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- bat-adlm-1: NOTRUN -> [SKIP][33] ([i915#1845] / [i915#3708])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-adlm-1: NOTRUN -> [SKIP][34] ([i915#3708]) +2 other tests skip
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlm-1/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s0@lmem0:
- bat-dg2-9: [INCOMPLETE][35] ([i915#9275]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-dg2-9/igt@gem_exec_suspend@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-dg2-9/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@gem_migrate:
- bat-mtlp-6: [INCOMPLETE][37] -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-mtlp-6/igt@i915_selftest@live@gem_migrate.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-mtlp-6/igt@i915_selftest@live@gem_migrate.html

* igt@i915_suspend@basic-s3-without-i915:
- bat-adlp-9: [INCOMPLETE][39] ([i915#7443]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-adlp-9/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-9/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-dp-5:
- bat-adlp-11: [ABORT][41] ([i915#8668]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13702/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/bat-adlp-11/igt@kms_pipe_crc_basic@[email protected]

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

[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#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3826]: https://gitlab.freedesktop.org/drm/intel/issues/3826
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[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#7443]: https://gitlab.freedesktop.org/drm/intel/issues/7443
[i915#7952]: https://gitlab.freedesktop.org/drm/intel/issues/7952
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#8841]: https://gitlab.freedesktop.org/drm/intel/issues/8841
[i915#9275]: https://gitlab.freedesktop.org/drm/intel/issues/9275
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9414]: https://gitlab.freedesktop.org/drm/intel/issues/9414

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

* CI: CI-20190529 -> None
* IGT: IGT_7508 -> IGTPW_9907

CI-20190529: 20190529
CI_DRM_13702: 712ba44bed40a31304163b0cf67c455224e2e4a9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_9907: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9907/index.html
IGT_7508: f366406b05ca6b3d16eaa734a91e0833bd159f54 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

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

+igt@kms_pm_dc@pkgc-8

== Logs ==

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