[PATCH i-g-t v3] tests/intel/kms_pm_dc: Remove PKGC10 dependency to validate DC6

Mohammed Thasleem mohammed.thasleem at intel.com
Sun Mar 30 10:28:54 UTC 2025


DC6 counter was removed MTL onwards, so pkgc10 counter is used
to validated DC6 tests but with the new approach of kmd changes
created DC6 debugfs entry counter to validated DC6 tests and
removeing the existing PKGC10 code.

v2: Update debugfs message.
v3: Remove display version check. (Imre)
    Update commit subject and description.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
 tests/intel/kms_pm_dc.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 2491cd1f8..29e5758fc 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -285,7 +285,13 @@ static uint32_t read_dc_counter(uint32_t debugfs_fd, int dc_flag)
 		igt_assert_f(str, "DC5 counter is not available\n");
 	} else if (dc_flag & CHECK_DC6) {
 		str = strstr(buf, "DC5 -> DC6 count");
-		igt_assert_f(str, "DC6 counter is not available\n");
+		if (!str) {
+			str = strstr(buf, "DC5 -> DC6 allowed count");
+			igt_assert_f(str, "DC5 -> DC6 allowed count "
+					  "is not available\n");
+		} else {
+			igt_assert_f(str, "DC6 counter is not available\n");
+		}
 	} else if (dc_flag & CHECK_DC3CO) {
 		str = strstr(buf, "DC3CO count");
 		igt_assert_f(str, "DC3CO counter is not available\n");
@@ -376,6 +382,7 @@ static void check_dc3co_with_videoplayback_like_load(data_t *data)
 
 static void require_dc_counter(int debugfs_fd, int dc_flag)
 {
+	char *str;
 	char buf[4096];
 
 	igt_debugfs_simple_read(debugfs_fd, "i915_dmc_info",
@@ -391,8 +398,13 @@ static void require_dc_counter(int debugfs_fd, int dc_flag)
 			      "DC5 counter is not available\n");
 		break;
 	case CHECK_DC6:
-		igt_skip_on_f(!strstr(buf, "DC5 -> DC6 count"),
-			      "DC6 counter is not available\n");
+		str = strstr(buf, "DC5 -> DC6 count");
+		if (!str) {
+			str = strstr(buf, "DC5 -> DC6 allowed count");
+			igt_assert_f(str, "DC5 -> DC6 allowed count is not available\n");
+		} else {
+			igt_assert_f(str, "DC6 counter is not available\n");
+		}
 		break;
 	default:
 		igt_assert_f(0, "Unknown DC counter %d\n", dc_flag);
-- 
2.34.1



More information about the igt-dev mailing list