Skip to contentSkip to conversation

Remove deep-pkgc subtest

PATCH Superseded Mohammed Thasleem 5 participants 18 messages Apr 17 – May 25

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Remove deep-pkgc subtest

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

 tests/intel/kms_pm_dc.c | 98 -----------------------------------------
 1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/7 Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"

This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.

---
 tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 23 deletions(-)
tests/intel/kms_pm_dc.c +16 -23
index 8138933d4..da74a21ce 100644
@@ -543,38 +543,31 @@ static void test_deep_pkgc_state(data_t *data)
 	time_t delay;
 	igt_crtc_t *crtc;
 	bool pkgc_flag = false;
-	bool flip = true, edp_found = false;
+	bool flip = true;
 
 	igt_display_t *display = &data->display;
 	igt_plane_t *primary;
 	igt_output_t *output = NULL;
 	drmModeModeInfo *mode;
 
-	for_each_crtc_with_valid_output(display, crtc, output) {
-		if (output->config.connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
-
-			edp_found = true;
-			/* Check VRR capabilities before setting up */
-			if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
-			    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
-				/*
-				 * TODO: Add check for vmin = vmax = flipline if VRR enabled
-				 * when KMD allows for such capability.
-				 */
-				igt_crtc_set_prop_value(crtc, IGT_CRTC_VRR_ENABLED, false);
-				igt_assert(igt_display_try_commit_atomic(display,
-									 DRM_MODE_ATOMIC_ALLOW_MODESET,
-									 NULL) == 0);
-			}
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			igt_skip("No eDP output found, skipping the test.\n");
+		/* Check VRR capabilities before setting up */
+		if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
+		    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
+			/*
+			 * TODO: Add check for vmin = vmax = flipline if VRR enabled
+			 * when KMD allows for such capability.
+			 */
+			igt_pipe_set_prop_value(display, pipe,
+						IGT_CRTC_VRR_ENABLED, false);
+			igt_assert(igt_display_try_commit_atomic(display,
+								 DRM_MODE_ATOMIC_ALLOW_MODESET,
+								 NULL) == 0);
 			break;
 		}
 	}
-
-	if (!edp_found) {
-		igt_skip("No eDP output found, skipping the test.\n");
-		return;
-	}
-
 	igt_display_reset(display);
 
 	igt_output_set_crtc(output, crtc);
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"

Hi Mohammed,

Quoted 3 lines · Mohammed Thasleem

This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.

As Jani said, this is not compiling, so please fix compilation at first change and amend a fix. Do this step by step, so bisect should work.

Jani's hint: This should work for your series:

$ git rebase -i origin -x 'ninja -C build'

+cc Jani

Regards,
Kamil

Quoted 66 lines
---
 tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 23 deletions(-)
tests/intel/kms_pm_dc.c +16 -23
index 8138933d4..da74a21ce 100644
@@ -543,38 +543,31 @@ static void test_deep_pkgc_state(data_t *data)
 	time_t delay;
 	igt_crtc_t *crtc;
 	bool pkgc_flag = false;
-	bool flip = true, edp_found = false;
+	bool flip = true;
 
 	igt_display_t *display = &data->display;
 	igt_plane_t *primary;
 	igt_output_t *output = NULL;
 	drmModeModeInfo *mode;
 
-	for_each_crtc_with_valid_output(display, crtc, output) {
-		if (output->config.connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
-
-			edp_found = true;
-			/* Check VRR capabilities before setting up */
-			if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
-			    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
-				/*
-				 * TODO: Add check for vmin = vmax = flipline if VRR enabled
-				 * when KMD allows for such capability.
-				 */
-				igt_crtc_set_prop_value(crtc, IGT_CRTC_VRR_ENABLED, false);
-				igt_assert(igt_display_try_commit_atomic(display,
-									 DRM_MODE_ATOMIC_ALLOW_MODESET,
-									 NULL) == 0);
-			}
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			igt_skip("No eDP output found, skipping the test.\n");
+		/* Check VRR capabilities before setting up */
+		if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
+		    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
+			/*
+			 * TODO: Add check for vmin = vmax = flipline if VRR enabled
+			 * when KMD allows for such capability.
+			 */
+			igt_pipe_set_prop_value(display, pipe,
+						IGT_CRTC_VRR_ENABLED, false);
+			igt_assert(igt_display_try_commit_atomic(display,
+								 DRM_MODE_ATOMIC_ALLOW_MODESET,
+								 NULL) == 0);
 			break;
 		}
 	}
-
-	if (!edp_found) {
-		igt_skip("No eDP output found, skipping the test.\n");
-		return;
-	}
-
 	igt_display_reset(display);
 
 	igt_output_set_crtc(output, crtc);
Signature · 1 line
2.43.0
#3 lore raw

RE: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"

Floated new version : https://patchwork.freedesktop.org/series/165054/
Both individual changes compile successfully, and they also compile correctly when combined using git rebase -i origin -x 'ninja -C build'

-----Original Message-----
From: Kamil Konieczny <[email protected]>
Sent: 17 April 2026 04:16 PM
To: Thasleem, Mohammed <[email protected]>
Cc: [email protected]; Sharma, Swati2 <[email protected]>; Nikula, Jani <[email protected]>
Subject: Re: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"

Hi Mohammed,

Quoted 3 lines · Mohammed Thasleem

This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.

As Jani said, this is not compiling, so please fix compilation at first change and amend a fix. Do this step by step, so bisect should work.

Jani's hint: This should work for your series:

$ git rebase -i origin -x 'ninja -C build'

+cc Jani

Regards,
Kamil

Quoted 66 lines
---
 tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 23 deletions(-)
tests/intel/kms_pm_dc.c index renamed from tests/intel/kms_pm_dc.c +0 -0

8138933d4..da74a21ce 100644

tests/intel/kms_pm_dc.c +16 -24
@@ -543,38 +543,31 @@ static void test_deep_pkgc_state(data_t *data)
 	time_t delay;
 	igt_crtc_t *crtc;
 	bool pkgc_flag = false;
-	bool flip = true, edp_found = false;
+	bool flip = true;
 
 	igt_display_t *display = &data->display;
 	igt_plane_t *primary;
 	igt_output_t *output = NULL;
 	drmModeModeInfo *mode;
 
-	for_each_crtc_with_valid_output(display, crtc, output) {
-		if (output->config.connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
-
-			edp_found = true;
-			/* Check VRR capabilities before setting up */
-			if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
-			    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
-				/*
-				 * TODO: Add check for vmin = vmax = flipline if VRR enabled
-				 * when KMD allows for such capability.
-				 */
-				igt_crtc_set_prop_value(crtc, IGT_CRTC_VRR_ENABLED, false);
-				igt_assert(igt_display_try_commit_atomic(display,
-									 DRM_MODE_ATOMIC_ALLOW_MODESET,
-									 NULL) == 0);
-			}
+	for_each_pipe_with_valid_output(display, pipe, output) {
+		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
+			igt_skip("No eDP output found, skipping the test.\n");
+		/* Check VRR capabilities before setting up */
+		if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
+		    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
+			/*
+			 * TODO: Add check for vmin = vmax = flipline if VRR enabled
+			 * when KMD allows for such capability.
+			 */
+			igt_pipe_set_prop_value(display, pipe,
+						IGT_CRTC_VRR_ENABLED, false);
+			igt_assert(igt_display_try_commit_atomic(display,
+								 DRM_MODE_ATOMIC_ALLOW_MODESET,
+								 NULL) == 0);
 			break;
 		}
 	}
-
-	if (!edp_found) {
-		igt_skip("No eDP output found, skipping the test.\n");
-		return;
-	}
-
 	igt_display_reset(display);
 
 	igt_output_set_crtc(output, crtc);
--

2.43.0

#4 lore raw

PATCH v2 2/7 Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc"

In reply to Mohammed Thasleem

This reverts commit 0e443bec0ccfb56c2754437b465fc197ee4fd481.

---
 tests/intel/kms_pm_dc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
tests/intel/kms_pm_dc.c +4 -8
index da74a21ce..bb5f2ffc5 100644
@@ -586,26 +586,22 @@ static void test_deep_pkgc_state(data_t *data)
 	setup_videoplayback(data);
 
 	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
+	pre_val = read_pkgc_counter(data->debugfs_root_fd);
+
 	igt_plane_set_fb(primary, &data->fb_rgb);
 	igt_display_commit(&data->display);
-	/* Wait for the vblank to sync the frame time */
-	igt_wait_for_vblank_count(crtc, 1);
-	pre_val = igt_read_pkgc_counter(data->debugfs_root_fd);
-	/* Add a half-frame delay to ensure the flip occurs when the frame is active. */
-	usleep(delay * 0.5);
 
 	while (time(NULL) - start < duration) {
 		flip = !flip;
 		igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
 		igt_display_commit(&data->display);
 
-		igt_wait((cur_val = igt_read_pkgc_counter(data->debugfs_root_fd)) > pre_val,
-			 (delay * 2), (5 * MSEC));
-
+		cur_val = read_pkgc_counter(data->debugfs_root_fd);
 		if (cur_val > pre_val) {
 			pkgc_flag = true;
 			break;
 		}
+		usleep(delay);
 	}
 
 	cleanup_dc3co_fbs(data);
Signature · 1 line
2.43.0
#5 lore raw

PATCH v2 3/7 Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds"

In reply to Mohammed Thasleem

This reverts commit 4eba89501947cf67d34475b4493489334a292f23.

---
 tests/intel/kms_pm_dc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
tests/intel/kms_pm_dc.c +2 -4
index bb5f2ffc5..3f93a2a82 100644
@@ -538,10 +538,8 @@ static int has_panels_without_dc_support(igt_display_t *display)
 static void test_deep_pkgc_state(data_t *data)
 {
 	unsigned int pre_val = 0, cur_val = 0;
-	time_t start = time(NULL);
-	time_t duration = (4 * SEC);
-	time_t delay;
-	igt_crtc_t *crtc;
+	time_t start = time(NULL), duration = 2, delay;
+	enum pipe pipe;
 	bool pkgc_flag = false;
 	bool flip = true;
 
Signature · 1 line
2.43.0
#6 lore raw

PATCH v2 4/7 Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output check"

In reply to Mohammed Thasleem

This reverts commit e08151940f034f976632d99798f2097b2ee5e04e.

---
 tests/intel/kms_pm_dc.c | 33 ++++++++++-----------------------
 1 file changed, 10 insertions(+), 23 deletions(-)
tests/intel/kms_pm_dc.c +10 -23
index 3f93a2a82..91c9cebf2 100644
@@ -541,7 +541,7 @@ static void test_deep_pkgc_state(data_t *data)
 	time_t start = time(NULL), duration = 2, delay;
 	enum pipe pipe;
 	bool pkgc_flag = false;
-	bool flip = true;
+	bool vrr_supported = false, flip = true;
 
 	igt_display_t *display = &data->display;
 	igt_plane_t *primary;
@@ -549,42 +549,29 @@ static void test_deep_pkgc_state(data_t *data)
 	drmModeModeInfo *mode;
 
 	for_each_pipe_with_valid_output(display, pipe, output) {
-		if (output->config.connector->connector_type != DRM_MODE_CONNECTOR_eDP)
-			igt_skip("No eDP output found, skipping the test.\n");
 		/* Check VRR capabilities before setting up */
 		if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
 		    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
-			/*
-			 * TODO: Add check for vmin = vmax = flipline if VRR enabled
-			 * when KMD allows for such capability.
-			 */
-			igt_pipe_set_prop_value(display, pipe,
-						IGT_CRTC_VRR_ENABLED, false);
-			igt_assert(igt_display_try_commit_atomic(display,
-								 DRM_MODE_ATOMIC_ALLOW_MODESET,
-								 NULL) == 0);
+			vrr_supported = true;
 			break;
 		}
 	}
+
+	/* Skip the test if no VRR capable output is found */
+	igt_skip_on_f(!vrr_supported,
+		      "No VRR capable output found, skipping the test.\n");
+
 	igt_display_reset(display);
 
-	igt_output_set_crtc(output, crtc);
-	for_each_connector_mode(output, mode) {
-		data->mode = mode;
-		delay = (MSEC / (data->mode->vrefresh));
-		/*
-		 * Should be 5ms vblank time required to program higher
-		 * watermark levels
-		 */
-		if (delay >= (5 * MSEC))
-			break;
-	}
+	igt_output_set_pipe(output, pipe);
 
 	data->output = output;
+	data->mode = igt_output_get_mode(output);
 	setup_videoplayback(data);
 
 	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
 	pre_val = read_pkgc_counter(data->debugfs_root_fd);
+	delay = (MSEC / (data->mode->vrefresh - 10));
 
 	igt_plane_set_fb(primary, &data->fb_rgb);
 	igt_display_commit(&data->display);
Signature · 1 line
2.43.0
#7 lore raw

PATCH v2 5/7 Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay calculation"

In reply to Mohammed Thasleem

This reverts commit 846b646da18d8d997cbbfabb7fde809e401d6ac0.

---
 tests/intel/kms_pm_dc.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
tests/intel/kms_pm_dc.c +2 -3
index 91c9cebf2..d32e1cf1f 100644
@@ -84,8 +84,7 @@
 #define KMS_HELPER "/sys/module/drm_kms_helper/parameters/"
 #define KMS_POLL_DISABLE 0
 #define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || intel_display_ver(devid) >= 14))
-#define SEC 1
-#define MSEC (SEC * 1000)
+#define MSECS (1000000ul)
 
 IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
 
@@ -571,7 +570,7 @@ static void test_deep_pkgc_state(data_t *data)
 
 	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
 	pre_val = read_pkgc_counter(data->debugfs_root_fd);
-	delay = (MSEC / (data->mode->vrefresh - 10));
+	delay = 1 * (MSECS / (data->mode->vrefresh - 10));
 
 	igt_plane_set_fb(primary, &data->fb_rgb);
 	igt_display_commit(&data->display);
Signature · 1 line
2.43.0
#8 lore raw

PATCH v2 6/7 Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank"

In reply to Mohammed Thasleem

This reverts commit 4d9b4ee12b5f0852c02818ca9a886355b43fbbff.

---
 tests/intel/kms_pm_dc.c | 101 ++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 62 deletions(-)
tests/intel/kms_pm_dc.c +39 -62
index d32e1cf1f..e268b0696 100644
@@ -72,9 +72,6 @@
  * SUBTEST: dc9-dpms
  * Description: This test validates display engine entry to DC9 state
  *
- * SUBTEST: deep-pkgc
- * Description: This test validates display engine entry to PKGC10 state for extended vblank
- *
  * SUBTEST: dc5-retention-flops
  * Description: This test validates display engine entry to DC5 state while PSR is active on Pipe B
  */
@@ -84,7 +81,6 @@
 #define KMS_HELPER "/sys/module/drm_kms_helper/parameters/"
 #define KMS_POLL_DISABLE 0
 #define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || intel_display_ver(devid) >= 14))
-#define MSECS (1000000ul)
 
 IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
 
@@ -534,62 +530,52 @@ static int has_panels_without_dc_support(igt_display_t *display)
 	return external_panel;
 }
 
-static void test_deep_pkgc_state(data_t *data)
+static unsigned int read_pkgc_counter(int debugfs_root_fd)
 {
-	unsigned int pre_val = 0, cur_val = 0;
-	time_t start = time(NULL), duration = 2, delay;
-	enum pipe pipe;
-	bool pkgc_flag = false;
-	bool vrr_supported = false, flip = true;
-
-	igt_display_t *display = &data->display;
-	igt_plane_t *primary;
-	igt_output_t *output = NULL;
-	drmModeModeInfo *mode;
-
-	for_each_pipe_with_valid_output(display, pipe, output) {
-		/* Check VRR capabilities before setting up */
-		if (igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) &&
-		    igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
-			vrr_supported = true;
-			break;
-		}
-	}
-
-	/* Skip the test if no VRR capable output is found */
-	igt_skip_on_f(!vrr_supported,
-		      "No VRR capable output found, skipping the test.\n");
+	char buf[4096];
+	char *str;
+	int len;
 
-	igt_display_reset(display);
+	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 C10");
+	igt_skip_on_f(!str, "PKGC10 is not supported.\n");
 
-	igt_output_set_pipe(output, pipe);
-
-	data->output = output;
-	data->mode = igt_output_get_mode(output);
-	setup_videoplayback(data);
-
-	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
-	pre_val = read_pkgc_counter(data->debugfs_root_fd);
-	delay = 1 * (MSECS / (data->mode->vrefresh - 10));
+	return get_dc_counter(str);
+}
 
-	igt_plane_set_fb(primary, &data->fb_rgb);
-	igt_display_commit(&data->display);
+static void test_pkgc_state_dpms(data_t *data)
+{
+	unsigned int timeout_sec = 6;
+	unsigned int prev_value = 0, cur_value = 0;
 
-	while (time(NULL) - start < duration) {
-		flip = !flip;
-		igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
-		igt_display_commit(&data->display);
+	prev_value = read_pkgc_counter(data->debugfs_root_fd);
+	setup_dc_dpms(data);
+	dpms_off(data);
+	igt_wait((cur_value = read_pkgc_counter(data->debugfs_root_fd)) > prev_value,
+		  timeout_sec * 1000, 100);
+	igt_assert_f(cur_value > prev_value, "PKGC10 is not achieved.\n");
+	dpms_on(data);
+	cleanup_dc_dpms(data);
+}
 
-		cur_val = read_pkgc_counter(data->debugfs_root_fd);
-		if (cur_val > pre_val) {
-			pkgc_flag = true;
-			break;
-		}
-		usleep(delay);
-	}
+static void test_pkgc_state_psr(data_t *data)
+{
+	unsigned int timeout_sec = 6;
+	unsigned int prev_value = 0, cur_value = 0;
 
-	cleanup_dc3co_fbs(data);
-	igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+	prev_value = read_pkgc_counter(data->debugfs_root_fd);
+	setup_output(data);
+	setup_primary(data);
+	igt_require(!psr_disabled_check(data->debugfs_fd));
+	igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, NULL));
+	psr_dpms(data, DRM_MODE_DPMS_OFF);
+	igt_wait((cur_value = read_pkgc_counter(data->debugfs_root_fd)) > prev_value,
+		  timeout_sec * 1000, 100);
+	igt_assert_f(cur_value > prev_value, "PKGC10 is not achieved.\n");
+	psr_dpms(data, DRM_MODE_DPMS_ON);
+	cleanup_dc_psr(data);
 }
 
 static void kms_poll_state_restore(int sig)
@@ -658,15 +644,6 @@ int igt_main()
 		test_dc_state_psr(&data, IGT_INTEL_CHECK_DC6);
 	}
 
-	igt_describe("This test validates display engine entry to PKGC10 state "
-		     "during extended vblank");
-	igt_subtest("deep-pkgc") {
-		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
-			      "PC8+ residencies not supported\n");
-		igt_require(intel_display_ver(data.devid) >= 20);
-		test_deep_pkgc_state(&data);
-	}
-
 	igt_describe("This test validates display engine entry to DC5 state "
 		     "while all connectors's DPMS property set to OFF");
 	igt_subtest("dc5-dpms") {
Signature · 1 line
2.43.0
#9 lore raw

PATCH v2 7/7 tests/intel/kms_pm_dc: Remove unused pkgc functions

In reply to Mohammed Thasleem

Clean up unused pkgc residency functions.

---
 tests/intel/kms_pm_dc.c | 48 -----------------------------------------
 1 file changed, 48 deletions(-)
tests/intel/kms_pm_dc.c +0 -48
index e268b0696..bf2d22ddc 100644
@@ -530,54 +530,6 @@ static int has_panels_without_dc_support(igt_display_t *display)
 	return external_panel;
 }
 
-static unsigned int read_pkgc_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 C10");
-	igt_skip_on_f(!str, "PKGC10 is not supported.\n");
-
-	return get_dc_counter(str);
-}
-
-static void test_pkgc_state_dpms(data_t *data)
-{
-	unsigned int timeout_sec = 6;
-	unsigned int prev_value = 0, cur_value = 0;
-
-	prev_value = read_pkgc_counter(data->debugfs_root_fd);
-	setup_dc_dpms(data);
-	dpms_off(data);
-	igt_wait((cur_value = read_pkgc_counter(data->debugfs_root_fd)) > prev_value,
-		  timeout_sec * 1000, 100);
-	igt_assert_f(cur_value > prev_value, "PKGC10 is not achieved.\n");
-	dpms_on(data);
-	cleanup_dc_dpms(data);
-}
-
-static void test_pkgc_state_psr(data_t *data)
-{
-	unsigned int timeout_sec = 6;
-	unsigned int prev_value = 0, cur_value = 0;
-
-	prev_value = read_pkgc_counter(data->debugfs_root_fd);
-	setup_output(data);
-	setup_primary(data);
-	igt_require(!psr_disabled_check(data->debugfs_fd));
-	igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, NULL));
-	psr_dpms(data, DRM_MODE_DPMS_OFF);
-	igt_wait((cur_value = read_pkgc_counter(data->debugfs_root_fd)) > prev_value,
-		  timeout_sec * 1000, 100);
-	igt_assert_f(cur_value > prev_value, "PKGC10 is not achieved.\n");
-	psr_dpms(data, DRM_MODE_DPMS_ON);
-	cleanup_dc_psr(data);
-}
-
 static void kms_poll_state_restore(int sig)
 {
 	int sysfs_fd;
Signature · 1 line
2.43.0
#10 lore raw
In reply to Mohammed Thasleem
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Doing this in reverts like this breaks bisect.

I basically do this on all of my series before submitting:

$ git rebase -i origin -x 'ninja -C build'

BR,
Jani.

Quoted 16 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

 tests/intel/kms_pm_dc.c | 98 -----------------------------------------
 1 file changed, 98 deletions(-)
Signature · 1 line
Jani Nikula, Intel
#11 lore raw

Hi Jani

Quoted 8 lines · Jani Nikula
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Doing this in reverts like this breaks bisect.

Then what's the best approach to follow?

Even in git log, I can see such reverts.

Quoted 24 lines

I basically do this on all of my series before submitting:

$ git rebase -i origin -x 'ninja -C build'

BR,
Jani.

Quoted 15 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

  tests/intel/kms_pm_dc.c | 98 -----------------------------------------
  1 file changed, 98 deletions(-)
#12 lore raw
Quoted 10 lines · On Fri, 17 Apr 2026, "Sharma, Swati2" <[email protected]> wrote:

Hi Jani

Quoted 7 lines · Jani Nikula
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Quoted 5 lines
Quoted 1 line

Doing this in reverts like this breaks bisect.

Then what's the best approach to follow?

Even in git log, I can see such reverts.

Reverts are fine *in general*, but in this case it reverts back to states that won't build. For example patch 1 adds for_each_pipe_with_valid_output() which doesn't exist anymore.

Maybe you need to squash enough of these together to form commits that build. Or all of them.

BR,
Jani.

Quoted 25 lines
Quoted 25 lines

I basically do this on all of my series before submitting:

$ git rebase -i origin -x 'ninja -C build'

BR,
Jani.

Quoted 15 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

  tests/intel/kms_pm_dc.c | 98 -----------------------------------------
  1 file changed, 98 deletions(-)
Signature · 1 line
Jani Nikula, Intel
#13 lore raw
In reply to Mohammed Thasleem
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

What is the actual plan for that? How would it even be implemented and when should we expect to get it?

Quoted 19 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

 tests/intel/kms_pm_dc.c | 98 -----------------------------------------
 1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
Signature · 2 lines
Ville Syrjälä
Intel
#14 lore raw
Quoted 9 lines · Ville Syrjälä
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

What is the actual plan for that? How would it even be implemented and when should we expect to get it?

It's in discussion with hardware design team to come up with hooks for better validation and tracking.

Quoted 18 lines
Quoted 18 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

  tests/intel/kms_pm_dc.c | 98 -----------------------------------------
  1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
#15 lore raw
Quoted 9 lines · Mohammed
Quoted 7 lines · Ville Syrjälä
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Quoted 4 lines
Quoted 2 lines

What is the actual plan for that? How would it even be implemented and when should we expect to get it?

It's in discussion with hardware design team to come up with hooks for better validation and tracking.

And how are you going to catch regression on current systems?

Quoted 18 lines
Quoted 18 lines
Quoted 18 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

  tests/intel/kms_pm_dc.c | 98 -----------------------------------------
  1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
Signature · 2 lines
Ville Syrjälä
Intel
#16 lore raw
Quoted 9 lines · Ville Syrjälä
Quoted 8 lines · Mohammed
Quoted 7 lines · Ville Syrjälä
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

What is the actual plan for that? How would it even be implemented and when should we expect to get it?

It's in discussion with hardware design team to come up with hooks for better validation and tracking.

And how are you going to catch regression on current systems?

The removed deep-pkgc subtest was providing unreliable results due to its dependency on unrelated system components, making it more likely to produce false positives rather than catch actual regressions. And we will test pkg c tests as part of manual validation.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

   tests/intel/kms_pm_dc.c | 98 -----------------------------------------
   1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
#17 lore raw
Quoted 11 lines · Mohammed
Quoted 9 lines · Ville Syrjälä
Quoted 8 lines · Mohammed
Quoted 7 lines · Ville Syrjälä
Quoted 6 lines · Mohammed Thasleem

Remove the deep-pkgc subtest as it depends on other display IPs which makes testing unreliable. Current validation uses Package C-state counters that are affected by unrelated system components and requires platform-specific checks that vary across different platforms.
A redesigned test with proper display IP isolation will be implemented in a future patch.

Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines

What is the actual plan for that? How would it even be implemented and when should we expect to get it?

It's in discussion with hardware design team to come up with hooks for better validation and tracking.

And how are you going to catch regression on current systems?

The removed deep-pkgc subtest was providing unreliable results due to its dependency on unrelated system components, making it more likely to produce false positives rather than catch actual regressions.

Are you saying the CI setups are unstable enough that we sometimes reach deep pkgc and sometimes we don't, on the same system? Someone should fix that so that there isn't random ping pong. Either the systems have been configured correctly and can reach deep pkgc, or they have not and never reach those states.

I know it's a real pain to figure out what is preventing the pkgc states due to lack of good feedback from the SoC level stuff, and the pmc debugfs stuff is an undocumented mess. But it should still be possible to get there in most cases.

Quoted 1 line

And we will test pkg c tests as part of manual validation.

Aren't you removing those tests here? And on which platforms does this manual testing happen? I also have no idea where the results of this manual testing are tracked.

I would also like to know which systems in CI can actually reach deep pkgc states and which can't because that really does affect how the display hardware works, and might be important if we eg. get underruns.

Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines
Quoted 19 lines

Mohammed Thasleem (7):
Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping
test"
Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output
check"
Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay
calculation"
Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep
sleep state during extended vblank"
tests/intel/kms_pm_dc: Remove unused pkgc functions

   tests/intel/kms_pm_dc.c | 98 -----------------------------------------
   1 file changed, 98 deletions(-)
Signature · 1 line
2.43.0
Signature · 2 lines
Ville Syrjälä
Intel