From: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH v2 i-g-t] tests/i915_pm_freq_api: Ignore zero register value
Date: Mon, 14 Aug 2023 11:13:16 -0700 [thread overview]
Message-ID: <20230814181316.408017-1-vinay.belgaumkar@intel.com> (raw)
Register read for requested_freq can return 0 when system is
in runtime_pm. Make allowance for this case.
v2: Explicit check for runtime_pm status (Riana)
Link: https://gitlab.freedesktop.org/drm/intel/issues/8736
Link: https://gitlab.freedesktop.org/drm/intel/issues/8989
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
tests/i915/i915_pm_freq_api.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/i915/i915_pm_freq_api.c b/tests/i915/i915_pm_freq_api.c
index cf21cc936..6713ad213 100644
--- a/tests/i915/i915_pm_freq_api.c
+++ b/tests/i915/i915_pm_freq_api.c
@@ -95,14 +95,16 @@ static void test_reset(int i915, int dirfd, int gt, int count)
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_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
+ if (igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE)
+ igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
/* Manually trigger a GT reset */
fd = igt_debugfs_gt_open(i915, gt, "reset", O_WRONLY);
igt_require(fd >= 0);
igt_ignore_warn(write(fd, "1\n", 2));
- igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
+ if (igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE)
+ igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
}
close(fd);
}
@@ -114,13 +116,15 @@ static void test_suspend(int i915, int dirfd, int gt)
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_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
+ if (igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE)
+ igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
/* Manually trigger a suspend */
igt_system_suspend_autoresume(SUSPEND_STATE_S3,
SUSPEND_TEST_NONE);
- igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
+ if (igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE)
+ igt_assert_eq(get_freq(dirfd, RPS_CUR_FREQ_MHZ), rpn);
}
int i915 = -1;
--
2.38.1
next reply other threads:[~2023-08-14 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-14 18:13 Vinay Belgaumkar [this message]
2023-08-14 19:29 ` [igt-dev] ✗ GitLab.Pipeline: warning for tests/i915_pm_freq_api: Ignore zero register value (rev2) Patchwork
2023-08-14 19:56 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-14 20:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-15 1:46 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-08-16 14:32 ` Kamil Konieczny
2023-08-16 15:32 ` Belgaumkar, Vinay
2023-08-17 8:51 ` Kamil Konieczny
2023-08-22 0:43 ` Belgaumkar, Vinay
2023-08-17 10:52 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230814181316.408017-1-vinay.belgaumkar@intel.com \
--to=vinay.belgaumkar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox