Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [i-g-t PATCH v2 1/2] lib: make sure all rings are idle in gpu_quiescent_gpu()
Date: Tue, 28 May 2013 17:22:57 +0300	[thread overview]
Message-ID: <1369750978-6040-1-git-send-email-imre.deak@intel.com> (raw)
In-Reply-To: <1369669362-21300-1-git-send-email-imre.deak@intel.com>

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 lib/drmtest.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 16f5be1..2d37fb6 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -109,6 +109,7 @@ int gem_available_fences(int fd)
 }
 
 
+#define LOCAL_I915_EXEC_VEBOX	(4 << 0)
 /* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */
 void gem_quiescent_gpu(int fd)
 {
@@ -143,6 +144,21 @@ void gem_quiescent_gpu(int fd)
 
 	do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
 
+	if (gem_has_blt(fd)) {
+		execbuf.flags = I915_EXEC_BLT;
+		do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+	}
+
+	if (gem_has_bsd(fd)) {
+		execbuf.flags = I915_EXEC_BSD;
+		do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+	}
+
+	if (gem_has_vebox(fd)) {
+		execbuf.flags = LOCAL_I915_EXEC_VEBOX;
+		do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+	}
+
 	gem_sync(fd, handle);
 }
 
-- 
1.8.1.2

  parent reply	other threads:[~2013-05-28 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 15:42 [i-g-t PATCH] tests/gem_wait_render_timeout: make sure the GPU is idle before exiting Imre Deak
2013-05-28  9:31 ` Daniel Vetter
2013-05-28 14:22 ` Imre Deak [this message]
2013-05-28 14:22 ` [i-g-t PATCH v2 2/2] tests/lib: make sure the GPU is idle at test start and exit Imre Deak
2013-05-28 14:35   ` [i-g-t PATCH v3 " Imre Deak
2013-05-28 16:33     ` Daniel Vetter

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=1369750978-6040-1-git-send-email-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --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