public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Remove deep-pkgc subtest
@ 2026-04-17  8:34 Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test" Mohammed Thasleem
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:34 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, 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.

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(-)

-- 
2.43.0


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

* [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17 10:45   ` Kamil Konieczny
  2026-04-17  8:35 ` [PATCH v2 2/7] Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Mohammed Thasleem
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
 1 file changed, 16 insertions(+), 23 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 8138933d4..da74a21ce 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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


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

* [PATCH v2 2/7] Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 3/7] Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Mohammed Thasleem
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit 0e443bec0ccfb56c2754437b465fc197ee4fd481.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index da74a21ce..bb5f2ffc5 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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);
-- 
2.43.0


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

* [PATCH v2 3/7] Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test" Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 2/7] Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 4/7] Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output check" Mohammed Thasleem
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit 4eba89501947cf67d34475b4493489334a292f23.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index bb5f2ffc5..3f93a2a82 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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;
 
-- 
2.43.0


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

* [PATCH v2 4/7] Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output check"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (2 preceding siblings ...)
  2026-04-17  8:35 ` [PATCH v2 3/7] Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 5/7] Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay calculation" Mohammed Thasleem
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit e08151940f034f976632d99798f2097b2ee5e04e.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 33 ++++++++++-----------------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 3f93a2a82..91c9cebf2 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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);
-- 
2.43.0


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

* [PATCH v2 5/7] Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay calculation"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (3 preceding siblings ...)
  2026-04-17  8:35 ` [PATCH v2 4/7] Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output check" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 6/7] Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank" Mohammed Thasleem
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit 846b646da18d8d997cbbfabb7fde809e401d6ac0.

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

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 91c9cebf2..d32e1cf1f 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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);
-- 
2.43.0


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

* [PATCH v2 6/7] Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank"
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (4 preceding siblings ...)
  2026-04-17  8:35 ` [PATCH v2 5/7] Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay calculation" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:35 ` [PATCH v2 7/7] tests/intel/kms_pm_dc: Remove unused pkgc functions Mohammed Thasleem
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

This reverts commit 4d9b4ee12b5f0852c02818ca9a886355b43fbbff.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 101 ++++++++++++++++------------------------
 1 file changed, 39 insertions(+), 62 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index d32e1cf1f..e268b0696 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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") {
-- 
2.43.0


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

* [PATCH v2 7/7] tests/intel/kms_pm_dc: Remove unused pkgc functions
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (5 preceding siblings ...)
  2026-04-17  8:35 ` [PATCH v2 6/7] Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank" Mohammed Thasleem
@ 2026-04-17  8:35 ` Mohammed Thasleem
  2026-04-17  8:53 ` [PATCH v2 0/7] Remove deep-pkgc subtest Jani Nikula
  2026-04-17 12:34 ` Ville Syrjälä
  8 siblings, 0 replies; 14+ messages in thread
From: Mohammed Thasleem @ 2026-04-17  8:35 UTC (permalink / raw)
  To: igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

Clean up unused pkgc residency functions.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 48 -----------------------------------------
 1 file changed, 48 deletions(-)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index e268b0696..bf2d22ddc 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -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;
-- 
2.43.0


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

* Re: [PATCH v2 0/7] Remove deep-pkgc subtest
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (6 preceding siblings ...)
  2026-04-17  8:35 ` [PATCH v2 7/7] tests/intel/kms_pm_dc: Remove unused pkgc functions Mohammed Thasleem
@ 2026-04-17  8:53 ` Jani Nikula
  2026-04-17  9:38   ` Sharma, Swati2
  2026-04-17 12:34 ` Ville Syrjälä
  8 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2026-04-17  8:53 UTC (permalink / raw)
  To: Mohammed Thasleem, igt-dev; +Cc: swati2.sharma, Mohammed Thasleem

On Fri, 17 Apr 2026, Mohammed Thasleem <mohammed.thasleem@intel.com> wrote:
> 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.

>
> 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(-)

-- 
Jani Nikula, Intel

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

* Re: [PATCH v2 0/7] Remove deep-pkgc subtest
  2026-04-17  8:53 ` [PATCH v2 0/7] Remove deep-pkgc subtest Jani Nikula
@ 2026-04-17  9:38   ` Sharma, Swati2
  2026-04-17 10:29     ` Jani Nikula
  0 siblings, 1 reply; 14+ messages in thread
From: Sharma, Swati2 @ 2026-04-17  9:38 UTC (permalink / raw)
  To: Jani Nikula, Mohammed Thasleem, igt-dev

Hi Jani

On 17-04-2026 02:23 pm, Jani Nikula wrote:
> On Fri, 17 Apr 2026, Mohammed Thasleem <mohammed.thasleem@intel.com> wrote:
>> 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.

>
> I basically do this on all of my series before submitting:
>
> $ git rebase -i origin -x 'ninja -C build'
>
>
> BR,
> Jani.
>
>> 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(-)

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

* Re: [PATCH v2 0/7] Remove deep-pkgc subtest
  2026-04-17  9:38   ` Sharma, Swati2
@ 2026-04-17 10:29     ` Jani Nikula
  0 siblings, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2026-04-17 10:29 UTC (permalink / raw)
  To: Sharma, Swati2, Mohammed Thasleem, igt-dev

On Fri, 17 Apr 2026, "Sharma, Swati2" <swati2.sharma@intel.com> wrote:
> Hi Jani
>
> On 17-04-2026 02:23 pm, Jani Nikula wrote:
>> On Fri, 17 Apr 2026, Mohammed Thasleem <mohammed.thasleem@intel.com> wrote:
>>> 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.

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.


>
>>
>> I basically do this on all of my series before submitting:
>>
>> $ git rebase -i origin -x 'ninja -C build'
>>
>>
>> BR,
>> Jani.
>>
>>> 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(-)

-- 
Jani Nikula, Intel

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

* Re: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"
  2026-04-17  8:35 ` [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test" Mohammed Thasleem
@ 2026-04-17 10:45   ` Kamil Konieczny
  2026-04-20 12:58     ` Thasleem, Mohammed
  0 siblings, 1 reply; 14+ messages in thread
From: Kamil Konieczny @ 2026-04-17 10:45 UTC (permalink / raw)
  To: Mohammed Thasleem; +Cc: igt-dev, swati2.sharma, Jani Nikula

Hi Mohammed,
On 2026-04-17 at 14:05:00 +0530, Mohammed Thasleem wrote:
> This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.
> 
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>

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 

> ---
>  tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
>  1 file changed, 16 insertions(+), 23 deletions(-)
> 
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index 8138933d4..da74a21ce 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -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
> 

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

* Re: [PATCH v2 0/7] Remove deep-pkgc subtest
  2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
                   ` (7 preceding siblings ...)
  2026-04-17  8:53 ` [PATCH v2 0/7] Remove deep-pkgc subtest Jani Nikula
@ 2026-04-17 12:34 ` Ville Syrjälä
  8 siblings, 0 replies; 14+ messages in thread
From: Ville Syrjälä @ 2026-04-17 12:34 UTC (permalink / raw)
  To: Mohammed Thasleem; +Cc: igt-dev, swati2.sharma

On Fri, Apr 17, 2026 at 02:04:59PM +0530, Mohammed Thasleem wrote:
> 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?

> 
> 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(-)
> 
> -- 
> 2.43.0

-- 
Ville Syrjälä
Intel

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

* RE: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"
  2026-04-17 10:45   ` Kamil Konieczny
@ 2026-04-20 12:58     ` Thasleem, Mohammed
  0 siblings, 0 replies; 14+ messages in thread
From: Thasleem, Mohammed @ 2026-04-20 12:58 UTC (permalink / raw)
  To: Kamil Konieczny
  Cc: igt-dev@lists.freedesktop.org, Sharma,  Swati2, Nikula, Jani

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 <kamil.konieczny@linux.intel.com> 
Sent: 17 April 2026 04:16 PM
To: Thasleem, Mohammed <mohammed.thasleem@intel.com>
Cc: igt-dev@lists.freedesktop.org; Sharma, Swati2 <swati2.sharma@intel.com>; Nikula, Jani <jani.nikula@intel.com>
Subject: Re: [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test"

Hi Mohammed,
On 2026-04-17 at 14:05:00 +0530, Mohammed Thasleem wrote:
> This reverts commit d063ceaeaf2d2d561670945e9e81b8976a16f080.
> 
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>

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 

> ---
>  tests/intel/kms_pm_dc.c | 39 ++++++++++++++++-----------------------
>  1 file changed, 16 insertions(+), 23 deletions(-)
> 
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index 
> 8138933d4..da74a21ce 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -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
> 

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

end of thread, other threads:[~2026-04-20 12:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17  8:34 [PATCH v2 0/7] Remove deep-pkgc subtest Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 1/7] Revert "tests/intel/kms_pm_dc: Ensure eDP detection before skipping test" Mohammed Thasleem
2026-04-17 10:45   ` Kamil Konieczny
2026-04-20 12:58     ` Thasleem, Mohammed
2026-04-17  8:35 ` [PATCH v2 2/7] Revert "tests/intel/kms_pm_dc: Add polling for deep-pkgc" Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 3/7] Revert "tests/intel/kms_pm_dc: Update test duration to 4 seconds" Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 4/7] Revert "tests/intel/kms_pm_dc: Update VRR handling and eDP output check" Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 5/7] Revert "tests/intel/kms_pm_dc: Add time unit macros and update delay calculation" Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 6/7] Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank" Mohammed Thasleem
2026-04-17  8:35 ` [PATCH v2 7/7] tests/intel/kms_pm_dc: Remove unused pkgc functions Mohammed Thasleem
2026-04-17  8:53 ` [PATCH v2 0/7] Remove deep-pkgc subtest Jani Nikula
2026-04-17  9:38   ` Sharma, Swati2
2026-04-17 10:29     ` Jani Nikula
2026-04-17 12:34 ` Ville Syrjälä

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox