From patchwork Mon Apr 11 17:41:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paauwe, Bob J" X-Patchwork-Id: 8804831 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 47C9EC0554 for ; Mon, 11 Apr 2016 17:41:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 729AB2028D for ; Mon, 11 Apr 2016 17:41:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2080F202B8 for ; Mon, 11 Apr 2016 17:41:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A568B6E2FC; Mon, 11 Apr 2016 17:41:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 563566E2FC for ; Mon, 11 Apr 2016 17:41:08 +0000 (UTC) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 11 Apr 2016 10:41:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,462,1455004800"; d="scan'208";a="930132535" Received: from bpaauwe-desk.fm.intel.com ([10.1.134.204]) by orsmga001.jf.intel.com with ESMTP; 11 Apr 2016 10:41:07 -0700 From: Bob Paauwe To: intel-gfx Date: Mon, 11 Apr 2016 10:41:35 -0700 Message-Id: <1460396495-10265-1-git-send-email-bob.j.paauwe@intel.com> X-Mailer: git-send-email 2.5.5 Subject: [Intel-gfx] [PATCH i-g-t] ksm_pipe_color: Set legacy gamma values inside loop. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When testing multple outputs, make sure to set the gamma values before testing the output. Otherwise we're testing using the gamma values that were reset after last output was tested. Without this, the first output passes, but each output after that will fail. Signed-off-by: Bob Paauwe Reviewed-by: Lionel Landwerlin --- tests/kms_pipe_color.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c index f08aabd..9f7ac7e 100644 --- a/tests/kms_pipe_color.c +++ b/tests/kms_pipe_color.c @@ -452,10 +452,6 @@ static void test_pipe_legacy_gamma(data_t *data, green_lut = malloc(sizeof(uint16_t) * legacy_lut_size); blue_lut = malloc(sizeof(uint16_t) * legacy_lut_size); - red_lut[0] = green_lut[0] = blue_lut[0] = 0; - for (i = 1; i < legacy_lut_size; i++) - red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff; - for_each_connected_output(&data->display, output) { drmModeModeInfo *mode; struct igt_fb fb_modeset, fb; @@ -500,6 +496,10 @@ static void test_pipe_legacy_gamma(data_t *data, */ paint_gradient_rectangles(data, mode, red_green_blue, &fb); igt_plane_set_fb(primary, &fb); + + red_lut[0] = green_lut[0] = blue_lut[0] = 0; + for (i = 1; i < legacy_lut_size; i++) + red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff; igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id, legacy_lut_size, red_lut, green_lut, blue_lut), 0); igt_display_commit(&data->display);