All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
@ 2021-07-08 16:05 ` Varide, Nischal
  2021-07-12 13:35   ` Harry Wentland
  2021-07-08 16:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Varide, Nischal @ 2021-07-08 16:05 UTC (permalink / raw)
  To: Modem, Bhanuprakash, igt-dev



-----Original Message-----
From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com> 
Sent: Friday, July 9, 2021 2:04 AM
To: igt-dev@lists.freedesktop.org
Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Sharma, Swati2 <swati2.sharma@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Varide, Nischal <nischal.varide@intel.com>
Subject: [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering

Many of the display devices have color format support less than the color format of the input data (Ex: 8-bit input data and 6-bit display color depth). Then the input data will be either truncated or rounded, but this approach usually causes loss of detail and also produce large banded areas of a single color that significantly differs from the original image.

Dithering is a technique used to enhance these colors by creating the illusion of smoothness by adjusting the nearby pixel color.
For Eg: Converting 8-bit to 6-bit by modifying the pixel information.

Dithering should be enabled when a panel color depth is lower than the color depth of the framebuffer.

Even though feature Dithering is there since legacy, there is no specific IGT for this. This patch will create New IGT for Dithering.
And below is the truth table for CRTC Dithering.

|----------------|---------|-------------|
|  Frame buffer  |  Panel  |  Dithering  |
|----------------|---------|-------------|
|      8 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|      8 BPC     |  8 BPC  |     No      |
|----------------|---------|-------------|
|      8 BPC     | 10 BPC  |     No      |
|----------------|---------|-------------|
|     10 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|     10 BPC     |  8 BPC  |     Yes     |
|----------------|---------|-------------|
|     10 BPC     | 10 BPC  |     No      |
|----------------|---------|-------------|
|     16 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|     16 BPC     |  8 BPC  |     Yes     |
|----------------|---------|-------------|
|     16 BPC     | 10 BPC  |     Yes     |
|----------------|---------|-------------|

As i915 enables dithering for 6 bpc panels only, we need to limit the execution to 6 & 8 bpc panels (Negative testing) only.

Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Nischal Varide <nischal.varide@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Nischal Varide <nischal.varide@intel.com>
---
 tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build  |   1 +
 2 files changed, 254 insertions(+)
 create mode 100644 tests/kms_dither.c

diff --git a/tests/kms_dither.c b/tests/kms_dither.c new file mode 100644 index 0000000000..0e0c61dea2
--- /dev/null
+++ b/tests/kms_dither.c
@@ -0,0 +1,253 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person 
+obtaining a
+ * copy of this software and associated documentation files (the 
+"Software"),
+ * to deal in the Software without restriction, including without 
+limitation
+ * the rights to use, copy, modify, merge, publish, distribute, 
+sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom 
+the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the 
+next
+ * paragraph) shall be included in all copies or substantial portions 
+of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
+EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
+MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT 
+SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, 
+DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
+OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 
+OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
+ *
+ */
+
+#include "igt.h"
+#include <fcntl.h>
+#include <termios.h>
+#include <unistd.h>
+
+IGT_TEST_DESCRIPTION("Test Dithering block status");
+
+/* Connector BPC */
+#define IGT_CONNECTOR_BPC_6		6
+#define IGT_CONNECTOR_BPC_8		8
+#define IGT_CONNECTOR_BPC_10		10
+#define IGT_CONNECTOR_BPC_12		12
+
+/* Framebuffer BPC */
+#define IGT_FRAME_BUFFER_BPC_8		8
+#define IGT_FRAME_BUFFER_BPC_10		10
+#define IGT_FRAME_BUFFER_BPC_16		16
+
+/* Common test data. */
+typedef struct data {
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	drmModeModeInfo *mode;
+	enum pipe pipe_id;
+	int drm_fd;
+	igt_fb_t fb;
+} data_t;
+
+typedef struct {
+	unsigned int bpc;
+	unsigned int dither;
+} dither_status_t;
+
+/* Prepare test data. */
+static void prepare_test(data_t *data, igt_output_t *output, enum pipe 
+pipe) {
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = pipe;
+	data->pipe = &data->display.pipes[data->pipe_id];
+	igt_assert(data->pipe);
+
+	igt_display_reset(display);
+
+	data->output = output;
+	igt_assert(data->output);
+
+	data->mode = igt_output_get_mode(data->output);
+	igt_assert(data->mode);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	igt_output_set_pipe(data->output, data->pipe_id); }
+
+/* Returns the current state of dithering from the crtc debugfs. */ 
+static dither_status_t get_dither_state(data_t *data) {
+	char buf[512], tmp[5];
+	char *start_loc;
+	int dir, res;
+	dither_status_t status;
+
+	dir = igt_debugfs_dir(data->drm_fd);
+	igt_assert(dir >= 0);
+
+	res = igt_debugfs_simple_read(dir, "i915_display_info", buf, sizeof(buf));
+	igt_require(res > 0);
+	close(dir);
+
+	igt_assert(start_loc = strstr(buf, ", bpp="));
+	igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
+	status.bpc /= 3;
+
+	igt_assert(start_loc = strstr(buf, ", dither="));
+	igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
+	status.dither = !strcmp(tmp, "yes,");
+
+	return status;
+}
+
+static void test_dithering(data_t *data, enum pipe pipe,
+			   igt_output_t *output,
+			   int fb_bpc, int fb_format,
+			   int output_bpc)
+{
+	igt_display_t *display = &data->display;
+	dither_status_t status;
+	int bpc;
+
+	igt_info("Dithering test execution on %s PIPE_%s\n",
+			output->name, kmstest_pipe_name(pipe));
+	prepare_test(data, output, pipe);
+
+	igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
+				 data->mode->vdisplay, fb_format,
+				 LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
+	igt_plane_set_fb(data->primary, &data->fb);
+	igt_plane_set_size(data->primary, data->mode->hdisplay, 
+data->mode->vdisplay);
+
+	bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
+	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, output_bpc);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : 
+COMMIT_LEGACY);
+
+	/*
+	 * Check the status of Dithering block:
+	 *
+	 * Preserve the result & compute later (after clean-up).
+	 * If fb_bpc is greater than output_bpc, Dithering should be enabled
+	 * Else disabled
+	 */
+	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");
+
+       /*
+	* We must update the Connector max_bpc property back
+	* Otherwise, previously updated value will stay forever and
+	* may cause the failures for next/other subtests.
+	*/
+	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
+	igt_plane_set_fb(data->primary, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	igt_remove_fb(data->drm_fd, &data->fb);
+
+	/* Check if crtc bpc is updated with requested one. */
+	igt_require_f((status.bpc == output_bpc),
+			"%s can support max %u-bpc, but requested %d-bpc\n",
+				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",
+				fb_bpc, output_bpc);
+
+	return;
+}
+
+/* Returns true if an output supports max bpc property & max_bpc >= 
+requested. */ static bool is_supported(igt_output_t *output, int bpc) {
+        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
+	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); }
+
+static void
+run_dither_test(data_t *data, int fb_bpc, int fb_format, int 
+output_bpc) {
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+
+	for_each_connected_output(display, output) {
+		enum pipe pipe;
+		drmModeConnector *connector = output->config.connector;
+
+		if (!is_supported(output, output_bpc))
+			continue;
+
+		/* HDMI won't support 6 BPC */
+		if (output_bpc == IGT_CONNECTOR_BPC_6 &&
+		   (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+		    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
+			continue;
+
+		for_each_pipe(display, pipe) {
+			if (igt_pipe_connector_valid(pipe, output)) {
+				igt_dynamic_f("%s-pipe-%s", output->name, kmstest_pipe_name(pipe))
+					test_dithering(data, pipe, output, fb_bpc,
+							fb_format, output_bpc);
+
+				/* One pipe is enough */
+				break;
+			}
+		}
+	}
+}
+
+igt_main
+{
+	struct {
+		int fb_bpc;
+		int format;
+		int output_bpc;
+	} 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 },
+	};
+	int i;
+	data_t data = { 0 };
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.drm_fd);
+		igt_display_require_output(&data.display);
+	}
+
+	for (i = 0; i < ARRAY_SIZE(tests); i++) {
+		igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected Dither:%s\n",
+			       tests[i].fb_bpc, tests[i].output_bpc,
+			       (tests[i].fb_bpc > tests[i].output_bpc) ?
+							"Enable": "Disable");
+
+		igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
+				tests[i].fb_bpc, tests[i].output_bpc)
+			run_dither_test(&data,
+					tests[i].fb_bpc,
+					tests[i].format,
+					tests[i].output_bpc);
+	}
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build index 01911c4579..d3de40be07 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -29,6 +29,7 @@ test_progs = [
 	'kms_cursor_crc',
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
+	'kms_dither',
 	'kms_dp_aux_dev',
 	'kms_dp_dsc',
 	'kms_dp_tiled_display',
--
2.20.1

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
  2021-07-08 16:05 ` Varide, Nischal
@ 2021-07-08 16:56 ` Patchwork
  2021-07-08 20:33 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add dither tests to fast-feedback Bhanuprakash Modem
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-07-08 16:56 UTC (permalink / raw)
  To: Modem, Bhanuprakash; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 9382 bytes --]

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering
URL   : https://patchwork.freedesktop.org/series/92320/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10317 -> IGTPW_5996
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_5996:

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dither@fb-8bpc-vs-panel-8bpc} (NEW):
    - {fi-tgl-dsi}:       NOTRUN -> [SKIP][1] +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-tgl-dsi/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html

  * {igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a} (NEW):
    - {fi-ehl-2}:         NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-ehl-2/igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a.html
    - {fi-jsl-1}:         NOTRUN -> [SKIP][3]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-jsl-1/igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a.html

  
New tests
---------

  New tests have been introduced between CI_DRM_10317 and IGTPW_5996:

### New IGT tests (12) ###

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc:
    - Statuses : 18 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@dp-1-pipe-a:
    - Statuses : 4 pass(s)
    - Exec time: [0.08, 0.24] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@dp-2-pipe-a:
    - Statuses : 3 pass(s)
    - Exec time: [0.07, 0.47] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@dp-3-pipe-a:
    - Statuses : 1 pass(s)
    - Exec time: [0.18] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@edp-1-pipe-a:
    - Statuses : 10 pass(s)
    - Exec time: [1.36, 2.10] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc:
    - Statuses : 14 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@dp-1-pipe-a:
    - Statuses : 4 pass(s)
    - Exec time: [0.07, 0.24] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@dp-2-pipe-a:
    - Statuses : 3 pass(s)
    - Exec time: [0.06, 0.46] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@dp-3-pipe-a:
    - Statuses : 1 pass(s)
    - Exec time: [0.18] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a:
    - Statuses : 7 pass(s) 3 skip(s)
    - Exec time: [1.41, 2.13] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@hdmi-a-1-pipe-a:
    - Statuses : 4 pass(s)
    - Exec time: [0.06, 0.08] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc@hdmi-a-2-pipe-a:
    - Statuses : 4 pass(s)
    - Exec time: [0.05, 0.10] s

  

Known issues
------------

  Here are the changes found in IGTPW_5996 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_huc_copy@huc-copy:
    - fi-skl-6700k2:      NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@gem_huc_copy@huc-copy.html

  * igt@kms_chamelium@dp-hpd-fast:
    - fi-skl-6700k2:      NOTRUN -> [SKIP][5] ([fdo#109271]) +11 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@kms_chamelium@dp-hpd-fast.html

  * {igt@kms_dither@fb-8bpc-vs-panel-6bpc} (NEW):
    - fi-glk-dsi:         NOTRUN -> [SKIP][6] ([fdo#109271]) +1 similar issue
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-glk-dsi/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-kbl-8809g:       NOTRUN -> [SKIP][7] ([fdo#109271]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-kbl-8809g/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-kbl-guc:         NOTRUN -> [SKIP][8] ([fdo#109271]) +1 similar issue
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-kbl-guc/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-bsw-nick:        NOTRUN -> [SKIP][9] ([fdo#109271]) +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-bsw-nick/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-bwr-2160:        NOTRUN -> [SKIP][10] ([fdo#109271]) +1 similar issue
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-bwr-2160/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-bdw-5557u:       NOTRUN -> [SKIP][11] ([fdo#109271])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-bdw-5557u/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-kbl-7567u:       NOTRUN -> [SKIP][12] ([fdo#109271]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-kbl-7567u/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-cfl-8700k:       NOTRUN -> [SKIP][13] ([fdo#109271])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-cfl-8700k/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - {fi-dg1-1}:         NOTRUN -> [SKIP][14] ([i915#3717])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-dg1-1/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html
    - fi-cfl-guc:         NOTRUN -> [SKIP][15] ([fdo#109271])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-cfl-guc/igt@kms_dither@fb-8bpc-vs-panel-6bpc.html

  * {igt@kms_dither@fb-8bpc-vs-panel-8bpc} (NEW):
    - fi-elk-e7500:       NOTRUN -> [SKIP][16] ([fdo#109271]) +1 similar issue
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-elk-e7500/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - fi-ivb-3770:        NOTRUN -> [SKIP][17] ([fdo#109271]) +1 similar issue
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-ivb-3770/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - {fi-hsw-gt1}:       NOTRUN -> [SKIP][18] ([fdo#109271]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-hsw-gt1/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - fi-pnv-d510:        NOTRUN -> [SKIP][19] ([fdo#109271]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-pnv-d510/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - fi-hsw-4770:        NOTRUN -> [SKIP][20] ([fdo#109271]) +1 similar issue
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-hsw-4770/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - fi-bxt-dsi:         NOTRUN -> [SKIP][21] ([fdo#109271]) +1 similar issue
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-bxt-dsi/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html
    - fi-snb-2520m:       NOTRUN -> [SKIP][22] ([fdo#109271]) +1 similar issue
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-snb-2520m/igt@kms_dither@fb-8bpc-vs-panel-8bpc.html

  * {igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a} (NEW):
    - fi-bsw-kefka:       NOTRUN -> [SKIP][23] ([fdo#109271])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-bsw-kefka/igt@kms_dither@fb-8bpc-vs-panel-8bpc@edp-1-pipe-a.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-skl-6700k2:      NOTRUN -> [SKIP][24] ([fdo#109271] / [i915#533])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@runner@aborted:
    - fi-skl-6700k2:      NOTRUN -> [FAIL][25] ([i915#2722] / [i915#3363] / [i915#3744])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@runner@aborted.html

  * igt@vgem_basic@unload:
    - fi-skl-6700k2:      NOTRUN -> [INCOMPLETE][26] ([i915#3744])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@vgem_basic@unload.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-skl-6700k2:      [INCOMPLETE][27] ([i915#146] / [i915#198]) -> [PASS][28]
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/fi-skl-6700k2/igt@gem_exec_suspend@basic-s3.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/fi-skl-6700k2/igt@gem_exec_suspend@basic-s3.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
  [i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#3717]: https://gitlab.freedesktop.org/drm/intel/issues/3717
  [i915#3744]: https://gitlab.freedesktop.org/drm/intel/issues/3744
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Participating hosts (40 -> 39)
------------------------------

  Missing    (1): fi-bsw-cyan 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6131 -> IGTPW_5996

  CI-20190529: 20190529
  CI_DRM_10317: 505afbd2be5c7d6490a00a079a1d790921344b7a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_5996: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/index.html
  IGT_6131: ed6bf12d6608af1bc25d1cfdfae09f54e5566284 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git



== Testlist changes ==

+igt@kms_dither@fb-8bpc-vs-panel-6bpc
+igt@kms_dither@fb-8bpc-vs-panel-8bpc

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/index.html

[-- Attachment #1.2: Type: text/html, Size: 12179 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
@ 2021-07-08 20:33 Bhanuprakash Modem
  2021-07-08 16:05 ` Varide, Nischal
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Bhanuprakash Modem @ 2021-07-08 20:33 UTC (permalink / raw)
  To: igt-dev; +Cc: Nischal Varide

Many of the display devices have color format support less than
the color format of the input data (Ex: 8-bit input data and 6-bit
display color depth). Then the input data will be either truncated
or rounded, but this approach usually causes loss of detail and also
produce large banded areas of a single color that significantly
differs from the original image.

Dithering is a technique used to enhance these colors by creating the
illusion of smoothness by adjusting the nearby pixel color.
For Eg: Converting 8-bit to 6-bit by modifying the pixel information.

Dithering should be enabled when a panel color depth is lower than the
color depth of the framebuffer.

Even though feature Dithering is there since legacy, there is no
specific IGT for this. This patch will create New IGT for Dithering.
And below is the truth table for CRTC Dithering.

|----------------|---------|-------------|
|  Frame buffer  |  Panel  |  Dithering  |
|----------------|---------|-------------|
|      8 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|      8 BPC     |  8 BPC  |     No      |
|----------------|---------|-------------|
|      8 BPC     | 10 BPC  |     No      |
|----------------|---------|-------------|
|     10 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|     10 BPC     |  8 BPC  |     Yes     |
|----------------|---------|-------------|
|     10 BPC     | 10 BPC  |     No      |
|----------------|---------|-------------|
|     16 BPC     |  6 BPC  |     Yes     |
|----------------|---------|-------------|
|     16 BPC     |  8 BPC  |     Yes     |
|----------------|---------|-------------|
|     16 BPC     | 10 BPC  |     Yes     |
|----------------|---------|-------------|

As i915 enables dithering for 6 bpc panels only, we need to limit the
execution to 6 & 8 bpc panels (Negative testing) only.

Cc: Swati Sharma <swati2.sharma@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Nischal Varide <nischal.varide@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
 tests/meson.build  |   1 +
 2 files changed, 254 insertions(+)
 create mode 100644 tests/kms_dither.c

diff --git a/tests/kms_dither.c b/tests/kms_dither.c
new file mode 100644
index 0000000000..0e0c61dea2
--- /dev/null
+++ b/tests/kms_dither.c
@@ -0,0 +1,253 @@
+/*
+ * Copyright © 2020 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
+ *
+ */
+
+#include "igt.h"
+#include <fcntl.h>
+#include <termios.h>
+#include <unistd.h>
+
+IGT_TEST_DESCRIPTION("Test Dithering block status");
+
+/* Connector BPC */
+#define IGT_CONNECTOR_BPC_6		6
+#define IGT_CONNECTOR_BPC_8		8
+#define IGT_CONNECTOR_BPC_10		10
+#define IGT_CONNECTOR_BPC_12		12
+
+/* Framebuffer BPC */
+#define IGT_FRAME_BUFFER_BPC_8		8
+#define IGT_FRAME_BUFFER_BPC_10		10
+#define IGT_FRAME_BUFFER_BPC_16		16
+
+/* Common test data. */
+typedef struct data {
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	drmModeModeInfo *mode;
+	enum pipe pipe_id;
+	int drm_fd;
+	igt_fb_t fb;
+} data_t;
+
+typedef struct {
+	unsigned int bpc;
+	unsigned int dither;
+} dither_status_t;
+
+/* Prepare test data. */
+static void prepare_test(data_t *data, igt_output_t *output, enum pipe pipe)
+{
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = pipe;
+	data->pipe = &data->display.pipes[data->pipe_id];
+	igt_assert(data->pipe);
+
+	igt_display_reset(display);
+
+	data->output = output;
+	igt_assert(data->output);
+
+	data->mode = igt_output_get_mode(data->output);
+	igt_assert(data->mode);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	igt_output_set_pipe(data->output, data->pipe_id);
+}
+
+/* Returns the current state of dithering from the crtc debugfs. */
+static dither_status_t get_dither_state(data_t *data)
+{
+	char buf[512], tmp[5];
+	char *start_loc;
+	int dir, res;
+	dither_status_t status;
+
+	dir = igt_debugfs_dir(data->drm_fd);
+	igt_assert(dir >= 0);
+
+	res = igt_debugfs_simple_read(dir, "i915_display_info", buf, sizeof(buf));
+	igt_require(res > 0);
+	close(dir);
+
+	igt_assert(start_loc = strstr(buf, ", bpp="));
+	igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
+	status.bpc /= 3;
+
+	igt_assert(start_loc = strstr(buf, ", dither="));
+	igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
+	status.dither = !strcmp(tmp, "yes,");
+
+	return status;
+}
+
+static void test_dithering(data_t *data, enum pipe pipe,
+			   igt_output_t *output,
+			   int fb_bpc, int fb_format,
+			   int output_bpc)
+{
+	igt_display_t *display = &data->display;
+	dither_status_t status;
+	int bpc;
+
+	igt_info("Dithering test execution on %s PIPE_%s\n",
+			output->name, kmstest_pipe_name(pipe));
+	prepare_test(data, output, pipe);
+
+	igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
+				 data->mode->vdisplay, fb_format,
+				 LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
+	igt_plane_set_fb(data->primary, &data->fb);
+	igt_plane_set_size(data->primary, data->mode->hdisplay, data->mode->vdisplay);
+
+	bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
+	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, output_bpc);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+
+	/*
+	 * Check the status of Dithering block:
+	 *
+	 * Preserve the result & compute later (after clean-up).
+	 * If fb_bpc is greater than output_bpc, Dithering should be enabled
+	 * Else disabled
+	 */
+	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");
+
+       /*
+	* We must update the Connector max_bpc property back
+	* Otherwise, previously updated value will stay forever and
+	* may cause the failures for next/other subtests.
+	*/
+	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
+	igt_plane_set_fb(data->primary, NULL);
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
+	igt_remove_fb(data->drm_fd, &data->fb);
+
+	/* Check if crtc bpc is updated with requested one. */
+	igt_require_f((status.bpc == output_bpc),
+			"%s can support max %u-bpc, but requested %d-bpc\n",
+				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",
+				fb_bpc, output_bpc);
+
+	return;
+}
+
+/* Returns true if an output supports max bpc property & max_bpc >= requested. */
+static bool is_supported(igt_output_t *output, int bpc)
+{
+        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
+	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
+}
+
+static void
+run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc)
+{
+	igt_output_t *output;
+	igt_display_t *display = &data->display;
+
+	for_each_connected_output(display, output) {
+		enum pipe pipe;
+		drmModeConnector *connector = output->config.connector;
+
+		if (!is_supported(output, output_bpc))
+			continue;
+
+		/* HDMI won't support 6 BPC */
+		if (output_bpc == IGT_CONNECTOR_BPC_6 &&
+		   (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+		    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
+			continue;
+
+		for_each_pipe(display, pipe) {
+			if (igt_pipe_connector_valid(pipe, output)) {
+				igt_dynamic_f("%s-pipe-%s", output->name, kmstest_pipe_name(pipe))
+					test_dithering(data, pipe, output, fb_bpc,
+							fb_format, output_bpc);
+
+				/* One pipe is enough */
+				break;
+			}
+		}
+	}
+}
+
+igt_main
+{
+	struct {
+		int fb_bpc;
+		int format;
+		int output_bpc;
+	} 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 },
+	};
+	int i;
+	data_t data = { 0 };
+
+	igt_fixture {
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.drm_fd);
+		igt_display_require_output(&data.display);
+	}
+
+	for (i = 0; i < ARRAY_SIZE(tests); i++) {
+		igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected Dither:%s\n",
+			       tests[i].fb_bpc, tests[i].output_bpc,
+			       (tests[i].fb_bpc > tests[i].output_bpc) ?
+							"Enable": "Disable");
+
+		igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
+				tests[i].fb_bpc, tests[i].output_bpc)
+			run_dither_test(&data,
+					tests[i].fb_bpc,
+					tests[i].format,
+					tests[i].output_bpc);
+	}
+
+	igt_fixture {
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/meson.build b/tests/meson.build
index 01911c4579..d3de40be07 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -29,6 +29,7 @@ test_progs = [
 	'kms_cursor_crc',
 	'kms_cursor_edge_walk',
 	'kms_cursor_legacy',
+	'kms_dither',
 	'kms_dp_aux_dev',
 	'kms_dp_dsc',
 	'kms_dp_tiled_display',
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] [PATCH i-g-t 2/2] HAX: Add dither tests to fast-feedback
  2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
  2021-07-08 16:05 ` Varide, Nischal
  2021-07-08 16:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
@ 2021-07-08 20:33 ` Bhanuprakash Modem
  2021-07-09  1:23 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
  2021-07-10  8:10 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering (rev2) Patchwork
  4 siblings, 0 replies; 10+ messages in thread
From: Bhanuprakash Modem @ 2021-07-08 20:33 UTC (permalink / raw)
  To: igt-dev

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/intel-ci/fast-feedback.testlist | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index fa5006d2e5..493ba6862e 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -107,6 +107,8 @@ igt@kms_cursor_legacy@basic-flip-after-cursor-varying-size
 igt@kms_cursor_legacy@basic-flip-before-cursor-atomic
 igt@kms_cursor_legacy@basic-flip-before-cursor-legacy
 igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size
+igt@kms_dither@FB-8BPC-Vs-Panel-6BPC
+igt@kms_dither@FB-8BPC-Vs-Panel-8BPC
 igt@kms_flip@basic-flip-vs-dpms
 igt@kms_flip@basic-flip-vs-modeset
 igt@kms_flip@basic-flip-vs-wf_vblank
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
                   ` (2 preceding siblings ...)
  2021-07-08 20:33 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add dither tests to fast-feedback Bhanuprakash Modem
@ 2021-07-09  1:23 ` Patchwork
  2021-07-10  8:10 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering (rev2) Patchwork
  4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-07-09  1:23 UTC (permalink / raw)
  To: Modem, Bhanuprakash; +Cc: igt-dev


[-- Attachment #1.1: Type: text/plain, Size: 30303 bytes --]

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering
URL   : https://patchwork.freedesktop.org/series/92320/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10317_full -> IGTPW_5996_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/index.html

New tests
---------

  New tests have been introduced between CI_DRM_10317_full and IGTPW_5996_full:

### New IGT tests (4) ###

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc:
    - Statuses : 2 skip(s)
    - Exec time: [0.0] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@dp-1-pipe-a:
    - Statuses : 2 pass(s)
    - Exec time: [0.17, 0.25] s

  * igt@kms_dither@fb-8bpc-vs-panel-6bpc@edp-1-pipe-a:
    - Statuses : 2 pass(s)
    - Exec time: [1.43, 1.45] s

  * igt@kms_dither@fb-8bpc-vs-panel-8bpc:
    - Statuses :
    - Exec time: [None] s

  

Known issues
------------

  Here are the changes found in IGTPW_5996_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@legacy-engines-queued:
    - shard-snb:          NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#1099]) +6 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-snb2/igt@gem_ctx_persistence@legacy-engines-queued.html

  * igt@gem_ctx_persistence@many-contexts:
    - shard-tglb:         [PASS][2] -> [FAIL][3] ([i915#2410])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb1/igt@gem_ctx_persistence@many-contexts.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb3/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][4] ([i915#2842])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl4/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [PASS][5] -> [FAIL][6] ([i915#2842])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk6/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk3/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-tglb:         [PASS][7] -> [FAIL][8] ([i915#2842]) +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb2/igt@gem_exec_fair@basic-pace@vecs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_mmap_gtt@coherency:
    - shard-tglb:         NOTRUN -> [SKIP][9] ([fdo#111656])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb6/igt@gem_mmap_gtt@coherency.html
    - shard-iclb:         NOTRUN -> [SKIP][10] ([fdo#109292])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@gem_mmap_gtt@coherency.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-iclb:         NOTRUN -> [WARN][11] ([i915#2658])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb6/igt@gem_pwrite@basic-exhaustion.html
    - shard-kbl:          NOTRUN -> [WARN][12] ([i915#2658])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl2/igt@gem_pwrite@basic-exhaustion.html
    - shard-tglb:         NOTRUN -> [WARN][13] ([i915#2658])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb1/igt@gem_pwrite@basic-exhaustion.html
    - shard-glk:          NOTRUN -> [WARN][14] ([i915#2658])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk5/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#3323])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@vma-merge:
    - shard-kbl:          NOTRUN -> [FAIL][16] ([i915#3318])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@gem_userptr_blits@vma-merge.html

  * igt@gen7_exec_parse@basic-allocation:
    - shard-iclb:         NOTRUN -> [SKIP][17] ([fdo#109289])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@gen7_exec_parse@basic-allocation.html

  * igt@gen9_exec_parse@bb-large:
    - shard-tglb:         NOTRUN -> [SKIP][18] ([i915#2527])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb6/igt@gen9_exec_parse@bb-large.html
    - shard-glk:          NOTRUN -> [FAIL][19] ([i915#3296])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk3/igt@gen9_exec_parse@bb-large.html
    - shard-kbl:          NOTRUN -> [FAIL][20] ([i915#3296])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@gen9_exec_parse@bb-large.html
    - shard-iclb:         NOTRUN -> [SKIP][21] ([i915#2527])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb4/igt@gen9_exec_parse@bb-large.html

  * igt@i915_pm_dc@dc5-psr:
    - shard-iclb:         [PASS][22] -> [DMESG-WARN][23] ([i915#3698])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb6/igt@i915_pm_dc@dc5-psr.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb7/igt@i915_pm_dc@dc5-psr.html

  * igt@i915_pm_dc@dc6-psr:
    - shard-iclb:         NOTRUN -> [DMESG-WARN][24] ([i915#3698])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb3/igt@i915_pm_dc@dc6-psr.html
    - shard-tglb:         NOTRUN -> [FAIL][25] ([i915#454])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb3/igt@i915_pm_dc@dc6-psr.html

  * igt@i915_selftest@live@gt_lrc:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][26] ([i915#2373])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb5/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@gt_pm:
    - shard-tglb:         NOTRUN -> [DMESG-FAIL][27] ([i915#1759] / [i915#2291])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb5/igt@i915_selftest@live@gt_pm.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-glk:          [PASS][28] -> [FAIL][29] ([i915#3193])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk8/igt@i915_suspend@fence-restore-tiled2untiled.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk8/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_addfb_basic@invalid-smem-bo-on-discrete:
    - shard-apl:          NOTRUN -> [FAIL][30] ([i915#3745])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@kms_addfb_basic@invalid-smem-bo-on-discrete.html
    - shard-snb:          NOTRUN -> [FAIL][31] ([i915#3745])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-snb5/igt@kms_addfb_basic@invalid-smem-bo-on-discrete.html

  * igt@kms_big_fb@y-tiled-32bpp-rotate-0:
    - shard-glk:          [PASS][32] -> [DMESG-WARN][33] ([i915#118] / [i915#95])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk8/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk8/igt@kms_big_fb@y-tiled-32bpp-rotate-0.html

  * igt@kms_big_fb@y-tiled-8bpp-rotate-90:
    - shard-tglb:         NOTRUN -> [SKIP][34] ([fdo#111614])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb6/igt@kms_big_fb@y-tiled-8bpp-rotate-90.html
    - shard-iclb:         NOTRUN -> [SKIP][35] ([fdo#110725] / [fdo#111614])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@kms_big_fb@y-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@yf-tiled-addfb-size-overflow:
    - shard-tglb:         NOTRUN -> [SKIP][36] ([fdo#111615])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb3/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html

  * igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][37] ([i915#3689]) +3 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb3/igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_cdclk@mode-transition:
    - shard-apl:          NOTRUN -> [SKIP][38] ([fdo#109271]) +231 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@kms_cdclk@mode-transition.html

  * igt@kms_color_chamelium@pipe-a-ctm-0-25:
    - shard-snb:          NOTRUN -> [SKIP][39] ([fdo#109271] / [fdo#111827]) +21 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-snb2/igt@kms_color_chamelium@pipe-a-ctm-0-25.html

  * igt@kms_color_chamelium@pipe-a-degamma:
    - shard-kbl:          NOTRUN -> [SKIP][40] ([fdo#109271] / [fdo#111827]) +7 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl7/igt@kms_color_chamelium@pipe-a-degamma.html
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#109284] / [fdo#111827]) +2 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb3/igt@kms_color_chamelium@pipe-a-degamma.html

  * igt@kms_color_chamelium@pipe-b-ctm-max:
    - shard-tglb:         NOTRUN -> [SKIP][42] ([fdo#109284] / [fdo#111827]) +2 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@kms_color_chamelium@pipe-b-ctm-max.html
    - shard-glk:          NOTRUN -> [SKIP][43] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk6/igt@kms_color_chamelium@pipe-b-ctm-max.html

  * igt@kms_color_chamelium@pipe-invalid-degamma-lut-sizes:
    - shard-apl:          NOTRUN -> [SKIP][44] ([fdo#109271] / [fdo#111827]) +17 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@kms_color_chamelium@pipe-invalid-degamma-lut-sizes.html

  * igt@kms_content_protection@type1:
    - shard-iclb:         NOTRUN -> [SKIP][45] ([fdo#109300] / [fdo#111066])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb8/igt@kms_content_protection@type1.html
    - shard-tglb:         NOTRUN -> [SKIP][46] ([fdo#111828])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb2/igt@kms_content_protection@type1.html

  * igt@kms_cursor_crc@pipe-a-cursor-512x170-random:
    - shard-tglb:         NOTRUN -> [SKIP][47] ([fdo#109279] / [i915#3359]) +1 similar issue
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@kms_cursor_crc@pipe-a-cursor-512x170-random.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x512-offscreen:
    - shard-iclb:         NOTRUN -> [SKIP][48] ([fdo#109278] / [fdo#109279]) +1 similar issue
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb6/igt@kms_cursor_crc@pipe-c-cursor-512x512-offscreen.html

  * igt@kms_cursor_crc@pipe-d-cursor-256x256-rapid-movement:
    - shard-iclb:         NOTRUN -> [SKIP][49] ([fdo#109278]) +14 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb7/igt@kms_cursor_crc@pipe-d-cursor-256x256-rapid-movement.html

  * igt@kms_cursor_crc@pipe-d-cursor-32x10-onscreen:
    - shard-tglb:         NOTRUN -> [SKIP][50] ([i915#3359]) +4 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@kms_cursor_crc@pipe-d-cursor-32x10-onscreen.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-toggle:
    - shard-iclb:         NOTRUN -> [SKIP][51] ([fdo#109274] / [fdo#109278]) +1 similar issue
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb8/igt@kms_cursor_legacy@cursorb-vs-flipa-toggle.html

  * igt@kms_flip@2x-flip-vs-wf_vblank-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][52] ([fdo#109274]) +1 similar issue
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb6/igt@kms_flip@2x-flip-vs-wf_vblank-interruptible.html

  * igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
    - shard-apl:          NOTRUN -> [DMESG-WARN][53] ([i915#180]) +2 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl2/igt@kms_flip@flip-vs-suspend-interruptible@c-dp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-apl:          [PASS][54] -> [DMESG-WARN][55] ([i915#180])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl6/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-kbl:          NOTRUN -> [SKIP][56] ([fdo#109271] / [i915#2672]) +1 similar issue
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-pgflip-blt:
    - shard-tglb:         NOTRUN -> [SKIP][57] ([fdo#111825]) +13 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-shrfb-pgflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
    - shard-glk:          NOTRUN -> [SKIP][58] ([fdo#109271]) +40 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk2/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-indfb-draw-render:
    - shard-iclb:         NOTRUN -> [SKIP][59] ([fdo#109280]) +9 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb6/igt@kms_frontbuffer_tracking@psr-2p-primscrn-pri-indfb-draw-render.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-tglb:         [PASS][60] -> [SKIP][61] ([i915#433])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb1/igt@kms_hdmi_inject@inject-audio.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb3/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][62] ([fdo#109271] / [i915#533])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#533]) +2 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-kbl:          [PASS][64] -> [DMESG-WARN][65] ([i915#180]) +3 similar issues
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl3/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
    - shard-apl:          NOTRUN -> [FAIL][66] ([fdo#108145] / [i915#265]) +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@kms_plane_alpha_blend@pipe-b-alpha-7efc.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb:
    - shard-apl:          NOTRUN -> [FAIL][67] ([i915#265]) +1 similar issue
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@kms_plane_alpha_blend@pipe-b-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-kbl:          NOTRUN -> [FAIL][68] ([fdo#108145] / [i915#265])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl2/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

  * igt@kms_plane_multiple@atomic-pipe-d-tiling-x:
    - shard-kbl:          NOTRUN -> [SKIP][69] ([fdo#109271]) +98 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@kms_plane_multiple@atomic-pipe-d-tiling-x.html

  * igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
    - shard-apl:          NOTRUN -> [SKIP][70] ([fdo#109271] / [i915#2733])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl2/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4:
    - shard-apl:          NOTRUN -> [SKIP][71] ([fdo#109271] / [i915#658]) +6 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-4.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5:
    - shard-glk:          NOTRUN -> [SKIP][72] ([fdo#109271] / [i915#658]) +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk8/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html
    - shard-tglb:         NOTRUN -> [SKIP][73] ([i915#2920]) +1 similar issue
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5:
    - shard-kbl:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#658]) +3 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl4/igt@kms_psr2_sf@overlay-primary-update-sf-dmg-area-5.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-4:
    - shard-iclb:         NOTRUN -> [SKIP][75] ([i915#658]) +1 similar issue
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb7/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-4.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [PASS][76] -> [SKIP][77] ([fdo#109441]) +2 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_setmode@basic:
    - shard-snb:          NOTRUN -> [FAIL][78] ([i915#31])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-snb2/igt@kms_setmode@basic.html

  * igt@kms_vblank@pipe-d-query-forked-hang:
    - shard-snb:          NOTRUN -> [SKIP][79] ([fdo#109271]) +436 similar issues
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-snb7/igt@kms_vblank@pipe-d-query-forked-hang.html

  * igt@kms_writeback@writeback-check-output:
    - shard-apl:          NOTRUN -> [SKIP][80] ([fdo#109271] / [i915#2437]) +1 similar issue
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl1/igt@kms_writeback@writeback-check-output.html

  * igt@perf@mi-rpc:
    - shard-tglb:         NOTRUN -> [SKIP][81] ([fdo#109289]) +1 similar issue
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb2/igt@perf@mi-rpc.html

  * igt@prime_nv_test@i915_blt_fill_nv_read:
    - shard-tglb:         NOTRUN -> [SKIP][82] ([fdo#109291])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb2/igt@prime_nv_test@i915_blt_fill_nv_read.html
    - shard-iclb:         NOTRUN -> [SKIP][83] ([fdo#109291])
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb5/igt@prime_nv_test@i915_blt_fill_nv_read.html

  * igt@sysfs_clients@fair-1:
    - shard-apl:          NOTRUN -> [SKIP][84] ([fdo#109271] / [i915#2994]) +2 similar issues
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@sysfs_clients@fair-1.html

  * igt@sysfs_clients@sema-50:
    - shard-kbl:          NOTRUN -> [SKIP][85] ([fdo#109271] / [i915#2994]) +1 similar issue
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl1/igt@sysfs_clients@sema-50.html

  
#### Possible fixes ####

  * igt@gem_eio@unwedge-stress:
    - shard-tglb:         [TIMEOUT][86] ([i915#2369] / [i915#3063] / [i915#3648]) -> [PASS][87]
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb6/igt@gem_eio@unwedge-stress.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb5/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [FAIL][88] ([i915#2842]) -> [PASS][89] +2 similar issues
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb2/igt@gem_exec_fair@basic-flow@rcs0.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [FAIL][90] ([i915#2842]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-kbl3/igt@gem_exec_fair@basic-pace@vecs0.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl6/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [FAIL][92] ([i915#2842]) -> [PASS][93]
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk8/igt@gem_exec_fair@basic-throttle@rcs0.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk7/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_whisper@basic-normal-all:
    - shard-glk:          [DMESG-WARN][94] ([i915#118] / [i915#95]) -> [PASS][95] +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk1/igt@gem_exec_whisper@basic-normal-all.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk3/igt@gem_exec_whisper@basic-normal-all.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [SKIP][96] ([i915#2190]) -> [PASS][97]
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb6/igt@gem_huc_copy@huc-copy.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb7/igt@gem_huc_copy@huc-copy.html

  * igt@gem_vm_create@destroy-race:
    - shard-tglb:         [FAIL][98] ([i915#2822]) -> [PASS][99]
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb5/igt@gem_vm_create@destroy-race.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb6/igt@gem_vm_create@destroy-race.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-apl:          [SKIP][100] ([fdo#109271]) -> [PASS][101]
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl1/igt@i915_pm_dc@dc9-dpms.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-kbl:          [DMESG-WARN][102] ([i915#180]) -> [PASS][103] +1 similar issue
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-kbl3/igt@i915_suspend@fence-restore-untiled.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-kbl2/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-iclb:         [DMESG-WARN][104] ([i915#3621]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb1/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb3/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge:
    - shard-tglb:         [DMESG-WARN][106] ([i915#2868]) -> [PASS][107]
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-tglb5/igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-tglb2/igt@kms_cursor_edge_walk@pipe-a-64x64-left-edge.html

  * igt@kms_flip@flip-vs-suspend@a-dp1:
    - shard-apl:          [DMESG-WARN][108] ([i915#180]) -> [PASS][109] +1 similar issue
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl6/igt@kms_flip@flip-vs-suspend@a-dp1.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@kms_flip@flip-vs-suspend@a-dp1.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-blt:
    - shard-glk:          [FAIL][110] ([i915#2546] / [i915#49]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-glk9/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-blt.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-glk7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-pri-shrfb-draw-blt.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         [SKIP][112] ([fdo#109441]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb6/igt@kms_psr@psr2_primary_mmap_gtt.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@kms_psr@psr2_primary_mmap_gtt.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-fence:
    - shard-iclb:         [WARN][114] ([i915#2684]) -> [WARN][115] ([i915#1804] / [i915#2684])
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb8/igt@i915_pm_rc6_residency@rc6-fence.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb4/igt@i915_pm_rc6_residency@rc6-fence.html

  * igt@kms_dp_dsc@basic-dsc-enable-edp:
    - shard-iclb:         [DMESG-WARN][116] ([i915#1226]) -> [SKIP][117] ([fdo#109349])
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb2/igt@kms_dp_dsc@basic-dsc-enable-edp.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb8/igt@kms_dp_dsc@basic-dsc-enable-edp.html

  * igt@kms_psr2_sf@plane-move-sf-dmg-area-3:
    - shard-iclb:         [SKIP][118] ([i915#658]) -> [SKIP][119] ([i915#2920]) +2 similar issues
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb6/igt@kms_psr2_sf@plane-move-sf-dmg-area-3.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@kms_psr2_sf@plane-move-sf-dmg-area-3.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2:
    - shard-iclb:         [SKIP][120] ([i915#2920]) -> [SKIP][121] ([i915#658]) +2 similar issues
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb8/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-2.html

  * igt@runner@aborted:
    - shard-iclb:         ([FAIL][122], [FAIL][123], [FAIL][124], [FAIL][125]) ([i915#1814] / [i915#2722] / [i915#3002] / [i915#3744]) -> ([FAIL][126], [FAIL][127], [FAIL][128], [FAIL][129], [FAIL][130]) ([i915#1814] / [i915#2722] / [i915#3002] / [i915#3702] / [i915#3744])
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb1/igt@runner@aborted.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb6/igt@runner@aborted.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb7/igt@runner@aborted.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-iclb8/igt@runner@aborted.html
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb1/igt@runner@aborted.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb2/igt@runner@aborted.html
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb3/igt@runner@aborted.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb7/igt@runner@aborted.html
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-iclb7/igt@runner@aborted.html
    - shard-apl:          ([FAIL][131], [FAIL][132], [FAIL][133], [FAIL][134]) ([i915#180] / [i915#1814] / [i915#2722] / [i915#3002] / [i915#3363] / [i915#3744]) -> ([FAIL][135], [FAIL][136], [FAIL][137], [FAIL][138], [FAIL][139]) ([i915#180] / [i915#2722] / [i915#3002] / [i915#3363] / [i915#3744])
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl2/igt@runner@aborted.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl6/igt@runner@aborted.html
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl1/igt@runner@aborted.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10317/shard-apl7/igt@runner@aborted.html
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl8/igt@runner@aborted.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl2/igt@runner@aborted.html
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl1/igt@runner@aborted.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl1/igt@runner@aborted.html
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/shard-apl6/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
  [fdo#109292]: https://bugs.freedesktop.org/show_bug.cgi?id=109292
  [fdo#109300]: https://bugs.freedesktop.org/show_bug.cgi?id=109300
  [fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110725]: https://bugs.freedesktop.org/show_bug.cgi?id=110725
  [fdo#111066]: https://bugs.freedesktop.org/show_bug.cgi?id=111066
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#111828]: https://b

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_5996/index.html

[-- Attachment #1.2: Type: text/html, Size: 36292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering (rev2)
  2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
                   ` (3 preceding siblings ...)
  2021-07-09  1:23 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
@ 2021-07-10  8:10 ` Patchwork
  4 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2021-07-10  8:10 UTC (permalink / raw)
  To: Varide, Nischal; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering (rev2)
URL   : https://patchwork.freedesktop.org/series/92320/
State : failure

== Summary ==

Applying: tests/kms_dither: New IGT to validate crtc Dithering
Patch failed at 0001 tests/kms_dither: New IGT to validate crtc Dithering
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".


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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-08 16:05 ` Varide, Nischal
@ 2021-07-12 13:35   ` Harry Wentland
  2021-07-12 14:56     ` Mark Yacoub
  0 siblings, 1 reply; 10+ messages in thread
From: Harry Wentland @ 2021-07-12 13:35 UTC (permalink / raw)
  To: Varide, Nischal, Modem, Bhanuprakash, igt-dev



On 2021-07-08 12:05 p.m., Varide, Nischal wrote:
> 
> 
> -----Original Message-----
> From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com> 
> Sent: Friday, July 9, 2021 2:04 AM
> To: igt-dev@lists.freedesktop.org
> Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Sharma, Swati2 <swati2.sharma@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Varide, Nischal <nischal.varide@intel.com>
> Subject: [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
> 
> Many of the display devices have color format support less than the color format of the input data (Ex: 8-bit input data and 6-bit display color depth). Then the input data will be either truncated or rounded, but this approach usually causes loss of detail and also produce large banded areas of a single color that significantly differs from the original image.
> 
> Dithering is a technique used to enhance these colors by creating the illusion of smoothness by adjusting the nearby pixel color.
> For Eg: Converting 8-bit to 6-bit by modifying the pixel information.
> 
> Dithering should be enabled when a panel color depth is lower than the color depth of the framebuffer.
> 
> Even though feature Dithering is there since legacy, there is no specific IGT for this. This patch will create New IGT for Dithering.
> And below is the truth table for CRTC Dithering.
> 
> |----------------|---------|-------------|
> |  Frame buffer  |  Panel  |  Dithering  |
> |----------------|---------|-------------|
> |      8 BPC     |  6 BPC  |     Yes     |
> |----------------|---------|-------------|
> |      8 BPC     |  8 BPC  |     No      |
> |----------------|---------|-------------|
> |      8 BPC     | 10 BPC  |     No      |
> |----------------|---------|-------------|
> |     10 BPC     |  6 BPC  |     Yes     |
> |----------------|---------|-------------|
> |     10 BPC     |  8 BPC  |     Yes     |
> |----------------|---------|-------------|
> |     10 BPC     | 10 BPC  |     No      |
> |----------------|---------|-------------|
> |     16 BPC     |  6 BPC  |     Yes     |
> |----------------|---------|-------------|
> |     16 BPC     |  8 BPC  |     Yes     |
> |----------------|---------|-------------|
> |     16 BPC     | 10 BPC  |     Yes     |
> |----------------|---------|-------------|
> 
> As i915 enables dithering for 6 bpc panels only, we need to limit the execution to 6 & 8 bpc panels (Negative testing) only.
> 
> Cc: Swati Sharma <swati2.sharma@intel.com>
> Cc: Uma Shankar <uma.shankar@intel.com>
> Cc: Nischal Varide <nischal.varide@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> Reviewed-by: Nischal Varide <nischal.varide@intel.com>
> ---
>  tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
>  tests/meson.build  |   1 +
>  2 files changed, 254 insertions(+)
>  create mode 100644 tests/kms_dither.c
> 
> diff --git a/tests/kms_dither.c b/tests/kms_dither.c new file mode 100644 index 0000000000..0e0c61dea2
> --- /dev/null
> +++ b/tests/kms_dither.c
> @@ -0,0 +1,253 @@
> +/*
> + * Copyright © 2020 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person 
> +obtaining a
> + * copy of this software and associated documentation files (the 
> +"Software"),
> + * to deal in the Software without restriction, including without 
> +limitation
> + * the rights to use, copy, modify, merge, publish, distribute, 
> +sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom 
> +the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the 
> +next
> + * paragraph) shall be included in all copies or substantial portions 
> +of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
> +EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
> +MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT 
> +SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, 
> +DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
> +OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 
> +OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + *
> + * Authors:
> + *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> + *
> + */
> +
> +#include "igt.h"
> +#include <fcntl.h>
> +#include <termios.h>
> +#include <unistd.h>
> +
> +IGT_TEST_DESCRIPTION("Test Dithering block status");
> +
> +/* Connector BPC */
> +#define IGT_CONNECTOR_BPC_6		6
> +#define IGT_CONNECTOR_BPC_8		8
> +#define IGT_CONNECTOR_BPC_10		10
> +#define IGT_CONNECTOR_BPC_12		12
> +
> +/* Framebuffer BPC */
> +#define IGT_FRAME_BUFFER_BPC_8		8
> +#define IGT_FRAME_BUFFER_BPC_10		10
> +#define IGT_FRAME_BUFFER_BPC_16		16
> +
> +/* Common test data. */
> +typedef struct data {
> +	igt_display_t display;
> +	igt_plane_t *primary;
> +	igt_output_t *output;
> +	igt_pipe_t *pipe;
> +	drmModeModeInfo *mode;
> +	enum pipe pipe_id;
> +	int drm_fd;
> +	igt_fb_t fb;
> +} data_t;
> +
> +typedef struct {
> +	unsigned int bpc;
> +	unsigned int dither;
> +} dither_status_t;
> +
> +/* Prepare test data. */
> +static void prepare_test(data_t *data, igt_output_t *output, enum pipe 
> +pipe) {
> +	igt_display_t *display = &data->display;
> +
> +	data->pipe_id = pipe;
> +	data->pipe = &data->display.pipes[data->pipe_id];
> +	igt_assert(data->pipe);
> +
> +	igt_display_reset(display);
> +
> +	data->output = output;
> +	igt_assert(data->output);
> +
> +	data->mode = igt_output_get_mode(data->output);
> +	igt_assert(data->mode);
> +
> +	data->primary =
> +		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> +
> +	igt_output_set_pipe(data->output, data->pipe_id); }
> +
> +/* Returns the current state of dithering from the crtc debugfs. */ 
> +static dither_status_t get_dither_state(data_t *data) {
> +	char buf[512], tmp[5];
> +	char *start_loc;
> +	int dir, res;
> +	dither_status_t status;
> +
> +	dir = igt_debugfs_dir(data->drm_fd);
> +	igt_assert(dir >= 0);
> +
> +	res = igt_debugfs_simple_read(dir, "i915_display_info", buf, sizeof(buf));

This seems to be an i915-specific test. Do those belong in the kms_ namespace?

Could this be made into a generic test?

Harry

> +	igt_require(res > 0);
> +	close(dir);
> +
> +	igt_assert(start_loc = strstr(buf, ", bpp="));
> +	igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
> +	status.bpc /= 3;
> +
> +	igt_assert(start_loc = strstr(buf, ", dither="));
> +	igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
> +	status.dither = !strcmp(tmp, "yes,");
> +
> +	return status;
> +}
> +
> +static void test_dithering(data_t *data, enum pipe pipe,
> +			   igt_output_t *output,
> +			   int fb_bpc, int fb_format,
> +			   int output_bpc)
> +{
> +	igt_display_t *display = &data->display;
> +	dither_status_t status;
> +	int bpc;
> +
> +	igt_info("Dithering test execution on %s PIPE_%s\n",
> +			output->name, kmstest_pipe_name(pipe));
> +	prepare_test(data, output, pipe);
> +
> +	igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
> +				 data->mode->vdisplay, fb_format,
> +				 LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
> +	igt_plane_set_fb(data->primary, &data->fb);
> +	igt_plane_set_size(data->primary, data->mode->hdisplay, 
> +data->mode->vdisplay);
> +
> +	bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> +	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, output_bpc);
> +	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : 
> +COMMIT_LEGACY);
> +
> +	/*
> +	 * Check the status of Dithering block:
> +	 *
> +	 * Preserve the result & compute later (after clean-up).
> +	 * If fb_bpc is greater than output_bpc, Dithering should be enabled
> +	 * Else disabled
> +	 */
> +	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");
> +
> +       /*
> +	* We must update the Connector max_bpc property back
> +	* Otherwise, previously updated value will stay forever and
> +	* may cause the failures for next/other subtests.
> +	*/
> +	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
> +	igt_plane_set_fb(data->primary, NULL);
> +	igt_output_set_pipe(output, PIPE_NONE);
> +	igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> +	igt_remove_fb(data->drm_fd, &data->fb);
> +
> +	/* Check if crtc bpc is updated with requested one. */
> +	igt_require_f((status.bpc == output_bpc),
> +			"%s can support max %u-bpc, but requested %d-bpc\n",
> +				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",
> +				fb_bpc, output_bpc);
> +
> +	return;
> +}
> +
> +/* Returns true if an output supports max bpc property & max_bpc >= 
> +requested. */ static bool is_supported(igt_output_t *output, int bpc) {
> +        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> +	       igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); }
> +
> +static void
> +run_dither_test(data_t *data, int fb_bpc, int fb_format, int 
> +output_bpc) {
> +	igt_output_t *output;
> +	igt_display_t *display = &data->display;
> +
> +	for_each_connected_output(display, output) {
> +		enum pipe pipe;
> +		drmModeConnector *connector = output->config.connector;
> +
> +		if (!is_supported(output, output_bpc))
> +			continue;
> +
> +		/* HDMI won't support 6 BPC */
> +		if (output_bpc == IGT_CONNECTOR_BPC_6 &&
> +		   (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> +		    connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
> +			continue;
> +
> +		for_each_pipe(display, pipe) {
> +			if (igt_pipe_connector_valid(pipe, output)) {
> +				igt_dynamic_f("%s-pipe-%s", output->name, kmstest_pipe_name(pipe))
> +					test_dithering(data, pipe, output, fb_bpc,
> +							fb_format, output_bpc);
> +
> +				/* One pipe is enough */
> +				break;
> +			}
> +		}
> +	}
> +}
> +
> +igt_main
> +{
> +	struct {
> +		int fb_bpc;
> +		int format;
> +		int output_bpc;
> +	} 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 },
> +	};
> +	int i;
> +	data_t data = { 0 };
> +
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> +		kmstest_set_vt_graphics_mode();
> +
> +		igt_display_require(&data.display, data.drm_fd);
> +		igt_display_require_output(&data.display);
> +	}
> +
> +	for (i = 0; i < ARRAY_SIZE(tests); i++) {
> +		igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected Dither:%s\n",
> +			       tests[i].fb_bpc, tests[i].output_bpc,
> +			       (tests[i].fb_bpc > tests[i].output_bpc) ?
> +							"Enable": "Disable");
> +
> +		igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
> +				tests[i].fb_bpc, tests[i].output_bpc)
> +			run_dither_test(&data,
> +					tests[i].fb_bpc,
> +					tests[i].format,
> +					tests[i].output_bpc);
> +	}
> +
> +	igt_fixture {
> +		igt_display_fini(&data.display);
> +	}
> +}
> diff --git a/tests/meson.build b/tests/meson.build index 01911c4579..d3de40be07 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -29,6 +29,7 @@ test_progs = [
>  	'kms_cursor_crc',
>  	'kms_cursor_edge_walk',
>  	'kms_cursor_legacy',
> +	'kms_dither',
>  	'kms_dp_aux_dev',
>  	'kms_dp_dsc',
>  	'kms_dp_tiled_display',
> --
> 2.20.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev>> 

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-12 13:35   ` Harry Wentland
@ 2021-07-12 14:56     ` Mark Yacoub
  2021-07-15  4:00       ` Modem, Bhanuprakash
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Yacoub @ 2021-07-12 14:56 UTC (permalink / raw)
  To: Harry Wentland; +Cc: Varide, Nischal, igt-dev, Sean Paul

On Mon, Jul 12, 2021 at 9:35 AM Harry Wentland <harry.wentland@amd.com> wrote:
>
>
>
> On 2021-07-08 12:05 p.m., Varide, Nischal wrote:
> >
> >
> > -----Original Message-----
> > From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
> > Sent: Friday, July 9, 2021 2:04 AM
> > To: igt-dev@lists.freedesktop.org
> > Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Sharma, Swati2 <swati2.sharma@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Varide, Nischal <nischal.varide@intel.com>
> > Subject: [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
> >
> > Many of the display devices have color format support less than the color format of the input data (Ex: 8-bit input data and 6-bit display color depth). Then the input data will be either truncated or rounded, but this approach usually causes loss of detail and also produce large banded areas of a single color that significantly differs from the original image.
> >
> > Dithering is a technique used to enhance these colors by creating the illusion of smoothness by adjusting the nearby pixel color.
> > For Eg: Converting 8-bit to 6-bit by modifying the pixel information.
> >
> > Dithering should be enabled when a panel color depth is lower than the color depth of the framebuffer.
> >
> > Even though feature Dithering is there since legacy, there is no specific IGT for this. This patch will create New IGT for Dithering.
> > And below is the truth table for CRTC Dithering.
> >
> > |----------------|---------|-------------|
> > |  Frame buffer  |  Panel  |  Dithering  |
> > |----------------|---------|-------------|
> > |      8 BPC     |  6 BPC  |     Yes     |
> > |----------------|---------|-------------|
> > |      8 BPC     |  8 BPC  |     No      |
> > |----------------|---------|-------------|
> > |      8 BPC     | 10 BPC  |     No      |
> > |----------------|---------|-------------|
> > |     10 BPC     |  6 BPC  |     Yes     |
> > |----------------|---------|-------------|
> > |     10 BPC     |  8 BPC  |     Yes     |
> > |----------------|---------|-------------|
> > |     10 BPC     | 10 BPC  |     No      |
> > |----------------|---------|-------------|
> > |     16 BPC     |  6 BPC  |     Yes     |
> > |----------------|---------|-------------|
> > |     16 BPC     |  8 BPC  |     Yes     |
> > |----------------|---------|-------------|
> > |     16 BPC     | 10 BPC  |     Yes     |
> > |----------------|---------|-------------|
> >
> > As i915 enables dithering for 6 bpc panels only, we need to limit the execution to 6 & 8 bpc panels (Negative testing) only.
> >
> > Cc: Swati Sharma <swati2.sharma@intel.com>
> > Cc: Uma Shankar <uma.shankar@intel.com>
> > Cc: Nischal Varide <nischal.varide@intel.com>
> > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > Reviewed-by: Nischal Varide <nischal.varide@intel.com>
> > ---
> >  tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
> >  tests/meson.build  |   1 +
> >  2 files changed, 254 insertions(+)
> >  create mode 100644 tests/kms_dither.c
> >
> > diff --git a/tests/kms_dither.c b/tests/kms_dither.c new file mode 100644 index 0000000000..0e0c61dea2
> > --- /dev/null
> > +++ b/tests/kms_dither.c
> > @@ -0,0 +1,253 @@
> > +/*
> > + * Copyright © 2020 Intel Corporation
> > + *
> > + * Permission is hereby granted, free of charge, to any person
> > +obtaining a
> > + * copy of this software and associated documentation files (the
> > +"Software"),
> > + * to deal in the Software without restriction, including without
> > +limitation
> > + * the rights to use, copy, modify, merge, publish, distribute,
> > +sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom
> > +the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice (including the
> > +next
> > + * paragraph) shall be included in all copies or substantial portions
> > +of the
> > + * Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > +EXPRESS OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > +MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> > +SHALL
> > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM,
> > +DAMAGES OR
> > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> > +OTHERWISE,
> > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
> > +OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + *
> > + * Authors:
> > + *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > + *
> > + */
> > +
> > +#include "igt.h"
> > +#include <fcntl.h>
> > +#include <termios.h>
> > +#include <unistd.h>
> > +
> > +IGT_TEST_DESCRIPTION("Test Dithering block status");
> > +
> > +/* Connector BPC */
> > +#define IGT_CONNECTOR_BPC_6          6
> > +#define IGT_CONNECTOR_BPC_8          8
> > +#define IGT_CONNECTOR_BPC_10         10
> > +#define IGT_CONNECTOR_BPC_12         12
> > +
> > +/* Framebuffer BPC */
> > +#define IGT_FRAME_BUFFER_BPC_8               8
> > +#define IGT_FRAME_BUFFER_BPC_10              10
> > +#define IGT_FRAME_BUFFER_BPC_16              16
> > +
> > +/* Common test data. */
> > +typedef struct data {
> > +     igt_display_t display;
> > +     igt_plane_t *primary;
> > +     igt_output_t *output;
> > +     igt_pipe_t *pipe;
> > +     drmModeModeInfo *mode;
> > +     enum pipe pipe_id;
> > +     int drm_fd;
> > +     igt_fb_t fb;
> > +} data_t;
> > +
> > +typedef struct {
> > +     unsigned int bpc;
> > +     unsigned int dither;
> > +} dither_status_t;
> > +
> > +/* Prepare test data. */
> > +static void prepare_test(data_t *data, igt_output_t *output, enum pipe
> > +pipe) {
> > +     igt_display_t *display = &data->display;
> > +
> > +     data->pipe_id = pipe;
> > +     data->pipe = &data->display.pipes[data->pipe_id];
> > +     igt_assert(data->pipe);
> > +
> > +     igt_display_reset(display);
> > +
> > +     data->output = output;
> > +     igt_assert(data->output);
> > +
> > +     data->mode = igt_output_get_mode(data->output);
> > +     igt_assert(data->mode);
> > +
> > +     data->primary =
> > +             igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> > +
> > +     igt_output_set_pipe(data->output, data->pipe_id); }
> > +
> > +/* Returns the current state of dithering from the crtc debugfs. */
> > +static dither_status_t get_dither_state(data_t *data) {
> > +     char buf[512], tmp[5];
> > +     char *start_loc;
> > +     int dir, res;
> > +     dither_status_t status;
> > +
> > +     dir = igt_debugfs_dir(data->drm_fd);
> > +     igt_assert(dir >= 0);
> > +
> > +     res = igt_debugfs_simple_read(dir, "i915_display_info", buf, sizeof(buf));
>
> This seems to be an i915-specific test. Do those belong in the kms_ namespace?
>
> Could this be made into a generic test?
>
> Harry
>
> > +     igt_require(res > 0);
> > +     close(dir);
> > +
> > +     igt_assert(start_loc = strstr(buf, ", bpp="));
> > +     igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
> > +     status.bpc /= 3;
> > +
> > +     igt_assert(start_loc = strstr(buf, ", dither="));
> > +     igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
> > +     status.dither = !strcmp(tmp, "yes,");
> > +
> > +     return status;
> > +}
> > +
> > +static void test_dithering(data_t *data, enum pipe pipe,
> > +                        igt_output_t *output,
> > +                        int fb_bpc, int fb_format,
> > +                        int output_bpc)
> > +{
> > +     igt_display_t *display = &data->display;
> > +     dither_status_t status;
> > +     int bpc;
> > +
> > +     igt_info("Dithering test execution on %s PIPE_%s\n",
> > +                     output->name, kmstest_pipe_name(pipe));
> > +     prepare_test(data, output, pipe);
> > +
> > +     igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
> > +                              data->mode->vdisplay, fb_format,
> > +                              LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
> > +     igt_plane_set_fb(data->primary, &data->fb);
> > +     igt_plane_set_size(data->primary, data->mode->hdisplay,
> > +data->mode->vdisplay);
> > +
> > +     bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, output_bpc);
> > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC :
> > +COMMIT_LEGACY);
> > +
> > +     /*
> > +      * Check the status of Dithering block:
> > +      *
> > +      * Preserve the result & compute later (after clean-up).
> > +      * If fb_bpc is greater than output_bpc, Dithering should be enabled
> > +      * Else disabled
> > +      */
> > +     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");
> > +
> > +       /*
> > +     * We must update the Connector max_bpc property back
> > +     * Otherwise, previously updated value will stay forever and
> > +     * may cause the failures for next/other subtests.
> > +     */
> > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
> > +     igt_plane_set_fb(data->primary, NULL);
> > +     igt_output_set_pipe(output, PIPE_NONE);
> > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> > +     igt_remove_fb(data->drm_fd, &data->fb);
> > +
> > +     /* Check if crtc bpc is updated with requested one. */
> > +     igt_require_f((status.bpc == output_bpc),
> > +                     "%s can support max %u-bpc, but requested %d-bpc\n",
> > +                             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",
> > +                             fb_bpc, output_bpc);
> > +
> > +     return;
> > +}
> > +
> > +/* Returns true if an output supports max bpc property & max_bpc >=
> > +requested. */ static bool is_supported(igt_output_t *output, int bpc) {
> > +        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> > +            igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); }
> > +
> > +static void
> > +run_dither_test(data_t *data, int fb_bpc, int fb_format, int
> > +output_bpc) {
> > +     igt_output_t *output;
> > +     igt_display_t *display = &data->display;
> > +
> > +     for_each_connected_output(display, output) {
> > +             enum pipe pipe;
> > +             drmModeConnector *connector = output->config.connector;
> > +
> > +             if (!is_supported(output, output_bpc))
> > +                     continue;
> > +
> > +             /* HDMI won't support 6 BPC */
> > +             if (output_bpc == IGT_CONNECTOR_BPC_6 &&
> > +                (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> > +                 connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
> > +                     continue;
> > +
> > +             for_each_pipe(display, pipe) {
> > +                     if (igt_pipe_connector_valid(pipe, output)) {
> > +                             igt_dynamic_f("%s-pipe-%s", output->name, kmstest_pipe_name(pipe))
> > +                                     test_dithering(data, pipe, output, fb_bpc,
> > +                                                     fb_format, output_bpc);
> > +
> > +                             /* One pipe is enough */
> > +                             break;
> > +                     }
> > +             }
> > +     }
> > +}
> > +
> > +igt_main
> > +{
> > +     struct {
> > +             int fb_bpc;
> > +             int format;
> > +             int output_bpc;
> > +     } 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 },
> > +     };
> > +     int i;
> > +     data_t data = { 0 };
> > +
> > +     igt_fixture {
> > +             data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
I agree with Harry.
For context: KMS tests on IGT are officially supported on multiple
SoCs and there is an active development on it along with Intel's.
With that being said, KMS tests are meant to be generic. I understand
if sometime you need to test little things specific for intel so we
use igt_require_[intel | otherdriver], but if the whole test is intel
specific, it doesn't make sense to be part of kms, the best place for
it would be tests/i915.
So basically, we shouldn't have any `
drm_open_driver_master(DRIVER_INTEL);` in any kms_* tests.
Alternatively, this test can be made generic and everyone is happy :))
> > +             kmstest_set_vt_graphics_mode();
> > +
> > +             igt_display_require(&data.display, data.drm_fd);
> > +             igt_display_require_output(&data.display);
> > +     }
> > +
> > +     for (i = 0; i < ARRAY_SIZE(tests); i++) {
> > +             igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected Dither:%s\n",
> > +                            tests[i].fb_bpc, tests[i].output_bpc,
> > +                            (tests[i].fb_bpc > tests[i].output_bpc) ?
> > +                                                     "Enable": "Disable");
> > +
> > +             igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
> > +                             tests[i].fb_bpc, tests[i].output_bpc)
> > +                     run_dither_test(&data,
> > +                                     tests[i].fb_bpc,
> > +                                     tests[i].format,
> > +                                     tests[i].output_bpc);
> > +     }
> > +
> > +     igt_fixture {
> > +             igt_display_fini(&data.display);
> > +     }
> > +}
> > diff --git a/tests/meson.build b/tests/meson.build index 01911c4579..d3de40be07 100644
> > --- a/tests/meson.build
> > +++ b/tests/meson.build
> > @@ -29,6 +29,7 @@ test_progs = [
> >       'kms_cursor_crc',
> >       'kms_cursor_edge_walk',
> >       'kms_cursor_legacy',
> > +     'kms_dither',
> >       'kms_dp_aux_dev',
> >       'kms_dp_dsc',
> >       'kms_dp_tiled_display',
> > --
> > 2.20.1
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev>>
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-12 14:56     ` Mark Yacoub
@ 2021-07-15  4:00       ` Modem, Bhanuprakash
  2021-07-15 14:50         ` Mark Yacoub
  0 siblings, 1 reply; 10+ messages in thread
From: Modem, Bhanuprakash @ 2021-07-15  4:00 UTC (permalink / raw)
  To: Mark Yacoub, Harry Wentland, Shankar, Uma
  Cc: igt-dev, Varide, Nischal, Sean Paul

> From: Mark Yacoub <markyacoub@chromium.org>
> Sent: Monday, July 12, 2021 8:27 PM
> To: Harry Wentland <harry.wentland@amd.com>
> Cc: Varide, Nischal <nischal.varide@intel.com>; Modem, Bhanuprakash
> <bhanuprakash.modem@intel.com>; igt-dev@lists.freedesktop.org; Arkadiusz Hiler
> <arek@hiler.eu>; Sean Paul <seanpaul@chromium.org>; Siqueira, Rodrigo
> <Rodrigo.Siqueira@amd.com>
> Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate
> crtc Dithering
> 
> On Mon, Jul 12, 2021 at 9:35 AM Harry Wentland <harry.wentland@amd.com> wrote:
> >
> >
> >
> > On 2021-07-08 12:05 p.m., Varide, Nischal wrote:
> > >
> > >
> > > -----Original Message-----
> > > From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
> > > Sent: Friday, July 9, 2021 2:04 AM
> > > To: igt-dev@lists.freedesktop.org
> > > Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Sharma, Swati2
> <swati2.sharma@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Varide,
> Nischal <nischal.varide@intel.com>
> > > Subject: [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc
> Dithering
> > >
> > > Many of the display devices have color format support less than the color
> format of the input data (Ex: 8-bit input data and 6-bit display color depth).
> Then the input data will be either truncated or rounded, but this approach
> usually causes loss of detail and also produce large banded areas of a single
> color that significantly differs from the original image.
> > >
> > > Dithering is a technique used to enhance these colors by creating the
> illusion of smoothness by adjusting the nearby pixel color.
> > > For Eg: Converting 8-bit to 6-bit by modifying the pixel information.
> > >
> > > Dithering should be enabled when a panel color depth is lower than the
> color depth of the framebuffer.
> > >
> > > Even though feature Dithering is there since legacy, there is no specific
> IGT for this. This patch will create New IGT for Dithering.
> > > And below is the truth table for CRTC Dithering.
> > >
> > > |----------------|---------|-------------|
> > > |  Frame buffer  |  Panel  |  Dithering  |
> > > |----------------|---------|-------------|
> > > |      8 BPC     |  6 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > > |      8 BPC     |  8 BPC  |     No      |
> > > |----------------|---------|-------------|
> > > |      8 BPC     | 10 BPC  |     No      |
> > > |----------------|---------|-------------|
> > > |     10 BPC     |  6 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > > |     10 BPC     |  8 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > > |     10 BPC     | 10 BPC  |     No      |
> > > |----------------|---------|-------------|
> > > |     16 BPC     |  6 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > > |     16 BPC     |  8 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > > |     16 BPC     | 10 BPC  |     Yes     |
> > > |----------------|---------|-------------|
> > >
> > > As i915 enables dithering for 6 bpc panels only, we need to limit the
> execution to 6 & 8 bpc panels (Negative testing) only.
> > >
> > > Cc: Swati Sharma <swati2.sharma@intel.com>
> > > Cc: Uma Shankar <uma.shankar@intel.com>
> > > Cc: Nischal Varide <nischal.varide@intel.com>
> > > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > > Reviewed-by: Nischal Varide <nischal.varide@intel.com>
> > > ---
> > >  tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
> > >  tests/meson.build  |   1 +
> > >  2 files changed, 254 insertions(+)
> > >  create mode 100644 tests/kms_dither.c
> > >
> > > diff --git a/tests/kms_dither.c b/tests/kms_dither.c new file mode 100644
> index 0000000000..0e0c61dea2
> > > --- /dev/null
> > > +++ b/tests/kms_dither.c
> > > @@ -0,0 +1,253 @@
> > > +/*
> > > + * Copyright © 2020 Intel Corporation
> > > + *
> > > + * Permission is hereby granted, free of charge, to any person
> > > +obtaining a
> > > + * copy of this software and associated documentation files (the
> > > +"Software"),
> > > + * to deal in the Software without restriction, including without
> > > +limitation
> > > + * the rights to use, copy, modify, merge, publish, distribute,
> > > +sublicense,
> > > + * and/or sell copies of the Software, and to permit persons to whom
> > > +the
> > > + * Software is furnished to do so, subject to the following conditions:
> > > + *
> > > + * The above copyright notice and this permission notice (including the
> > > +next
> > > + * paragraph) shall be included in all copies or substantial portions
> > > +of the
> > > + * Software.
> > > + *
> > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > > +EXPRESS OR
> > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > +MERCHANTABILITY,
> > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> > > +SHALL
> > > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM,
> > > +DAMAGES OR
> > > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> > > +OTHERWISE,
> > > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
> > > +OR
> > > + * OTHER DEALINGS IN THE SOFTWARE.
> > > + *
> > > + * Authors:
> > > + *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > > + *
> > > + */
> > > +
> > > +#include "igt.h"
> > > +#include <fcntl.h>
> > > +#include <termios.h>
> > > +#include <unistd.h>
> > > +
> > > +IGT_TEST_DESCRIPTION("Test Dithering block status");
> > > +
> > > +/* Connector BPC */
> > > +#define IGT_CONNECTOR_BPC_6          6
> > > +#define IGT_CONNECTOR_BPC_8          8
> > > +#define IGT_CONNECTOR_BPC_10         10
> > > +#define IGT_CONNECTOR_BPC_12         12
> > > +
> > > +/* Framebuffer BPC */
> > > +#define IGT_FRAME_BUFFER_BPC_8               8
> > > +#define IGT_FRAME_BUFFER_BPC_10              10
> > > +#define IGT_FRAME_BUFFER_BPC_16              16
> > > +
> > > +/* Common test data. */
> > > +typedef struct data {
> > > +     igt_display_t display;
> > > +     igt_plane_t *primary;
> > > +     igt_output_t *output;
> > > +     igt_pipe_t *pipe;
> > > +     drmModeModeInfo *mode;
> > > +     enum pipe pipe_id;
> > > +     int drm_fd;
> > > +     igt_fb_t fb;
> > > +} data_t;
> > > +
> > > +typedef struct {
> > > +     unsigned int bpc;
> > > +     unsigned int dither;
> > > +} dither_status_t;
> > > +
> > > +/* Prepare test data. */
> > > +static void prepare_test(data_t *data, igt_output_t *output, enum pipe
> > > +pipe) {
> > > +     igt_display_t *display = &data->display;
> > > +
> > > +     data->pipe_id = pipe;
> > > +     data->pipe = &data->display.pipes[data->pipe_id];
> > > +     igt_assert(data->pipe);
> > > +
> > > +     igt_display_reset(display);
> > > +
> > > +     data->output = output;
> > > +     igt_assert(data->output);
> > > +
> > > +     data->mode = igt_output_get_mode(data->output);
> > > +     igt_assert(data->mode);
> > > +
> > > +     data->primary =
> > > +             igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> > > +
> > > +     igt_output_set_pipe(data->output, data->pipe_id); }
> > > +
> > > +/* Returns the current state of dithering from the crtc debugfs. */
> > > +static dither_status_t get_dither_state(data_t *data) {
> > > +     char buf[512], tmp[5];
> > > +     char *start_loc;
> > > +     int dir, res;
> > > +     dither_status_t status;
> > > +
> > > +     dir = igt_debugfs_dir(data->drm_fd);
> > > +     igt_assert(dir >= 0);
> > > +
> > > +     res = igt_debugfs_simple_read(dir, "i915_display_info", buf,
> sizeof(buf));
> >
> > This seems to be an i915-specific test. Do those belong in the kms_
> namespace?
> >
> > Could this be made into a generic test?
> >
> > Harry
> >
> > > +     igt_require(res > 0);
> > > +     close(dir);
> > > +
> > > +     igt_assert(start_loc = strstr(buf, ", bpp="));
> > > +     igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
> > > +     status.bpc /= 3;
> > > +
> > > +     igt_assert(start_loc = strstr(buf, ", dither="));
> > > +     igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
> > > +     status.dither = !strcmp(tmp, "yes,");
> > > +
> > > +     return status;
> > > +}
> > > +
> > > +static void test_dithering(data_t *data, enum pipe pipe,
> > > +                        igt_output_t *output,
> > > +                        int fb_bpc, int fb_format,
> > > +                        int output_bpc)
> > > +{
> > > +     igt_display_t *display = &data->display;
> > > +     dither_status_t status;
> > > +     int bpc;
> > > +
> > > +     igt_info("Dithering test execution on %s PIPE_%s\n",
> > > +                     output->name, kmstest_pipe_name(pipe));
> > > +     prepare_test(data, output, pipe);
> > > +
> > > +     igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
> > > +                              data->mode->vdisplay, fb_format,
> > > +                              LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
> > > +     igt_plane_set_fb(data->primary, &data->fb);
> > > +     igt_plane_set_size(data->primary, data->mode->hdisplay,
> > > +data->mode->vdisplay);
> > > +
> > > +     bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> > > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC,
> output_bpc);
> > > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC :
> > > +COMMIT_LEGACY);
> > > +
> > > +     /*
> > > +      * Check the status of Dithering block:
> > > +      *
> > > +      * Preserve the result & compute later (after clean-up).
> > > +      * If fb_bpc is greater than output_bpc, Dithering should be enabled
> > > +      * Else disabled
> > > +      */
> > > +     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");
> > > +
> > > +       /*
> > > +     * We must update the Connector max_bpc property back
> > > +     * Otherwise, previously updated value will stay forever and
> > > +     * may cause the failures for next/other subtests.
> > > +     */
> > > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
> > > +     igt_plane_set_fb(data->primary, NULL);
> > > +     igt_output_set_pipe(output, PIPE_NONE);
> > > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC :
> COMMIT_LEGACY);
> > > +     igt_remove_fb(data->drm_fd, &data->fb);
> > > +
> > > +     /* Check if crtc bpc is updated with requested one. */
> > > +     igt_require_f((status.bpc == output_bpc),
> > > +                     "%s can support max %u-bpc, but requested %d-bpc\n",
> > > +                             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",
> > > +                             fb_bpc, output_bpc);
> > > +
> > > +     return;
> > > +}
> > > +
> > > +/* Returns true if an output supports max bpc property & max_bpc >=
> > > +requested. */ static bool is_supported(igt_output_t *output, int bpc) {
> > > +        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> > > +            igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); }
> > > +
> > > +static void
> > > +run_dither_test(data_t *data, int fb_bpc, int fb_format, int
> > > +output_bpc) {
> > > +     igt_output_t *output;
> > > +     igt_display_t *display = &data->display;
> > > +
> > > +     for_each_connected_output(display, output) {
> > > +             enum pipe pipe;
> > > +             drmModeConnector *connector = output->config.connector;
> > > +
> > > +             if (!is_supported(output, output_bpc))
> > > +                     continue;
> > > +
> > > +             /* HDMI won't support 6 BPC */
> > > +             if (output_bpc == IGT_CONNECTOR_BPC_6 &&
> > > +                (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> > > +                 connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
> > > +                     continue;
> > > +
> > > +             for_each_pipe(display, pipe) {
> > > +                     if (igt_pipe_connector_valid(pipe, output)) {
> > > +                             igt_dynamic_f("%s-pipe-%s", output->name,
> kmstest_pipe_name(pipe))
> > > +                                     test_dithering(data, pipe, output,
> fb_bpc,
> > > +                                                     fb_format,
> output_bpc);
> > > +
> > > +                             /* One pipe is enough */
> > > +                             break;
> > > +                     }
> > > +             }
> > > +     }
> > > +}
> > > +
> > > +igt_main
> > > +{
> > > +     struct {
> > > +             int fb_bpc;
> > > +             int format;
> > > +             int output_bpc;
> > > +     } 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 },
> > > +     };
> > > +     int i;
> > > +     data_t data = { 0 };
> > > +
> > > +     igt_fixture {
> > > +             data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> I agree with Harry.
> For context: KMS tests on IGT are officially supported on multiple
> SoCs and there is an active development on it along with Intel's.
> With that being said, KMS tests are meant to be generic. I understand
> if sometime you need to test little things specific for intel so we
> use igt_require_[intel | otherdriver], but if the whole test is intel
> specific, it doesn't make sense to be part of kms, the best place for
> it would be tests/i915.
> So basically, we shouldn't have any `
> drm_open_driver_master(DRIVER_INTEL);` in any kms_* tests.
> Alternatively, this test can be made generic and everyone is happy :))
 
Agreed, Dithering is not intel specific. As this test is already merged,
for now maybe we can add a check intel_require(intel) in igt_fixture, and
start working to make this test generic.

Does this make sense?

- Bhanu

> > > +             kmstest_set_vt_graphics_mode();
> > > +
> > > +             igt_display_require(&data.display, data.drm_fd);
> > > +             igt_display_require_output(&data.display);
> > > +     }
> > > +
> > > +     for (i = 0; i < ARRAY_SIZE(tests); i++) {
> > > +             igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected
> Dither:%s\n",
> > > +                            tests[i].fb_bpc, tests[i].output_bpc,
> > > +                            (tests[i].fb_bpc > tests[i].output_bpc) ?
> > > +                                                     "Enable":
> "Disable");
> > > +
> > > +             igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
> > > +                             tests[i].fb_bpc, tests[i].output_bpc)
> > > +                     run_dither_test(&data,
> > > +                                     tests[i].fb_bpc,
> > > +                                     tests[i].format,
> > > +                                     tests[i].output_bpc);
> > > +     }
> > > +
> > > +     igt_fixture {
> > > +             igt_display_fini(&data.display);
> > > +     }
> > > +}
> > > diff --git a/tests/meson.build b/tests/meson.build index
> 01911c4579..d3de40be07 100644
> > > --- a/tests/meson.build
> > > +++ b/tests/meson.build
> > > @@ -29,6 +29,7 @@ test_progs = [
> > >       'kms_cursor_crc',
> > >       'kms_cursor_edge_walk',
> > >       'kms_cursor_legacy',
> > > +     'kms_dither',
> > >       'kms_dp_aux_dev',
> > >       'kms_dp_dsc',
> > >       'kms_dp_tiled_display',
> > > --
> > > 2.20.1
> > >
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/igt-dev>>
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering
  2021-07-15  4:00       ` Modem, Bhanuprakash
@ 2021-07-15 14:50         ` Mark Yacoub
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Yacoub @ 2021-07-15 14:50 UTC (permalink / raw)
  To: Modem, Bhanuprakash; +Cc: Varide, Nischal, igt-dev, Sean Paul

On Thu, Jul 15, 2021 at 12:00 AM Modem, Bhanuprakash
<bhanuprakash.modem@intel.com> wrote:
>
> > From: Mark Yacoub <markyacoub@chromium.org>
> > Sent: Monday, July 12, 2021 8:27 PM
> > To: Harry Wentland <harry.wentland@amd.com>
> > Cc: Varide, Nischal <nischal.varide@intel.com>; Modem, Bhanuprakash
> > <bhanuprakash.modem@intel.com>; igt-dev@lists.freedesktop.org; Arkadiusz Hiler
> > <arek@hiler.eu>; Sean Paul <seanpaul@chromium.org>; Siqueira, Rodrigo
> > <Rodrigo.Siqueira@amd.com>
> > Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate
> > crtc Dithering
> >
> > On Mon, Jul 12, 2021 at 9:35 AM Harry Wentland <harry.wentland@amd.com> wrote:
> > >
> > >
> > >
> > > On 2021-07-08 12:05 p.m., Varide, Nischal wrote:
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>
> > > > Sent: Friday, July 9, 2021 2:04 AM
> > > > To: igt-dev@lists.freedesktop.org
> > > > Cc: Modem, Bhanuprakash <bhanuprakash.modem@intel.com>; Sharma, Swati2
> > <swati2.sharma@intel.com>; Shankar, Uma <uma.shankar@intel.com>; Varide,
> > Nischal <nischal.varide@intel.com>
> > > > Subject: [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc
> > Dithering
> > > >
> > > > Many of the display devices have color format support less than the color
> > format of the input data (Ex: 8-bit input data and 6-bit display color depth).
> > Then the input data will be either truncated or rounded, but this approach
> > usually causes loss of detail and also produce large banded areas of a single
> > color that significantly differs from the original image.
> > > >
> > > > Dithering is a technique used to enhance these colors by creating the
> > illusion of smoothness by adjusting the nearby pixel color.
> > > > For Eg: Converting 8-bit to 6-bit by modifying the pixel information.
> > > >
> > > > Dithering should be enabled when a panel color depth is lower than the
> > color depth of the framebuffer.
> > > >
> > > > Even though feature Dithering is there since legacy, there is no specific
> > IGT for this. This patch will create New IGT for Dithering.
> > > > And below is the truth table for CRTC Dithering.
> > > >
> > > > |----------------|---------|-------------|
> > > > |  Frame buffer  |  Panel  |  Dithering  |
> > > > |----------------|---------|-------------|
> > > > |      8 BPC     |  6 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > > |      8 BPC     |  8 BPC  |     No      |
> > > > |----------------|---------|-------------|
> > > > |      8 BPC     | 10 BPC  |     No      |
> > > > |----------------|---------|-------------|
> > > > |     10 BPC     |  6 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > > |     10 BPC     |  8 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > > |     10 BPC     | 10 BPC  |     No      |
> > > > |----------------|---------|-------------|
> > > > |     16 BPC     |  6 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > > |     16 BPC     |  8 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > > |     16 BPC     | 10 BPC  |     Yes     |
> > > > |----------------|---------|-------------|
> > > >
> > > > As i915 enables dithering for 6 bpc panels only, we need to limit the
> > execution to 6 & 8 bpc panels (Negative testing) only.
> > > >
> > > > Cc: Swati Sharma <swati2.sharma@intel.com>
> > > > Cc: Uma Shankar <uma.shankar@intel.com>
> > > > Cc: Nischal Varide <nischal.varide@intel.com>
> > > > Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > > > Reviewed-by: Nischal Varide <nischal.varide@intel.com>
> > > > ---
> > > >  tests/kms_dither.c | 253 +++++++++++++++++++++++++++++++++++++++++++++
> > > >  tests/meson.build  |   1 +
> > > >  2 files changed, 254 insertions(+)
> > > >  create mode 100644 tests/kms_dither.c
> > > >
> > > > diff --git a/tests/kms_dither.c b/tests/kms_dither.c new file mode 100644
> > index 0000000000..0e0c61dea2
> > > > --- /dev/null
> > > > +++ b/tests/kms_dither.c
> > > > @@ -0,0 +1,253 @@
> > > > +/*
> > > > + * Copyright © 2020 Intel Corporation
> > > > + *
> > > > + * Permission is hereby granted, free of charge, to any person
> > > > +obtaining a
> > > > + * copy of this software and associated documentation files (the
> > > > +"Software"),
> > > > + * to deal in the Software without restriction, including without
> > > > +limitation
> > > > + * the rights to use, copy, modify, merge, publish, distribute,
> > > > +sublicense,
> > > > + * and/or sell copies of the Software, and to permit persons to whom
> > > > +the
> > > > + * Software is furnished to do so, subject to the following conditions:
> > > > + *
> > > > + * The above copyright notice and this permission notice (including the
> > > > +next
> > > > + * paragraph) shall be included in all copies or substantial portions
> > > > +of the
> > > > + * Software.
> > > > + *
> > > > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > > > +EXPRESS OR
> > > > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > > +MERCHANTABILITY,
> > > > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT
> > > > +SHALL
> > > > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM,
> > > > +DAMAGES OR
> > > > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> > > > +OTHERWISE,
> > > > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
> > > > +OR
> > > > + * OTHER DEALINGS IN THE SOFTWARE.
> > > > + *
> > > > + * Authors:
> > > > + *     Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> > > > + *
> > > > + */
> > > > +
> > > > +#include "igt.h"
> > > > +#include <fcntl.h>
> > > > +#include <termios.h>
> > > > +#include <unistd.h>
> > > > +
> > > > +IGT_TEST_DESCRIPTION("Test Dithering block status");
> > > > +
> > > > +/* Connector BPC */
> > > > +#define IGT_CONNECTOR_BPC_6          6
> > > > +#define IGT_CONNECTOR_BPC_8          8
> > > > +#define IGT_CONNECTOR_BPC_10         10
> > > > +#define IGT_CONNECTOR_BPC_12         12
> > > > +
> > > > +/* Framebuffer BPC */
> > > > +#define IGT_FRAME_BUFFER_BPC_8               8
> > > > +#define IGT_FRAME_BUFFER_BPC_10              10
> > > > +#define IGT_FRAME_BUFFER_BPC_16              16
> > > > +
> > > > +/* Common test data. */
> > > > +typedef struct data {
> > > > +     igt_display_t display;
> > > > +     igt_plane_t *primary;
> > > > +     igt_output_t *output;
> > > > +     igt_pipe_t *pipe;
> > > > +     drmModeModeInfo *mode;
> > > > +     enum pipe pipe_id;
> > > > +     int drm_fd;
> > > > +     igt_fb_t fb;
> > > > +} data_t;
> > > > +
> > > > +typedef struct {
> > > > +     unsigned int bpc;
> > > > +     unsigned int dither;
> > > > +} dither_status_t;
> > > > +
> > > > +/* Prepare test data. */
> > > > +static void prepare_test(data_t *data, igt_output_t *output, enum pipe
> > > > +pipe) {
> > > > +     igt_display_t *display = &data->display;
> > > > +
> > > > +     data->pipe_id = pipe;
> > > > +     data->pipe = &data->display.pipes[data->pipe_id];
> > > > +     igt_assert(data->pipe);
> > > > +
> > > > +     igt_display_reset(display);
> > > > +
> > > > +     data->output = output;
> > > > +     igt_assert(data->output);
> > > > +
> > > > +     data->mode = igt_output_get_mode(data->output);
> > > > +     igt_assert(data->mode);
> > > > +
> > > > +     data->primary =
> > > > +             igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
> > > > +
> > > > +     igt_output_set_pipe(data->output, data->pipe_id); }
> > > > +
> > > > +/* Returns the current state of dithering from the crtc debugfs. */
> > > > +static dither_status_t get_dither_state(data_t *data) {
> > > > +     char buf[512], tmp[5];
> > > > +     char *start_loc;
> > > > +     int dir, res;
> > > > +     dither_status_t status;
> > > > +
> > > > +     dir = igt_debugfs_dir(data->drm_fd);
> > > > +     igt_assert(dir >= 0);
> > > > +
> > > > +     res = igt_debugfs_simple_read(dir, "i915_display_info", buf,
> > sizeof(buf));
> > >
> > > This seems to be an i915-specific test. Do those belong in the kms_
> > namespace?
> > >
> > > Could this be made into a generic test?
> > >
> > > Harry
> > >
> > > > +     igt_require(res > 0);
> > > > +     close(dir);
> > > > +
> > > > +     igt_assert(start_loc = strstr(buf, ", bpp="));
> > > > +     igt_assert_eq(sscanf(start_loc, ", bpp=%u", &status.bpc), 1);
> > > > +     status.bpc /= 3;
> > > > +
> > > > +     igt_assert(start_loc = strstr(buf, ", dither="));
> > > > +     igt_assert_eq(sscanf(start_loc, ", dither=%s", tmp), 1);
> > > > +     status.dither = !strcmp(tmp, "yes,");
> > > > +
> > > > +     return status;
> > > > +}
> > > > +
> > > > +static void test_dithering(data_t *data, enum pipe pipe,
> > > > +                        igt_output_t *output,
> > > > +                        int fb_bpc, int fb_format,
> > > > +                        int output_bpc)
> > > > +{
> > > > +     igt_display_t *display = &data->display;
> > > > +     dither_status_t status;
> > > > +     int bpc;
> > > > +
> > > > +     igt_info("Dithering test execution on %s PIPE_%s\n",
> > > > +                     output->name, kmstest_pipe_name(pipe));
> > > > +     prepare_test(data, output, pipe);
> > > > +
> > > > +     igt_assert(igt_create_fb(data->drm_fd, data->mode->hdisplay,
> > > > +                              data->mode->vdisplay, fb_format,
> > > > +                              LOCAL_DRM_FORMAT_MOD_NONE, &data->fb));
> > > > +     igt_plane_set_fb(data->primary, &data->fb);
> > > > +     igt_plane_set_size(data->primary, data->mode->hdisplay,
> > > > +data->mode->vdisplay);
> > > > +
> > > > +     bpc = igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC);
> > > > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC,
> > output_bpc);
> > > > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC :
> > > > +COMMIT_LEGACY);
> > > > +
> > > > +     /*
> > > > +      * Check the status of Dithering block:
> > > > +      *
> > > > +      * Preserve the result & compute later (after clean-up).
> > > > +      * If fb_bpc is greater than output_bpc, Dithering should be enabled
> > > > +      * Else disabled
> > > > +      */
> > > > +     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");
> > > > +
> > > > +       /*
> > > > +     * We must update the Connector max_bpc property back
> > > > +     * Otherwise, previously updated value will stay forever and
> > > > +     * may cause the failures for next/other subtests.
> > > > +     */
> > > > +     igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, bpc);
> > > > +     igt_plane_set_fb(data->primary, NULL);
> > > > +     igt_output_set_pipe(output, PIPE_NONE);
> > > > +     igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC :
> > COMMIT_LEGACY);
> > > > +     igt_remove_fb(data->drm_fd, &data->fb);
> > > > +
> > > > +     /* Check if crtc bpc is updated with requested one. */
> > > > +     igt_require_f((status.bpc == output_bpc),
> > > > +                     "%s can support max %u-bpc, but requested %d-bpc\n",
> > > > +                             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",
> > > > +                             fb_bpc, output_bpc);
> > > > +
> > > > +     return;
> > > > +}
> > > > +
> > > > +/* Returns true if an output supports max bpc property & max_bpc >=
> > > > +requested. */ static bool is_supported(igt_output_t *output, int bpc) {
> > > > +        return igt_output_has_prop(output, IGT_CONNECTOR_MAX_BPC) &&
> > > > +            igt_output_get_prop(output, IGT_CONNECTOR_MAX_BPC); }
> > > > +
> > > > +static void
> > > > +run_dither_test(data_t *data, int fb_bpc, int fb_format, int
> > > > +output_bpc) {
> > > > +     igt_output_t *output;
> > > > +     igt_display_t *display = &data->display;
> > > > +
> > > > +     for_each_connected_output(display, output) {
> > > > +             enum pipe pipe;
> > > > +             drmModeConnector *connector = output->config.connector;
> > > > +
> > > > +             if (!is_supported(output, output_bpc))
> > > > +                     continue;
> > > > +
> > > > +             /* HDMI won't support 6 BPC */
> > > > +             if (output_bpc == IGT_CONNECTOR_BPC_6 &&
> > > > +                (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> > > > +                 connector->connector_type == DRM_MODE_CONNECTOR_HDMIB))
> > > > +                     continue;
> > > > +
> > > > +             for_each_pipe(display, pipe) {
> > > > +                     if (igt_pipe_connector_valid(pipe, output)) {
> > > > +                             igt_dynamic_f("%s-pipe-%s", output->name,
> > kmstest_pipe_name(pipe))
> > > > +                                     test_dithering(data, pipe, output,
> > fb_bpc,
> > > > +                                                     fb_format,
> > output_bpc);
> > > > +
> > > > +                             /* One pipe is enough */
> > > > +                             break;
> > > > +                     }
> > > > +             }
> > > > +     }
> > > > +}
> > > > +
> > > > +igt_main
> > > > +{
> > > > +     struct {
> > > > +             int fb_bpc;
> > > > +             int format;
> > > > +             int output_bpc;
> > > > +     } 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 },
> > > > +     };
> > > > +     int i;
> > > > +     data_t data = { 0 };
> > > > +
> > > > +     igt_fixture {
> > > > +             data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
> > I agree with Harry.
> > For context: KMS tests on IGT are officially supported on multiple
> > SoCs and there is an active development on it along with Intel's.
> > With that being said, KMS tests are meant to be generic. I understand
> > if sometime you need to test little things specific for intel so we
> > use igt_require_[intel | otherdriver], but if the whole test is intel
> > specific, it doesn't make sense to be part of kms, the best place for
> > it would be tests/i915.
> > So basically, we shouldn't have any `
> > drm_open_driver_master(DRIVER_INTEL);` in any kms_* tests.
> > Alternatively, this test can be made generic and everyone is happy :))
>
> Agreed, Dithering is not intel specific. As this test is already merged,
`> for now maybe we can add a check intel_require(intel) in igt_fixture, and
> start working to make this test generic.
>
> Does this make sense?
Hey Bhanu,
So I ran the test on a Zork (amdgpu) device and it's pretty gracefully
handled. The first subtest skips due to `eDP-1 don't support 6-bpc`
and the second one is pretty expected as you try to open
`i915_display_info` but it skips at `igt_require(res > 0);`.
Basically everything is gracefully handled if you do
`drm_open_driver_master(DRIVER_ANY);` and should be quite easy to
extend it to other platforms when needed.
I don't mind uploading the change so let me know :))
>
> - Bhanu
>
> > > > +             kmstest_set_vt_graphics_mode();
> > > > +
> > > > +             igt_display_require(&data.display, data.drm_fd);
> > > > +             igt_display_require_output(&data.display);
> > > > +     }
> > > > +
> > > > +     for (i = 0; i < ARRAY_SIZE(tests); i++) {
> > > > +             igt_describe_f("Framebuffer BPC:%d, Panel BPC:%d, Expected
> > Dither:%s\n",
> > > > +                            tests[i].fb_bpc, tests[i].output_bpc,
> > > > +                            (tests[i].fb_bpc > tests[i].output_bpc) ?
> > > > +                                                     "Enable":
> > "Disable");
> > > > +
> > > > +             igt_subtest_with_dynamic_f("FB-%dBPC-Vs-Panel-%dBPC",
> > > > +                             tests[i].fb_bpc, tests[i].output_bpc)
> > > > +                     run_dither_test(&data,
> > > > +                                     tests[i].fb_bpc,
> > > > +                                     tests[i].format,
> > > > +                                     tests[i].output_bpc);
> > > > +     }
> > > > +
> > > > +     igt_fixture {
> > > > +             igt_display_fini(&data.display);
> > > > +     }
> > > > +}
> > > > diff --git a/tests/meson.build b/tests/meson.build index
> > 01911c4579..d3de40be07 100644
> > > > --- a/tests/meson.build
> > > > +++ b/tests/meson.build
> > > > @@ -29,6 +29,7 @@ test_progs = [
> > > >       'kms_cursor_crc',
> > > >       'kms_cursor_edge_walk',
> > > >       'kms_cursor_legacy',
> > > > +     'kms_dither',
> > > >       'kms_dp_aux_dev',
> > > >       'kms_dp_dsc',
> > > >       'kms_dp_tiled_display',
> > > > --
> > > > 2.20.1
> > > >
> > > > _______________________________________________
> > > > igt-dev mailing list
> > > > igt-dev@lists.freedesktop.org
> > > > https://lists.freedesktop.org/mailman/listinfo/igt-dev>>
> > >
> > > _______________________________________________
> > > igt-dev mailing list
> > > igt-dev@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-15 14:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-08 20:33 [igt-dev] [PATCH i-g-t 1/2] tests/kms_dither: New IGT to validate crtc Dithering Bhanuprakash Modem
2021-07-08 16:05 ` Varide, Nischal
2021-07-12 13:35   ` Harry Wentland
2021-07-12 14:56     ` Mark Yacoub
2021-07-15  4:00       ` Modem, Bhanuprakash
2021-07-15 14:50         ` Mark Yacoub
2021-07-08 16:56 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork
2021-07-08 20:33 ` [igt-dev] [PATCH i-g-t 2/2] HAX: Add dither tests to fast-feedback Bhanuprakash Modem
2021-07-09  1:23 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering Patchwork
2021-07-10  8:10 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,1/2] tests/kms_dither: New IGT to validate crtc Dithering (rev2) Patchwork

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.