From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak 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 Message-ID: <1369750978-6040-1-git-send-email-imre.deak@intel.com> References: <1369669362-21300-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 9F70BE61B0 for ; Tue, 28 May 2013 07:23:01 -0700 (PDT) In-Reply-To: <1369669362-21300-1-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Signed-off-by: Imre Deak --- 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