All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lyude <lyude@redhat.com>
Subject: [PATCH i-g-t v2 1/7] lib/igt_aux: Use provided autoresume delay for rtc wake
Date: Tue, 27 Jun 2017 13:53:05 +0300	[thread overview]
Message-ID: <20170627105311.28975-1-paul.kocialkowski@linux.intel.com> (raw)

This stores the autoresume delay provided via igt_set_autoresume_delay
for use during suspend via rtc wake scheduling. This delay was
previously only used for pm_test suspendm while the function suggests
it should be applied to all autoresume cases.

There is also definitely a use case for configuring the rtc wake delay,
so this implements it.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
---
 lib/igt_aux.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index eb563f72..882dba06 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -680,6 +680,8 @@ void igt_cleanup_aperture_trashers(void)
 	free(trash_bos);
 }
 
+static int autoresume_delay;
+
 static const char *suspend_state_name[] = {
 	[SUSPEND_STATE_FREEZE] = "freeze",
 	[SUSPEND_STATE_STANDBY] = "standby",
@@ -746,7 +748,10 @@ static void suspend_via_rtcwake(enum igt_suspend_state state)
 
 	igt_assert(state < SUSPEND_STATE_NUM);
 
-	delay = state == SUSPEND_STATE_DISK ? 30 : 15;
+	if (autoresume_delay)
+		delay = autoresume_delay;
+	else
+		delay = state == SUSPEND_STATE_DISK ? 30 : 15;
 
 	/*
 	 * Skip if rtcwake would fail for a reason not related to the kernel's
@@ -889,6 +894,8 @@ void igt_set_autoresume_delay(int delay_secs)
 	igt_require(write(delay_fd, delay_str, strlen(delay_str)));
 
 	close(delay_fd);
+
+	autoresume_delay = delay_secs;
 }
 
 /**
-- 
2.13.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-06-27 10:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 10:53 Paul Kocialkowski [this message]
2017-06-27 10:53 ` [PATCH i-g-t v2 2/7] chamelium: Add support for HPD toggle scheduling instead of async pulses Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 3/7] tests/chamelium: Add VGA HPD toggle tests after suspend and hibernate Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 4/7] tests/chamelium: Reduce the simple hotplug test toggle count for VGA Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 5/7] tests/chamelium: Update connector state without reprobe when possible Paul Kocialkowski
2017-06-27 21:26   ` Lyude Paul
2017-06-28  7:47     ` Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 6/7] tests/chamelium: Disconnect connectors without extra reset Paul Kocialkowski
2017-06-27 21:21   ` Lyude Paul
2017-06-28  7:49     ` Paul Kocialkowski
2017-06-27 10:53 ` [PATCH i-g-t v2 7/7] Make igtrc configuration common, with configurable suspend/resume delay Paul Kocialkowski
2017-06-27 21:11   ` Lyude Paul
2017-06-28  7:27     ` Paul Kocialkowski
2017-06-27 21:25 ` [PATCH i-g-t v2 1/7] lib/igt_aux: Use provided autoresume delay for rtc wake Lyude Paul

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=20170627105311.28975-1-paul.kocialkowski@linux.intel.com \
    --to=paul.kocialkowski@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lyude@redhat.com \
    /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 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.