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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

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

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux