From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com, Mohammed Thasleem <mohammed.thasleem@intel.com>
Subject: [PATCH v2 6/7] Revert "tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank"
Date: Fri, 17 Apr 2026 14:05:05 +0530 [thread overview]
Message-ID: <20260417083506.33404-7-mohammed.thasleem@intel.com> (raw)
In-Reply-To: <20260417083506.33404-1-mohammed.thasleem@intel.com>
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
next prev parent reply other threads:[~2026-04-17 8:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Mohammed Thasleem [this message]
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ä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260417083506.33404-7-mohammed.thasleem@intel.com \
--to=mohammed.thasleem@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox