[Intel-gfx] [PATCH i-g-t] tests/kms_addfb_basic: Add clobbered-modifier subtest

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed Nov 11 09:11:30 PST 2015


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Make sure the kernel doesn't clobber the modifiers when the user didn't
pass any.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_addfb_basic.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index d466e4d..73000d6 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -101,6 +101,16 @@ static void invalid_tests(int fd)
 		f.modifier[1] = 0;
 	}
 
+	igt_subtest("clobberred-modifier") {
+		f.flags = 0;
+		f.modifier[0] = 0;
+		gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
+		igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == 0);
+		igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
+		f.fb_id = 0;
+		igt_assert(f.modifier[0] == 0);
+	}
+
 	igt_fixture {
 		gem_close(fd, gem_bo);
 		gem_close(fd, gem_bo_small);
-- 
2.4.10



More information about the Intel-gfx mailing list