Skip to contentSkip to conversation

tests/i915:Extend kms_frontbuffer_tracking to test FBC on multiple pipes

PATCH Superseded Nidhi Gupta 2 participants 2 messages Feb 15, 2022

v2 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tests/i915:Extend kms_frontbuffer_tracking to test FBC on multiple pipes

In future more platforms will support FBC on multiple pipes, so to validate the same extending the kms_frontbuffer_tracking test.

In kernel code now FBC debugfs files are exposed for each crtc so added debugfs_read_crtc function to get the per pipe fbc status.

---
 tests/i915/kms_frontbuffer_tracking.c | 42 +++++++++++++++------------
 1 file changed, 23 insertions(+), 19 deletions(-)
tests/i915/kms_frontbuffer_tracking.c +23 -19
index 532bfbb9..363b4c6c 100644
@@ -732,8 +732,23 @@ static int __debugfs_write(const char *param, char *buf, int len)
 	return igt_sysfs_write(drm.debugfs, param, buf, len - 1);
 }
 
+static void __debugfs_read_crtc(const char *param, char *buf, int len)
+{
+	int dir,fd;
+	enum pipe pipe;
+
+	pipe = prim_mode_params.pipe;
+	dir = igt_debugfs_pipe_dir(drm.fd, pipe, O_RDONLY);
+	igt_require_fd(dir);
+	fd = openat(dir, "i915_fbc_status", O_RDONLY);
+	igt_debugfs_simple_read(fd, param, buf, len);
+	close(fd);
+	close(dir);
+}
+
 #define debugfs_read(p, arr) __debugfs_read(p, arr, sizeof(arr))
 #define debugfs_write(p, arr) __debugfs_write(p, arr, sizeof(arr))
+#define debugfs_read_crtc(p, arr) __debugfs_read_crtc(p, arr, sizeof(arr))
 
 static char last_fbc_buf[128];
 
@@ -742,7 +757,7 @@ static bool fbc_is_enabled(int lvl)
 	char buf[128];
 	bool print = true;
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	if (lvl != IGT_LOG_DEBUG)
 		last_fbc_buf[0] = '\0';
 	else if (strcmp(last_fbc_buf, buf))
@@ -825,8 +840,8 @@ static struct timespec fbc_get_last_action(void)
 	char *action;
 	ssize_t n_read;
 
-	debugfs_read("i915_fbc_status", buf);
 
+	debugfs_read_crtc("i915_fbc_status", buf);
 	action = strstr(buf, "\nLast action:");
 	igt_assert(action);
 
@@ -874,8 +889,8 @@ static void fbc_setup_last_action(void)
 	char buf[128];
 	char *action;
 
-	debugfs_read("i915_fbc_status", buf);
 
+	debugfs_read_crtc("i915_fbc_status", buf);
 	action = strstr(buf, "\nLast action:");
 	if (!action) {
 		igt_info("FBC last action not supported\n");
@@ -893,7 +908,7 @@ static bool fbc_is_compressing(void)
 {
 	char buf[128];
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	return strstr(buf, "\nCompressing: yes\n") != NULL;
 }
 
@@ -906,7 +921,7 @@ static bool fbc_not_enough_stolen(void)
 {
 	char buf[128];
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	return strstr(buf, "FBC disabled: not enough stolen memory\n");
 }
 
@@ -914,7 +929,7 @@ static bool fbc_stride_not_supported(void)
 {
 	char buf[128];
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	return strstr(buf, "FBC disabled: framebuffer stride not supported\n");
 }
 
@@ -922,7 +937,7 @@ static bool fbc_mode_too_large(void)
 {
 	char buf[128];
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	return strstr(buf, "FBC disabled: mode too large for compression\n");
 }
 
@@ -1388,7 +1403,7 @@ static bool fbc_supported_on_chipset(void)
 {
 	char buf[128];
 
-	debugfs_read("i915_fbc_status", buf);
+	debugfs_read_crtc("i915_fbc_status", buf);
 	if (*buf == '\0')
 		return false;
 
@@ -1404,17 +1419,6 @@ static void setup_fbc(void)
 		return;
 	}
 
-	/*
-	 * While some platforms do allow FBC on pipes B/C, this test suite
-	 * is not prepared for that yet.
-	 * TODO: solve this.
-	 */
-	if (prim_mode_params.pipe != PIPE_A) {
-		igt_info("Can't test FBC: primary connector doesn't support "
-			 "pipe A\n");
-		return;
-	}
-
 	/* Early Generations are not able to report compression status. */
 	if (!AT_LEAST_GEN(devid, 7))
 		opt.fbc_check_compression = false;
Signature · 1 line
2.26.2
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/i915:Extend kms_frontbuffer_tracking to test FBC on multiple pipes (rev2)

== Series Details ==

== Series Details ==

Series: tests/i915:Extend kms_frontbuffer_tracking to test FBC on multiple pipes (rev2)
URL : https://patchwork.freedesktop.org/series/99985/
State : failure

== Summary ==

CI Bug Log - changes from IGT_6345 -> IGTPW_6621
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in IGTPW_6621, 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_6621/index.html

Participating hosts (47 -> 46)
------------------------------

Missing (1): fi-bsw-cyan

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@workarounds:
- fi-rkl-guc: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/fi-rkl-guc/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-rkl-guc/igt@i915_selftest@[email protected]

#### Suppressed ####

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

* igt@i915_selftest@live@gt_heartbeat:
- {bat-jsl-1}: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/bat-jsl-1/igt@i915_selftest@live@gt_heartbeat.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-skl-6600u: NOTRUN -> [INCOMPLETE][5] ([i915#4547])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-skl-6600u/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- fi-snb-2600: [PASS][6] -> [INCOMPLETE][7] ([i915#3921])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/fi-snb-2600/igt@i915_selftest@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-snb-2600/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@requests:
- fi-pnv-d510: [PASS][8] -> [DMESG-FAIL][9] ([i915#2927])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/fi-pnv-d510/igt@i915_selftest@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-pnv-d510/igt@i915_selftest@[email protected]

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

#### Possible fixes ####

* igt@i915_selftest@live@hangcheck:
- bat-dg1-6: [DMESG-FAIL][11] ([i915#4494] / [i915#4957]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/bat-dg1-6/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/bat-dg1-6/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@workarounds:
- {bat-adlp-6}: [DMESG-WARN][13] ([i915#5068]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/bat-adlp-6/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/bat-adlp-6/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-cfl-8109u: [DMESG-WARN][15] ([i915#295]) -> [PASS][16] +11 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/fi-cfl-8109u/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-cfl-8109u/igt@[email protected]

#### Warnings ####

* igt@i915_selftest@live@hangcheck:
- fi-hsw-4770: [INCOMPLETE][17] ([i915#4785]) -> [INCOMPLETE][18] ([i915#3303])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_6345/fi-hsw-4770/igt@i915_selftest@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/fi-hsw-4770/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
[i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
[i915#2927]: https://gitlab.freedesktop.org/drm/intel/issues/2927
[i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
[i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
[i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
[i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
[i915#4785]: https://gitlab.freedesktop.org/drm/intel/issues/4785
[i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
[i915#5068]: https://gitlab.freedesktop.org/drm/intel/issues/5068

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

* CI: CI-20190529 -> None
* IGT: IGT_6345 -> IGTPW_6621

CI-20190529: 20190529
CI_DRM_11228: edf25884076190dda9286ede129ab4eb8f90a167 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_6621: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6621/index.html
IGT_6345: ee18c0497ec2c74007e299c3fdd26f1613b9f514 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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