summaryrefslogtreecommitdiff
path: root/tests/kms_rotation_crc.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-07-09 14:00:59 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-07-11 15:12:23 +0100
commit1a754396673d99d51cd4d5821bee32d5f6425f4c (patch)
tree4860b57e9aa945ce27d939deabbbf82adc266b05 /tests/kms_rotation_crc.c
parent282f5605b02a2fc0f1c1547d59e39810962112dd (diff)
kms_rotation_crc: Always use the primary plane to compute the reference CRC
Trying to disable the primary planes isn't exactly working at the moment. W/A it until it works. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'tests/kms_rotation_crc.c')
-rw-r--r--tests/kms_rotation_crc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
index cb1b00bf..9aacddd1 100644
--- a/tests/kms_rotation_crc.c
+++ b/tests/kms_rotation_crc.c
@@ -86,6 +86,7 @@ static bool prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
igt_output_set_pipe(output, pipe);
+
/* create the pipe_crc object for this pipe */
igt_pipe_crc_free(data->pipe_crc);
data->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
@@ -108,6 +109,18 @@ static bool prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
paint_squares(data, &data->fb, mode, DRM_ROTATE_180);
+ /*
+ * XXX: We always set the primary plane to actually enable the pipe as
+ * there's no way (that works) to light up a pipe with only a sprite
+ * plane enabled at the moment.
+ */
+ if (!plane->is_primary) {
+ igt_plane_t *primary;
+
+ primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
+ igt_plane_set_fb(primary, &data->fb);
+ }
+
igt_plane_set_fb(plane, &data->fb);
igt_display_commit(display);
@@ -133,6 +146,15 @@ static void cleanup_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
data->pipe_crc = NULL;
igt_remove_fb(data->gfx_fd, &data->fb);
+
+ /* XXX: see the note in prepare_crtc() */
+ if (!plane->is_primary) {
+ igt_plane_t *primary;
+
+ primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY);
+ igt_plane_set_fb(primary, NULL);
+ }
+
igt_plane_set_fb(plane, NULL);
igt_output_set_pipe(output, PIPE_ANY);