All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
@ 2021-07-29 13:20 Jigar Bhatt
  2021-07-29 13:24 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jigar Bhatt @ 2021-07-29 13:20 UTC (permalink / raw)
  To: igt-dev; +Cc: nischal.varide

1. Currently, check_dc9 is being called with reference
(previous) counter being read after dpms_off call.
At this time, already the counter is 0.
We need to read the counter before dpms_off is called
so that it holds the previous value which had
incremented while testing shallow states (DC5 or DC6).

2. Check for a condition dc counter to be reset along with
system should in runtime suspend state :
currect_dc < prev_dc && i915 runtime status == SUSPENDED.
If above condition pass, test is passed otherwise test is failed.

3. adding dc9_dpms_off()

Signed-off-by: Jigar Bhatt <jigar.bhatt@intel.com>
---
 tests/i915/i915_pm_dc.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 9d0a15d81..a6fddb617 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -358,6 +358,15 @@ static void dpms_off(data_t *data)
 			   (IGT_RUNTIME_PM_STATUS_SUSPENDED));
 }
 
+static void dc9_dpms_off(data_t *data)
+{
+	for (int i = 0; i < data->display.n_outputs; i++) {
+		kmstest_set_connector_dpms(data->drm_fd,
+					   data->display.outputs[i].config.connector,
+					   DRM_MODE_DPMS_OFF);
+	}
+}
+
 static void dpms_on(data_t *data)
 {
 	for (int i = 0; i < data->display.n_outputs; i++) {
@@ -400,8 +409,11 @@ static bool check_dc9(uint32_t debugfs_fd, int prev_dc, bool dc6_supported, int
 	 * so we rely on dc5/dc6 counter reset to check if display engine was in DC9.
 	 */
 	return igt_wait(dc6_supported ? read_dc_counter(debugfs_fd, CHECK_DC6) <
-			prev_dc : read_dc_counter(debugfs_fd, CHECK_DC5) <
-			prev_dc, seconds, 100);
+			prev_dc &&
+			igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)
+			: read_dc_counter(debugfs_fd, CHECK_DC5) < prev_dc &&
+			igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
+			, seconds, 100);
 }
 
 static void setup_dc9_dpms(data_t *data, int prev_dc, bool dc6_supported)
@@ -418,15 +430,16 @@ static void setup_dc9_dpms(data_t *data, int prev_dc, bool dc6_supported)
 static void test_dc9_dpms(data_t *data)
 {
 	bool dc6_supported;
+	int prev_dc;
 
 	require_dc_counter(data->debugfs_fd, CHECK_DC5);
 	dc6_supported = support_dc6(data->debugfs_fd);
 	setup_dc9_dpms(data, dc6_supported ? read_dc_counter(data->debugfs_fd, CHECK_DC6) :
 			read_dc_counter(data->debugfs_fd, CHECK_DC5), dc6_supported);
-	dpms_off(data);
-	igt_assert_f(check_dc9(data->debugfs_fd, dc6_supported ?
-				read_dc_counter(data->debugfs_fd, CHECK_DC6) :
-				read_dc_counter(data->debugfs_fd, CHECK_DC5),
+	prev_dc = dc6_supported ? read_dc_counter(data->debugfs_fd, CHECK_DC6) :
+		read_dc_counter(data->debugfs_fd, CHECK_DC5);
+	dc9_dpms_off(data);
+	igt_assert_f(check_dc9(data->debugfs_fd, prev_dc,
 				dc6_supported, 3000), "Not in DC9\n");
 	dpms_on(data);
 }
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BUILD: failure for tests/i915/i915_pm_dc: Fix DC9 test
  2021-07-29 13:20 [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test Jigar Bhatt
@ 2021-07-29 13:24 ` Patchwork
  2021-07-29 14:26 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
  2021-08-04  5:51 ` [igt-dev] [PATCH i-g-t RFC] " Gupta, Anshuman
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-07-29 13:24 UTC (permalink / raw)
  To: Jigar Bhatt; +Cc: igt-dev

== Series Details ==

Series: tests/i915/i915_pm_dc: Fix DC9 test
URL   : https://patchwork.freedesktop.org/series/93180/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
354638455597ac48ac433606b24b82a4d7b65d20 Revert "tests/kms_plane_alpha_blend: Skip coverage-vs-premult-vs-none for 6bpc panels"

[299/447] Linking target tests/gem_ringfill.
[300/447] Linking target tests/gem_render_copy.
[301/447] Linking target tests/gem_render_linear_blits.
[302/447] Linking target tests/gem_render_tiled_blits.
[303/447] Linking target tests/gem_request_retire.
[304/447] Linking target tests/gem_set_tiling_vs_blt.
[305/447] Linking target tests/gem_reset_stats.
[306/447] Linking target tests/gem_set_tiling_vs_pwrite.
[307/447] Linking target tests/gem_set_tiling_vs_gtt.
[308/447] Linking target tests/gem_shrink.
[309/447] Linking target tests/gem_softpin.
[310/447] Linking target tests/gem_spin_batch.
[311/447] Linking target tests/gem_sync.
[312/447] Linking target tests/gem_streaming_writes.
[313/447] Linking target tests/gem_tiled_fence_blits.
[314/447] Linking target tests/gem_tiled_partial_pwrite_pread.
[315/447] Linking target tests/gem_tiled_blits.
[316/447] Linking target tests/gem_tiled_pread_pwrite.
[317/447] Linking target tests/gem_tiled_pread_basic.
[318/447] Linking target tests/gem_tiled_swapping.
[319/447] Linking target tests/gem_tiled_wb.
[320/447] Linking target tests/gem_tiling_max_stride.
[321/447] Linking target tests/gem_unfence_active_buffers.
[322/447] Linking target tests/gem_tiled_wc.
[323/447] Linking target tests/gem_userptr_blits.
[324/447] Linking target tests/gem_unref_active_buffers.
[325/447] Linking target tests/gem_vm_create.
[326/447] Linking target tests/gem_watchdog.
[327/447] Linking target tests/gem_wait.
[328/447] Linking target tests/gem_workarounds.
[329/447] Linking target tests/i915_module_load.
[330/447] Compiling C object 'tests/tests@@i915_pm_dc@exe/i915_i915_pm_dc.c.o'.
FAILED: tests/tests@@i915_pm_dc@exe/i915_i915_pm_dc.c.o 
ccache cc -Itests/tests@@i915_pm_dc@exe -Itests -I../tests -I../include/drm-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/x86_64-linux-gnu -I/usr/include/alsa -I/usr/include -I/home/cidrm/kernel_headers/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wimplicit-fallthrough=0 -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-clobbered -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-pointer-arith -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -pthread  -MD -MQ 'tests/tests@@i915_pm_dc@exe/i915_i915_pm_dc.c.o' -MF 'tests/tests@@i915_pm_dc@exe/i915_i915_pm_dc.c.o.d' -o 'tests/tests@@i915_pm_dc@exe/i915_i915_pm_dc.c.o' -c ../tests/i915/i915_pm_dc.c
In file included from ../lib/igt.h:30,
                 from ../tests/i915/i915_pm_dc.c:30:
../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
   if (COND) {      \
       ^~~~
../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
   if (COND) {      \
       ^~~~
ninja: build stopped: subcommand failed.


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ GitLab.Pipeline: warning for tests/i915/i915_pm_dc: Fix DC9 test
  2021-07-29 13:20 [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test Jigar Bhatt
  2021-07-29 13:24 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2021-07-29 14:26 ` Patchwork
  2021-08-04  5:51 ` [igt-dev] [PATCH i-g-t RFC] " Gupta, Anshuman
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2021-07-29 14:26 UTC (permalink / raw)
  To: Jigar Bhatt; +Cc: igt-dev

== Series Details ==

Series: tests/i915/i915_pm_dc: Fix DC9 test
URL   : https://patchwork.freedesktop.org/series/93180/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/370254 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/12308227):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565563:step_script
  section_start:1627565563:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565564:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/12308230):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565557:step_script
  section_start:1627565557:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565559:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/12308229):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565533:step_script
  section_start:1627565533:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565535:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/12308231):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
      igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
     if (COND) {      \
         ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565583:step_script
  section_start:1627565583:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565584:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/12308222):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565392:step_script
  section_start:1627565393:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565393: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/12308226):
  FAILED: tests/59830eb@@i915_pm_dc@exe/i915_i915_pm_dc.c.o 
  clang -Itests/59830eb@@i915_pm_dc@exe -Itests -I../tests -I../include/drm-uapi -Ilib -I../lib -I../lib/stubs/syscalls -I. -I../ -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libdrm -I/usr/include/libdrm/nouveau -I/usr/include/valgrind -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O2 -g -D_GNU_SOURCE -include config.h -D_FORTIFY_SOURCE=2 -Wbad-function-cast -Wdeclaration-after-statement -Wformat=2 -Wmissing-declarations -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wuninitialized -Wunused -Wno-missing-field-initializers -Wno-pointer-arith -Wno-address-of-packed-member -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-unused-result -Werror=address -Werror=array-bounds -Werror=implicit -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=nonnull -Werror=pointer-to-int-cast -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=write-strings -fno-builtin-malloc -fno-builtin-calloc -fcommon -pthread -MD -MQ 'tests/59830eb@@i915_pm_dc@exe/i915_i915_pm_dc.c.o' -MF 'tests/59830eb@@i915_pm_dc@exe/i915_i915_pm_dc.c.o.d' -o 'tests/59830eb@@i915_pm_dc@exe/i915_i915_pm_dc.c.o' -c ../tests/i915/i915_pm_dc.c
  ../tests/i915/i915_pm_dc.c:415:27: error: use of undeclared identifier 'IGT_RUNTIME_STATUS_PM_SUSPENDED'; did you mean 'IGT_RUNTIME_PM_STATUS_SUSPENDED'?
                          igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 IGT_RUNTIME_PM_STATUS_SUSPENDED
  ../lib/igt_aux.h:266:7: note: expanded from macro 'igt_wait'
                  if (COND) {                                             \
                      ^
  ../lib/igt_pm.h:43:2: note: 'IGT_RUNTIME_PM_STATUS_SUSPENDED' declared here
          IGT_RUNTIME_PM_STATUS_SUSPENDED,
          ^
  1 error generated.
  ninja: build stopped: subcommand failed.
  section_end:1627565464:step_script
  section_start:1627565464:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565466: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/12308225):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565461:step_script
  section_start:1627565461:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565492: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/12308223):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565519:step_script
  section_start:1627565519:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565525: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/12308224):
  ../tests/i915/i915_pm_dc.c: In function ‘check_dc9’:
  ../tests/i915/i915_pm_dc.c:415:27: error: ‘IGT_RUNTIME_STATUS_PM_SUSPENDED’ undeclared (first use in this function); did you mean ‘IGT_RUNTIME_PM_STATUS_SUSPENDED’?
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ../tests/i915/i915_pm_dc.c:415:27: note: each undeclared identifier is reported only once for each function it appears in
    415 |    igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
        |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/igt_aux.h:266:7: note: in definition of macro ‘igt_wait’
    266 |   if (COND) {      \
        |       ^~~~
  ninja: build stopped: subcommand failed.
  section_end:1627565492:step_script
  section_start:1627565492:cleanup_file_variables
  Cleaning up file based variables
  section_end:1627565493:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/370254
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
@ 2021-07-29 14:41 Jigar Bhatt
  0 siblings, 0 replies; 6+ messages in thread
From: Jigar Bhatt @ 2021-07-29 14:41 UTC (permalink / raw)
  To: igt-dev; +Cc: nischal.varide

1. Currently, check_dc9 is being called with reference
(previous) counter being read after dpms_off call.
At this time, already the counter is 0.
We need to read the counter before dpms_off is called
so that it holds the previous value which had
incremented while testing shallow states (DC5 or DC6).

2. Check for a condition dc counter to be reset along with
system should in runtime suspend state :
currect_dc < prev_dc && i915 runtime status == SUSPENDED.
If above condition pass, test is passed otherwise test is failed.

3. adding dc9_dpms_off()

Signed-off-by: Jigar Bhatt <jigar.bhatt@intel.com>
---
 tests/i915/i915_pm_dc.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 9d0a15d81..a6fddb617 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -358,6 +358,15 @@ static void dpms_off(data_t *data)
 			   (IGT_RUNTIME_PM_STATUS_SUSPENDED));
 }
 
+static void dc9_dpms_off(data_t *data)
+{
+	for (int i = 0; i < data->display.n_outputs; i++) {
+		kmstest_set_connector_dpms(data->drm_fd,
+					   data->display.outputs[i].config.connector,
+					   DRM_MODE_DPMS_OFF);
+	}
+}
+
 static void dpms_on(data_t *data)
 {
 	for (int i = 0; i < data->display.n_outputs; i++) {
@@ -400,8 +409,11 @@ static bool check_dc9(uint32_t debugfs_fd, int prev_dc, bool dc6_supported, int
 	 * so we rely on dc5/dc6 counter reset to check if display engine was in DC9.
 	 */
 	return igt_wait(dc6_supported ? read_dc_counter(debugfs_fd, CHECK_DC6) <
-			prev_dc : read_dc_counter(debugfs_fd, CHECK_DC5) <
-			prev_dc, seconds, 100);
+			prev_dc &&
+			igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)
+			: read_dc_counter(debugfs_fd, CHECK_DC5) < prev_dc &&
+			igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)
+			, seconds, 100);
 }
 
 static void setup_dc9_dpms(data_t *data, int prev_dc, bool dc6_supported)
@@ -418,15 +430,16 @@ static void setup_dc9_dpms(data_t *data, int prev_dc, bool dc6_supported)
 static void test_dc9_dpms(data_t *data)
 {
 	bool dc6_supported;
+	int prev_dc;
 
 	require_dc_counter(data->debugfs_fd, CHECK_DC5);
 	dc6_supported = support_dc6(data->debugfs_fd);
 	setup_dc9_dpms(data, dc6_supported ? read_dc_counter(data->debugfs_fd, CHECK_DC6) :
 			read_dc_counter(data->debugfs_fd, CHECK_DC5), dc6_supported);
-	dpms_off(data);
-	igt_assert_f(check_dc9(data->debugfs_fd, dc6_supported ?
-				read_dc_counter(data->debugfs_fd, CHECK_DC6) :
-				read_dc_counter(data->debugfs_fd, CHECK_DC5),
+	prev_dc = dc6_supported ? read_dc_counter(data->debugfs_fd, CHECK_DC6) :
+		read_dc_counter(data->debugfs_fd, CHECK_DC5);
+	dc9_dpms_off(data);
+	igt_assert_f(check_dc9(data->debugfs_fd, prev_dc,
 				dc6_supported, 3000), "Not in DC9\n");
 	dpms_on(data);
 }
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
  2021-07-29 13:20 [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test Jigar Bhatt
  2021-07-29 13:24 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
  2021-07-29 14:26 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
@ 2021-08-04  5:51 ` Gupta, Anshuman
  2021-08-05  4:01   ` Bhatt, Jigar
  2 siblings, 1 reply; 6+ messages in thread
From: Gupta, Anshuman @ 2021-08-04  5:51 UTC (permalink / raw)
  To: Bhatt, Jigar, igt-dev@lists.freedesktop.org; +Cc: Varide, Nischal, Shankar, Uma



> -----Original Message-----
> From: Bhatt, Jigar <jigar.bhatt@intel.com>
> Sent: Thursday, July 29, 2021 6:50 PM
> To: igt-dev@lists.freedesktop.org
> Cc: Bhatt, Jigar <jigar.bhatt@intel.com>; Varide, Nischal
> <nischal.varide@intel.com>; Gupta, Anshuman <anshuman.gupta@intel.com>;
> Shankar, Uma <uma.shankar@intel.com>
> Subject: [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
> 
Please use the standard patch header format.
> 1. Currently, check_dc9 is being called with reference
> (previous) counter being read after dpms_off call.
> At this time, already the counter is 0.
> We need to read the counter before dpms_off is called so that it holds the
> previous value which had incremented while testing shallow states (DC5 or DC6).
> 
> 2. Check for a condition dc counter to be reset along with system should in
> runtime suspend state :
> currect_dc < prev_dc && i915 runtime status == SUSPENDED.
> If above condition pass, test is passed otherwise test is failed.
> 
> 3. adding dc9_dpms_off()
> 
> Signed-off-by: Jigar Bhatt <jigar.bhatt@intel.com>
> ---
>  tests/i915/i915_pm_dc.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index
> 9d0a15d81..a6fddb617 100644
> --- a/tests/i915/i915_pm_dc.c
> +++ b/tests/i915/i915_pm_dc.c
> @@ -358,6 +358,15 @@ static void dpms_off(data_t *data)
>  			   (IGT_RUNTIME_PM_STATUS_SUSPENDED));
>  }
> 
> +static void dc9_dpms_off(data_t *data)
> +{
> +	for (int i = 0; i < data->display.n_outputs; i++) {
> +		kmstest_set_connector_dpms(data->drm_fd,
> +					   data-
> >display.outputs[i].config.connector,
> +					   DRM_MODE_DPMS_OFF);
> +	}
> +}
> +
>  static void dpms_on(data_t *data)
>  {
>  	for (int i = 0; i < data->display.n_outputs; i++) { @@ -400,8 +409,11 @@
> static bool check_dc9(uint32_t debugfs_fd, int prev_dc, bool dc6_supported, int
>  	 * so we rely on dc5/dc6 counter reset to check if display engine was in
> DC9.
>  	 */
>  	return igt_wait(dc6_supported ? read_dc_counter(debugfs_fd,
> CHECK_DC6) <
> -			prev_dc : read_dc_counter(debugfs_fd, CHECK_DC5) <
> -			prev_dc, seconds, 100);
> +			prev_dc &&
> +
> 	igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)
Don't use igt_wait_for_pm_status here , it waits for 10 seconds internally.
We just need i915 runtime pm status and that should check against suspended.
This will waste may CI cycles.
Br,
Anshuman
> +			: read_dc_counter(debugfs_fd, CHECK_DC5) < prev_dc
> &&
> +
> 	igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
> +			, seconds, 100);
>  }
> 
>  static void setup_dc9_dpms(data_t *data, int prev_dc, bool dc6_supported)
> @@ -418,15 +430,16 @@ static void setup_dc9_dpms(data_t *data, int
> prev_dc, bool dc6_supported)  static void test_dc9_dpms(data_t *data)  {
>  	bool dc6_supported;
> +	int prev_dc;
> 
>  	require_dc_counter(data->debugfs_fd, CHECK_DC5);
>  	dc6_supported = support_dc6(data->debugfs_fd);
>  	setup_dc9_dpms(data, dc6_supported ? read_dc_counter(data-
> >debugfs_fd, CHECK_DC6) :
>  			read_dc_counter(data->debugfs_fd, CHECK_DC5),
> dc6_supported);
> -	dpms_off(data);
> -	igt_assert_f(check_dc9(data->debugfs_fd, dc6_supported ?
> -				read_dc_counter(data->debugfs_fd,
> CHECK_DC6) :
> -				read_dc_counter(data->debugfs_fd,
> CHECK_DC5),
> +	prev_dc = dc6_supported ? read_dc_counter(data->debugfs_fd,
> CHECK_DC6) :
> +		read_dc_counter(data->debugfs_fd, CHECK_DC5);
> +	dc9_dpms_off(data);
> +	igt_assert_f(check_dc9(data->debugfs_fd, prev_dc,
>  				dc6_supported, 3000), "Not in DC9\n");
>  	dpms_on(data);
>  }
> --
> 2.25.1

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

* Re: [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
  2021-08-04  5:51 ` [igt-dev] [PATCH i-g-t RFC] " Gupta, Anshuman
@ 2021-08-05  4:01   ` Bhatt, Jigar
  0 siblings, 0 replies; 6+ messages in thread
From: Bhatt, Jigar @ 2021-08-05  4:01 UTC (permalink / raw)
  To: Gupta, Anshuman, igt-dev@lists.freedesktop.org
  Cc: Varide, Nischal, Shankar, Uma

Hi Anshuman,

-----Original Message-----
From: Gupta, Anshuman <anshuman.gupta@intel.com> 
Sent: Wednesday, August 4, 2021 11:21 AM
To: Bhatt, Jigar <jigar.bhatt@intel.com>; igt-dev@lists.freedesktop.org
Cc: Varide, Nischal <nischal.varide@intel.com>; Shankar, Uma <uma.shankar@intel.com>
Subject: RE: [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test



> -----Original Message-----
> From: Bhatt, Jigar <jigar.bhatt@intel.com>
> Sent: Thursday, July 29, 2021 6:50 PM
> To: igt-dev@lists.freedesktop.org
> Cc: Bhatt, Jigar <jigar.bhatt@intel.com>; Varide, Nischal 
> <nischal.varide@intel.com>; Gupta, Anshuman 
> <anshuman.gupta@intel.com>; Shankar, Uma <uma.shankar@intel.com>
> Subject: [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test
> 
Please use the standard patch header format.
> 1. Currently, check_dc9 is being called with reference
> (previous) counter being read after dpms_off call.
> At this time, already the counter is 0.
> We need to read the counter before dpms_off is called so that it holds 
> the previous value which had incremented while testing shallow states (DC5 or DC6).
> 
> 2. Check for a condition dc counter to be reset along with system 
> should in runtime suspend state :
> currect_dc < prev_dc && i915 runtime status == SUSPENDED.
> If above condition pass, test is passed otherwise test is failed.
> 
> 3. adding dc9_dpms_off()
> 
> Signed-off-by: Jigar Bhatt <jigar.bhatt@intel.com>
> ---
>  tests/i915/i915_pm_dc.c | 25 +++++++++++++++++++------
>  1 file changed, 19 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index
> 9d0a15d81..a6fddb617 100644
> --- a/tests/i915/i915_pm_dc.c
> +++ b/tests/i915/i915_pm_dc.c
> @@ -358,6 +358,15 @@ static void dpms_off(data_t *data)
>     (IGT_RUNTIME_PM_STATUS_SUSPENDED));
>  }
> 
> +static void dc9_dpms_off(data_t *data) { for (int i = 0; i < 
> +data->display.n_outputs; i++) { 
> +kmstest_set_connector_dpms(data->drm_fd,
> +   data-
> >display.outputs[i].config.connector,
> +   DRM_MODE_DPMS_OFF);
> +}
> +}
> +
>  static void dpms_on(data_t *data)
>  {
>  for (int i = 0; i < data->display.n_outputs; i++) { @@ -400,8 +409,11 
> @@ static bool check_dc9(uint32_t debugfs_fd, int prev_dc, bool dc6_supported, int
>   * so we rely on dc5/dc6 counter reset to check if display engine was 
> in DC9.
>   */
>  return igt_wait(dc6_supported ? read_dc_counter(debugfs_fd,
> CHECK_DC6) <
> -prev_dc : read_dc_counter(debugfs_fd, CHECK_DC5) < -prev_dc, seconds, 
> 100);
> +prev_dc &&
> +
> igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED)
Don't use igt_wait_for_pm_status here , it waits for 10 seconds internally.
We just need i915 runtime pm status and that should check against suspended.
This will waste may CI cycles.
Br,
Anshuman

If we are not using this igt_wait_for_status then it will check status only one time and mostly it has active status.
and after dpms_off it will take some time to be suspended that's why this igt_wait_for_status has
max 10 sec wait loop if status == SUSPENDED then it will automatically getting out of waiting time(10 sec).

If we only depend on i915 runtime status after immediate DPMS_OFF then it will take some milliseconds for getting SUSPENDED.

Thanks and Regards,
Jigar Bhatt
> +: read_dc_counter(debugfs_fd, CHECK_DC5) < prev_dc
> &&
> +
> igt_wait_for_pm_status(IGT_RUNTIME_STATUS_PM_SUSPENDED)
> +, seconds, 100);
>  }
> 
>  static void setup_dc9_dpms(data_t *data, int prev_dc, bool 
> dc6_supported) @@ -418,15 +430,16 @@ static void setup_dc9_dpms(data_t 
> *data, int prev_dc, bool dc6_supported)  static void 
> test_dc9_dpms(data_t *data)  {  bool dc6_supported;
> +int prev_dc;
> 
>  require_dc_counter(data->debugfs_fd, CHECK_DC5);  dc6_supported = 
> support_dc6(data->debugfs_fd);  setup_dc9_dpms(data, dc6_supported ? 
> read_dc_counter(data-
> >debugfs_fd, CHECK_DC6) :
>  read_dc_counter(data->debugfs_fd, CHECK_DC5), dc6_supported); 
> -dpms_off(data); -igt_assert_f(check_dc9(data->debugfs_fd, 
> dc6_supported ?
> -read_dc_counter(data->debugfs_fd,
> CHECK_DC6) :
> -read_dc_counter(data->debugfs_fd,
> CHECK_DC5),
> +prev_dc = dc6_supported ? read_dc_counter(data->debugfs_fd,
> CHECK_DC6) :
> +read_dc_counter(data->debugfs_fd, CHECK_DC5); dc9_dpms_off(data); 
> +igt_assert_f(check_dc9(data->debugfs_fd, prev_dc,
>  dc6_supported, 3000), "Not in DC9\n");  dpms_on(data);  }
> --
> 2.25.1


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

end of thread, other threads:[~2021-08-05  4:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 13:20 [igt-dev] [PATCH i-g-t RFC] tests/i915/i915_pm_dc: Fix DC9 test Jigar Bhatt
2021-07-29 13:24 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
2021-07-29 14:26 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-04  5:51 ` [igt-dev] [PATCH i-g-t RFC] " Gupta, Anshuman
2021-08-05  4:01   ` Bhatt, Jigar
  -- strict thread matches above, loose matches on Subject: below --
2021-07-29 14:41 Jigar Bhatt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.