diff mbox

[igt] lib/ioctl_wrappers: handle ENODEV from from GEM_SET_CACHING ioctl

Message ID 1439567078-29459-1-git-send-email-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Imre Deak Aug. 14, 2015, 3:44 p.m. UTC
The ENODEV return value was introduced to the GEM_SET_CACHING ioctl to
mean that the given platform doesn't support the requested caching level
(currently only due to a HW issues on BXT A steppings). Handle this as
the other cases where we want to skip the related subtests.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 lib/ioctl_wrappers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 53bd635..25f0b2c 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -201,7 +201,8 @@  void gem_set_caching(int fd, uint32_t handle, uint32_t caching)
 	arg.caching = caching;
 	ret = ioctl(fd, LOCAL_DRM_IOCTL_I915_GEM_SET_CACHEING, &arg);
 
-	igt_assert(ret == 0 || (errno == ENOTTY || errno == EINVAL));
+	igt_assert(ret == 0 || (errno == ENOTTY || errno == EINVAL ||
+				errno == ENODEV));
 	igt_require(ret == 0);
 	errno = 0;
 }