diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-05-08 15:56:24 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-05-09 21:03:46 +0300 |
commit | d848a36545eec43760de7e34a57a796182358087 (patch) | |
tree | 5aaad80d38322e4462627672595c35e6e1b69827 /tests | |
parent | f85fff0de620bc20d8a20896812fcce584983f28 (diff) |
tests/kms_fbc_crc: Check context support earlier
Check for context support before doing anything else in the subtest.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_fbc_crc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c index b728224c..4013510e 100644 --- a/tests/kms_fbc_crc.c +++ b/tests/kms_fbc_crc.c @@ -401,9 +401,9 @@ static bool prepare_test(data_t *data, enum test_mode mode) if (mode == TEST_CONTEXT || mode == TEST_PAGE_FLIP_AND_CONTEXT) { data->ctx[0] = drm_intel_gem_context_create(data->bufmgr); - igt_require(data->ctx[0]); + igt_assert(data->ctx[0]); data->ctx[1] = drm_intel_gem_context_create(data->bufmgr); - igt_require(data->ctx[1]); + igt_assert(data->ctx[1]); /* * Disable FBC RT address for both contexts @@ -460,6 +460,12 @@ static void run_test(data_t *data, enum test_mode mode) int i, n; int valid_tests = 0; + if (mode == TEST_CONTEXT || mode == TEST_PAGE_FLIP_AND_CONTEXT) { + drm_intel_context *ctx = drm_intel_gem_context_create(data->bufmgr); + igt_require(ctx); + drm_intel_gem_context_destroy(ctx); + } + for (i = 0; i < data->resources->count_connectors; i++) { uint32_t connector_id = data->resources->connectors[i]; |