Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
@ 2023-06-06 20:35 Vinay Belgaumkar
  2023-06-06 20:49 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Vinay Belgaumkar @ 2023-06-06 20:35 UTC (permalink / raw)
  To: intel-gfx, igt-dev

Verify that SLPC API works as expected after a suspend.

Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
index 9005cd220..f35f1f8e0 100644
--- a/tests/i915/i915_pm_freq_api.c
+++ b/tests/i915/i915_pm_freq_api.c
@@ -18,6 +18,9 @@
  *
  * SUBTEST: freq-reset
  * Description: Test basic freq API works after a reset
+ *
+ * SUBTEST: freq-suspend
+ * Description: Test basic freq API works after a runtime suspend
  */
 
 IGT_TEST_DESCRIPTION("Test SLPC freq API");
@@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
 	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
 }
 
+static void test_suspend(int i915, int dirfd, int gt)
+{
+	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
+
+	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
+	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
+	usleep(ACT_FREQ_LATENCY_US);
+	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
+	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
+
+	/* Manually trigger a suspend */
+	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
+				      SUSPEND_TEST_NONE);
+
+	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
+	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
+}
+
 igt_main
 {
 	int i915 = -1;
@@ -143,6 +164,15 @@ igt_main
 				test_reset(i915, dirfd, gt);
 	}
 
+	igt_describe("Test basic freq API works after suspend");
+	igt_subtest_with_dynamic_f("freq-suspend") {
+		int dirfd, gt;
+
+		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
+			igt_dynamic_f("gt%u", gt)
+				test_suspend(i915, dirfd, gt);
+	}
+
 	igt_fixture {
 		int dirfd, gt;
 		/* Restore frequencies */
-- 
2.38.1

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

* [igt-dev] ✗ GitLab.Pipeline: warning for tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
@ 2023-06-06 20:49 ` Patchwork
  2023-06-06 21:25 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2023-06-06 20:49 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: igt-dev

== Series Details ==

Series: tests/i915_pm_freq_api: Add a suspend subtest
URL   : https://patchwork.freedesktop.org/series/118969/
State : warning

== Summary ==

Pipeline status: FAILED.

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

build-containers:build-debian-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/43228989):
          "intel-IGT_5164"
      ],
      "Created": "2019-11-20T12:54:52.073706506Z",
      "DockerVersion": "",
      "Labels": {},
      "Architecture": "amd64",
      "Os": "linux",
      "Layers": [
          "sha256:45252bb38c9c74dfe76c4b3808269db61d3b2aebe5e26bf7fcd85e48b93e16f9"
      ]
  }
  Skipping, already built
  Getting image source signatures
  time="2023-06-06T20:47:09Z" level=fatal msg="Error trying to reuse blob sha256:45252bb38c9c74dfe76c4b3808269db61d3b2aebe5e26bf7fcd85e48b93e16f9 at destination: failed to read from destination repository gfx-ci/igt-ci-tags/build-debian-armhf: 500 (Internal Server Error)" 
  section_end:1686084430:step_script
  section_start:1686084430:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1686084430:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build-containers:build-debian-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/43228991):
  time="2023-06-06T20:47:07Z" level=fatal msg="Error determining repository tags: Invalid status code returned when fetching tags list 500 (Internal Server Error)" 
  Building!
  STEP 1: FROM debian:buster
  Getting image source signatures
  Copying blob sha256:c722db24a050621ee87ea07acd5d066d3d6a94737c32012f27d73a1ad5cc645c
  Copying config sha256:8b5601a5a7f855241ac7f372ec0042e793b0b3eb3f3a601014845f22bd371c90
  Writing manifest to image destination
  Storing signatures
  STEP 2: RUN apt-get update
  error running container: error creating container for [/bin/sh -c apt-get update]: time="2023-06-06T20:47:11Z" level=warning msg="signal: killed"
  time="2023-06-06T20:47:11Z" level=error msg="container_linux.go:346: starting container process caused \"process_linux.go:297: applying cgroup configuration for process caused \\\"mountpoint for cgroup not found\\\"\"\n"
  container_linux.go:346: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"mountpoint for cgroup not found\""
  : exit status 1
  Error: error building at STEP "RUN apt-get update": error while running runtime: exit status 1
  section_end:1686084432:step_script
  section_start:1686084432:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1686084432:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build-containers:build-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/43228992):
  time="2023-06-06T20:47:10Z" level=fatal msg="Error determining repository tags: Invalid status code returned when fetching tags list 500 (Internal Server Error)" 
  Building!
  STEP 1: FROM fedora:31
  Getting image source signatures
  Copying blob sha256:854946d575a439a894349addd141568875d7c1e673d3286b08250f3dde002e6a
  Copying config sha256:7e94ed77b448a8d2ff08b92d3ca743e4e862c744892d6886c73487581eb5863a
  Writing manifest to image destination
  Storing signatures
  STEP 2: RUN dnf install -y 	gcc flex bison libatomic meson ninja-build xdotool 	'pkgconfig(libdrm)' 	'pkgconfig(pciaccess)' 	'pkgconfig(libkmod)' 	'pkgconfig(libprocps)' 	'pkgconfig(libunwind)' 	'pkgconfig(libdw)' 	'pkgconfig(pixman-1)' 	'pkgconfig(valgrind)' 	'pkgconfig(cairo)' 	'pkgconfig(libudev)' 	'pkgconfig(glib-2.0)' 	'pkgconfig(gsl)' 	'pkgconfig(alsa)' 	'pkgconfig(xmlrpc)' 	'pkgconfig(xmlrpc_util)' 	'pkgconfig(xmlrpc_client)' 	'pkgconfig(json-c)' 	'pkgconfig(gtk-doc)' 	'pkgconfig(xv)' 	'pkgconfig(xrandr)' 	python3-docutils
  error running container: error creating container for [/bin/sh -c dnf install -y 	gcc flex bison libatomic meson ninja-build xdotool 	'pkgconfig(libdrm)' 	'pkgconfig(pciaccess)' 	'pkgconfig(libkmod)' 	'pkgconfig(libprocps)' 	'pkgconfig(libunwind)' 	'pkgconfig(libdw)' 	'pkgconfig(pixman-1)' 	'pkgconfig(valgrind)' 	'pkgconfig(cairo)' 	'pkgconfig(libudev)' 	'pkgconfig(glib-2.0)' 	'pkgconfig(gsl)' 	'pkgconfig(alsa)' 	'pkgconfig(xmlrpc)' 	'pkgconfig(xmlrpc_util)' 	'pkgconfig(xmlrpc_client)' 	'pkgconfig(json-c)' 	'pkgconfig(gtk-doc)' 	'pkgconfig(xv)' 	'pkgconfig(xrandr)' 	python3-docutils]: time="2023-06-06T20:47:14Z" level=warning msg="signal: killed"
  time="2023-06-06T20:47:14Z" level=error msg="container_linux.go:346: starting container process caused \"process_linux.go:297: applying cgroup configuration for process caused \\\"mountpoint for cgroup not found\\\"\"\n"
  container_linux.go:346: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused \"mountpoint for cgroup not found\""
  : exit status 1
  Error: error building at STEP "RUN dnf install -y 	gcc flex bison libatomic meson ninja-build xdotool 	'pkgconfig(libdrm)' 	'pkgconfig(pciaccess)' 	'pkgconfig(libkmod)' 	'pkgconfig(libprocps)' 	'pkgconfig(libunwind)' 	'pkgconfig(libdw)' 	'pkgconfig(pixman-1)' 	'pkgconfig(valgrind)' 	'pkgconfig(cairo)' 	'pkgconfig(libudev)' 	'pkgconfig(glib-2.0)' 	'pkgconfig(gsl)' 	'pkgconfig(alsa)' 	'pkgconfig(xmlrpc)' 	'pkgconfig(xmlrpc_util)' 	'pkgconfig(xmlrpc_client)' 	'pkgconfig(json-c)' 	'pkgconfig(gtk-doc)' 	'pkgconfig(xv)' 	'pkgconfig(xrandr)' 	python3-docutils": error while running runtime: exit status 1
  section_end:1686084434:step_script
  section_start:1686084434:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1686084436:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/901590

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

* [igt-dev] ✓ Fi.CI.BAT: success for tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
  2023-06-06 20:49 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
@ 2023-06-06 21:25 ` Patchwork
  2023-06-07 12:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2023-06-07 21:12 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2023-06-06 21:25 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 5712 bytes --]

== Series Details ==

Series: tests/i915_pm_freq_api: Add a suspend subtest
URL   : https://patchwork.freedesktop.org/series/118969/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13238 -> IGTPW_9121
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html

Participating hosts (41 -> 40)
------------------------------

  Missing    (1): fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_9121:

### IGT changes ###

#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-dp-5:
    - {bat-adlp-11}:      [PASS][1] -> [FAIL][2] +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-adlp-11/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-dp-5.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-adlp-11/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-c-dp-5.html

  
New tests
---------

  New tests have been introduced between CI_DRM_13238 and IGTPW_9121:

### New IGT tests (1) ###

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-b-dp-5:
    - Statuses : 1 pass(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in IGTPW_9121 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@requests:
    - bat-rpls-2:         [PASS][3] -> [ABORT][4] ([i915#7913] / [i915#7982])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-rpls-2/igt@i915_selftest@live@requests.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-rpls-2/igt@i915_selftest@live@requests.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - bat-dg2-11:         NOTRUN -> [SKIP][5] ([i915#7828])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-dg2-11/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
    - bat-adlm-1:         NOTRUN -> [SKIP][6] ([i915#7828])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-adlm-1/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
    - bat-dg2-8:          [PASS][7] -> [FAIL][8] ([i915#7932])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1.html

  * igt@kms_pipe_crc_basic@suspend-read-crc:
    - bat-adlm-1:         NOTRUN -> [SKIP][9] ([i915#1845])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-adlm-1/igt@kms_pipe_crc_basic@suspend-read-crc.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg2-11:         [ABORT][10] ([i915#7913] / [i915#7979]) -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-dg2-11/igt@i915_selftest@live@hangcheck.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-dg2-11/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@workarounds:
    - bat-adlm-1:         [INCOMPLETE][12] ([i915#4983] / [i915#7677]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/bat-adlm-1/igt@i915_selftest@live@workarounds.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/bat-adlm-1/igt@i915_selftest@live@workarounds.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
  [i915#6818]: https://gitlab.freedesktop.org/drm/intel/issues/6818
  [i915#6868]: https://gitlab.freedesktop.org/drm/intel/issues/6868
  [i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7677]: https://gitlab.freedesktop.org/drm/intel/issues/7677
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
  [i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
  [i915#7953]: https://gitlab.freedesktop.org/drm/intel/issues/7953
  [i915#7979]: https://gitlab.freedesktop.org/drm/intel/issues/7979
  [i915#7982]: https://gitlab.freedesktop.org/drm/intel/issues/7982


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7320 -> IGTPW_9121

  CI-20190529: 20190529
  CI_DRM_13238: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_9121: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html
  IGT_7320: 1c96b08a4cde6f2d49824a8cc3303bd860617b52 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

+igt@i915_pm_freq_api@freq-suspend

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html

[-- Attachment #2: Type: text/html, Size: 5916 bytes --]

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

* [igt-dev] ✓ Fi.CI.IGT: success for tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
  2023-06-06 20:49 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
  2023-06-06 21:25 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2023-06-07 12:27 ` Patchwork
  2023-06-07 21:12 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
  3 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2023-06-07 12:27 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 16742 bytes --]

== Series Details ==

Series: tests/i915_pm_freq_api: Add a suspend subtest
URL   : https://patchwork.freedesktop.org/series/118969/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_13238_full -> IGTPW_9121_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html

Participating hosts (7 -> 7)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_9121_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@i915_pm_freq_api@freq-suspend} (NEW):
    - {shard-rkl}:        NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-rkl-3/igt@i915_pm_freq_api@freq-suspend.html
    - {shard-tglu}:       NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-tglu-3/igt@i915_pm_freq_api@freq-suspend.html

  
New tests
---------

  New tests have been introduced between CI_DRM_13238_full and IGTPW_9121_full:

### New IGT tests (2) ###

  * igt@i915_pm_freq_api@freq-suspend:
    - Statuses : 5 skip(s)
    - Exec time: [0.0] s

  * igt@i915_pm_freq_api@freq-suspend@gt0:
    - Statuses : 1 pass(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in IGTPW_9121_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@engines-hang:
    - shard-snb:          NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1099])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb5/igt@gem_ctx_persistence@engines-hang.html

  * {igt@i915_pm_freq_api@freq-suspend} (NEW):
    - shard-apl:          NOTRUN -> [SKIP][4] ([fdo#109271])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-apl7/igt@i915_pm_freq_api@freq-suspend.html
    - shard-glk:          NOTRUN -> [SKIP][5] ([fdo#109271])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-glk8/igt@i915_pm_freq_api@freq-suspend.html

  * igt@kms_async_flips@alternate-sync-async-flip@pipe-a-hdmi-a-2:
    - shard-glk:          [PASS][6] -> [FAIL][7] ([i915#2521])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk9/igt@kms_async_flips@alternate-sync-async-flip@pipe-a-hdmi-a-2.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-glk1/igt@kms_async_flips@alternate-sync-async-flip@pipe-a-hdmi-a-2.html

  * igt@kms_ccs@pipe-c-missing-ccs-buffer-4_tiled_mtl_rc_ccs:
    - shard-snb:          NOTRUN -> [SKIP][8] ([fdo#109271]) +55 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb2/igt@kms_ccs@pipe-c-missing-ccs-buffer-4_tiled_mtl_rc_ccs.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-glk:          [PASS][9] -> [FAIL][10] ([i915#2346]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-glk7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-glk3/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@plain-flip-ts-check@b-dp1:
    - shard-apl:          [PASS][11] -> [FAIL][12] ([i915#2122])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl2/igt@kms_flip@plain-flip-ts-check@b-dp1.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-apl4/igt@kms_flip@plain-flip-ts-check@b-dp1.html

  * igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-b-hdmi-a-1:
    - shard-snb:          NOTRUN -> [SKIP][13] ([fdo#109271] / [i915#4579]) +14 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb1/igt@kms_plane_scaling@plane-upscale-with-modifiers-factor-0-25@pipe-b-hdmi-a-1.html

  * igt@kms_setmode@basic@pipe-a-hdmi-a-1:
    - shard-snb:          NOTRUN -> [FAIL][14] ([i915#5465]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb1/igt@kms_setmode@basic@pipe-a-hdmi-a-1.html

  
#### Possible fixes ####

  * igt@gem_barrier_race@remote-request@rcs0:
    - {shard-dg1}:        [ABORT][15] ([i915#7461] / [i915#8234]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-18/igt@gem_barrier_race@remote-request@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-dg1-14/igt@gem_barrier_race@remote-request@rcs0.html

  * igt@gem_ctx_freq@sysfs:
    - {shard-dg1}:        [FAIL][17] ([i915#6786]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-16/igt@gem_ctx_freq@sysfs.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-dg1-12/igt@gem_ctx_freq@sysfs.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-apl:          [FAIL][19] ([i915#2842]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl4/igt@gem_exec_fair@basic-none-solo@rcs0.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-apl2/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - {shard-rkl}:        [FAIL][21] ([i915#2842]) -> [PASS][22] +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-rkl-1/igt@gem_exec_fair@basic-none@vecs0.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-rkl-6/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@i915_module_load@reload:
    - shard-snb:          [ABORT][23] ([i915#4528]) -> [PASS][24]
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-snb5/igt@i915_module_load@reload.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb2/igt@i915_module_load@reload.html

  * igt@i915_pm_rc6_residency@rc6-idle@rcs0:
    - {shard-dg1}:        [FAIL][25] ([i915#3591]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-18/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-dg1-17/igt@i915_pm_rc6_residency@rc6-idle@rcs0.html

  * igt@i915_pm_rpm@modeset-non-lpsp:
    - {shard-dg1}:        [SKIP][27] ([i915#1397]) -> [PASS][28] +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-19/igt@i915_pm_rpm@modeset-non-lpsp.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-dg1-18/igt@i915_pm_rpm@modeset-non-lpsp.html

  * igt@i915_pm_rpm@modeset-non-lpsp-stress:
    - {shard-rkl}:        [SKIP][29] ([i915#1397]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-rkl-7/igt@i915_pm_rpm@modeset-non-lpsp-stress.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-rkl-6/igt@i915_pm_rpm@modeset-non-lpsp-stress.html

  * igt@i915_pm_rps@reset:
    - shard-snb:          [INCOMPLETE][31] ([i915#7790]) -> [PASS][32]
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-snb1/igt@i915_pm_rps@reset.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-snb5/igt@i915_pm_rps@reset.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-apl:          [FAIL][33] ([i915#2346]) -> [PASS][34] +1 similar issue
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl6/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-apl4/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@forked-move@pipe-b:
    - {shard-dg1}:        [INCOMPLETE][35] ([i915#8011] / [i915#8347]) -> [PASS][36]
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-dg1-19/igt@kms_cursor_legacy@forked-move@pipe-b.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-dg1-16/igt@kms_cursor_legacy@forked-move@pipe-b.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [FAIL][37] ([i915#4767]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-apl6/igt@kms_fbcon_fbt@fbc-suspend.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-apl3/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-1:
    - {shard-tglu}:       [FAIL][39] ([i915#8292]) -> [PASS][40]
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13238/shard-tglu-9/igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-1.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/shard-tglu-5/igt@kms_plane_scaling@intel-max-src-size@pipe-a-hdmi-a-1.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1099]: https://gitlab.freedesktop.org/drm/intel/issues/1099
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1937]: https://gitlab.freedesktop.org/drm/intel/issues/1937
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2876]: https://gitlab.freedesktop.org/drm/intel/issues/2876
  [i915#3023]: https://gitlab.freedesktop.org/drm/intel/issues/3023
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
  [i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
  [i915#4423]: https://gitlab.freedesktop.org/drm/intel/issues/4423
  [i915#4528]: https://gitlab.freedesktop.org/drm/intel/issues/4528
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5234]: https://gitlab.freedesktop.org/drm/intel/issues/5234
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5465]: https://gitlab.freedesktop.org/drm/intel/issues/5465
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6786]: https://gitlab.freedesktop.org/drm/intel/issues/6786
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7461]: https://gitlab.freedesktop.org/drm/intel/issues/7461
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7790]: https://gitlab.freedesktop.org/drm/intel/issues/7790
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
  [i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
  [i915#8011]: https://gitlab.freedesktop.org/drm/intel/issues/8011
  [i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
  [i915#8234]: https://gitlab.freedesktop.org/drm/intel/issues/8234
  [i915#8247]: https://gitlab.freedesktop.org/drm/intel/issues/8247
  [i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
  [i915#8347]: https://gitlab.freedesktop.org/drm/intel/issues/8347
  [i915#8414]: https://gitlab.freedesktop.org/drm/intel/issues/8414
  [i915#8502]: https://gitlab.freedesktop.org/drm/intel/issues/8502
  [i915#8516]: https://gitlab.freedesktop.org/drm/intel/issues/8516
  [i915#8555]: https://gitlab.freedesktop.org/drm/intel/issues/8555


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7320 -> IGTPW_9121
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_13238: 8c0b302811d744b945dcb6d78164a76188914db9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_9121: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html
  IGT_7320: 1c96b08a4cde6f2d49824a8cc3303bd860617b52 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_9121/index.html

[-- Attachment #2: Type: text/html, Size: 12572 bytes --]

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

* Re: [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
                   ` (2 preceding siblings ...)
  2023-06-07 12:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2023-06-07 21:12 ` Dixit, Ashutosh
  2023-06-07 22:31   ` Belgaumkar, Vinay
  3 siblings, 1 reply; 11+ messages in thread
From: Dixit, Ashutosh @ 2023-06-07 21:12 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: igt-dev, intel-gfx

On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
>

Hi Vinay,

> Verify that SLPC API works as expected after a suspend.
>
> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> ---
>  tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
> index 9005cd220..f35f1f8e0 100644
> --- a/tests/i915/i915_pm_freq_api.c
> +++ b/tests/i915/i915_pm_freq_api.c
> @@ -18,6 +18,9 @@
>   *
>   * SUBTEST: freq-reset
>   * Description: Test basic freq API works after a reset
> + *
> + * SUBTEST: freq-suspend
> + * Description: Test basic freq API works after a runtime suspend
>   */
>
>  IGT_TEST_DESCRIPTION("Test SLPC freq API");
> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
>	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>  }
>
> +static void test_suspend(int i915, int dirfd, int gt)
> +{
> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> +
> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> +	usleep(ACT_FREQ_LATENCY_US);
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> +
> +	/* Manually trigger a suspend */
> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> +				      SUSPEND_TEST_NONE);
> +
> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);

I am wondering what the purpose/value of this test (and also "freq-reset")
is?  How can the "set" min/max set freq (which are just input settings)
change whether or not there is a suspend/resume or a reset? Especially when
we just return cached min/max values from i915?

Thanks.
--
Ashutosh


> +}
> +
>  igt_main
>  {
>	int i915 = -1;
> @@ -143,6 +164,15 @@ igt_main
>				test_reset(i915, dirfd, gt);
>	}
>
> +	igt_describe("Test basic freq API works after suspend");
> +	igt_subtest_with_dynamic_f("freq-suspend") {
> +		int dirfd, gt;
> +
> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> +			igt_dynamic_f("gt%u", gt)
> +				test_suspend(i915, dirfd, gt);
> +	}
> +
>	igt_fixture {
>		int dirfd, gt;
>		/* Restore frequencies */
> --
> 2.38.1
>

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

* Re: [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 21:12 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
@ 2023-06-07 22:31   ` Belgaumkar, Vinay
  2023-06-07 22:56     ` Dixit, Ashutosh
  0 siblings, 1 reply; 11+ messages in thread
From: Belgaumkar, Vinay @ 2023-06-07 22:31 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: igt-dev, intel-gfx


On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
> On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
> Hi Vinay,
>
>> Verify that SLPC API works as expected after a suspend.
>>
>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>> ---
>>   tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>>   1 file changed, 30 insertions(+)
>>
>> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
>> index 9005cd220..f35f1f8e0 100644
>> --- a/tests/i915/i915_pm_freq_api.c
>> +++ b/tests/i915/i915_pm_freq_api.c
>> @@ -18,6 +18,9 @@
>>    *
>>    * SUBTEST: freq-reset
>>    * Description: Test basic freq API works after a reset
>> + *
>> + * SUBTEST: freq-suspend
>> + * Description: Test basic freq API works after a runtime suspend
>>    */
>>
>>   IGT_TEST_DESCRIPTION("Test SLPC freq API");
>> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
>> 	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>   }
>>
>> +static void test_suspend(int i915, int dirfd, int gt)
>> +{
>> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
>> +
>> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
>> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
>> +	usleep(ACT_FREQ_LATENCY_US);
>> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>> +
>> +	/* Manually trigger a suspend */
>> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
>> +				      SUSPEND_TEST_NONE);
>> +
>> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> I am wondering what the purpose/value of this test (and also "freq-reset")
> is?  How can the "set" min/max set freq (which are just input settings)
> change whether or not there is a suspend/resume or a reset? Especially when
> we just return cached min/max values from i915?

It is mainly checking that we don't smother the softlimit during a reset 
or suspend flow. In addition, it also tests the read/write interface 
works as expected after those events.

Thanks,

Vinay.

>
> Thanks.
> --
> Ashutosh
>
>
>> +}
>> +
>>   igt_main
>>   {
>> 	int i915 = -1;
>> @@ -143,6 +164,15 @@ igt_main
>> 				test_reset(i915, dirfd, gt);
>> 	}
>>
>> +	igt_describe("Test basic freq API works after suspend");
>> +	igt_subtest_with_dynamic_f("freq-suspend") {
>> +		int dirfd, gt;
>> +
>> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
>> +			igt_dynamic_f("gt%u", gt)
>> +				test_suspend(i915, dirfd, gt);
>> +	}
>> +
>> 	igt_fixture {
>> 		int dirfd, gt;
>> 		/* Restore frequencies */
>> --
>> 2.38.1
>>

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

* Re: [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 22:31   ` Belgaumkar, Vinay
@ 2023-06-07 22:56     ` Dixit, Ashutosh
  2023-06-07 23:11       ` Belgaumkar, Vinay
  0 siblings, 1 reply; 11+ messages in thread
From: Dixit, Ashutosh @ 2023-06-07 22:56 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: igt-dev, intel-gfx

On Wed, 07 Jun 2023 15:31:33 -0700, Belgaumkar, Vinay wrote:
>
> On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
> > On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
> > Hi Vinay,
> >
> >> Verify that SLPC API works as expected after a suspend.
> >>
> >> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> >> ---
> >>   tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
> >>   1 file changed, 30 insertions(+)
> >>
> >> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
> >> index 9005cd220..f35f1f8e0 100644
> >> --- a/tests/i915/i915_pm_freq_api.c
> >> +++ b/tests/i915/i915_pm_freq_api.c
> >> @@ -18,6 +18,9 @@
> >>    *
> >>    * SUBTEST: freq-reset
> >>    * Description: Test basic freq API works after a reset
> >> + *
> >> + * SUBTEST: freq-suspend
> >> + * Description: Test basic freq API works after a runtime suspend
> >>    */
> >>
> >>   IGT_TEST_DESCRIPTION("Test SLPC freq API");
> >> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
> >>	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>   }
> >>
> >> +static void test_suspend(int i915, int dirfd, int gt)
> >> +{
> >> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> >> +
> >> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> >> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> >> +	usleep(ACT_FREQ_LATENCY_US);
> >> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >> +
> >> +	/* Manually trigger a suspend */
> >> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> >> +				      SUSPEND_TEST_NONE);
> >> +
> >> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> > I am wondering what the purpose/value of this test (and also "freq-reset")
> > is?  How can the "set" min/max set freq (which are just input settings)
> > change whether or not there is a suspend/resume or a reset? Especially when
> > we just return cached min/max values from i915?
>
> It is mainly checking that we don't smother the softlimit during a reset or
> suspend flow.

How can softlimit which is a ordinary variable in memory get clobbered by
suspend resume?

> In addition, it also tests the read/write interface works as expected
> after those events.

There's no write. Sorry, but I'm not convinced. There should be some more
meat to the test.

Maybe we can write a test which will check /all/ sysfs values are the same
after a suspend resume cycle? Why do only these specific ones have to be
checked?

Thanks.
--
Ashutosh


>
> Thanks,
>
> Vinay.
>
> >
> > Thanks.
> > --
> > Ashutosh
> >
> >
> >> +}
> >> +
> >>   igt_main
> >>   {
> >>	int i915 = -1;
> >> @@ -143,6 +164,15 @@ igt_main
> >>				test_reset(i915, dirfd, gt);
> >>	}
> >>
> >> +	igt_describe("Test basic freq API works after suspend");
> >> +	igt_subtest_with_dynamic_f("freq-suspend") {
> >> +		int dirfd, gt;
> >> +
> >> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> >> +			igt_dynamic_f("gt%u", gt)
> >> +				test_suspend(i915, dirfd, gt);
> >> +	}
> >> +
> >>	igt_fixture {
> >>		int dirfd, gt;
> >>		/* Restore frequencies */
> >> --
> >> 2.38.1
> >>

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

* Re: [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 22:56     ` Dixit, Ashutosh
@ 2023-06-07 23:11       ` Belgaumkar, Vinay
  2023-06-07 23:40         ` [igt-dev] [Intel-gfx] " Belgaumkar, Vinay
  0 siblings, 1 reply; 11+ messages in thread
From: Belgaumkar, Vinay @ 2023-06-07 23:11 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: igt-dev, intel-gfx


On 6/7/2023 3:56 PM, Dixit, Ashutosh wrote:
> On Wed, 07 Jun 2023 15:31:33 -0700, Belgaumkar, Vinay wrote:
>> On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
>>> On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
>>> Hi Vinay,
>>>
>>>> Verify that SLPC API works as expected after a suspend.
>>>>
>>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>>>> ---
>>>>    tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>>>>    1 file changed, 30 insertions(+)
>>>>
>>>> diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
>>>> index 9005cd220..f35f1f8e0 100644
>>>> --- a/tests/i915/i915_pm_freq_api.c
>>>> +++ b/tests/i915/i915_pm_freq_api.c
>>>> @@ -18,6 +18,9 @@
>>>>     *
>>>>     * SUBTEST: freq-reset
>>>>     * Description: Test basic freq API works after a reset
>>>> + *
>>>> + * SUBTEST: freq-suspend
>>>> + * Description: Test basic freq API works after a runtime suspend
>>>>     */
>>>>
>>>>    IGT_TEST_DESCRIPTION("Test SLPC freq API");
>>>> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int gt)
>>>> 	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>>>    }
>>>>
>>>> +static void test_suspend(int i915, int dirfd, int gt)
>>>> +{
>>>> +	uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
>>>> +
>>>> +	igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
>>>> +	igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
>>>> +	usleep(ACT_FREQ_LATENCY_US);
>>>> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>>>> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>>> +
>>>> +	/* Manually trigger a suspend */
>>>> +	igt_system_suspend_autoresume(SUSPEND_STATE_S3,
>>>> +				      SUSPEND_TEST_NONE);
>>>> +
>>>> +	igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>>>> +	igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>> I am wondering what the purpose/value of this test (and also "freq-reset")
>>> is?  How can the "set" min/max set freq (which are just input settings)
>>> change whether or not there is a suspend/resume or a reset? Especially when
>>> we just return cached min/max values from i915?
>> It is mainly checking that we don't smother the softlimit during a reset or
>> suspend flow.
> How can softlimit which is a ordinary variable in memory get clobbered by
> suspend resume?
>
>> In addition, it also tests the read/write interface works as expected
>> after those events.
> There's no write. Sorry, but I'm not convinced. There should be some more
> meat to the test.
There are writes in the IGT fixture after the test completes.
>
> Maybe we can write a test which will check /all/ sysfs values are the same
> after a suspend resume cycle? Why do only these specific ones have to be
> checked?

This test is specific to the freq api, hence just min/max entries.

Thanks,

Vinay.

>
> Thanks.
> --
> Ashutosh
>
>
>> Thanks,
>>
>> Vinay.
>>
>>> Thanks.
>>> --
>>> Ashutosh
>>>
>>>
>>>> +}
>>>> +
>>>>    igt_main
>>>>    {
>>>> 	int i915 = -1;
>>>> @@ -143,6 +164,15 @@ igt_main
>>>> 				test_reset(i915, dirfd, gt);
>>>> 	}
>>>>
>>>> +	igt_describe("Test basic freq API works after suspend");
>>>> +	igt_subtest_with_dynamic_f("freq-suspend") {
>>>> +		int dirfd, gt;
>>>> +
>>>> +		for_each_sysfs_gt_dirfd(i915, dirfd, gt)
>>>> +			igt_dynamic_f("gt%u", gt)
>>>> +				test_suspend(i915, dirfd, gt);
>>>> +	}
>>>> +
>>>> 	igt_fixture {
>>>> 		int dirfd, gt;
>>>> 		/* Restore frequencies */
>>>> --
>>>> 2.38.1
>>>>

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 23:11       ` Belgaumkar, Vinay
@ 2023-06-07 23:40         ` Belgaumkar, Vinay
  2023-06-07 23:49           ` Dixit, Ashutosh
  2023-06-09  1:25           ` Dixit, Ashutosh
  0 siblings, 2 replies; 11+ messages in thread
From: Belgaumkar, Vinay @ 2023-06-07 23:40 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: igt-dev, intel-gfx


On 6/7/2023 4:11 PM, Belgaumkar, Vinay wrote:
>
> On 6/7/2023 3:56 PM, Dixit, Ashutosh wrote:
>> On Wed, 07 Jun 2023 15:31:33 -0700, Belgaumkar, Vinay wrote:
>>> On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
>>>> On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
>>>> Hi Vinay,
>>>>
>>>>> Verify that SLPC API works as expected after a suspend.
>>>>>
>>>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>>>>> ---
>>>>>    tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
>>>>>    1 file changed, 30 insertions(+)
>>>>>
>>>>> diff --git a/tests/i915/i915_pm_freq_api.c 
>>>>> b/tests/i915/i915_pm_freq_api.c
>>>>> index 9005cd220..f35f1f8e0 100644
>>>>> --- a/tests/i915/i915_pm_freq_api.c
>>>>> +++ b/tests/i915/i915_pm_freq_api.c
>>>>> @@ -18,6 +18,9 @@
>>>>>     *
>>>>>     * SUBTEST: freq-reset
>>>>>     * Description: Test basic freq API works after a reset
>>>>> + *
>>>>> + * SUBTEST: freq-suspend
>>>>> + * Description: Test basic freq API works after a runtime suspend
>>>>>     */
>>>>>
>>>>>    IGT_TEST_DESCRIPTION("Test SLPC freq API");
>>>>> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, 
>>>>> int gt)
>>>>>     igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>>>>    }
>>>>>
>>>>> +static void test_suspend(int i915, int dirfd, int gt)
>>>>> +{
>>>>> +    uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
>>>>> +
>>>>> +    igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
>>>>> +    igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
>>>>> +    usleep(ACT_FREQ_LATENCY_US);
>>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>>>> +
>>>>> +    /* Manually trigger a suspend */
>>>>> +    igt_system_suspend_autoresume(SUSPEND_STATE_S3,
>>>>> +                      SUSPEND_TEST_NONE);
>>>>> +
>>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
>>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
>>>> I am wondering what the purpose/value of this test (and also 
>>>> "freq-reset")
>>>> is?  How can the "set" min/max set freq (which are just input 
>>>> settings)
>>>> change whether or not there is a suspend/resume or a reset? 
>>>> Especially when
>>>> we just return cached min/max values from i915?
>>> It is mainly checking that we don't smother the softlimit during a 
>>> reset or
>>> suspend flow.
>> How can softlimit which is a ordinary variable in memory get 
>> clobbered by
>> suspend resume?

It shouldn't, but funnier things have happened. Anyways, I can add a 
check for cur_freq and ensure that is at min. That will prove we applied 
the soft limit after suspend.

Thanks,

Vinay.

>>
>>> In addition, it also tests the read/write interface works as expected
>>> after those events.
>> There's no write. Sorry, but I'm not convinced. There should be some 
>> more
>> meat to the test.
> There are writes in the IGT fixture after the test completes.
>>
>> Maybe we can write a test which will check /all/ sysfs values are the 
>> same
>> after a suspend resume cycle? Why do only these specific ones have to be
>> checked?
>
> This test is specific to the freq api, hence just min/max entries.
>
> Thanks,
>
> Vinay.
>
>>
>> Thanks.
>> -- 
>> Ashutosh
>>
>>
>>> Thanks,
>>>
>>> Vinay.
>>>
>>>> Thanks.
>>>> -- 
>>>> Ashutosh
>>>>
>>>>
>>>>> +}
>>>>> +
>>>>>    igt_main
>>>>>    {
>>>>>     int i915 = -1;
>>>>> @@ -143,6 +164,15 @@ igt_main
>>>>>                 test_reset(i915, dirfd, gt);
>>>>>     }
>>>>>
>>>>> +    igt_describe("Test basic freq API works after suspend");
>>>>> +    igt_subtest_with_dynamic_f("freq-suspend") {
>>>>> +        int dirfd, gt;
>>>>> +
>>>>> +        for_each_sysfs_gt_dirfd(i915, dirfd, gt)
>>>>> +            igt_dynamic_f("gt%u", gt)
>>>>> +                test_suspend(i915, dirfd, gt);
>>>>> +    }
>>>>> +
>>>>>     igt_fixture {
>>>>>         int dirfd, gt;
>>>>>         /* Restore frequencies */
>>>>> -- 
>>>>> 2.38.1
>>>>>

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 23:40         ` [igt-dev] [Intel-gfx] " Belgaumkar, Vinay
@ 2023-06-07 23:49           ` Dixit, Ashutosh
  2023-06-09  1:25           ` Dixit, Ashutosh
  1 sibling, 0 replies; 11+ messages in thread
From: Dixit, Ashutosh @ 2023-06-07 23:49 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: igt-dev, intel-gfx

On Wed, 07 Jun 2023 16:40:53 -0700, Belgaumkar, Vinay wrote:
>
>
> On 6/7/2023 4:11 PM, Belgaumkar, Vinay wrote:
> >
> > On 6/7/2023 3:56 PM, Dixit, Ashutosh wrote:
> >> On Wed, 07 Jun 2023 15:31:33 -0700, Belgaumkar, Vinay wrote:
> >>> On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
> >>>> On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
> >>>> Hi Vinay,
> >>>>
> >>>>> Verify that SLPC API works as expected after a suspend.
> >>>>>
> >>>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> >>>>> ---
> >>>>>    tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
> >>>>>    1 file changed, 30 insertions(+)
> >>>>>
> >>>>> diff --git a/tests/i915/i915_pm_freq_api.c
> >>>>> b/tests/i915/i915_pm_freq_api.c
> >>>>> index 9005cd220..f35f1f8e0 100644
> >>>>> --- a/tests/i915/i915_pm_freq_api.c
> >>>>> +++ b/tests/i915/i915_pm_freq_api.c
> >>>>> @@ -18,6 +18,9 @@
> >>>>>     *
> >>>>>     * SUBTEST: freq-reset
> >>>>>     * Description: Test basic freq API works after a reset
> >>>>> + *
> >>>>> + * SUBTEST: freq-suspend
> >>>>> + * Description: Test basic freq API works after a runtime suspend
> >>>>>     */
> >>>>>
> >>>>>    IGT_TEST_DESCRIPTION("Test SLPC freq API");
> >>>>> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int
> >>>>> gt)
> >>>>>     igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>>>    }
> >>>>>
> >>>>> +static void test_suspend(int i915, int dirfd, int gt)
> >>>>> +{
> >>>>> +    uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> >>>>> +
> >>>>> +    igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> >>>>> +    igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> >>>>> +    usleep(ACT_FREQ_LATENCY_US);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>>> +
> >>>>> +    /* Manually trigger a suspend */
> >>>>> +    igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> >>>>> +                      SUSPEND_TEST_NONE);
> >>>>> +
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>> I am wondering what the purpose/value of this test (and also
> >>>> "freq-reset")
> >>>> is?  How can the "set" min/max set freq (which are just input
> >>>> settings)
> >>>> change whether or not there is a suspend/resume or a reset? Especially
> >>>> when
> >>>> we just return cached min/max values from i915?
> >>> It is mainly checking that we don't smother the softlimit during a
> >>> reset or
> >>> suspend flow.
> >> How can softlimit which is a ordinary variable in memory get clobbered
> >> by
> >> suspend resume?
>
> It shouldn't, but funnier things have happened. Anyways, I can add a check
> for cur_freq and ensure that is at min. That will prove we applied the soft
> limit after suspend.
>
> Thanks,
>
> Vinay.
>
> >>
> >>> In addition, it also tests the read/write interface works as expected
> >>> after those events.
> >> There's no write. Sorry, but I'm not convinced. There should be some
> >> more
> >> meat to the test.
> > There are writes in the IGT fixture after the test completes.

This should also be in an exit handler, not in the fixture? See
gem_ctx_freq e.g.

Thanks.
--
Ashutosh



> >>
> >> Maybe we can write a test which will check /all/ sysfs values are the
> >> same
> >> after a suspend resume cycle? Why do only these specific ones have to be
> >> checked?
> >
> > This test is specific to the freq api, hence just min/max entries.
> >
> > Thanks,
> >
> > Vinay.
> >
> >>
> >> Thanks.
> >> --
> >> Ashutosh
> >>
> >>
> >>> Thanks,
> >>>
> >>> Vinay.
> >>>
> >>>> Thanks.
> >>>> --
> >>>> Ashutosh
> >>>>
> >>>>
> >>>>> +}
> >>>>> +
> >>>>>    igt_main
> >>>>>    {
> >>>>>     int i915 = -1;
> >>>>> @@ -143,6 +164,15 @@ igt_main
> >>>>>                 test_reset(i915, dirfd, gt);
> >>>>>     }
> >>>>>
> >>>>> +    igt_describe("Test basic freq API works after suspend");
> >>>>> +    igt_subtest_with_dynamic_f("freq-suspend") {
> >>>>> +        int dirfd, gt;
> >>>>> +
> >>>>> +        for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> >>>>> +            igt_dynamic_f("gt%u", gt)
> >>>>> +                test_suspend(i915, dirfd, gt);
> >>>>> +    }
> >>>>> +
> >>>>>     igt_fixture {
> >>>>>         int dirfd, gt;
> >>>>>         /* Restore frequencies */
> >>>>> --
> >>>>> 2.38.1
> >>>>>

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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest
  2023-06-07 23:40         ` [igt-dev] [Intel-gfx] " Belgaumkar, Vinay
  2023-06-07 23:49           ` Dixit, Ashutosh
@ 2023-06-09  1:25           ` Dixit, Ashutosh
  1 sibling, 0 replies; 11+ messages in thread
From: Dixit, Ashutosh @ 2023-06-09  1:25 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: igt-dev, intel-gfx

On Wed, 07 Jun 2023 16:40:53 -0700, Belgaumkar, Vinay wrote:
>
> On 6/7/2023 4:11 PM, Belgaumkar, Vinay wrote:
> >
> > On 6/7/2023 3:56 PM, Dixit, Ashutosh wrote:
> >> On Wed, 07 Jun 2023 15:31:33 -0700, Belgaumkar, Vinay wrote:
> >>> On 6/7/2023 2:12 PM, Dixit, Ashutosh wrote:
> >>>> On Tue, 06 Jun 2023 13:35:35 -0700, Vinay Belgaumkar wrote:
> >>>> Hi Vinay,
> >>>>
> >>>>> Verify that SLPC API works as expected after a suspend.
> >>>>>
> >>>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
> >>>>> ---
> >>>>>    tests/i915/i915_pm_freq_api.c | 30 ++++++++++++++++++++++++++++++
> >>>>>    1 file changed, 30 insertions(+)
> >>>>>
> >>>>> diff --git a/tests/i915/i915_pm_freq_api.c
> >>>>> b/tests/i915/i915_pm_freq_api.c
> >>>>> index 9005cd220..f35f1f8e0 100644
> >>>>> --- a/tests/i915/i915_pm_freq_api.c
> >>>>> +++ b/tests/i915/i915_pm_freq_api.c
> >>>>> @@ -18,6 +18,9 @@
> >>>>>     *
> >>>>>     * SUBTEST: freq-reset
> >>>>>     * Description: Test basic freq API works after a reset
> >>>>> + *
> >>>>> + * SUBTEST: freq-suspend
> >>>>> + * Description: Test basic freq API works after a runtime suspend
> >>>>>     */
> >>>>>
> >>>>>    IGT_TEST_DESCRIPTION("Test SLPC freq API");
> >>>>> @@ -99,6 +102,24 @@ static void test_reset(int i915, int dirfd, int
> >>>>> gt)
> >>>>>     igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>>>    }
> >>>>>
> >>>>> +static void test_suspend(int i915, int dirfd, int gt)
> >>>>> +{
> >>>>> +    uint32_t rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ);
> >>>>> +
> >>>>> +    igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn) > 0);
> >>>>> +    igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rpn) > 0);
> >>>>> +    usleep(ACT_FREQ_LATENCY_US);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>>> +
> >>>>> +    /* Manually trigger a suspend */
> >>>>> +    igt_system_suspend_autoresume(SUSPEND_STATE_S3,
> >>>>> +                      SUSPEND_TEST_NONE);
> >>>>> +
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MIN_FREQ_MHZ) == rpn);
> >>>>> +    igt_assert(get_freq(dirfd, RPS_MAX_FREQ_MHZ) == rpn);
> >>>> I am wondering what the purpose/value of this test (and also
> >>>> "freq-reset")
> >>>> is?  How can the "set" min/max set freq (which are just input
> >>>> settings)
> >>>> change whether or not there is a suspend/resume or a reset? Especially
> >>>> when
> >>>> we just return cached min/max values from i915?
> >>> It is mainly checking that we don't smother the softlimit during a
> >>> reset or
> >>> suspend flow.
> >> How can softlimit which is a ordinary variable in memory get clobbered
> >> by
> >> suspend resume?
>
> It shouldn't, but funnier things have happened. Anyways, I can add a check
> for cur_freq and ensure that is at min. That will prove we applied the soft
> limit after suspend.

Yes, let's do this. With this at least we will see the min freq being
applied after a resume and should be sufficient reason to merge this.

This test is present for xe in it's present form, but for xe it is reading
shared data (which can be in vram). So it is harder to criticize that it is
just returning a cpu memory variable.

Thanks.
--
Ashutosh

> >>> In addition, it also tests the read/write interface works as expected
> >>> after those events.
> >> There's no write. Sorry, but I'm not convinced. There should be some
> >> more
> >> meat to the test.
> > There are writes in the IGT fixture after the test completes.
> >>
> >> Maybe we can write a test which will check /all/ sysfs values are the
> >> same
> >> after a suspend resume cycle? Why do only these specific ones have to be
> >> checked?
> >
> > This test is specific to the freq api, hence just min/max entries.
> >
> > Thanks,
> >
> > Vinay.
> >
> >>
> >> Thanks.
> >> --
> >> Ashutosh
> >>
> >>
> >>> Thanks,
> >>>
> >>> Vinay.
> >>>
> >>>> Thanks.
> >>>> --
> >>>> Ashutosh
> >>>>
> >>>>
> >>>>> +}
> >>>>> +
> >>>>>    igt_main
> >>>>>    {
> >>>>>     int i915 = -1;
> >>>>> @@ -143,6 +164,15 @@ igt_main
> >>>>>                 test_reset(i915, dirfd, gt);
> >>>>>     }
> >>>>>
> >>>>> +    igt_describe("Test basic freq API works after suspend");
> >>>>> +    igt_subtest_with_dynamic_f("freq-suspend") {
> >>>>> +        int dirfd, gt;
> >>>>> +
> >>>>> +        for_each_sysfs_gt_dirfd(i915, dirfd, gt)
> >>>>> +            igt_dynamic_f("gt%u", gt)
> >>>>> +                test_suspend(i915, dirfd, gt);
> >>>>> +    }
> >>>>> +
> >>>>>     igt_fixture {
> >>>>>         int dirfd, gt;
> >>>>>         /* Restore frequencies */
> >>>>> --
> >>>>> 2.38.1
> >>>>>

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

end of thread, other threads:[~2023-06-09  1:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 20:35 [igt-dev] [PATCH i-g-t] tests/i915_pm_freq_api: Add a suspend subtest Vinay Belgaumkar
2023-06-06 20:49 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-06-06 21:25 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-06-07 12:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-06-07 21:12 ` [igt-dev] [PATCH i-g-t] " Dixit, Ashutosh
2023-06-07 22:31   ` Belgaumkar, Vinay
2023-06-07 22:56     ` Dixit, Ashutosh
2023-06-07 23:11       ` Belgaumkar, Vinay
2023-06-07 23:40         ` [igt-dev] [Intel-gfx] " Belgaumkar, Vinay
2023-06-07 23:49           ` Dixit, Ashutosh
2023-06-09  1:25           ` Dixit, Ashutosh

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