* [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
@ 2024-05-27 4:19 Jeevan B
2024-05-27 5:03 ` Kandpal, Suraj
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Jeevan B @ 2024-05-27 4:19 UTC (permalink / raw)
To: igt-dev; +Cc: bhanuprakash.modem, suraj.kandpal, Jeevan B
Add a new test to validate deep sleep states during extended vblank
scenarios, where two frames are committed simultaneously for a give
time with reduced refresh rate.
v2: dealy of one frame added to simulate extended vblank.
remove vrr related debug checks.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 7766d34d7..9f89e537d 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -584,6 +584,46 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
return get_dc_counter(str);
}
+static void test_deep_pkgc_state(data_t *data)
+{
+ unsigned int pre_val = 0, cur_val = 0;
+ time_t start = time(NULL), duration = 2, delay;
+ enum pipe pipe;
+ bool pkgc_flag;
+ igt_display_t *display = &data->display;
+ igt_plane_t *primary;
+ igt_output_t *output;
+
+ for_each_pipe_with_valid_output(display, pipe, output) {
+ igt_output_set_pipe(output, pipe);
+ data->output = output;
+ data->mode = igt_output_get_mode(output);
+ setup_videoplayback(data);
+ igt_require(igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
+ igt_require(igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
+
+ primary = igt_output_get_plane_type(data->output,
+ DRM_PLANE_TYPE_PRIMARY);
+ pre_val = read_pkgc_counter(data->debugfs_root_fd);
+ delay = 1 * ((1000 * 1000) / data->mode->vrefresh);
+ while (time(NULL) - start < duration) {
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+ usleep(delay);
+
+ igt_plane_set_fb(primary, &data->fb_rgr);
+ igt_display_commit(&data->display);
+ cur_val = read_pkgc_counter(data->debugfs_root_fd);
+ if (cur_val > pre_val) {
+ pkgc_flag = true;
+ continue;
+ }
+ }
+ }
+ cleanup_dc3co_fbs(data);
+ igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+}
+
static void test_pkgc_state_dpms(data_t *data)
{
unsigned int timeout_sec = 6;
@@ -687,6 +727,15 @@ igt_main
test_dc_state_psr(&data, CHECK_DC6);
}
+ igt_describe("This test validates display engine entry to DC8 state "
+ "while 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.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* RE: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 4:19 [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank Jeevan B
@ 2024-05-27 5:03 ` Kandpal, Suraj
2024-05-27 10:12 ` B, Jeevan
2024-05-27 6:30 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-05-27 6:36 ` ✗ GitLab.Pipeline: warning " Patchwork
2 siblings, 1 reply; 12+ messages in thread
From: Kandpal, Suraj @ 2024-05-27 5:03 UTC (permalink / raw)
To: B, Jeevan, igt-dev@lists.freedesktop.org; +Cc: Modem, Bhanuprakash
> Subject: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the
> deep sleep state during extended vblank
>
> Add a new test to validate deep sleep states during extended vblank scenarios,
> where two frames are committed simultaneously for a give time with reduced
Typo here *given
> refresh rate.
> v2: dealy of one frame added to simulate extended vblank.
> remove vrr related debug checks.
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 49
> +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> 7766d34d7..9f89e537d 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -584,6 +584,46 @@ static unsigned int read_pkgc_counter(int
> debugfs_root_fd)
> return get_dc_counter(str);
> }
>
> +static void test_deep_pkgc_state(data_t *data) {
> + unsigned int pre_val = 0, cur_val = 0;
> + time_t start = time(NULL), duration = 2, delay;
> + enum pipe pipe;
> + bool pkgc_flag;
> + igt_display_t *display = &data->display;
> + igt_plane_t *primary;
> + igt_output_t *output;
> +
> + for_each_pipe_with_valid_output(display, pipe, output) {
> + igt_output_set_pipe(output, pipe);
> + data->output = output;
> + data->mode = igt_output_get_mode(output);
> + setup_videoplayback(data);
> + igt_require(igt_output_has_prop(output,
> IGT_CONNECTOR_VRR_CAPABLE));
> + igt_require(igt_output_get_prop(output,
> IGT_CONNECTOR_VRR_CAPABLE));
Why are there two igt_require checking the same thing here?
> +
> + primary = igt_output_get_plane_type(data->output,
> +
> DRM_PLANE_TYPE_PRIMARY);
> + pre_val = read_pkgc_counter(data->debugfs_root_fd);
> + delay = 1 * ((1000 * 1000) / data->mode->vrefresh);
If 1000*1000 is constant why not use a #define would look cleaner
> + while (time(NULL) - start < duration) {
> + igt_plane_set_fb(primary, &data->fb_rgb);
> + igt_display_commit(&data->display);
> + usleep(delay);
> +
> + igt_plane_set_fb(primary, &data->fb_rgr);
> + igt_display_commit(&data->display);
> + cur_val = read_pkgc_counter(data->debugfs_root_fd);
> + if (cur_val > pre_val) {
> + pkgc_flag = true;
> + continue;
> + }
> + }
> + }
> + cleanup_dc3co_fbs(data);
> + igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n"); }
> +
> static void test_pkgc_state_dpms(data_t *data) {
> unsigned int timeout_sec = 6;
> @@ -687,6 +727,15 @@ igt_main
> test_dc_state_psr(&data, CHECK_DC6);
> }
>
> + igt_describe("This test validates display engine entry to DC8 state "
> + "while extended vblank");
*during extended vblank
Regards,
Suraj Kandpal
> + 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.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread* RE: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 5:03 ` Kandpal, Suraj
@ 2024-05-27 10:12 ` B, Jeevan
0 siblings, 0 replies; 12+ messages in thread
From: B, Jeevan @ 2024-05-27 10:12 UTC (permalink / raw)
To: Kandpal, Suraj, igt-dev@lists.freedesktop.org; +Cc: Modem, Bhanuprakash
> -----Original Message-----
> From: Kandpal, Suraj <suraj.kandpal@intel.com>
> Sent: Monday, May 27, 2024 10:33 AM
> To: B, Jeevan <jeevan.b@intel.com>; igt-dev@lists.freedesktop.org
> Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
> Subject: RE: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate
> the deep sleep state during extended vblank
>
> > Subject: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to
> > validate the deep sleep state during extended vblank
> >
> > Add a new test to validate deep sleep states during extended vblank
> > scenarios, where two frames are committed simultaneously for a give
> > time with reduced
>
> Typo here *given
>
> > refresh rate.
> > v2: dealy of one frame added to simulate extended vblank.
> > remove vrr related debug checks.
> >
> > Signed-off-by: Jeevan B <jeevan.b@intel.com>
> > ---
> > tests/intel/kms_pm_dc.c | 49
> > +++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 49 insertions(+)
> >
> > diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> > 7766d34d7..9f89e537d 100644
> > --- a/tests/intel/kms_pm_dc.c
> > +++ b/tests/intel/kms_pm_dc.c
> > @@ -584,6 +584,46 @@ static unsigned int read_pkgc_counter(int
> > debugfs_root_fd)
> > return get_dc_counter(str);
> > }
> >
> > +static void test_deep_pkgc_state(data_t *data) {
> > + unsigned int pre_val = 0, cur_val = 0;
> > + time_t start = time(NULL), duration = 2, delay;
> > + enum pipe pipe;
> > + bool pkgc_flag;
> > + igt_display_t *display = &data->display;
> > + igt_plane_t *primary;
> > + igt_output_t *output;
> > +
> > + for_each_pipe_with_valid_output(display, pipe, output) {
> > + igt_output_set_pipe(output, pipe);
> > + data->output = output;
> > + data->mode = igt_output_get_mode(output);
> > + setup_videoplayback(data);
> > + igt_require(igt_output_has_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE));
> > + igt_require(igt_output_get_prop(output,
> > IGT_CONNECTOR_VRR_CAPABLE));
>
> Why are there two igt_require checking the same thing here?
To check VRR is supported and available.
BR, Jeevan B
>
> > +
> > + primary = igt_output_get_plane_type(data->output,
> > +
> > DRM_PLANE_TYPE_PRIMARY);
> > + pre_val = read_pkgc_counter(data->debugfs_root_fd);
> > + delay = 1 * ((1000 * 1000) / data->mode->vrefresh);
>
> If 1000*1000 is constant why not use a #define would look cleaner
>
> > + while (time(NULL) - start < duration) {
> > + igt_plane_set_fb(primary, &data->fb_rgb);
> > + igt_display_commit(&data->display);
> > + usleep(delay);
> > +
> > + igt_plane_set_fb(primary, &data->fb_rgr);
> > + igt_display_commit(&data->display);
> > + cur_val = read_pkgc_counter(data->debugfs_root_fd);
> > + if (cur_val > pre_val) {
> > + pkgc_flag = true;
> > + continue;
> > + }
> > + }
> > + }
> > + cleanup_dc3co_fbs(data);
> > + igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n"); }
> > +
> > static void test_pkgc_state_dpms(data_t *data) {
> > unsigned int timeout_sec = 6;
> > @@ -687,6 +727,15 @@ igt_main
> > test_dc_state_psr(&data, CHECK_DC6);
> > }
> >
> > + igt_describe("This test validates display engine entry to DC8 state "
> > + "while extended vblank");
>
> *during extended vblank
>
> Regards,
> Suraj Kandpal
> > + 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.25.1
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ Fi.CI.BUILD: failure for tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 4:19 [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank Jeevan B
2024-05-27 5:03 ` Kandpal, Suraj
@ 2024-05-27 6:30 ` Patchwork
2024-05-27 6:36 ` ✗ GitLab.Pipeline: warning " Patchwork
2 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2024-05-27 6:30 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
== Series Details ==
Series: tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
URL : https://patchwork.freedesktop.org/series/134058/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
1d7b961235e345db20933c057f265898e2e96fd2 tests: Fix Sub-category in documentation
Tail of build.log:
[1632/1679] Linking target tools/intel_vbt_decode.
[1633/1679] Linking target tools/intel_pm_rpm.
[1634/1679] Linking target tools/lsgpu.
[1635/1679] Linking target runner/testdata/skippers.
[1636/1679] Linking target tools/intel_stepping.
[1637/1679] Linking target tools/intel_residency.
[1638/1679] Linking target runner/testdata/dynamic.
[1639/1679] Linking target tools/intel_gem_info.
[1640/1679] Linking target tools/intel_l3_parity.
[1641/1679] Linking target runner/testdata/abort-fixture.
[1642/1679] Linking target tools/intel_watermark.
[1643/1679] Generating gem_stress.testlist with a meson_exe.py custom command.
[1644/1679] Linking target runner/igt_comms_decoder.
[1645/1679] Linking target tools/amd_hdmi_compliance.
[1646/1679] Linking target runner/igt_runner.
[1647/1679] Linking target runner/testdata/abort-simple.
[1648/1679] Linking target runner/testdata/abort-dynamic.
[1649/1679] Linking target runner/testdata/no-subtests.
[1650/1679] Linking target tools/msm_dp_compliance.
[1651/1679] Linking target runner/testdata/successtest.
[1652/1679] Linking target runner/igt_resume.
[1653/1679] Linking target runner/testdata/abort.
[1654/1679] Linking target runner/runner_json_test.
[1655/1679] Linking target runner/igt_results.
[1656/1679] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt1.c.o'.
[1657/1679] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
[1658/1679] Linking target runner/runner_test.
[1659/1679] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt2.c.o'.
[1660/1679] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt3.c.o'.
[1661/1679] Linking target lib/libi915_perf.so.1.5.
[1662/1679] Generating symbol file 'lib/76b5a35@@i915_perf@sha/libi915_perf.so.1.5.symbols'.
[1663/1679] Linking target tools/i915-perf/i915-perf-configs.
[1664/1679] Linking target tools/i915-perf/i915-perf-reader.
[1665/1679] Linking target tests/gem_barrier_race.
[1666/1679] Linking target tests/perf.
[1667/1679] Linking target tools/i915-perf/i915-perf-recorder.
[1668/1679] Linking target tests/core_hotunplug.
[1669/1679] Generating gem_barrier_race.testlist with a meson_exe.py custom command.
[1670/1679] Generating perf.testlist with a meson_exe.py custom command.
[1671/1679] Generating core_hotunplug.testlist with a meson_exe.py custom command.
[1672/1679] Generating xe_tests.rst with a custom command.
[1673/1679] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/usr/src/igt-gpu-tools/scripts/igt_doc.py --config /usr/src/igt-gpu-tools/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /opt/igt/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
[1674/1679] Generating i915_tests.rst with a custom command.
[1675/1679] Generating intel-ci-tests with a custom command.
[1676/1679] Generating xe_tests.html with a custom command.
ninja: build stopped: subcommand failed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ GitLab.Pipeline: warning for tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 4:19 [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank Jeevan B
2024-05-27 5:03 ` Kandpal, Suraj
2024-05-27 6:30 ` ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2024-05-27 6:36 ` Patchwork
2 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2024-05-27 6:36 UTC (permalink / raw)
To: Jeevan B; +Cc: igt-dev
== Series Details ==
Series: tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
URL : https://patchwork.freedesktop.org/series/134058/
State : warning
== Summary ==
Pipeline status: FAILED.
see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1186674 for the overview.
build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173459):
[1796/1801] Generating intel-ci-tests with a custom command.
[1797/1801] Generating xe_tests.html with a custom command.
[1798/1801] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/824] Generating version.h with a custom command.
[2/6] Linking target runner/runner_test.
[3/6] Generating i915_tests.html with a custom command.
[4/6] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791548:step_script
section_start:1716791548:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791549:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173454):
[1803/1807] Generating xe_tests.html with a custom command.
[1804/1807] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/826] Generating version.h with a custom command.
[2/6] Linking target runner/runner_test.
[3/6] Generating intel-ci-tests with a custom command.
[4/6] Generating i915_tests.html with a custom command.
[5/6] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791553:step_script
section_start:1716791553:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791554:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173458):
[1803/1807] Generating i915_tests.rst with a custom command.
[1804/1807] Generating intel-ci-tests with a custom command.
[1805/1807] Generating xe_tests.html with a custom command.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/826] Generating version.h with a custom command.
[2/5] Generating i915_tests.html with a custom command.
[3/5] Generating intel-ci-tests with a custom command.
[4/5] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791526:step_script
section_start:1716791526:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791526:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173457):
[1635/1639] Generating xe_tests.html with a custom command.
[1636/1639] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/775] Generating version.h with a custom command.
[2/6] Linking target runner/runner_test.
[3/6] Generating intel-ci-tests with a custom command.
[4/6] Generating i915_tests.html with a custom command.
[5/6] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791549:step_script
section_start:1716791549:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791550:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173455):
[1803/1807] Generating xe_tests.html with a custom command.
[1804/1807] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/826] Generating version.h with a custom command.
[2/6] Linking target runner/runner_test.
[3/6] Generating intel-ci-tests with a custom command.
[4/6] Generating i915_tests.html with a custom command.
[5/6] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791551:step_script
section_start:1716791551:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791552:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/59173456):
[1803/1807] Generating xe_tests.html with a custom command.
[1804/1807] Compiling C object 'runner/runner@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/826] Generating version.h with a custom command.
[2/6] Linking target runner/runner_test.
[3/6] Generating intel-ci-tests with a custom command.
[4/6] Generating i915_tests.html with a custom command.
[5/6] Generating kms_tests.rst with a custom command.
FAILED: docs/testplan/kms_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/kms_test_config.json --rest docs/testplan/kms_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@kms_pm_dc@deep-pkgc
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1716791506:step_script
section_start:1716791506:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1716791507:cleanup_file_variables
ERROR: Job failed: exit code 1
== Logs ==
For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1186674
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
@ 2024-05-27 10:21 Jeevan B
2024-05-27 13:03 ` Modem, Bhanuprakash
0 siblings, 1 reply; 12+ messages in thread
From: Jeevan B @ 2024-05-27 10:21 UTC (permalink / raw)
To: igt-dev; +Cc: bhanuprakash.modem, suraj.kandpal, Jeevan B
Add a new test to validate deep sleep states during extended vblank
scenarios, where two frames are committed simultaneously for a given
time with reduced refresh rate.
v2: dealy of one frame added to simulate extended vblank.
remove vrr related debug checks.
v3: fix typo and add define. (Suraj)
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 54 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 7766d34d7..f7989ed47 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -76,6 +76,10 @@
*
* 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
+ * Functionality: pm_dc
*/
/* DC State Flags */
@@ -89,6 +93,7 @@
#define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
#define KMS_POLL_DISABLE 0
#define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
+#define MSECS 1000000
IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
@@ -584,6 +589,46 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
return get_dc_counter(str);
}
+static void test_deep_pkgc_state(data_t *data)
+{
+ unsigned int pre_val = 0, cur_val = 0;
+ time_t start = time(NULL), duration = 2, delay;
+ enum pipe pipe;
+ bool pkgc_flag;
+ igt_display_t *display = &data->display;
+ igt_plane_t *primary;
+ igt_output_t *output;
+
+ for_each_pipe_with_valid_output(display, pipe, output) {
+ igt_output_set_pipe(output, pipe);
+ data->output = output;
+ data->mode = igt_output_get_mode(output);
+ setup_videoplayback(data);
+ igt_require(igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
+ igt_require(igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
+
+ 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);
+ while (time(NULL) - start < duration) {
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+ usleep(delay);
+
+ igt_plane_set_fb(primary, &data->fb_rgr);
+ igt_display_commit(&data->display);
+ cur_val = read_pkgc_counter(data->debugfs_root_fd);
+ if (cur_val > pre_val) {
+ pkgc_flag = true;
+ continue;
+ }
+ }
+ }
+ cleanup_dc3co_fbs(data);
+ igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+}
+
static void test_pkgc_state_dpms(data_t *data)
{
unsigned int timeout_sec = 6;
@@ -687,6 +732,15 @@ igt_main
test_dc_state_psr(&data, 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.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 10:21 [PATCH i-g-t] " Jeevan B
@ 2024-05-27 13:03 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2024-05-27 13:03 UTC (permalink / raw)
To: Jeevan B, igt-dev; +Cc: suraj.kandpal
Hi Jeevan,
On 27-05-2024 03:51 pm, Jeevan B wrote:
> Add a new test to validate deep sleep states during extended vblank
> scenarios, where two frames are committed simultaneously for a given
> time with reduced refresh rate.
> v2: dealy of one frame added to simulate extended vblank.
> remove vrr related debug checks.
> v3: fix typo and add define. (Suraj)
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 54 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index 7766d34d7..f7989ed47 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -76,6 +76,10 @@
> *
> * 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
> + * Functionality: pm_dc
> */
>
> /* DC State Flags */
> @@ -89,6 +93,7 @@
> #define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
> #define KMS_POLL_DISABLE 0
> #define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
> +#define MSECS 1000000
>
> IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
>
> @@ -584,6 +589,46 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
> return get_dc_counter(str);
> }
>
> +static void test_deep_pkgc_state(data_t *data)
> +{
> + unsigned int pre_val = 0, cur_val = 0;
> + time_t start = time(NULL), duration = 2, delay;
> + enum pipe pipe;
> + bool pkgc_flag;
Please initialize this flag with "false".
> + igt_display_t *display = &data->display;
> + igt_plane_t *primary;
> + igt_output_t *output;
> +
> + for_each_pipe_with_valid_output(display, pipe, output) {
> + igt_output_set_pipe(output, pipe);
Please do igt_display_reset()/igt_output_set_pipe(NULL) before setting
the output to pipe.
> + data->output = output;
> + data->mode = igt_output_get_mode(output);
> + setup_videoplayback(data);
> + igt_require(igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
> + igt_require(igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE));
Check for the config capabilities before setting up anything.
(Move these checks to just after initializing the loops)
if (!has_vrr_capable || !get_vrr_capable)
continue;
> +
> + 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);
> + while (time(NULL) - start < duration) {
> + igt_plane_set_fb(primary, &data->fb_rgb);
> + igt_display_commit(&data->display);
> + usleep(delay);
> +
> + igt_plane_set_fb(primary, &data->fb_rgr);
> + igt_display_commit(&data->display);
Why do we need 2 commits, lets simplify this as below:
pre_val = read_pkgc_counter(data->debugfs_root_fd);
delay = 1 * (MSECS / data->mode->vrefresh);
+
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+
+ flip = true;
+
while (time(NULL) - start < duration) {
- igt_plane_set_fb(primary, &data->fb_rgb);
+ flip = !flip;
+ igt_plane_set_fb(primary, flip ? &data->fb_rgb :
&data->fb_rgr);
igt_display_commit(&data->display);
- usleep(delay);
- igt_plane_set_fb(primary, &data->fb_rgr);
- igt_display_commit(&data->display);
cur_val = read_pkgc_counter(data->debugfs_root_fd);
if (cur_val > pre_val) {
pkgc_flag = true;
- continue;
+ break;
}
+ usleep(delay);
}
}
> + cur_val = read_pkgc_counter(data->debugfs_root_fd);
> + if (cur_val > pre_val) {
> + pkgc_flag = true;
> + continue;
If PKGC states achieved, we must do the "break" instead of "continue".
Right?
> + }
> + }
> + }
> + cleanup_dc3co_fbs(data);
> + igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
It'll throw an error if there is no valid output found, instead we must
skip.
- Bhanu
> +}
> +
> static void test_pkgc_state_dpms(data_t *data)
> {
> unsigned int timeout_sec = 6;
> @@ -687,6 +732,15 @@ igt_main
> test_dc_state_psr(&data, 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") {
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
@ 2024-05-27 17:39 Jeevan B
2024-05-28 4:40 ` Modem, Bhanuprakash
0 siblings, 1 reply; 12+ messages in thread
From: Jeevan B @ 2024-05-27 17:39 UTC (permalink / raw)
To: igt-dev; +Cc: bhanuprakash.modem, suraj.kandpal, Jeevan B
Add a new test to validate deep sleep states during extended vblank
scenarios, where two frames are committed simultaneously for a given
time with reduced refresh rate.
v2: dealy of one frame added to simulate extended vblank.
remove vrr related debug checks.
v3: fix typo and add define. (Suraj)
v4: fix structure and add skip if no vrr monitor found. (Bhanu)
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 78 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 78 insertions(+)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 7766d34d7..51416c2f0 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -76,6 +76,10 @@
*
* 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
+ * Functionality: pm_dc
*/
/* DC State Flags */
@@ -89,6 +93,7 @@
#define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
#define KMS_POLL_DISABLE 0
#define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
+#define MSECS 1000000
IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
@@ -584,6 +589,70 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
return get_dc_counter(str);
}
+static void test_deep_pkgc_state(data_t *data)
+{
+ 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;
+
+ 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
+ if (!vrr_supported)
+ igt_skip("No VRR capable output found, skipping the test.\n");
+
+ for_each_pipe_with_valid_output(display, pipe, output) {
+ igt_display_reset(display);
+ igt_output_set_pipe(output, PIPE_NONE);
+
+ if (!igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) ||
+ !igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
+ continue;
+ }
+
+ 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);
+
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+
+ while (time(NULL) - start < duration) {
+ flip = !flip;
+ igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
+ igt_display_commit(&data->display);
+
+ cur_val = read_pkgc_counter(data->debugfs_root_fd);
+ if (cur_val > pre_val) {
+ pkgc_flag = true;
+ break;
+ }
+ usleep(delay);
+ }
+ }
+ cleanup_dc3co_fbs(data);
+ igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+}
+
static void test_pkgc_state_dpms(data_t *data)
{
unsigned int timeout_sec = 6;
@@ -687,6 +756,15 @@ igt_main
test_dc_state_psr(&data, 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.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-27 17:39 Jeevan B
@ 2024-05-28 4:40 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2024-05-28 4:40 UTC (permalink / raw)
To: Jeevan B, igt-dev; +Cc: suraj.kandpal
Hi Jeevan,
On 27-05-2024 11:09 pm, Jeevan B wrote:
> Add a new test to validate deep sleep states during extended vblank
> scenarios, where two frames are committed simultaneously for a given
> time with reduced refresh rate.
> v2: dealy of one frame added to simulate extended vblank.
> remove vrr related debug checks.
> v3: fix typo and add define. (Suraj)
> v4: fix structure and add skip if no vrr monitor found. (Bhanu)
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 78 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 78 insertions(+)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index 7766d34d7..51416c2f0 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -76,6 +76,10 @@
> *
> * 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
> + * Functionality: pm_dc
> */
>
> /* DC State Flags */
> @@ -89,6 +93,7 @@
> #define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
> #define KMS_POLL_DISABLE 0
> #define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
> +#define MSECS 1000000
Please make this arch/compiler safe
#define MSECS (1000000ul)
>
> IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
>
> @@ -584,6 +589,70 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
> return get_dc_counter(str);
> }
>
> +static void test_deep_pkgc_state(data_t *data)
> +{
> + 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;
> +
> + 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
Please fix the comment style as
/* This is single line comment. */
/*
* This is multi-line
* comment.
*/
> + if (!vrr_supported)
> + igt_skip("No VRR capable output found, skipping the test.\n");
> +
> + for_each_pipe_with_valid_output(display, pipe, output) {
This loop is redundant, just capture the output in above loop & use it
here directly. No need to iterate all outputs again.
> + igt_display_reset(display);
> + igt_output_set_pipe(output, PIPE_NONE);
This is redundant, as igt_display_reset() is doing the same, please drop it.
> +
> + if (!igt_output_has_prop(output, IGT_CONNECTOR_VRR_CAPABLE) ||
> + !igt_output_get_prop(output, IGT_CONNECTOR_VRR_CAPABLE)) {
> + continue;
> + }
This check is no more required.
> +
> + 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);
To make sure to achieve the extended vblank, let's try with some value
which is less than the vrefresh.
Ex: 1 * (MSECS / (vrefresh - 10))
- Bhanu
> +
> + igt_plane_set_fb(primary, &data->fb_rgb);
> + igt_display_commit(&data->display);
> +
> + while (time(NULL) - start < duration) {
> + flip = !flip;
> + igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
> + igt_display_commit(&data->display);
> +
> + cur_val = read_pkgc_counter(data->debugfs_root_fd);
> + if (cur_val > pre_val) {
> + pkgc_flag = true;
> + break;
> + }
> + usleep(delay);
> + }
> + }
> + cleanup_dc3co_fbs(data);
> + igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
> +}
> +
> static void test_pkgc_state_dpms(data_t *data)
> {
> unsigned int timeout_sec = 6;
> @@ -687,6 +756,15 @@ igt_main
> test_dc_state_psr(&data, 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") {
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
@ 2024-05-28 10:09 Jeevan B
2024-05-28 10:12 ` Modem, Bhanuprakash
0 siblings, 1 reply; 12+ messages in thread
From: Jeevan B @ 2024-05-28 10:09 UTC (permalink / raw)
To: igt-dev; +Cc: bhanuprakash.modem, suraj.kandpal, Jeevan B
Add a new test to validate deep sleep states during extended vblank
scenarios, where two frames are committed simultaneously for a given
time with reduced refresh rate.
v2: dealy of one frame added to simulate extended vblank.
remove vrr related debug checks.
v3: fix typo and add define. (Suraj)
v4: fix structure and add skip if no vrr monitor found. (Bhanu)
v5: remove redundant code and correct delay logic. (Bhanu)
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 72 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 72 insertions(+)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 7766d34d7..7ce1b7051 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -76,6 +76,10 @@
*
* 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
+ * Functionality: pm_dc
*/
/* DC State Flags */
@@ -89,6 +93,7 @@
#define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
#define KMS_POLL_DISABLE 0
#define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
+#define MSECS (1000000ul)
IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
@@ -584,6 +589,64 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
return get_dc_counter(str);
}
+static void test_deep_pkgc_state(data_t *data)
+{
+ 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;
+
+ 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 */
+ if (!vrr_supported)
+ igt_skip("No VRR capable output found, skipping the test.\n");
+
+ igt_display_reset(display);
+
+ if (output) {
+ 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));
+
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+
+ while (time(NULL) - start < duration) {
+ flip = !flip;
+ igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
+ igt_display_commit(&data->display);
+
+ cur_val = read_pkgc_counter(data->debugfs_root_fd);
+ if (cur_val > pre_val) {
+ pkgc_flag = true;
+ break;
+ }
+ usleep(delay);
+ }
+ }
+ cleanup_dc3co_fbs(data);
+ igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+}
+
static void test_pkgc_state_dpms(data_t *data)
{
unsigned int timeout_sec = 6;
@@ -687,6 +750,15 @@ igt_main
test_dc_state_psr(&data, 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.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
2024-05-28 10:09 Jeevan B
@ 2024-05-28 10:12 ` Modem, Bhanuprakash
0 siblings, 0 replies; 12+ messages in thread
From: Modem, Bhanuprakash @ 2024-05-28 10:12 UTC (permalink / raw)
To: Jeevan B, igt-dev; +Cc: suraj.kandpal
Hi Jeevan,
On 28-05-2024 03:39 pm, Jeevan B wrote:
> Add a new test to validate deep sleep states during extended vblank
> scenarios, where two frames are committed simultaneously for a given
> time with reduced refresh rate.
> v2: dealy of one frame added to simulate extended vblank.
> remove vrr related debug checks.
> v3: fix typo and add define. (Suraj)
> v4: fix structure and add skip if no vrr monitor found. (Bhanu)
> v5: remove redundant code and correct delay logic. (Bhanu)
>
> Signed-off-by: Jeevan B <jeevan.b@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 72 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 72 insertions(+)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
> index 7766d34d7..7ce1b7051 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -76,6 +76,10 @@
> *
> * 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
> + * Functionality: pm_dc
> */
>
> /* DC State Flags */
> @@ -89,6 +93,7 @@
> #define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
> #define KMS_POLL_DISABLE 0
> #define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
> +#define MSECS (1000000ul)
>
> IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
>
> @@ -584,6 +589,64 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
> return get_dc_counter(str);
> }
>
> +static void test_deep_pkgc_state(data_t *data)
> +{
> + 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;
> +
> + 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 */
> + if (!vrr_supported)
> + igt_skip("No VRR capable output found, skipping the test.\n");
> +
> + igt_display_reset(display);
> +
> + if (output) {
Do we really need this check? if vrr_supported check is pass means there
is a valid output available.
Apart from that, overall patch looks good to me. You can use my R-b
after addressing above comment.
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
- Bhanu
> + 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));
> +
> + igt_plane_set_fb(primary, &data->fb_rgb);
> + igt_display_commit(&data->display);
> +
> + while (time(NULL) - start < duration) {
> + flip = !flip;
> + igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
> + igt_display_commit(&data->display);
> +
> + cur_val = read_pkgc_counter(data->debugfs_root_fd);
> + if (cur_val > pre_val) {
> + pkgc_flag = true;
> + break;
> + }
> + usleep(delay);
> + }
> + }
> + cleanup_dc3co_fbs(data);
> + igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
> +}
> +
> static void test_pkgc_state_dpms(data_t *data)
> {
> unsigned int timeout_sec = 6;
> @@ -687,6 +750,15 @@ igt_main
> test_dc_state_psr(&data, 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") {
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank
@ 2024-05-30 7:15 Jeevan B
0 siblings, 0 replies; 12+ messages in thread
From: Jeevan B @ 2024-05-30 7:15 UTC (permalink / raw)
To: igt-dev; +Cc: bhanuprakash.modem, suraj.kandpal, Jeevan B
Add a new test to validate deep sleep states during extended vblank
scenarios, where two frames are committed simultaneously for a given
time with reduced refresh rate.
v2: dealy of one frame added to simulate extended vblank.
remove vrr related debug checks.
v3: fix typo and add define. (Suraj)
v4: fix structure and add skip if no vrr monitor found. (Bhanu)
v5: remove redundant code and correct delay logic. (Bhanu)
Signed-off-by: Jeevan B <jeevan.b@intel.com>
Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
tests/intel/kms_pm_dc.c | 71 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 7766d34d7..e1318bfa6 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -76,6 +76,10 @@
*
* 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
+ * Functionality: pm_dc
*/
/* DC State Flags */
@@ -89,6 +93,7 @@
#define PACKAGE_CSTATE_PATH "pmc_core/package_cstate_show"
#define KMS_POLL_DISABLE 0
#define DC9_RESETS_DC_COUNTERS(devid) (!(IS_DG1(devid) || IS_DG2(devid) || AT_LEAST_DISPLAY(devid, 14)))
+#define MSECS (1000000ul)
IGT_TEST_DESCRIPTION("Tests to validate display power DC states.");
@@ -584,6 +589,63 @@ static unsigned int read_pkgc_counter(int debugfs_root_fd)
return get_dc_counter(str);
}
+static void test_deep_pkgc_state(data_t *data)
+{
+ 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;
+
+ 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 */
+ if (!vrr_supported)
+ igt_skip("No VRR capable output found, skipping the test.\n");
+
+ igt_display_reset(display);
+
+ 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));
+
+ igt_plane_set_fb(primary, &data->fb_rgb);
+ igt_display_commit(&data->display);
+
+ while (time(NULL) - start < duration) {
+ flip = !flip;
+ igt_plane_set_fb(primary, flip ? &data->fb_rgb : &data->fb_rgr);
+ igt_display_commit(&data->display);
+
+ cur_val = read_pkgc_counter(data->debugfs_root_fd);
+ if (cur_val > pre_val) {
+ pkgc_flag = true;
+ break;
+ }
+ usleep(delay);
+ }
+
+ cleanup_dc3co_fbs(data);
+ igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
+}
+
static void test_pkgc_state_dpms(data_t *data)
{
unsigned int timeout_sec = 6;
@@ -687,6 +749,15 @@ igt_main
test_dc_state_psr(&data, 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.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-05-30 7:08 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 4:19 [PATCH i-g-t] tests/intel/kms_pm_dc: Add a new test to validate the deep sleep state during extended vblank Jeevan B
2024-05-27 5:03 ` Kandpal, Suraj
2024-05-27 10:12 ` B, Jeevan
2024-05-27 6:30 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-05-27 6:36 ` ✗ GitLab.Pipeline: warning " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-05-27 10:21 [PATCH i-g-t] " Jeevan B
2024-05-27 13:03 ` Modem, Bhanuprakash
2024-05-27 17:39 Jeevan B
2024-05-28 4:40 ` Modem, Bhanuprakash
2024-05-28 10:09 Jeevan B
2024-05-28 10:12 ` Modem, Bhanuprakash
2024-05-30 7:15 Jeevan B
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox