summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-06 10:53:10 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-13 09:35:35 +0100
commitc18b2d57a98c061845e0ec31bfffc90e03356aaa (patch)
tree0850b537dd06ae989e8bd8cfe4d48b0a598d6b6d
parentc66b2425e706bec5ce6df8664d19b06e047eb0ee (diff)
lib/ioctl: api polish for gem_context_has_param
Just push the igt_require down to align with the usual style. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--lib/igt_gt.c2
-rw-r--r--lib/ioctl_wrappers.c4
-rw-r--r--lib/ioctl_wrappers.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index c003a7ca..615f9893 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -33,7 +33,7 @@
void igt_require_hang_ring(int fd, int ring)
{
- igt_require(gem_context_has_param(fd, LOCAL_CONTEXT_PARAM_BAN_PERIOD));
+ gem_context_require_param(fd, LOCAL_CONTEXT_PARAM_BAN_PERIOD);
igt_require(intel_gen(intel_get_drm_devid(fd)) >= 5);
}
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 19a457ac..dd89e2c5 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1080,7 +1080,7 @@ int gem_context_set_param(int fd, struct local_i915_gem_context_param *p)
return 0;
}
-int gem_context_has_param(int fd, uint64_t param)
+void gem_context_require_param(int fd, uint64_t param)
{
struct local_i915_gem_context_param p;
@@ -1089,5 +1089,5 @@ int gem_context_has_param(int fd, uint64_t param)
p.value = 0;
p.size = 0;
- return gem_context_get_param(fd, &p) == 0;
+ igt_require(gem_context_get_param(fd, &p) == 0);
}
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 30ab8362..a1017ecd 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -113,7 +113,7 @@ struct local_i915_gem_context_param {
uint64_t value;
};
-int gem_context_has_param(int fd, uint64_t param);
+void gem_context_require_param(int fd, uint64_t param);
int gem_context_get_param(int fd, struct local_i915_gem_context_param *p);
int gem_context_set_param(int fd, struct local_i915_gem_context_param *p);