From: Damien Lespiau Subject: [PATCH i-g-t 41/43] kms_rotation_crc: Always use the primary plane to compute the reference CRC Date: Thu, 10 Jul 2014 19:00:42 +0100 Message-ID: <1405015244-11370-42-git-send-email-damien.lespiau@intel.com> References: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id A70B56E38D for ; Thu, 10 Jul 2014 11:02:38 -0700 (PDT) In-Reply-To: <1405015244-11370-1-git-send-email-damien.lespiau@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org Trying to disable the primary planes isn't exactly working at the moment. W/A it until it works. Signed-off-by: Damien Lespiau --- tests/kms_rotation_crc.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index cb1b00b..9aacddd 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); -- 1.8.3.1