summaryrefslogtreecommitdiff
path: root/tests/kms_frontbuffer_tracking.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2015-12-03 08:25:38 -0800
committerRodrigo Vivi <rodrigo.vivi@intel.com>2015-12-07 09:06:20 -0800
commitea3806badee7dcb7677edcfe35c17499c1b0f377 (patch)
treeb7ce404a6879fd997a165382cea53692830411c9 /tests/kms_frontbuffer_tracking.c
parentd074b44ab6a7ac14cc36b1dc98df5bcf73c82f95 (diff)
kms_frontbuffer_tracking: Make sink crc mandatory only for PSR.
Unfortunately Sink CRC is not 100% reliable for all platforms. So we cannot block FBC tests nor skip them when we are getting unreliable Sink CRC results, or not getting them at all. Acked-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'tests/kms_frontbuffer_tracking.c')
-rw-r--r--tests/kms_frontbuffer_tracking.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
index 8f5bda48..bc91d3e7 100644
--- a/tests/kms_frontbuffer_tracking.c
+++ b/tests/kms_frontbuffer_tracking.c
@@ -1570,7 +1570,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
return flags;
}
-#define do_crc_assertions(flags) do { \
+#define do_crc_assertions(flags, mandatory_sink_crc) do { \
int flags__ = (flags); \
struct both_crcs crc_; \
\
@@ -1582,7 +1582,11 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
\
igt_assert(wanted_crc); \
igt_assert_crc_equal(&crc_.pipe, &wanted_crc->pipe); \
- assert_sink_crc_equal(&crc_.sink, &wanted_crc->sink); \
+ if (mandatory_sink_crc) \
+ assert_sink_crc_equal(&crc_.sink, &wanted_crc->sink); \
+ else \
+ if (!sink_crc_equal(&crc_.sink, &wanted_crc->sink)) \
+ igt_info("Sink CRC differ, but not required\n"); \
} while (0)
#define do_status_assertions(flags_) do { \
@@ -1618,12 +1622,13 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
#define do_assertions(flags) do { \
int flags_ = adjust_assertion_flags(t, (flags)); \
+ bool mandatory_sink_crc = t->feature & FEATURE_PSR; \
\
wait_user(2, "Paused before assertions."); \
\
/* Check the CRC to make sure the drawing operations work \
* immediately, independently of the features being enabled. */ \
- do_crc_assertions(flags_); \
+ do_crc_assertions(flags_, mandatory_sink_crc); \
\
/* Now we can flush things to make the test faster. */ \
do_flush(t); \
@@ -1636,7 +1641,7 @@ static int adjust_assertion_flags(const struct test_mode *t, int flags)
* would only delay the test suite while adding no value to the \
* test suite. */ \
if (t->screen == SCREEN_PRIM) \
- do_crc_assertions(flags_); \
+ do_crc_assertions(flags_, mandatory_sink_crc); \
\
if (fbc.supports_last_action && opt.fbc_check_last_action) { \
if (flags_ & ASSERT_LAST_ACTION_CHANGED) \