From patchwork Fri Jun 4 13:11:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srinivas, Vidya" X-Patchwork-Id: 12299745 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABF99C07E94 for ; Fri, 4 Jun 2021 13:20:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A60F613DE for ; Fri, 4 Jun 2021 13:20:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A60F613DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B1146E3D8; Fri, 4 Jun 2021 13:20:12 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E3D96E3D8; Fri, 4 Jun 2021 13:20:11 +0000 (UTC) IronPort-SDR: dgjHuMzTzYHmPqqE5RS1wb7Sof7gv03BGKxaxR9szx8ia5iieXPnyLEfUjY0U3pP/z/20bPOdR 98lRXzjhy26w== X-IronPort-AV: E=McAfee;i="6200,9189,10004"; a="183969607" X-IronPort-AV: E=Sophos;i="5.83,248,1616482800"; d="scan'208";a="183969607" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2021 06:20:10 -0700 IronPort-SDR: NkKqZga4abMwGN8wYJ+9wtdVvY9ooJG2ZCByZCAD9rOYV6nzDd4yIp4nYt1jKVFBgFOw9YjkUY nk7RQhE67K3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,248,1616482800"; d="scan'208";a="468317078" Received: from vsrini4-xps-8920.iind.intel.com (HELO localhost.localdomain) ([10.223.163.28]) by fmsmga004.fm.intel.com with ESMTP; 04 Jun 2021 06:20:08 -0700 From: Vidya Srinivas To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org Date: Fri, 4 Jun 2021 18:41:02 +0530 Message-Id: <1622812262-16592-1-git-send-email-vidya.srinivas@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1622176543-12759-1-git-send-email-vidya.srinivas@intel.com> References: <1622176543-12759-1-git-send-email-vidya.srinivas@intel.com> Subject: [Intel-gfx] [PATCH] tests/kms_color: Disable gamma in degamma tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: markyacoub@chromium.org, charlton.lin@intel.com MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This patch disables gamma in degamma subtest which is missing. It compares CRC between (linear degamma + solid colors) and (max degamma + gradient colors). v2 - Addressed review comments from Bhanuprakash Modem Signed-off-by: Vidya Srinivas Change-Id: Ibdb91b603e2e4024d170727d24c6a5425441e2e1 Reviewed-by: Bhanuprakash Modem Reviewed-by: Bhanuprakash Modem --- tests/kms_color.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/kms_color.c b/tests/kms_color.c index 3a42532a5c27..41720dcdd90f 100644 --- a/tests/kms_color.c +++ b/tests/kms_color.c @@ -32,7 +32,6 @@ static void test_pipe_degamma(data_t *data, igt_output_t *output; igt_display_t *display = &data->display; gamma_lut_t *degamma_linear, *degamma_full; - gamma_lut_t *gamma_linear; color_t red_green_blue[] = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, @@ -45,8 +44,6 @@ static void test_pipe_degamma(data_t *data, degamma_linear = generate_table(data->degamma_lut_size, 1.0); degamma_full = generate_table_max(data->degamma_lut_size); - gamma_linear = generate_table(data->gamma_lut_size, 1.0); - for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) { drmModeModeInfo *mode; struct igt_fb fb_modeset, fb; @@ -75,8 +72,8 @@ static void test_pipe_degamma(data_t *data, igt_plane_set_fb(primary, &fb_modeset); disable_ctm(primary->pipe); - disable_degamma(primary->pipe); - set_gamma(data, primary->pipe, gamma_linear); + disable_gamma(primary->pipe); + set_degamma(data, primary->pipe, degamma_linear); igt_display_commit(&data->display); /* Draw solid colors with no degamma transformation. */ @@ -103,15 +100,17 @@ static void test_pipe_degamma(data_t *data, */ igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors); + disable_degamma(primary->pipe); igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit2(&data->display, data->display.is_atomic ? + COMMIT_ATOMIC : COMMIT_LEGACY); igt_remove_fb(data->drm_fd, &fb); igt_remove_fb(data->drm_fd, &fb_modeset); } free_lut(degamma_linear); free_lut(degamma_full); - free_lut(gamma_linear); } /* @@ -189,8 +188,11 @@ static void test_pipe_gamma(data_t *data, */ igt_assert_crc_equal(&crc_fullgamma, &crc_fullcolors); + disable_gamma(primary->pipe); igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit2(&data->display, data->display.is_atomic ? + COMMIT_ATOMIC : COMMIT_LEGACY); igt_remove_fb(data->drm_fd, &fb); igt_remove_fb(data->drm_fd, &fb_modeset); } From patchwork Tue Jun 8 06:54:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Srinivas, Vidya" X-Patchwork-Id: 12305481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ADD2C47082 for ; Tue, 8 Jun 2021 07:04:08 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B9BE06124B for ; Tue, 8 Jun 2021 07:04:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B9BE06124B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 55DC16E0D6; Tue, 8 Jun 2021 07:04:07 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1DAE86EAB4; Tue, 8 Jun 2021 07:04:06 +0000 (UTC) IronPort-SDR: wmqKO3uDlYWr2Y21cgZPJ2VKyxKt4pRaij8Y5fHdJLB7/AhG1p1T2HnsND1eMRsvPDiUTRnfGW 6bO79XfHO0Zw== X-IronPort-AV: E=McAfee;i="6200,9189,10008"; a="191895033" X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="191895033" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2021 00:03:49 -0700 IronPort-SDR: soMy49/aX0euyDRIEpDvChNUKR65hfULdKtS1liB/JS5JB3BcEgenM0p9KP7cn0eqJ+507WXBG MDYCFLF/aE6A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,257,1616482800"; d="scan'208";a="449412711" Received: from vsrini4-xps-8920.iind.intel.com (HELO localhost.localdomain) ([10.223.163.28]) by fmsmga008.fm.intel.com with ESMTP; 08 Jun 2021 00:03:44 -0700 From: Vidya Srinivas To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org Date: Tue, 8 Jun 2021 12:24:18 +0530 Message-Id: <1623135258-11372-2-git-send-email-vidya.srinivas@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1623135258-11372-1-git-send-email-vidya.srinivas@intel.com> References: <1622812262-16592-1-git-send-email-vidya.srinivas@intel.com> <1623135258-11372-1-git-send-email-vidya.srinivas@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 2/2] tests/kms_color_chamelium: Disable gamma in degamma tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: markyacoub@chromium.org, charlton.lin@intel.com MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This patch disables gamma in degamma subtest which is missing. It compares CRC between (linear degamma + solid colors) and (max degamma + gradient colors). Patch also cleans up degamma before exiting degamma test and cleans up gamma before exiting gamma test. Signed-off-by: Vidya Srinivas --- tests/kms_color_chamelium.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/kms_color_chamelium.c b/tests/kms_color_chamelium.c index 30b38b82e306..11e5286912d7 100644 --- a/tests/kms_color_chamelium.c +++ b/tests/kms_color_chamelium.c @@ -36,7 +36,6 @@ static void test_pipe_degamma(data_t *data, { igt_output_t *output; gamma_lut_t *degamma_linear, *degamma_full; - gamma_lut_t *gamma_linear; color_t red_green_blue[] = { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, @@ -57,8 +56,6 @@ static void test_pipe_degamma(data_t *data, degamma_linear = generate_table(data->degamma_lut_size, 1.0); degamma_full = generate_table_max(data->degamma_lut_size); - gamma_linear = generate_table(data->gamma_lut_size, 1.0); - for_each_valid_output_on_pipe(&data->display, primary->pipe->pipe, output) { @@ -109,11 +106,11 @@ static void test_pipe_degamma(data_t *data, igt_plane_set_fb(primary, &fb_modeset); disable_ctm(primary->pipe); - disable_degamma(primary->pipe); - set_gamma(data, primary->pipe, gamma_linear); + disable_gamma(primary->pipe); + set_degamma(data, primary->pipe, degamma_linear); igt_display_commit(&data->display); - /* Draw solid colors with no degamma transformation. */ + /* Draw solid colors with linear degamma transformation. */ paint_rectangles(data, mode, red_green_blue, &fbref); /* Draw a gradient with degamma LUT to remap all @@ -135,13 +132,14 @@ static void test_pipe_degamma(data_t *data, frame_fullcolors, &fbref, CHAMELIUM_CHECK_ANALOG); + disable_degamma(primary->pipe); igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit(&data->display); } free_lut(degamma_linear); free_lut(degamma_full); - free_lut(gamma_linear); } /* @@ -247,8 +245,10 @@ static void test_pipe_gamma(data_t *data, frame_fullcolors, &fbref, CHAMELIUM_CHECK_ANALOG); + disable_gamma(primary->pipe); igt_plane_set_fb(primary, NULL); igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit(&data->display); } free_lut(gamma_full);