mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-18 20:03:06 +00:00
Check for vebox support before testing
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63941
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user