Check for vebox support before testing

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
This commit is contained in:
Chris Wilson
2013-04-26 08:30:04 +01:00
parent cae610a2e5
commit 2facc1368d
4 changed files with 19 additions and 26 deletions
+1 -5
View File
@@ -55,7 +55,6 @@ static drm_intel_bo *target_buffer;
#define MI_COND_BATCH_BUFFER_END (0x36<<23 | 1)
#define MI_DO_COMPARE (1<<21)
#define LOCAL_I915_PARAM_HAS_VEBOX 22
static int
get_num_rings(int fd)
{
@@ -82,10 +81,7 @@ get_num_rings(int fd)
else
goto skip;
gp.param = LOCAL_I915_PARAM_HAS_VEBOX;
ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
if ((ret == 0) & (*gp.value > 0))
if (gem_has_vebox(fd))
num_rings++;
else
goto skip;