public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] kms_flip_tiling: [linear, X]<->[Y, Yf] tiling changes are not allowed
Date: Wed, 22 Apr 2015 17:00:27 +0100	[thread overview]
Message-ID: <1429718427-528-1-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

This matches the behaviour in kernel patch
"drm/i915/skl: Disallow tiling changes during page flip".

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/kms_flip_tiling.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
index 8345505..3eef4cc 100644
--- a/tests/kms_flip_tiling.c
+++ b/tests/kms_flip_tiling.c
@@ -63,7 +63,7 @@ fill_linear_fb(struct igt_fb *fb, data_t *data, drmModeModeInfo *mode)
 }
 
 static void
-test_flip_changes_tiling(data_t *data, igt_output_t *output, uint64_t tiling)
+test_flip_changes_tiling(data_t *data, igt_output_t *output, uint64_t tiling, int expect)
 {
 	struct igt_fb linear, tiled;
 	drmModeModeInfo *mode;
@@ -107,13 +107,15 @@ test_flip_changes_tiling(data_t *data, igt_output_t *output, uint64_t tiling)
 	/* flip to the linear buffer */
 	ret = drmModePageFlip(data->drm_fd, output->config.crtc->crtc_id,
 			      fb_id, 0, NULL);
-	igt_assert_eq(ret, 0);
+	igt_assert_eq(ret, expect);
 
-	igt_wait_for_vblank(data->drm_fd, pipe);
+	if (expect == 0) {
+		igt_wait_for_vblank(data->drm_fd, pipe);
 
-	/* get a crc and compare with the reference */
-	igt_pipe_crc_collect_crc(pipe_crc, &crc);
-	igt_assert_crc_equal(&reference_crc, &crc);
+		/* get a crc and compare with the reference */
+		igt_pipe_crc_collect_crc(pipe_crc, &crc);
+		igt_assert_crc_equal(&reference_crc, &crc);
+	}
 
 	/* clean up */
 	igt_plane_set_fb(primary, NULL);
@@ -145,7 +147,8 @@ igt_main
 	igt_subtest_f("flip-changes-tiling") {
 		for_each_connected_output(&data.display, output)
 			test_flip_changes_tiling(&data, output,
-						LOCAL_I915_FORMAT_MOD_X_TILED);
+						LOCAL_I915_FORMAT_MOD_X_TILED,
+						0);
 	}
 
 	igt_subtest_f("flip-changes-tiling-Y") {
@@ -154,7 +157,8 @@ igt_main
 
 		for_each_connected_output(&data.display, output)
 			test_flip_changes_tiling(&data, output,
-						LOCAL_I915_FORMAT_MOD_Y_TILED);
+						LOCAL_I915_FORMAT_MOD_Y_TILED,
+						-EINVAL);
 	}
 
 	igt_subtest_f("flip-changes-tiling-Yf") {
@@ -163,7 +167,8 @@ igt_main
 
 		for_each_connected_output(&data.display, output)
 			test_flip_changes_tiling(&data, output,
-						LOCAL_I915_FORMAT_MOD_Yf_TILED);
+						LOCAL_I915_FORMAT_MOD_Yf_TILED,
+						-EINVAL);
 	}
 
 	igt_fixture {
-- 
2.3.5

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

             reply	other threads:[~2015-04-22 16:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 16:00 Tvrtko Ursulin [this message]
2015-04-22 16:07 ` [PATCH i-g-t] kms_flip_tiling: [linear, X]<->[Y, Yf] tiling changes are not allowed Chris Wilson
2015-04-22 16:23   ` Tvrtko Ursulin
2015-04-22 16:45     ` Chris Wilson
2015-04-23  9:05       ` Tvrtko Ursulin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429718427-528-1-git-send-email-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox