diff mbox

[igt,09/10] kms_frontbuffer_tracking: assert the stride changes at stridechange()

Message ID 1447434771-19337-10-git-send-email-paulo.r.zanoni@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zanoni, Paulo R Nov. 13, 2015, 5:12 p.m. UTC
We were previously using igt_create_fb(), which decided the stride by
itself: there was no guarantee that making a buffer 512 pixels bigger
would make its stride change. We're setting our own stride now so we
have some guarantees, but let's put an assertion just to make sure
we're doing the right thing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 tests/kms_frontbuffer_tracking.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 436f1ec..5f6f3f1 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -2976,6 +2976,8 @@  static void stridechange_subtest(const struct test_mode *t)
 		  LOCAL_I915_FORMAT_MOD_X_TILED, t->plane, &new_fb);
 	fill_fb(&new_fb, COLOR_PRIM_BG);
 
+	igt_assert(old_fb->stride != new_fb.stride);
+
 	/* We can't assert that FBC will be enabled since there may not be
 	 * enough space for the CFB, but we can check the CRC. */
 	params->fb.fb = &new_fb;