From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH igt 1/2] lib: Add gem_bo_busy
Date: Mon, 25 Nov 2013 18:51:56 +0200 [thread overview]
Message-ID: <1385398317-29810-1-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20131125151921.GA27344@phenom.ffwll.local>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Move gem_bo_busy() from gem_wait_render_timeout.c to lib.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
lib/drmtest.c | 10 ++++++++++
lib/drmtest.h | 2 ++
tests/gem_wait_render_timeout.c | 11 -----------
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 6544128..8f6c74e 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -641,6 +641,16 @@ void gem_sw_finish(int fd, uint32_t handle)
do_ioctl(fd, DRM_IOCTL_I915_GEM_SW_FINISH, &finish);
}
+bool gem_bo_busy(int fd, uint32_t handle)
+{
+ struct drm_i915_gem_busy busy;
+
+ busy.handle = handle;
+
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
+
+ return !!busy.busy;
+}
/* prime */
int prime_handle_to_fd(int fd, uint32_t handle)
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 1a243b1..5e831e5 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -87,6 +87,8 @@ uint32_t gem_context_create(int fd);
void gem_sw_finish(int fd, uint32_t handle);
+bool gem_bo_busy(int fd, uint32_t handle);
+
/* feature test helpers */
bool gem_uses_aliasing_ppgtt(int fd);
int gem_available_fences(int fd);
diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c
index ae31729..3253d7f 100644
--- a/tests/gem_wait_render_timeout.c
+++ b/tests/gem_wait_render_timeout.c
@@ -80,17 +80,6 @@ gem_bo_wait_timeout(int fd, uint32_t handle, uint64_t *timeout_ns)
return ret ? -errno : 0;
}
-static bool
-gem_bo_busy(int fd, uint32_t handle)
-{
- struct drm_i915_gem_busy busy;
-
- busy.handle = handle;
- do_or_die(drmIoctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy));
-
- return !!busy.busy;
-}
-
static void blt_color_fill(struct intel_batchbuffer *batch,
drm_intel_bo *buf,
const unsigned int pages)
--
1.8.3.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-25 16:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 19:33 [PATCH igt 1/2] rendercopy: Pass context to rendercopy functions ville.syrjala
2013-11-21 19:33 ` [PATCH igt 2/2] kms_fbc_crc: Add a CRC based FBC test ville.syrjala
2013-11-25 9:18 ` Daniel Vetter
2013-11-25 15:08 ` [PATCH 1/2] lib: Add gem_sw_finish() ville.syrjala
2013-11-25 15:08 ` [PATCH v2 2/2] kms_fbc_crc: Add a CRC based FBC test ville.syrjala
2013-11-25 15:19 ` Daniel Vetter
2013-11-25 16:51 ` ville.syrjala [this message]
2013-11-25 16:51 ` [PATCH igt v3 " ville.syrjala
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=1385398317-29810-1-git-send-email-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.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