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
+15
View File
@@ -270,6 +270,21 @@ void gem_set_tiling(int fd, uint32_t handle, int tiling, int stride)
assert(st.tiling_mode == tiling);
}
#define LOCAL_I915_PARAM_HAS_VEBOX 22
int gem_has_vebox(int fd)
{
struct drm_i915_getparam gp;
int val;
gp.param = LOCAL_I915_PARAM_HAS_VEBOX;
gp.value = &val;
if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp, sizeof(gp)))
return 0;
return val != 0;
}
struct local_drm_i915_gem_cacheing {
uint32_t handle;
uint32_t cacheing;
+1
View File
@@ -47,6 +47,7 @@ int drm_open_any_master(void);
void gem_quiescent_gpu(int fd);
/* ioctl wrappers and similar stuff for bare metal testing */
int gem_has_vebox(int fd);
void gem_set_tiling(int fd, uint32_t handle, int tiling, int stride);
int gem_has_cacheing(int fd);
void gem_set_cacheing(int fd, uint32_t handle, int cacheing);