* [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling
@ 2017-04-24 12:55 Ewelina Musial
2017-04-25 9:10 ` Szwichtenberg, Radoslaw
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ewelina Musial @ 2017-04-24 12:55 UTC (permalink / raw)
To: intel-gfx
In some cases we observed that forcewake isn't kept after
resume and then RC6 residency is not constant.
References: HSD#1804921797
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Lukasz Fiedorowicz <lukasz.fiedorowicz@intel.com>
Signed-off-by: Ewelina Musial <ewelina.musial@intel.com>
---
tests/pm_rc6_residency.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index bdb9747..4e61326 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -165,6 +165,44 @@ static void measure_residencies(int devid, unsigned int rc6_mask,
res->rc6 += res->rc6p;
}
+enum sleep_state { NOSLEEP, SUSPEND, HIBERNATE };
+static void test_rc6_forcewake(enum sleep_state sleep_state)
+{
+ int fd, fw_fd;
+ unsigned long residency_pre, residency_post;
+
+ fd = drm_open_driver(DRIVER_INTEL);
+ igt_assert_lte(0, fd);
+
+ fw_fd = igt_open_forcewake_handle(fd);
+ igt_assert_lte(0, fw_fd);
+
+ switch (sleep_state) {
+ case NOSLEEP:
+ break;
+ case SUSPEND:
+ igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+ SUSPEND_TEST_NONE);
+ break;
+ case HIBERNATE:
+ igt_system_suspend_autoresume(SUSPEND_STATE_DISK,
+ SUSPEND_TEST_NONE);
+ break;
+ }
+
+ sleep(1); // time to fully resume
+
+ // forcewake should keep residency constant after resume
+ residency_pre = read_rc6_residency("rc6");
+ sleep(SLEEP_DURATION);
+ residency_post = read_rc6_residency("rc6");
+
+ igt_assert_eq(residency_pre, residency_post);
+
+ close(fw_fd);
+ close(fd);
+}
+
igt_main
{
unsigned int rc6_mask;
@@ -209,4 +247,19 @@ igt_main
residency_accuracy(res.rc6pp, res.duration, "rc6pp");
}
+ igt_subtest("rc6-forcewake") {
+ igt_skip_on(!(rc6_mask & RC6_ENABLED));
+
+ test_rc6_forcewake(NOSLEEP);
+ }
+ igt_subtest("rc6-forcewake-suspend") {
+ igt_skip_on(!(rc6_mask & RC6_ENABLED));
+
+ test_rc6_forcewake(SUSPEND);
+ }
+ igt_subtest("rc6-forcewake-hibernate") {
+ igt_skip_on(!(rc6_mask & RC6_ENABLED));
+
+ test_rc6_forcewake(HIBERNATE);
+ }
}
--
2.9.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling
2017-04-24 12:55 [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling Ewelina Musial
@ 2017-04-25 9:10 ` Szwichtenberg, Radoslaw
2017-04-25 10:44 ` Michał Winiarski
2017-04-25 10:54 ` Chris Wilson
2 siblings, 0 replies; 4+ messages in thread
From: Szwichtenberg, Radoslaw @ 2017-04-25 9:10 UTC (permalink / raw)
To: intel-gfx, Musial, Ewelina
On Mon, 2017-04-24 at 14:55 +0200, Ewelina Musial wrote:
> In some cases we observed that forcewake isn't kept after
> resume and then RC6 residency is not constant.
>
> References: HSD#1804921797
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Lukasz Fiedorowicz <lukasz.fiedorowicz@intel.com>
> Signed-off-by: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling
2017-04-24 12:55 [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling Ewelina Musial
2017-04-25 9:10 ` Szwichtenberg, Radoslaw
@ 2017-04-25 10:44 ` Michał Winiarski
2017-04-25 10:54 ` Chris Wilson
2 siblings, 0 replies; 4+ messages in thread
From: Michał Winiarski @ 2017-04-25 10:44 UTC (permalink / raw)
To: Ewelina Musial; +Cc: intel-gfx
On Mon, Apr 24, 2017 at 02:55:23PM +0200, Ewelina Musial wrote:
> In some cases we observed that forcewake isn't kept after
> resume and then RC6 residency is not constant.
>
> References: HSD#1804921797
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Lukasz Fiedorowicz <lukasz.fiedorowicz@intel.com>
> Signed-off-by: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
-Michał
> ---
> tests/pm_rc6_residency.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling
2017-04-24 12:55 [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling Ewelina Musial
2017-04-25 9:10 ` Szwichtenberg, Radoslaw
2017-04-25 10:44 ` Michał Winiarski
@ 2017-04-25 10:54 ` Chris Wilson
2 siblings, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2017-04-25 10:54 UTC (permalink / raw)
To: Ewelina Musial; +Cc: intel-gfx
On Mon, Apr 24, 2017 at 02:55:23PM +0200, Ewelina Musial wrote:
> In some cases we observed that forcewake isn't kept after
> resume and then RC6 residency is not constant.
This test only asks whether the debugfs/forcewake-user is kept across
resume. What benefit does this have over the existing tests?
P.S. Please keep to the kernel CodingStyle for igt.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-25 10:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-24 12:55 [PATCH i-g-t] tests/pm_rc6_residency: Add subtest to check RC6 suspend handling Ewelina Musial
2017-04-25 9:10 ` Szwichtenberg, Radoslaw
2017-04-25 10:44 ` Michał Winiarski
2017-04-25 10:54 ` Chris Wilson
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.