diff mbox

[i-g-t,v2,03/17] lib: Have gem_set_tiling require intel

Message ID 1457448699-9778-4-git-send-email-tomeu.vizoso@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomeu Vizoso March 8, 2016, 2:51 p.m. UTC
Before calling a i915-specific IOCTL, require i915.

This allows us to skip subtests that are specific to that driver, though
what should eventually happen is that tests don't generally call
gem_set_tiling directly but go through an abstraction layer that
constructs the buffer object in a driver-specific way.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---

Changes in v2: None

 lib/ioctl_wrappers.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 5d4972931506..0221b7fef3a1 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -138,6 +138,8 @@  int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride)
 	struct drm_i915_gem_set_tiling st;
 	int ret;
 
+	igt_require_intel(fd);
+
 	memset(&st, 0, sizeof(st));
 	do {
 		st.handle = handle;