[igt-dev] [PATCH i-g-t 1/2] lib: Skip tests that require fb modifiers when KMS is disabled
José Roberto de Souza
jose.souza at intel.com
Fri Oct 12 21:28:26 UTC 2018
When KMS is disabled, drmGetCap() for DRM_CAP_ADDFB2_MODIFIERS() will
return -1 and set errno as EOPNOTSUPP, the current assert was only
checking for a sucess result or invalid argument causing
prime_vgem at basic-fence-flip test to fail when KMS is disabled.
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
lib/ioctl_wrappers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 0929c43f..bda9a764 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1661,7 +1661,7 @@ void igt_require_fb_modifiers(int fd)
int ret;
ret = drmGetCap(fd, DRM_CAP_ADDFB2_MODIFIERS, &cap_modifiers);
- igt_assert(ret == 0 || errno == EINVAL);
+ igt_assert(ret == 0 || errno == EINVAL || errno == EOPNOTSUPP);
has_modifiers = ret == 0 && cap_modifiers == 1;
cap_modifiers_tested = true;
}
--
2.19.1
More information about the igt-dev
mailing list