From: Imre Deak <imre.deak@intel.com>
To: Mohammed Thasleem <mohammed.thasleem@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v2] tests/intel/kms_pm_dc: Remove PkgC dependecy to validate deep-pkgc test
Date: Tue, 25 Mar 2025 18:28:15 +0200 [thread overview]
Message-ID: <Z-LZn04ZRpFIPKdp@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <20250309102833.56309-1-mohammed.thasleem@intel.com>
On Sun, Mar 09, 2025 at 03:58:33PM +0530, Mohammed Thasleem wrote:
> PkgC counter was removed from MTL onwards, so an alternative counter was
> used to validate deep pkgC tests. With the new KMD changes, a dedicated DC6
> debugfs entry counter has been created to validate these tests,
> allowing for the removal of the existing alternative counter code.
>
> v2: Updated igt_describe and discription.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 34 ++++++++++------------------------
> 1 file changed, 10 insertions(+), 24 deletions(-)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index b4f30a37d..ed24a24b8 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -78,7 +78,8 @@
> * 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
> + * Description: This test validates display engine entry to deep pkgc by
> + * checking dc6 entry for extended vblank
> * Functionality: pm_dc
> *
> * SUBTEST: dc5-retention-flops
> @@ -617,22 +618,7 @@ 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_deep_pkgc_state(data_t *data)
> +static void test_deep_pkgc_state(data_t *data, int dc_target)
> {
> unsigned int pre_val = 0, cur_val = 0;
> time_t start = time(NULL);
> @@ -694,7 +680,7 @@ static void test_deep_pkgc_state(data_t *data)
> igt_display_commit(&data->display);
> /* Wait for the vblank to sync the frame time */
> igt_wait_for_vblank_count(data->drm_fd, data->display.pipes[pipe].crtc_offset, 1);
> - pre_val = read_pkgc_counter(data->debugfs_root_fd);
> + pre_val = read_dc_counter(data->debugfs_fd, dc_target);
> /* Add a half-frame delay to ensure the flip occurs when the frame is active. */
> usleep(delay * 0.5);
>
> @@ -703,8 +689,8 @@ static void test_deep_pkgc_state(data_t *data)
> igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
> igt_display_commit(&data->display);
>
> - igt_wait((cur_val = read_pkgc_counter(data->debugfs_root_fd)) > pre_val,
> - (delay * 2), (5 * MSEC));
> + igt_wait((cur_val = read_dc_counter(data->debugfs_fd, dc_target)) > pre_val,
> + (delay * 2), (5 * MSEC));
> if (cur_val > pre_val) {
> pkgc_flag = true;
> break;
> @@ -712,7 +698,7 @@ static void test_deep_pkgc_state(data_t *data)
> }
>
> cleanup_dc3co_fbs(data);
> - igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
> + igt_assert_f(pkgc_flag, "Deep pkgc state is not achieved.\n");
> }
>
> static void kms_poll_state_restore(int sig)
> @@ -781,13 +767,13 @@ igt_main
> test_dc_state_psr(&data, CHECK_DC6);
> }
>
> - igt_describe("This test validates display engine entry to PKGC10 state "
> - "during extended vblank");
> + igt_describe("This test validates display engine entry to deep pkgc by "
> + "checking dc6 state entry 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);
> + test_deep_pkgc_state(&data, CHECK_DC6);
What would be now the difference between this and the DC6 tests?
> }
>
> igt_describe("This test validates display engine entry to DC5 state "
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-03-25 16:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 10:03 [PATCH i-g-t] tests/intel/kms_pm_dc: Remove PkgC dependecy to validate deep-pkgc test Mohammed Thasleem
2025-03-09 10:23 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2025-03-09 10:28 ` [PATCH i-g-t v2] " Mohammed Thasleem
2025-03-25 16:28 ` Imre Deak [this message]
2025-04-04 14:22 ` Thasleem, Mohammed
2025-03-09 11:05 ` ✗ Fi.CI.BUILD: failure for tests/intel/kms_pm_dc: Remove PkgC dependecy to validate deep-pkgc test (rev2) Patchwork
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=Z-LZn04ZRpFIPKdp@ideak-desk.fi.intel.com \
--to=imre.deak@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=mohammed.thasleem@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