From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [igt-dev] [PATCH i-g-t] tests/kms_frontbuffer_tracking: Make sure GPU is quiescent before handling assertions, v2.
Date: Thu, 13 Dec 2018 14:31:51 +0100 [thread overview]
Message-ID: <20181213133151.5248-1-maarten.lankhorst@linux.intel.com> (raw)
Typically PSR enables in around 136 ms, but on some tests the we have
to explicitly make sure that the gpu is idle before rendering.
Otherwise, sometimes we wait for the background flusher to finish,
which will take at least a second longer, and causes the wait for
PSR to timeout.
On kms_frontbuffer_tracking:
Starting subtest: psr-2p-scndscrn-shrfb-plflip-blt
psr_active(debugfs_fd, true) took 136ms
psr_active(debugfs_fd, true) took 136ms
psr_active(debugfs_fd, true) took 350ms
psr_active(debugfs_fd, true) took 136ms
psr_active(debugfs_fd, true) took 1598ms
Changes since v1:
- Do not call gem_quiescent_gpu on modesetfrombusy subtest, or we get
a timeout.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108733
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
---
tests/kms_frontbuffer_tracking.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 276ef83ce386..5ab283197685 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1551,9 +1551,11 @@ static void do_flush(const struct test_mode *t)
#define DRRS_ASSERT_FLAGS (7 << 8)
#define ASSERT_DRRS_HIGH (1 << 8)
-#define ASSERT_DRRS_LOW (1 << 9)
+#define ASSERT_DRRS_LOW (1 << 9)
#define ASSERT_DRRS_INACTIVE (1 << 10)
+#define ASSERT_NO_IDLE_GPU (1 << 11)
+
static int adjust_assertion_flags(const struct test_mode *t, int flags)
{
if (!(flags & DONT_ASSERT_FEATURE_STATUS)) {
@@ -1642,6 +1644,10 @@ static void __do_assertions(const struct test_mode *t, int flags,
{
flags = adjust_assertion_flags(t, flags);
+ /* Make sure any submitted rendering is now idle. */
+ if (!(flags & ASSERT_NO_IDLE_GPU))
+ gem_quiescent_gpu(drm.fd);
+
igt_debug("checking asserts in line %i\n", line);
wait_user(2, "Paused before assertions.");
@@ -2691,7 +2697,7 @@ static void modesetfrombusy_subtest(const struct test_mode *t)
params->primary.fb = &fb2;
set_mode_for_params(params);
- do_assertions(0);
+ do_assertions(ASSERT_NO_IDLE_GPU);
stop_busy_thread();
--
2.19.2
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2018-12-13 13:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-13 13:31 Maarten Lankhorst [this message]
2018-12-13 13:54 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Make sure GPU is quiescent before handling assertions, v2 Patchwork
2018-12-13 17:23 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20181213133151.5248-1-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=igt-dev@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