All of lore.kernel.org
 help / color / mirror / Atom feed
From: venkata.sai.patnana@intel.com
To: igt-dev@lists.freedesktop.org
Cc: Nischal Varide <nischal.varide@intel.com>,
	Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 02/17] tests/kms_dither: Validate dither after CC blocks
Date: Fri, 11 Jun 2021 10:49:50 +0530	[thread overview]
Message-ID: <20210611052005.303-2-venkata.sai.patnana@intel.com> (raw)
In-Reply-To: <20210611052005.303-1-venkata.sai.patnana@intel.com>

From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

Dithering after all CC blocks will be enabled only if the panel
supports 12 BPC (or more) and the Framebuffer BPC is greater than
12 BPC. And legacy dither block (at the end of PIPE) should be
disabled to avoid double dithering.

This patch will extend the support to validate Dither after all
color conversion (CC) blocks.

Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Nischal Varide <nischal.varide@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_dither.c | 43 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)

diff --git a/tests/kms_dither.c b/tests/kms_dither.c
index c25d623f81..b1f0503a6c 100644
--- a/tests/kms_dither.c
+++ b/tests/kms_dither.c
@@ -57,7 +57,8 @@ typedef struct data {
 
 typedef struct {
 	unsigned int bpc;
-	unsigned int dither;
+	unsigned int legacy;
+	unsigned int cc1;
 } dither_status_t;
 
 /* Prepare test data. */
@@ -104,7 +105,13 @@ static dither_status_t get_dither_state(data_t *data)
 	igt_assert_eq(sscanf(start_loc, "bpc: %u", &status.bpc), 1);
 
 	igt_assert(start_loc = strstr(buf, "Dither: "));
-	igt_assert_eq(sscanf(start_loc, "Dither: %u", &status.dither), 1);
+	igt_assert_eq(sscanf(start_loc, "Dither: %u", &status.legacy), 1);
+
+	start_loc = strstr(buf, "Dither_CC1: ");
+	if (!start_loc)
+		status.cc1 = 0;
+	else
+		igt_assert_eq(sscanf(start_loc, "Dither_CC1: %u", &status.cc1), 1);
 
 	return status;
 }
@@ -141,10 +148,10 @@ static void test_dithering(data_t *data, enum pipe pipe,
 	 */
 	status = get_dither_state(data);
 
-	igt_debug("FB BPC:%d, Panel BPC:%d, Pipe BPC:%d, Expected Dither:%s, Actual result:%s\n",
-		  fb_bpc, output_bpc, status.bpc,
-		  (fb_bpc > output_bpc) ? "Enable": "Disable",
-		  status.dither ? "Enable": "Disable");
+	igt_debug("FB BPC:%d, Panel BPC:%d, Pipe BPC:%d, "
+		  "Dither at end of the pipe:%u, Dither after CC1:%u\n",
+			fb_bpc, output_bpc, status.bpc,
+			status.legacy, status.cc1);
 
        /*
 	* We must update the Connector max_bpc property back
@@ -163,12 +170,25 @@ static void test_dithering(data_t *data, enum pipe pipe,
 				output->name, status.bpc, output_bpc);
 
 	/* Compute the result. */
-	if (fb_bpc > output_bpc)
-		igt_assert_f(status.dither, "(fb_%dbpc > output_%dbpc): Dither should be enabled\n",
-				fb_bpc, output_bpc);
-	else
-		igt_assert_f(!status.dither, "(fb_%dbpc <= output_%dbpc): Dither should be disabled\n",
+	if (fb_bpc > output_bpc) {
+		if (output_bpc < IGT_CONNECTOR_BPC_12)
+			igt_assert_f((status.legacy && !status.cc1),
+					"(fb_%dbpc > output_%dbpc): Dither should be "
+					"enabled at end of the PIPE & "
+					"disbaled at the CC1.\n",
+					fb_bpc, output_bpc);
+		else
+			igt_assert_f((!status.legacy && status.cc1),
+					"(fb_%dbpc > output_%dbpc): Dither should be "
+					"disabled at end of the PIPE & "
+					"enabled at the CC1.\n",
+					fb_bpc, output_bpc);
+	} else {
+		igt_assert_f((!status.legacy && !status.cc1),
+				"(fb_%dbpc <= output_%dbpc): Dither should be "
+				"disabled at both places (end of the PIPE & CC1).\n",
 				fb_bpc, output_bpc);
+	}
 
 	return;
 }
@@ -218,6 +238,7 @@ igt_main
 	} tests[] = {
 		{ IGT_FRAME_BUFFER_BPC_8, DRM_FORMAT_XRGB8888, IGT_CONNECTOR_BPC_6 },
 		{ IGT_FRAME_BUFFER_BPC_8, DRM_FORMAT_XRGB8888, IGT_CONNECTOR_BPC_8 },
+		{ IGT_FRAME_BUFFER_BPC_16, DRM_FORMAT_XRGB16161616F, IGT_CONNECTOR_BPC_12 },
 	};
 	int i;
 	data_t data = { 0 };
-- 
2.25.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-06-11  5:30 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11  5:19 [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering venkata.sai.patnana
2021-06-11  5:19 ` venkata.sai.patnana [this message]
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 03/17] tests/device_reset: Unload snd driver before i915 unbind venkata.sai.patnana
2021-06-11 15:49   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 04/17] tests/core_hotunplug: " venkata.sai.patnana
2021-06-11 15:50   ` Kai Vehmanen
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 05/17] tests/kms_force_connector_basic: Skip prune stale mode venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 06/17] tests/kms: Create buffer object from LMEM for discrete venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 07/17] tests/kms_addfb_basic: Add invalid buffer object test " venkata.sai.patnana
2021-06-11 11:40   ` Petri Latvala
2021-06-11 11:49   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 12:09     ` Petri Latvala
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 08/17] tests/kms_dp_dsc: Read the debugfs only once venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 09/17] tests/kms_big_fb: Add max HW stride length tests venkata.sai.patnana
2021-06-15  6:00   ` Shankar, Uma
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 10/17] tests/kms_big_fb: Add max hw stride lenght async flip test venkata.sai.patnana
2021-06-11  5:19 ` [igt-dev] [PATCH i-g-t 11/17] tests/kms_big_fb: Optimize setup_fb function venkata.sai.patnana
2021-06-11  9:59   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 11:32     ` Karthik B S
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 12/17] tests/kms_dp_dsc: Add a subtest to force DSC output BPP venkata.sai.patnana
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 13/17] lib: Add helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:13   ` Petri Latvala
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 14/17] tests/kms_dp_dsc: Assign all related data members together venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 15/17] tests/kms_dp_dsc: Use helper functions to read/write dsc debugfs venkata.sai.patnana
2021-06-15  9:15   ` Petri Latvala
2021-06-15 15:25   ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 16/17] tests/kms_invalid_dotclock: Modify the test for bigjoiner venkata.sai.patnana
2021-06-11  5:20 ` [igt-dev] [PATCH i-g-t 17/17] tests/kms_cdclk : Add test to validate cdclk crawling venkata.sai.patnana
2021-06-11  9:59   ` venkata.sai.patnana
2021-06-11 11:49     ` [igt-dev] [PATCH i-g-t v2 " venkata.sai.patnana
2021-06-11 14:11       ` [igt-dev] [PATCH i-g-t v3 " venkata.sai.patnana
2021-06-11  6:15 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
2021-06-11  9:15 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 12:17   ` Petri Latvala
2021-06-11 10:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev3) Patchwork
2021-06-11 12:14 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-06-11 13:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev5) Patchwork
2021-06-11 15:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-11 15:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev6) Patchwork
2021-06-15  5:54 ` [igt-dev] [PATCH i-g-t 01/17] tests/kms_dither: New IGT to validate crtc Dithering Shankar, Uma
2021-06-15  5:58   ` Modem, Bhanuprakash
2021-06-15  6:11     ` Shankar, Uma
2021-06-15  9:04       ` Jani Nikula
2021-06-15 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,01/17] tests/kms_dither: New IGT to validate crtc Dithering (rev8) Patchwork
2021-06-16  0:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210611052005.303-2-venkata.sai.patnana@intel.com \
    --to=venkata.sai.patnana@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=nischal.varide@intel.com \
    --cc=petri.latvala@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.