summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-05-13 14:49:53 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-05-13 15:14:21 +0300
commitabc262bf470f0988e10f1cfe4aa8d0f7f5f65519 (patch)
treef29547337bc31a816c4b3ce70773a2042af90cc7 /tests
parent54f8f5d13eefbbfb16ffd38be565d5c60ce67440 (diff)
tests/kms_fbc_crc: Reset display state between subtests
If a subtest fails it'll leave the display in a state that may prevent the next subtest from working. So reset the display state between subtests. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_fbc_crc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index c169cc90..8a08bbc7 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -442,6 +442,19 @@ static void finish_crtc(data_t *data, enum test_mode mode)
igt_remove_fb(data->drm_fd, &data->fb[1]);
}
+static void reset_display(data_t *data)
+{
+ igt_display_t *display = &data->display;
+
+ for_each_connected_output(display, data->output) {
+ if (data->output->valid) {
+ data->primary = igt_output_get_plane(data->output, IGT_PLANE_PRIMARY);
+ igt_plane_set_fb(data->primary, NULL);
+ }
+ igt_output_set_pipe(data->output, PIPE_ANY);
+ }
+}
+
static void run_test(data_t *data, enum test_mode mode)
{
igt_display_t *display = &data->display;
@@ -453,6 +466,8 @@ static void run_test(data_t *data, enum test_mode mode)
drm_intel_gem_context_destroy(ctx);
}
+ reset_display(data);
+
for_each_connected_output(display, data->output) {
for (data->pipe = 0; data->pipe < igt_display_get_n_pipes(display); data->pipe++) {
if (!prepare_crtc(data))