summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-10-03 10:59:45 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-10-26 15:18:25 +0200
commitee9a10aa13cfb3c5b6520643a84b2f12ebc9fca5 (patch)
tree93bfb6357d501762f4d95a1efb309172dd0472b7 /tests
parentff2db94acb53543acd7ba4e2badff59807069365 (diff)
kms_plane_alpha_blend: Start CRC after enabling display.
This will fix the -EIO from trying to start CRC on a disabled pipe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108146 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_plane_alpha_blend.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 81c8cb916..3fab118ae 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -266,8 +266,9 @@ static void basic_alpha(data_t *data, enum pipe pipe, igt_plane_t *plane)
igt_display_commit2(display, COMMIT_ATOMIC);
igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc);
- igt_pipe_crc_stop(data->pipe_crc);
igt_assert_crc_equal(&ref_crc, &crc);
+
+ igt_pipe_crc_stop(data->pipe_crc);
}
static void argb_opaque(data_t *data, enum pipe pipe, igt_plane_t *plane)
@@ -390,6 +391,7 @@ static void alpha_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
if (plane->type != DRM_PLANE_TYPE_PRIMARY)
igt_plane_set_fb(igt_pipe_get_plane_type(&display->pipes[pipe], DRM_PLANE_TYPE_PRIMARY), &data->gray_fb);
+ igt_display_commit2(display, COMMIT_ATOMIC);
igt_pipe_crc_start(data->pipe_crc);
/* for coverage, plane alpha and fb alpha should be swappable, so swap fb and alpha */
@@ -407,6 +409,8 @@ static void alpha_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc);
igt_assert_crc_equal(&ref_crc, &crc);
}
+
+ igt_pipe_crc_stop(data->pipe_crc);
}
static void coverage_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
@@ -416,6 +420,7 @@ static void coverage_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
int i;
igt_plane_set_prop_enum(plane, IGT_PLANE_PIXEL_BLEND_MODE, "Coverage");
+ igt_display_commit2(display, COMMIT_ATOMIC);
igt_pipe_crc_start(data->pipe_crc);
/* for coverage, plane alpha and fb alpha should be swappable, so swap fb and alpha */
@@ -433,6 +438,8 @@ static void coverage_7efc(data_t *data, enum pipe pipe, igt_plane_t *plane)
igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc);
igt_assert_crc_equal(&ref_crc, &crc);
}
+
+ igt_pipe_crc_stop(data->pipe_crc);
}
static void coverage_premult_constant(data_t *data, enum pipe pipe, igt_plane_t *plane)
@@ -462,6 +469,8 @@ static void coverage_premult_constant(data_t *data, enum pipe pipe, igt_plane_t
igt_display_commit2(display, COMMIT_ATOMIC);
igt_pipe_crc_get_current(display->drm_fd, data->pipe_crc, &crc);
igt_assert_crc_equal(&ref_crc, &crc);
+
+ igt_pipe_crc_stop(data->pipe_crc);
}
static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, bool blend,
@@ -554,8 +563,6 @@ igt_main
enum pipe pipe;
igt_fixture {
- igt_skip_on_simulation();
-
data.gfx_fd = drm_open_driver(DRIVER_ANY);
igt_require_pipe_crc(data.gfx_fd);
igt_display_init(&data.display, data.gfx_fd);