summaryrefslogtreecommitdiff
path: root/tests/gem_stress.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-04-09 15:25:38 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-04-09 20:21:13 +0200
commit1d1f68316f420d8e174d3f16655f6be1549cd74c (patch)
tree136331982d6391888535a325d67708674fc2c206 /tests/gem_stress.c
parente37eb35e194de8fe1f244df085b8b8d2c530ce20 (diff)
tests: Use gem_available_fences()
lib/drmtest.c provides gem_available_fences(). Use it where appropriate. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_stress.c')
-rw-r--r--tests/gem_stress.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index 54597afe..9b31a690 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -605,13 +605,9 @@ static void copy_tiles(unsigned *permutation)
static int get_num_fences(void)
{
- drm_i915_getparam_t gp;
- int ret, val;
+ int val;
- gp.param = I915_PARAM_NUM_FENCES_AVAIL;
- gp.value = &val;
- ret = drmIoctl(drm_fd, DRM_IOCTL_I915_GETPARAM, &gp);
- assert (ret == 0);
+ val = gem_available_fences(drm_fd);
printf ("total %d fences\n", val);
assert(val > 4);