All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP
@ 2023-01-12  7:35 Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file Swati Sharma
                   ` (10 more replies)
  0 siblings, 11 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

In this series, fractional BPP patches are added
on top of VDSC YCbCr420 from
https://patchwork.freedesktop.org/series/110336/
DSC related functions are moved from igt_kms to igt_dsc (new lib file).
kms_dsc_helper file is created to consolidate all the wrapper functions
used in kms_dsc.
Based on the review comments, function parameters are modified so that
they can be resused for PSR2+DSC testcases.

Swati Sharma (8):
  lib/dsc: Move VDSC functions to separate lib file
  Move wrapper functions from kms_dsc to kms_dsc_helper
  lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  tests/i915/kms_dsc: Prep work for extending val support for VDSC
    YCbCr420
  tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
  lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry
  tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP
  tests/i915/kms_dsc: Add test summary

 lib/igt.h                   |   1 +
 lib/igt_dsc.c               | 284 ++++++++++++++++++++++++++++++++++++
 lib/igt_dsc.h               |  28 ++++
 lib/igt_kms.c               | 144 +++---------------
 lib/igt_kms.h               |  16 +-
 lib/meson.build             |   1 +
 tests/i915/kms_dsc.c        | 258 ++++++++++++++------------------
 tests/i915/kms_dsc_helper.c | 204 ++++++++++++++++++++++++++
 tests/i915/kms_dsc_helper.h |  43 ++++++
 tests/meson.build           |  10 +-
 10 files changed, 703 insertions(+), 286 deletions(-)
 create mode 100644 lib/igt_dsc.c
 create mode 100644 lib/igt_dsc.h
 create mode 100644 tests/i915/kms_dsc_helper.c
 create mode 100644 tests/i915/kms_dsc_helper.h

-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper Swati Sharma
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Move dsc func() from lib/igt_kms to lib/igt_dsc. With
DSC1.2a new functions will be introduced. It's better
to create separate file having dsc specific functions
instead of overcrowding igt_kms.

v2: -use of SPDX licence placeholder

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt.h       |   1 +
 lib/igt_dsc.c   | 133 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_dsc.h   |  19 +++++++
 lib/igt_kms.c   | 127 ---------------------------------------------
 lib/igt_kms.h   |  10 ----
 lib/meson.build |   1 +
 6 files changed, 154 insertions(+), 137 deletions(-)
 create mode 100644 lib/igt_dsc.c
 create mode 100644 lib/igt_dsc.h

diff --git a/lib/igt.h b/lib/igt.h
index 88938109e..73b6f7727 100644
--- a/lib/igt.h
+++ b/lib/igt.h
@@ -40,6 +40,7 @@
 #include "igt_pipe_crc.h"
 #include "igt_pm.h"
 #include "igt_stats.h"
+#include "igt_dsc.h"
 #ifdef HAVE_CHAMELIUM
 #include "igt_alsa.h"
 #include "igt_audio.h"
diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
new file mode 100644
index 000000000..25dcb5840
--- /dev/null
+++ b/lib/igt_dsc.c
@@ -0,0 +1,133 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+#include "igt_dsc.h"
+#include "igt_sysfs.h"
+
+static bool check_dsc_debugfs(int drmfd, char *connector_name, const char *check_str)
+{
+	char file_name[128] = {0};
+	char buf[512];
+
+	sprintf(file_name, "%s/i915_dsc_fec_support", connector_name);
+
+	igt_debugfs_read(drmfd, file_name, buf);
+
+	return strstr(buf, check_str);
+}
+
+static int write_dsc_debugfs(int drmfd, char *connector_name, const char *file_name,
+			     const char *write_buf)
+{
+	int debugfs_fd = igt_debugfs_dir(drmfd);
+	int len = strlen(write_buf);
+	int ret;
+	char file_path[128] = {0};
+
+	sprintf(file_path, "%s/%s", connector_name, file_name);
+
+	ret = igt_sysfs_write(debugfs_fd, file_path, write_buf, len);
+
+	close(debugfs_fd);
+
+	return ret;
+}
+
+/*
+ * igt_is_dsc_supported:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC is supported for the given connector, false otherwise.
+ */
+bool igt_is_dsc_supported(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "DSC_Sink_Support: yes");
+}
+
+/*
+ * igt_is_fec_supported:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if FEC is supported for the given connector, false otherwise.
+ */
+bool igt_is_fec_supported(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "FEC_Sink_Support: yes");
+}
+
+/*
+ * igt_is_dsc_enabled:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC is enabled for the given connector, false otherwise.
+ */
+bool igt_is_dsc_enabled(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "DSC_Enabled: yes");
+}
+
+/*
+ * igt_is_force_dsc_enabled:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC is force enabled (via debugfs) for the given connector,
+ * false otherwise.
+ */
+bool igt_is_force_dsc_enabled(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "Force_DSC_Enable: yes");
+}
+
+/*
+ * igt_force_dsc_enable:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: 1 on success or negative error code, in case of failure.
+ */
+int igt_force_dsc_enable(int drmfd, char *connector_name)
+{
+	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_fec_support", "1");
+}
+
+/*
+ * igt_force_dsc_enable_bpc:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ * @bpc: Input BPC
+ *
+ * Returns: No. of bytes written or negative error code, in case of failure.
+ */
+int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc)
+{
+	char buf[20] = {0};
+
+	sprintf(buf, "%d", bpc);
+
+	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_bpc", buf);
+}
+
+/*
+ * igt_get_dsc_debugfs_fd:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: fd of the DSC debugfs for the given connector, else returns -1.
+ */
+int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)
+{
+	char file_name[128] = {0};
+
+	sprintf(file_name, "%s/i915_dsc_fec_support", connector_name);
+
+	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
+}
diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
new file mode 100644
index 000000000..291c2cdea
--- /dev/null
+++ b/lib/igt_dsc.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#ifndef IGT_DSC_H
+#define IGT_DSC_H
+
+#include "igt_fb.h"
+
+bool igt_is_dsc_supported(int drmfd, char *connector_name);
+bool igt_is_fec_supported(int drmfd, char *connector_name);
+bool igt_is_dsc_enabled(int drmfd, char *connector_name);
+bool igt_is_force_dsc_enabled(int drmfd, char *connector_name);
+int igt_force_dsc_enable(int drmfd, char *connector_name);
+int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc);
+int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
+
+#endif
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b4a98ae17..31e6dfda0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5564,133 +5564,6 @@ void igt_dump_crtcs_fd(int drmfd)
 	drmModeFreeResources(mode_resources);
 }
 
-static
-bool check_dsc_debugfs(int drmfd, char *connector_name,
-		       const char *check_str)
-{
-	char file_name[128] = {0};
-	char buf[512];
-
-	sprintf(file_name, "%s/i915_dsc_fec_support", connector_name);
-
-	igt_debugfs_read(drmfd, file_name, buf);
-
-	return strstr(buf, check_str);
-}
-
-static
-int write_dsc_debugfs(int drmfd, char *connector_name,
-		      const char *file_name,
-		      const char *write_buf)
-{
-	int debugfs_fd = igt_debugfs_dir(drmfd);
-	int len = strlen(write_buf);
-	int ret;
-	char file_path[128] = {0};
-
-	sprintf(file_path, "%s/%s", connector_name, file_name);
-
-	ret = igt_sysfs_write(debugfs_fd, file_path, write_buf, len);
-
-	close(debugfs_fd);
-
-	return ret;
-}
-
-/*
- * igt_is_dsc_supported:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: True if DSC is supported for the given connector, false otherwise.
- */
-bool igt_is_dsc_supported(int drmfd, char *connector_name)
-{
-	return check_dsc_debugfs(drmfd, connector_name, "DSC_Sink_Support: yes");
-}
-
-/*
- * igt_is_fec_supported:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: True if FEC is supported for the given connector, false otherwise.
- */
-bool igt_is_fec_supported(int drmfd, char *connector_name)
-{
-	return check_dsc_debugfs(drmfd, connector_name, "FEC_Sink_Support: yes");
-}
-
-/*
- * igt_is_dsc_enabled:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: True if DSC is enabled for the given connector, false otherwise.
- */
-bool igt_is_dsc_enabled(int drmfd, char *connector_name)
-{
-	return check_dsc_debugfs(drmfd, connector_name, "DSC_Enabled: yes");
-}
-
-/*
- * igt_is_force_dsc_enabled:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: True if DSC is force enabled (via debugfs) for the given connector,
- * false otherwise.
- */
-bool igt_is_force_dsc_enabled(int drmfd, char *connector_name)
-{
-	return check_dsc_debugfs(drmfd, connector_name, "Force_DSC_Enable: yes");
-}
-
-/*
- * igt_force_dsc_enable:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: 1 on success or negative error code, in case of failure.
- */
-int igt_force_dsc_enable(int drmfd, char *connector_name)
-{
-	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_fec_support", "1");
-}
-
-/*
- * igt_force_dsc_enable_bpc:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- * @bpc: Input BPC
- *
- * Returns: No. of bytes written or negative error code, in case of failure.
- */
-int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc)
-{
-	char buf[20] = {0};
-
-	sprintf(buf, "%d", bpc);
-
-	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_bpc", buf);
-}
-
-/*
- * igt_get_dsc_debugfs_fd:
- * @drmfd: A drm file descriptor
- * @connector_name: Name of the libdrm connector we're going to use
- *
- * Returns: fd of the DSC debugfs for the given connector, else returns -1.
- */
-int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)
-{
-	char file_name[128] = {0};
-
-	sprintf(file_name, "%s/i915_dsc_fec_support", connector_name);
-
-	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
-}
-
 /*
  * igt_get_output_max_bpc:
  * @drmfd: A drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7a00d2045..be5482e08 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -974,16 +974,6 @@ void igt_require_pipe(igt_display_t *display,
 void igt_dump_connectors_fd(int drmfd);
 void igt_dump_crtcs_fd(int drmfd);
 bool igt_override_all_active_output_modes_to_fit_bw(igt_display_t *display);
-
-bool igt_is_dsc_supported(int drmfd, char *connector_name);
-bool igt_is_fec_supported(int drmfd, char *connector_name);
-bool igt_is_dsc_enabled(int drmfd, char *connector_name);
-bool igt_is_force_dsc_enabled(int drmfd, char *connector_name);
-int igt_force_dsc_enable(int drmfd, char *connector_name);
-int igt_force_dsc_enable_bpc(int drmfd, char *connector_name,
-			     int bpc);
-int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
-
 unsigned int igt_get_output_max_bpc(int drmfd, char *connector_name);
 unsigned int igt_get_pipe_current_bpc(int drmfd, enum pipe pipe);
 void igt_assert_output_bpc_equal(int drmfd, enum pipe pipe,
diff --git a/lib/meson.build b/lib/meson.build
index c79e3e952..1ba64bfd4 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -96,6 +96,7 @@ lib_sources = [
 	'igt_infoframe.c',
 	'veboxcopy_gen12.c',
 	'igt_msm.c',
+	'igt_dsc.c',
 ]
 
 lib_deps = [
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-13  7:55   ` Hogander, Jouni
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

To add dsc concurrent tests, these wrapper functions can be
reused. Lets create separate helper file to avoid code duplication.

v2: -use of SPDX licence placeholder
    -add more parameters to exported functions (Jouni)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c        | 133 +++---------------------------------
 tests/i915/kms_dsc_helper.c |  99 +++++++++++++++++++++++++++
 tests/i915/kms_dsc_helper.h |  35 ++++++++++
 tests/meson.build           |  10 ++-
 4 files changed, 152 insertions(+), 125 deletions(-)
 create mode 100644 tests/i915/kms_dsc_helper.c
 create mode 100644 tests/i915/kms_dsc_helper.h

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 330fc050b..22239122c 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -29,22 +29,8 @@
  * Manasi Navare <manasi.d.navare@intel.com>
  *
  */
-#include "igt.h"
-#include "igt_sysfs.h"
-#include <errno.h>
-#include <getopt.h>
-#include <math.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <strings.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <time.h>
-#include <fcntl.h>
-#include <termios.h>
-
-#define HDISPLAY_5K	5120
+
+#include "kms_dsc_helper.h"
 
 IGT_TEST_DESCRIPTION("Test to validate display stream compression");
 
@@ -64,9 +50,6 @@ typedef struct {
 	enum pipe pipe;
 } data_t;
 
-bool force_dsc_en_orig;
-int force_dsc_restore_fd = -1;
-
 const struct {
 	const int format;
 	const char format_str[20];
@@ -84,56 +67,6 @@ static inline void manual(const char *expected)
 	igt_debug_interactive_mode_check("all", expected);
 }
 
-static void force_dsc_enable(data_t *data)
-{
-	int ret;
-
-	igt_debug("Forcing DSC enable on %s\n", data->output->name);
-	ret = igt_force_dsc_enable(data->drm_fd,
-				   data->output->name);
-	igt_assert_f(ret > 0, "debugfs_write failed");
-}
-
-static void force_dsc_enable_bpc(data_t *data)
-{
-	int ret;
-
-	igt_debug("Forcing input DSC BPC to %d on %s\n",
-		  data->input_bpc, data->output->name);
-	ret = igt_force_dsc_enable_bpc(data->drm_fd,
-				       data->output->name,
-				       data->input_bpc);
-	igt_assert_f(ret > 0, "debugfs_write failed");
-}
-
-static void save_force_dsc_en(data_t *data)
-{
-	force_dsc_en_orig =
-		igt_is_force_dsc_enabled(data->drm_fd,
-					 data->output->name);
-	force_dsc_restore_fd =
-		igt_get_dsc_debugfs_fd(data->drm_fd,
-				       data->output->name);
-	igt_assert(force_dsc_restore_fd >= 0);
-}
-
-static void restore_force_dsc_en(void)
-{
-	if (force_dsc_restore_fd < 0)
-		return;
-
-	igt_debug("Restoring DSC enable\n");
-	igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ? "1" : "0", 1) == 1);
-
-	close(force_dsc_restore_fd);
-	force_dsc_restore_fd = -1;
-}
-
-static void kms_dsc_exit_handler(int sig)
-{
-	restore_force_dsc_en();
-}
-
 static drmModeModeInfo *get_highres_mode(igt_output_t *output)
 {
 	drmModeConnector *connector = output->config.connector;
@@ -146,26 +79,6 @@ static drmModeModeInfo *get_highres_mode(igt_output_t *output)
 	return highest_mode;
 }
 
-static bool check_dsc_on_connector(data_t *data)
-{
-	igt_output_t *output = data->output;
-
-	if (!igt_is_dsc_supported(data->drm_fd, output->name)) {
-		igt_debug("DSC not supported on connector %s\n",
-			  output->name);
-		return false;
-	}
-
-	if (!output_is_internal_panel(output) &&
-	    !igt_is_fec_supported(data->drm_fd, output->name)) {
-		igt_debug("DSC cannot be enabled without FEC on %s\n",
-			  output->name);
-		return false;
-	}
-
-	return true;
-}
-
 static bool check_big_joiner_pipe_constraint(data_t *data)
 {
 	igt_output_t *output = data->output;
@@ -181,34 +94,6 @@ static bool check_big_joiner_pipe_constraint(data_t *data)
 	return true;
 }
 
-static bool check_gen11_dp_constraint(data_t *data)
-{
-	igt_output_t *output = data->output;
-	uint32_t devid = intel_get_drm_devid(data->drm_fd);
-	drmModeConnector *connector = output->config.connector;
-
-	if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) &&
-	    (data->pipe == PIPE_A) && IS_GEN11(devid)) {
-		igt_debug("DSC not supported on pipe A on external DP in gen11 platforms\n");
-		return false;
-	}
-
-	return true;
-}
-
-/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
-static bool check_gen11_bpc_constraint(data_t *data)
-{
-	uint32_t devid = intel_get_drm_devid(data->drm_fd);
-
-	if (IS_GEN11(devid) && data->input_bpc == 12) {
-		igt_debug("Input bpc 12 not supported on gen11 platforms\n");
-		return false;
-	}
-
-	return true;
-}
-
 static void test_cleanup(data_t *data)
 {
 	igt_output_t *output = data->output;
@@ -235,12 +120,12 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
 	igt_display_commit(display);
 
 	igt_debug("DSC is supported on %s\n", data->output->name);
-	save_force_dsc_en(data);
-	force_dsc_enable(data);
+	save_force_dsc_en(data->drm_fd, data->output);
+	force_dsc_enable(data->drm_fd, data->output);
 
 	if (test_type == TEST_DSC_BPC) {
 		igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
-		force_dsc_enable_bpc(data);
+		force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
 	}
 
 	igt_output_set_pipe(output, data->pipe);
@@ -279,7 +164,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
 	restore_force_dsc_en();
 	igt_debug("Reset compression BPC\n");
 	data->input_bpc = 0;
-	force_dsc_enable_bpc(data);
+	force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
 
 	igt_assert_f(enabled,
 		     "Default DSC enable failed on connector: %s pipe: %s\n",
@@ -302,13 +187,13 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 		data->output = output;
 		data->pipe = pipe;
 
-		if (!check_dsc_on_connector(data))
+		if (!check_dsc_on_connector(data->drm_fd, data->output))
 			continue;
 
-		if (!check_gen11_dp_constraint(data))
+		if (!check_gen11_dp_constraint(data->drm_fd, data->output, data->pipe))
 			continue;
 
-		if (!check_gen11_bpc_constraint(data))
+		if (!check_gen11_bpc_constraint(data->drm_fd, data->output, data->input_bpc))
 			continue;
 
 		if (!check_big_joiner_pipe_constraint(data))
diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
new file mode 100644
index 000000000..3734b3444
--- /dev/null
+++ b/tests/i915/kms_dsc_helper.c
@@ -0,0 +1,99 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+#include "kms_dsc_helper.h"
+
+bool force_dsc_en_orig;
+int force_dsc_restore_fd = -1;
+
+void force_dsc_enable(int drmfd, igt_output_t *output)
+{
+	int ret;
+
+	igt_debug("Forcing DSC enable on %s\n", output->name);
+	ret = igt_force_dsc_enable(drmfd, output->name);
+	igt_assert_f(ret > 0, "debugfs_write failed");
+}
+
+void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
+{
+	int ret;
+
+	igt_debug("Forcing input DSC BPC to %d on %s\n",
+		  input_bpc, output->name);
+	ret = igt_force_dsc_enable_bpc(drmfd, output->name, input_bpc);
+	igt_assert_f(ret > 0, "debugfs_write failed");
+}
+
+void save_force_dsc_en(int drmfd, igt_output_t *output)
+{
+	force_dsc_en_orig =
+		igt_is_force_dsc_enabled(drmfd, output->name);
+	force_dsc_restore_fd =
+		igt_get_dsc_debugfs_fd(drmfd, output->name);
+	igt_assert(force_dsc_restore_fd >= 0);
+}
+
+void restore_force_dsc_en(void)
+{
+	if (force_dsc_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC enable\n");
+	igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_restore_fd);
+	force_dsc_restore_fd = -1;
+}
+
+void kms_dsc_exit_handler(int sig)
+{
+	restore_force_dsc_en();
+}
+
+bool check_dsc_on_connector(int drmfd, igt_output_t *output)
+{
+	if (!igt_is_dsc_supported(drmfd, output->name)) {
+		igt_debug("DSC not supported on connector %s\n",
+			  output->name);
+		return false;
+	}
+
+	if (!output_is_internal_panel(output) &&
+	    !igt_is_fec_supported(drmfd, output->name)) {
+		igt_debug("DSC cannot be enabled without FEC on %s\n",
+			  output->name);
+		return false;
+	}
+
+	return true;
+}
+
+bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum pipe pipe)
+{
+	uint32_t devid = intel_get_drm_devid(drmfd);
+	drmModeConnector *connector = output->config.connector;
+
+	if ((connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) &&
+	    (pipe == PIPE_A) && IS_GEN11(devid)) {
+		igt_debug("DSC not supported on pipe A on external DP in gen11 platforms\n");
+		return false;
+	}
+
+	return true;
+}
+
+/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
+bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc)
+{
+	uint32_t devid = intel_get_drm_devid(drmfd);
+
+	if (IS_GEN11(devid) && input_bpc == 12) {
+		igt_debug("Input bpc 12 not supported on gen11 platforms\n");
+		return false;
+	}
+
+	return true;
+}
diff --git a/tests/i915/kms_dsc_helper.h b/tests/i915/kms_dsc_helper.h
new file mode 100644
index 000000000..fe479dac4
--- /dev/null
+++ b/tests/i915/kms_dsc_helper.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#ifndef IGT_KMS_DSC_HELPER_H
+#define IGT_KMS_DSC_HELPER_H
+
+#include "igt.h"
+#include "igt_sysfs.h"
+#include <errno.h>
+#include <getopt.h>
+#include <math.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <strings.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <time.h>
+#include <fcntl.h>
+#include <termios.h>
+
+#define HDISPLAY_5K	5120
+
+void force_dsc_enable(int drmfd, igt_output_t *output);
+void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc);
+void save_force_dsc_en(int drmfd, igt_output_t *output);
+void restore_force_dsc_en(void);
+void kms_dsc_exit_handler(int sig);
+bool check_dsc_on_connector(int drmfd, igt_output_t *output);
+bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum pipe pipe);
+bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc);
+
+#endif
diff --git a/tests/meson.build b/tests/meson.build
index cb4289985..e63d62249 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -221,7 +221,6 @@ i915_progs = [
 	'kms_ccs',
 	'kms_cdclk',
 	'kms_draw_crc',
-	'kms_dsc',
 	'kms_fbcon_fbt',
 	'kms_fence_pin_leak',
 	'kms_flip_scaled_crc',
@@ -424,6 +423,15 @@ test_executables += executable('kms_color',
 	   install : true)
 test_list += 'kms_color'
 
+test_executables += executable('kms_dsc',
+	   [ join_paths('i915', 'kms_dsc.c'), join_paths ('i915', 'kms_dsc_helper.c')],
+	   dependencies : test_deps,
+	   install_dir : libexecdir,
+	   install_rpath : libexecdir_rpathdir,
+	   install : true)
+test_list += 'kms_dsc'
+
+
 if chamelium.found()
        test_executables += executable('kms_color_chamelium',
                              [ 'chamelium/kms_color_chamelium.c', 'kms_color_helper.c' ],
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-13  8:17   ` Hogander, Jouni
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 4/8] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Helper functions are added for getting/setting VDSC YCbCr420 debugfs entry.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt_dsc.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_dsc.h |  4 +++
 2 files changed, 71 insertions(+)

diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
index 25dcb5840..269d574e9 100644
--- a/lib/igt_dsc.c
+++ b/lib/igt_dsc.c
@@ -131,3 +131,70 @@ int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)
 
 	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
 }
+
+static
+bool check_dsc_ycbcr420_debugfs(int drmfd, char *connector_name,
+                                const char *check_str)
+{
+	char file_name[128] = {0};
+	char buf[512];
+
+	sprintf(file_name, "%s/i915_dsc_ycbcr420", connector_name);
+
+	igt_debugfs_read(drmfd, file_name, buf);
+
+	return strstr(buf, check_str);
+}
+
+/*
+ * igt_is_dsc_ycbcr420_supported:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC YCbCr420 is supported for the given connector, false otherwise.
+ */
+bool igt_is_dsc_ycbcr420_supported(int drmfd, char *connector_name)
+{
+	return check_dsc_debugfs(drmfd, connector_name, "DSC_YCBCR420_Sink_Support: yes");
+}
+
+/*
+ * igt_is_force_dsc_ycbcr420_enabled:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC YCbCr420 is force enabled (via debugfs) for the given connector,
+ * false otherwise.
+ */
+bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char *connector_name)
+{
+	return check_dsc_ycbcr420_debugfs(drmfd, connector_name, "Force_DSC_YCBCR420_Enable: yes");
+}
+
+/*
+ * igt_force_dsc_ycbcr420_enable:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: 1 on success or negative error code, in case of failure.
+ */
+int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name)
+{
+	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_ycbcr420", "1");
+}
+
+/*
+ * igt_get_dsc_ycbcr420_debugfs_fd:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: fd of the DSC YCbCr420 debugfs for the given connector, else returns -1.
+ */
+int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char *connector_name)
+{
+	char file_name[128] = {0};
+
+	sprintf(file_name, "%s/i915_dsc_ycbcr420", connector_name);
+
+	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
+}
diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
index 291c2cdea..e2b039f42 100644
--- a/lib/igt_dsc.h
+++ b/lib/igt_dsc.h
@@ -15,5 +15,9 @@ bool igt_is_force_dsc_enabled(int drmfd, char *connector_name);
 int igt_force_dsc_enable(int drmfd, char *connector_name);
 int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc);
 int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
+bool igt_is_dsc_ycbcr420_supported(int drmfd, char *connector_name);
+bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char *connector_name);
+int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
+int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char *connector_name);
 
 #endif
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 4/8] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (2 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation " Swati Sharma
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Functions are modified to accommodate changes for VDSC YCbCr420.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c        | 21 +++++++++++++++------
 tests/i915/kms_dsc_helper.c |  4 ++--
 2 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 22239122c..0bac9d26b 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -47,6 +47,7 @@ typedef struct {
 	igt_output_t *output;
 	int input_bpc;
 	int n_pipes;
+	int disp_ver;
 	enum pipe pipe;
 } data_t;
 
@@ -107,7 +108,8 @@ static void test_cleanup(data_t *data)
 }
 
 /* re-probe connectors and do a modeset with DSC */
-static void update_display(data_t *data, enum dsc_test_type test_type, unsigned int plane_format)
+static void update_display(data_t *data, enum dsc_test_type test_type,
+			   unsigned int plane_format)
 {
 	bool enabled;
 	igt_plane_t *primary;
@@ -209,6 +211,12 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 	}
 }
 
+static void run_test(data_t *data, enum dsc_test_type test_type, int bpc,
+		     unsigned int plane_format)
+{
+	test_dsc(data, test_type, bpc, plane_format);
+}
+
 igt_main
 {
 	data_t data = {};
@@ -217,11 +225,12 @@ igt_main
 	igt_fixture {
 		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
 		data.devid = intel_get_drm_devid(data.drm_fd);
+		data.disp_ver = intel_display_ver(data.devid);
 		kmstest_set_vt_graphics_mode();
 		igt_install_exit_handler(kms_dsc_exit_handler);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_display_require_output(&data.display);
-		igt_require(intel_display_ver(data.devid) >= 11);
+		igt_require(data.disp_ver >= 11);
 		data.n_pipes = 0;
 		for_each_pipe(&data.display, i)
 			data.n_pipes++;
@@ -231,14 +240,14 @@ igt_main
 		     "by a connector by forcing DSC on all connectors that support it "
 		     "with default parameters");
 	igt_subtest_with_dynamic("basic-dsc")
-			test_dsc(&data, TEST_DSC_BASIC, 0, DRM_FORMAT_XRGB8888);
+			run_test(&data, TEST_DSC_BASIC, 0, DRM_FORMAT_XRGB8888);
 
 	igt_describe("Tests basic display stream compression functionality if supported "
 		     "by a connector by forcing DSC on all connectors that support it "
 		     "with default parameters and creating fb with diff formats");
 	igt_subtest_with_dynamic("dsc-with-formats") {
 		for (int k = 0; k < ARRAY_SIZE(format_list); k++)
-			test_dsc(&data, TEST_DSC_BASIC, 0, format_list[k].format);
+			run_test(&data, TEST_DSC_BASIC, 0, format_list[k].format);
 	}
 
 	igt_describe("Tests basic display stream compression functionality if supported "
@@ -246,7 +255,7 @@ igt_main
 		     "with certain input BPC for the connector");
 	igt_subtest_with_dynamic("dsc-with-bpc") {
 		for (int j = 0; j < ARRAY_SIZE(bpc_list); j++)
-			test_dsc(&data, TEST_DSC_BPC, bpc_list[j], DRM_FORMAT_XRGB8888);
+			run_test(&data, TEST_DSC_BPC, bpc_list[j], DRM_FORMAT_XRGB8888);
 	}
 
 	igt_describe("Tests basic display stream compression functionality if supported "
@@ -255,7 +264,7 @@ igt_main
 	igt_subtest_with_dynamic("dsc-with-bpc-formats") {
 		for (int j = 0; j < ARRAY_SIZE(bpc_list); j++) {
 			for (int k = 0; k < ARRAY_SIZE(format_list); k++) {
-				test_dsc(&data, TEST_DSC_BPC, bpc_list[j], format_list[k].format);
+				run_test(&data, TEST_DSC_BPC, bpc_list[j], format_list[k].format);
 			}
 		}
 	}
diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
index 3734b3444..1a11f84ef 100644
--- a/tests/i915/kms_dsc_helper.c
+++ b/tests/i915/kms_dsc_helper.c
@@ -14,7 +14,7 @@ void force_dsc_enable(int drmfd, igt_output_t *output)
 
 	igt_debug("Forcing DSC enable on %s\n", output->name);
 	ret = igt_force_dsc_enable(drmfd, output->name);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_assert_f(ret > 0, "forcing dsc enable debugfs_write failed\n");
 }
 
 void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
@@ -24,7 +24,7 @@ void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int input_bpc)
 	igt_debug("Forcing input DSC BPC to %d on %s\n",
 		  input_bpc, output->name);
 	ret = igt_force_dsc_enable_bpc(drmfd, output->name, input_bpc);
-	igt_assert_f(ret > 0, "debugfs_write failed");
+	igt_assert_f(ret > 0, "forcing input dsc bpc debugfs_write failed\n");
 }
 
 void save_force_dsc_en(int drmfd, igt_output_t *output)
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (3 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 4/8] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-13  8:29   ` Hogander, Jouni
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry Swati Sharma
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Existing i-g-t is extended to enable validation for VDSC YCbCr420.
If a mode is supported in both RGB and YCbCr420 output formats by the
sink, i915 driver policy is to try RGB first and fall back to YCbCr420, if
mode cannot be shown using RGB. To test YCbCr420, we need a debugfs
entry (force_dsc_ycbcr420) to force this output format; so that YCbCr420 code
gets executed.
From i-g-t, we have set this debugfs entry. However, before setting
debugfs entry, we have checked capability i.e. YCbCr420 is supported by
both platform (D14+) and sink.
Also, all the modes doesn't support both YCbCr420 and RGB formats; so if
sink and platform supports YCbCr420 we will do try commit with each mode
till we get a successful commit.

v2: -used is_dsc_ycbcr420_supported() (Ankit)
    -handled try-commit correctly (Ankit)
    -instead of flag use enum for output formats (Ankit)
v3: -instead of global count, pass count as para (Ankit)
    -print output format (Ankit)
v4: -optimized while loop (Jouni)
    -used only try commit (Jouni)
    -fixed get_next_mode() (Jouni)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt_kms.c               | 17 ++++++++
 lib/igt_kms.h               |  6 +++
 tests/i915/kms_dsc.c        | 84 +++++++++++++++++++++++++++----------
 tests/i915/kms_dsc_helper.c | 45 ++++++++++++++++++++
 tests/i915/kms_dsc_helper.h |  4 ++
 5 files changed, 133 insertions(+), 23 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 31e6dfda0..0f1f7c6b9 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -966,6 +966,23 @@ const char *kmstest_scaling_filter_str(int filter)
 	return find_type_name(scaling_filter_names, filter);
 }
 
+static const struct type_name dsc_output_format_names[] = {
+	{ DSC_FORMAT_RGB444, "RGB444" },
+	{ DSC_FORMAT_YCBCR420, "YCBCR420" },
+	{}
+};
+
+/**
+ * kmstest_dsc_output_format_str:
+ * @output_format: DSC_FORMAT_* output format value
+ *
+ * Returns: A string representing the output format @output format.
+ */
+const char *kmstest_dsc_output_format_str(int output_format)
+{
+	return find_type_name(dsc_output_format_names, output_format);
+}
+
 static const struct type_name connector_type_names[] = {
 	{ DRM_MODE_CONNECTOR_Unknown, "Unknown" },
 	{ DRM_MODE_CONNECTOR_VGA, "VGA" },
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index be5482e08..61ec8fbec 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -106,10 +106,16 @@ enum igt_custom_edid_type {
  */
 #define kmstest_port_name(port) ((port) + 'A')
 
+enum dsc_output_format {
+	DSC_FORMAT_RGB444,
+	DSC_FORMAT_YCBCR420
+};
+
 const char *kmstest_encoder_type_str(int type);
 const char *kmstest_connector_status_str(int status);
 const char *kmstest_connector_type_str(int type);
 const char *kmstest_scaling_filter_str(int filter);
+const char *kmstest_dsc_output_format_str(int output_format);
 
 void kmstest_dump_mode(drmModeModeInfo *mode);
 #define MAX_HDISPLAY_PER_PIPE 5120
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 0bac9d26b..366205a4e 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -80,6 +80,17 @@ static drmModeModeInfo *get_highres_mode(igt_output_t *output)
 	return highest_mode;
 }
 
+static drmModeModeInfo *get_next_mode(igt_output_t *output, int index)
+{
+	drmModeConnector *connector = output->config.connector;
+	drmModeModeInfo *next_mode = NULL;
+
+	if (index < connector->count_modes)
+		next_mode = &connector->modes[index];
+
+	return next_mode;
+}
+
 static bool check_big_joiner_pipe_constraint(data_t *data)
 {
 	igt_output_t *output = data->output;
@@ -109,9 +120,11 @@ static void test_cleanup(data_t *data)
 
 /* re-probe connectors and do a modeset with DSC */
 static void update_display(data_t *data, enum dsc_test_type test_type,
-			   unsigned int plane_format)
+			   unsigned int plane_format, enum dsc_output_format output_format)
 {
+	int ret;
 	bool enabled;
+	int index = 0;
 	igt_plane_t *primary;
 	drmModeModeInfo *mode;
 	igt_output_t *output = data->output;
@@ -125,33 +138,51 @@ static void update_display(data_t *data, enum dsc_test_type test_type,
 	save_force_dsc_en(data->drm_fd, data->output);
 	force_dsc_enable(data->drm_fd, data->output);
 
+	if (output_format == DSC_FORMAT_YCBCR420) {
+		igt_debug("DSC YCbCr420 is supported on %s\n", data->output->name);
+		save_force_dsc_ycbcr420_en(data->drm_fd, data->output);
+		force_dsc_ycbcr420_enable(data->drm_fd, data->output);
+	}
+
 	if (test_type == TEST_DSC_BPC) {
 		igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
 		force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
 	}
 
 	igt_output_set_pipe(output, data->pipe);
-
-	mode = get_highres_mode(output);
-	igt_require(mode != NULL);
-	igt_output_override_mode(output, mode);
-
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
-
 	igt_skip_on(!igt_plane_has_format_mod(primary, plane_format,
 		    DRM_FORMAT_MOD_LINEAR));
 
-	igt_create_pattern_fb(data->drm_fd,
-			      mode->hdisplay,
-			      mode->vdisplay,
-			      plane_format,
-			      DRM_FORMAT_MOD_LINEAR,
-			      &data->fb_test_pattern);
-
-	igt_plane_set_fb(primary, &data->fb_test_pattern);
-	igt_display_commit(display);
-
-	/* until we have CRC check support, manually check if RGB test
+	do {
+		if (output_format == DSC_FORMAT_YCBCR420) {
+			mode = get_next_mode(output, index);
+			index++;
+		} else
+			mode = get_highres_mode(output);
+
+		igt_require(mode != NULL);
+		igt_output_override_mode(output, mode);
+		igt_create_pattern_fb(data->drm_fd,
+				      mode->hdisplay,
+				      mode->vdisplay,
+				      plane_format,
+				      DRM_FORMAT_MOD_LINEAR,
+				      &data->fb_test_pattern);
+
+		igt_plane_set_fb(primary, &data->fb_test_pattern);
+		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+		if (output_format == DSC_FORMAT_YCBCR420 && ret != 0) {
+			igt_remove_fb(data->drm_fd, &data->fb_test_pattern);
+				continue;
+		} else
+			break;
+	} while(1);
+
+	igt_assert_eq(ret, 0);
+
+	/*
+	 * Until we have CRC check support, manually check if RGB test
 	 * pattern has no corruption.
 	 */
 	manual("RGB test pattern without corruption");
@@ -164,7 +195,10 @@ static void update_display(data_t *data, enum dsc_test_type test_type,
 				enabled ? "ON" : "OFF");
 
 	restore_force_dsc_en();
-	igt_debug("Reset compression BPC\n");
+	if (output_format == DSC_FORMAT_YCBCR420)
+		restore_force_dsc_ycbcr420_en();
+
+	igt_debug("Reset input BPC\n");
 	data->input_bpc = 0;
 	force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
 
@@ -177,7 +211,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type,
 }
 
 static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
-		     unsigned int plane_format)
+		     unsigned int plane_format, enum dsc_output_format output_format)
 {
 	igt_display_t *display = &data->display;
 	igt_output_t *output;
@@ -206,15 +240,19 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 		else
 			snprintf(name, sizeof(name), "-%s", igt_format_str(plane_format));
 
-		igt_dynamic_f("pipe-%s-%s%s",  kmstest_pipe_name(data->pipe), data->output->name, name)
-			update_display(data, test_type, plane_format);
+		igt_dynamic_f("pipe-%s-%s%s-%s",  kmstest_pipe_name(data->pipe), data->output->name, name, kmstest_dsc_output_format_str(output_format))
+			update_display(data, test_type, plane_format, output_format);
 	}
 }
 
 static void run_test(data_t *data, enum dsc_test_type test_type, int bpc,
 		     unsigned int plane_format)
 {
-	test_dsc(data, test_type, bpc, plane_format);
+	test_dsc(data, test_type, bpc, plane_format, DSC_FORMAT_RGB444);
+
+	/* YCbCr420 DSC is supported on display version 14+ */
+	if ((data->disp_ver >= 14) && (is_dsc_ycbcr420_supported(data->drm_fd, data->output)))
+		test_dsc(data, test_type, bpc, plane_format, DSC_FORMAT_YCBCR420);
 }
 
 igt_main
diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
index 1a11f84ef..135e9cf58 100644
--- a/tests/i915/kms_dsc_helper.c
+++ b/tests/i915/kms_dsc_helper.c
@@ -6,7 +6,9 @@
 #include "kms_dsc_helper.h"
 
 bool force_dsc_en_orig;
+bool force_dsc_ycbcr420_en_orig;
 int force_dsc_restore_fd = -1;
+int force_dsc_ycbcr420_restore_fd = -1;
 
 void force_dsc_enable(int drmfd, igt_output_t *output)
 {
@@ -51,6 +53,7 @@ void restore_force_dsc_en(void)
 void kms_dsc_exit_handler(int sig)
 {
 	restore_force_dsc_en();
+	restore_force_dsc_ycbcr420_en();
 }
 
 bool check_dsc_on_connector(int drmfd, igt_output_t *output)
@@ -97,3 +100,45 @@ bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc)
 
 	return true;
 }
+
+void force_dsc_ycbcr420_enable(int drmfd, igt_output_t *output)
+{
+	int ret;
+
+	igt_debug("Forcing DSC YCbCr420 on %s\n", output->name);
+	ret = igt_force_dsc_ycbcr420_enable(drmfd,
+					    output->name);
+	igt_assert_f(ret > 0, "forcing dsc ycbcr420 debugfs_write failed\n");
+}
+
+void save_force_dsc_ycbcr420_en(int drmfd, igt_output_t *output)
+{
+	force_dsc_ycbcr420_en_orig =
+		igt_is_force_dsc_ycbcr420_enabled(drmfd, output->name);
+	force_dsc_ycbcr420_restore_fd =
+		igt_get_dsc_ycbcr420_debugfs_fd(drmfd, output->name);
+	igt_assert(force_dsc_ycbcr420_restore_fd >= 0);
+}
+
+void restore_force_dsc_ycbcr420_en(void)
+{
+	if (force_dsc_ycbcr420_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC YCbCr420 enable\n");
+	igt_assert(write(force_dsc_ycbcr420_restore_fd, force_dsc_ycbcr420_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_ycbcr420_restore_fd);
+	force_dsc_ycbcr420_restore_fd = -1;
+}
+
+bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output)
+{
+	if (!igt_is_dsc_ycbcr420_supported(drmfd, output->name)) {
+		igt_debug("DSC YCbCr420 not supported on connector %s\n",
+			  output->name);
+		return false;
+	}
+
+	return true;
+}
diff --git a/tests/i915/kms_dsc_helper.h b/tests/i915/kms_dsc_helper.h
index fe479dac4..83905fafe 100644
--- a/tests/i915/kms_dsc_helper.h
+++ b/tests/i915/kms_dsc_helper.h
@@ -31,5 +31,9 @@ void kms_dsc_exit_handler(int sig);
 bool check_dsc_on_connector(int drmfd, igt_output_t *output);
 bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum pipe pipe);
 bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc);
+void force_dsc_ycbcr420_enable(int drmfd, igt_output_t *output);
+void save_force_dsc_ycbcr420_en(int drmfd, igt_output_t *output);
+void restore_force_dsc_ycbcr420_en(void);
+bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output);
 
 #endif
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (4 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation " Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-13  8:31   ` Hogander, Jouni
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 7/8] tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP Swati Sharma
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Helper functions are added for getting/setting VDSC Fractional BPP
debugfs entry.

v2: -improved func description (Ankit)
    -increased buff size (Ankit)
    -asserted bpp_prec (Ankit)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 lib/igt_dsc.c | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++
 lib/igt_dsc.h |  5 +++
 2 files changed, 89 insertions(+)

diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
index 269d574e9..e5e67a469 100644
--- a/lib/igt_dsc.c
+++ b/lib/igt_dsc.c
@@ -198,3 +198,87 @@ int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char *connector_name)
 
 	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
 }
+
+static
+bool check_dsc_fractional_bpp_debugfs(int drmfd, char *connector_name,
+				      const char *check_str)
+{
+	char file_name[128] = {0};
+	char buf[512];
+
+	sprintf(file_name, "%s/i915_dsc_fractional_bpp", connector_name);
+
+	igt_debugfs_read(drmfd, file_name, buf);
+
+	return strstr(buf, check_str);
+}
+
+/*
+ * igt_get_dsc_fractional_bpp_supported:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: The dsc sink bpp precision.
+ * 	    Precision value of
+ * 				16 => 1/16
+ * 				8  => 1/8
+ * 				1  => fractional bpp not supported
+ */
+int igt_get_dsc_fractional_bpp_supported(int drmfd, char *connector_name)
+{
+	char file_name[128] = {0};
+	char buf[512];
+	char *start_loc;
+	int bpp_prec;
+
+	sprintf(file_name, "%s/i915_dsc_fec_support", connector_name);
+	igt_debugfs_read(drmfd, file_name, buf);
+
+	igt_assert(start_loc = strstr(buf, "DSC_Sink_BPP_Precision: "));
+	igt_assert_eq(sscanf(start_loc, "DSC_Sink_BPP_Precision: %d", &bpp_prec), 1);
+	igt_assert(bpp_prec > 0);
+
+	return bpp_prec;
+}
+
+/*
+ * igt_is_force_dsc_fractional_bpp_enabled:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: True if DSC Fractional BPP is force enabled (via debugfs) for the given connector,
+ * false otherwise.
+ */
+bool igt_is_force_dsc_fractional_bpp_enabled(int drmfd, char *connector_name)
+{
+	return check_dsc_fractional_bpp_debugfs(drmfd, connector_name, "Force_DSC_Fractional_BPP_Enable: yes");
+}
+
+/*
+ * igt_force_dsc_fractional_bpp_enable:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: 1 on success or negative error code, in case of failure.
+ */
+int igt_force_dsc_fractional_bpp_enable(int drmfd, char *connector_name)
+{
+	return write_dsc_debugfs(drmfd, connector_name, "i915_dsc_fractional_bpp", "1");
+}
+
+/*
+ * igt_get_dsc_fractional_bpp_debugfs_fd:
+ * @drmfd: A drm file descriptor
+ * @connector_name: Name of the libdrm connector we're going to use
+ *
+ * Returns: fd of the DSC Fractional BPP debugfs for the given connector,
+ * else returns -1.
+ */
+int igt_get_dsc_fractional_bpp_debugfs_fd(int drmfd, char *connector_name)
+{
+	char file_name[128] = {0};
+
+	sprintf(file_name, "%s/i915_dsc_fractional_bpp", connector_name);
+
+	return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
+}
diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
index e2b039f42..7dc958406 100644
--- a/lib/igt_dsc.h
+++ b/lib/igt_dsc.h
@@ -7,6 +7,7 @@
 #define IGT_DSC_H
 
 #include "igt_fb.h"
+#include "igt_core.h"
 
 bool igt_is_dsc_supported(int drmfd, char *connector_name);
 bool igt_is_fec_supported(int drmfd, char *connector_name);
@@ -19,5 +20,9 @@ bool igt_is_dsc_ycbcr420_supported(int drmfd, char *connector_name);
 bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char *connector_name);
 int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
 int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char *connector_name);
+int igt_get_dsc_fractional_bpp_supported(int drmfd, char *connector_name);
+bool igt_is_force_dsc_fractional_bpp_enabled(int drmfd, char *connector_name);
+int igt_force_dsc_fractional_bpp_enable(int drmfd, char *connector_name);
+int igt_get_dsc_fractional_bpp_debugfs_fd(int drmfd, char *connector_name);
 
 #endif
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 7/8] tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (5 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 8/8] tests/i915/kms_dsc: Add test summary Swati Sharma
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Fractional BPP support comes from DSC1.2. To test Fractional BPP, debugfs entry
(force_dsc_fractional_bpp) is introduced. From the IGT; we are setting this
debugfs entry. However, before setting this debugfs entry, we are checking
capability i.e. Fractional BPP is supported by platform and sink both. In driver,
if force_dsc_fractional_bpp is set then while iterating over output bpp with
fractional step size we will continue if output_bpp is computed as integer and
allow DSC iff compressed bpp is fractional.

v2: change in igt_describe (Ankit)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
 tests/i915/kms_dsc.c        | 27 ++++++++++++++---
 tests/i915/kms_dsc_helper.c | 60 +++++++++++++++++++++++++++++++++++++
 tests/i915/kms_dsc_helper.h |  4 +++
 3 files changed, 87 insertions(+), 4 deletions(-)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 366205a4e..fda96b5c2 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -36,7 +36,8 @@ IGT_TEST_DESCRIPTION("Test to validate display stream compression");
 
 enum dsc_test_type {
 	TEST_DSC_BASIC,
-	TEST_DSC_BPC
+	TEST_DSC_BPC,
+	TEST_DSC_FRACTIONAL_BPP
 };
 
 typedef struct {
@@ -147,6 +148,10 @@ static void update_display(data_t *data, enum dsc_test_type test_type,
 	if (test_type == TEST_DSC_BPC) {
 		igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
 		force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
+	} else if (test_type == TEST_DSC_FRACTIONAL_BPP) {
+		igt_debug("DSC fractional bpp is supported on %s\n", data->output->name);
+		save_force_dsc_fractional_bpp_en(data->drm_fd, data->output);
+		force_dsc_fractional_bpp_enable(data->drm_fd, data->output);
 	}
 
 	igt_output_set_pipe(output, data->pipe);
@@ -198,9 +203,12 @@ static void update_display(data_t *data, enum dsc_test_type test_type,
 	if (output_format == DSC_FORMAT_YCBCR420)
 		restore_force_dsc_ycbcr420_en();
 
-	igt_debug("Reset input BPC\n");
-	data->input_bpc = 0;
-	force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
+	if (test_type == TEST_DSC_BPC) {
+		igt_debug("Reset input BPC\n");
+		data->input_bpc = 0;
+		force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
+	} else if (test_type == TEST_DSC_FRACTIONAL_BPP)
+		restore_force_dsc_fractional_bpp_en();
 
 	igt_assert_f(enabled,
 		     "Default DSC enable failed on connector: %s pipe: %s\n",
@@ -235,6 +243,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
 		if (!check_big_joiner_pipe_constraint(data))
 			continue;
 
+		if ((test_type == TEST_DSC_FRACTIONAL_BPP) && !(check_dsc_fractional_bpp_on_connector(data->disp_ver, data->drm_fd, data->output)))
+			continue;
+
 		if (test_type == TEST_DSC_BPC)
 			snprintf(name, sizeof(name), "-%dbpc-%s", data->input_bpc, igt_format_str(plane_format));
 		else
@@ -307,6 +318,14 @@ igt_main
 		}
 	}
 
+	igt_describe("Tests fractional compressed bpp functionality if supported "
+		     "by a connector by forcing fractional_bpp on all connectors that support it "
+		     "with default parameter. While finding the optimum compressed bpp, driver will "
+		     "skip over the compressed bpps with integer values. It will go ahead with DSC, "
+		     "iff compressed bpp is fractional, failing in which, it will fail the commit.");
+	igt_subtest_with_dynamic("dsc-fractional-bpp")
+			run_test(&data, TEST_DSC_FRACTIONAL_BPP, 0, DRM_FORMAT_XRGB8888);
+
 	igt_fixture {
 		igt_display_fini(&data.display);
 		close(data.drm_fd);
diff --git a/tests/i915/kms_dsc_helper.c b/tests/i915/kms_dsc_helper.c
index 135e9cf58..5c6f1ba00 100644
--- a/tests/i915/kms_dsc_helper.c
+++ b/tests/i915/kms_dsc_helper.c
@@ -7,8 +7,10 @@
 
 bool force_dsc_en_orig;
 bool force_dsc_ycbcr420_en_orig;
+bool force_dsc_fractional_bpp_en_orig;
 int force_dsc_restore_fd = -1;
 int force_dsc_ycbcr420_restore_fd = -1;
+int force_dsc_fractional_bpp_restore_fd = -1;
 
 void force_dsc_enable(int drmfd, igt_output_t *output)
 {
@@ -54,6 +56,7 @@ void kms_dsc_exit_handler(int sig)
 {
 	restore_force_dsc_en();
 	restore_force_dsc_ycbcr420_en();
+	restore_force_dsc_fractional_bpp_en();
 }
 
 bool check_dsc_on_connector(int drmfd, igt_output_t *output)
@@ -142,3 +145,60 @@ bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output)
 
 	return true;
 }
+
+void force_dsc_fractional_bpp_enable(int drmfd, igt_output_t *output)
+{
+	int ret;
+
+	igt_debug("Forcing DSC Fractional BPP on %s\n", output->name);
+	ret = igt_force_dsc_fractional_bpp_enable(drmfd, output->name);
+	igt_assert_f(ret > 0, "forcing dsc fractional bpp debugfs_write failed\n");
+}
+
+void save_force_dsc_fractional_bpp_en(int drmfd, igt_output_t *output)
+{
+	force_dsc_fractional_bpp_en_orig =
+		igt_is_force_dsc_fractional_bpp_enabled(drmfd, output->name);
+	force_dsc_fractional_bpp_restore_fd =
+		igt_get_dsc_fractional_bpp_debugfs_fd(drmfd, output->name);
+	igt_assert(force_dsc_fractional_bpp_restore_fd >= 0);
+}
+
+void restore_force_dsc_fractional_bpp_en(void)
+{
+	if (force_dsc_fractional_bpp_restore_fd < 0)
+		return;
+
+	igt_debug("Restoring DSC Fractional BPP enable\n");
+	igt_assert(write(force_dsc_fractional_bpp_restore_fd, force_dsc_fractional_bpp_en_orig ? "1" : "0", 1) == 1);
+
+	close(force_dsc_fractional_bpp_restore_fd);
+	force_dsc_fractional_bpp_restore_fd = -1;
+}
+
+static
+bool is_dsc_fractional_bpp_supported(int drmfd, char *connector_name)
+{
+	int bpp_prec;
+
+	bpp_prec = igt_get_dsc_fractional_bpp_supported(drmfd, connector_name);
+
+	if (bpp_prec == 1)
+		return false;
+
+	return true;
+}
+
+bool check_dsc_fractional_bpp_on_connector(int disp_ver, int drmfd, igt_output_t *output)
+{
+	if (disp_ver >= 14) {
+		if (!is_dsc_fractional_bpp_supported(drmfd, output->name)) {
+			igt_debug("DSC fractional bpp not supported on connector %s\n",
+				   output->name);
+			return false;
+		} else
+			return true;
+	}
+
+	return false;
+}
diff --git a/tests/i915/kms_dsc_helper.h b/tests/i915/kms_dsc_helper.h
index 83905fafe..b46a08928 100644
--- a/tests/i915/kms_dsc_helper.h
+++ b/tests/i915/kms_dsc_helper.h
@@ -35,5 +35,9 @@ void force_dsc_ycbcr420_enable(int drmfd, igt_output_t *output);
 void save_force_dsc_ycbcr420_en(int drmfd, igt_output_t *output);
 void restore_force_dsc_ycbcr420_en(void);
 bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output);
+void force_dsc_fractional_bpp_enable(int drmfd, igt_output_t *output);
+void save_force_dsc_fractional_bpp_en(int drmfd, igt_output_t *output);
+void restore_force_dsc_fractional_bpp_en(void);
+bool check_dsc_fractional_bpp_on_connector(int disp_ver, int drmfd, igt_output_t *output);
 
 #endif
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t v4 8/8] tests/i915/kms_dsc: Add test summary
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (6 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 7/8] tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP Swati Sharma
@ 2023-01-12  7:35 ` Swati Sharma
  2023-01-12  8:51 ` [igt-dev] ✗ GitLab.Pipeline: warning for VDSC YCbCr420 + Fractional BPP (rev3) Patchwork
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-12  7:35 UTC (permalink / raw)
  To: igt-dev

Add test summary giving overall view of what all is being validated
in the test.

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/i915/kms_dsc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index fda96b5c2..4c0fd1e2b 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -34,6 +34,17 @@
 
 IGT_TEST_DESCRIPTION("Test to validate display stream compression");
 
+/*
+ * i915 driver supports DSC1.1 from gen11+. To validate DSC, we have
+ * different scenarios
+ * (i) basic modeset (ii) input bpc (iii) formats (iv) fractional bpp
+ * These tests will check for basic DSC support by the connector and
+ * few other gen specific constraints. Fractional bpp got introduced
+ * with DSC1.2 from MTL. By default, tests will get executed on RGB444
+ * output format. However, if sink and platform supports YCBCR420, all the
+ * tests will get executed with this format too.
+ */
+
 enum dsc_test_type {
 	TEST_DSC_BASIC,
 	TEST_DSC_BPC,
-- 
2.25.1

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

* [igt-dev] ✗ GitLab.Pipeline: warning for VDSC YCbCr420 + Fractional BPP (rev3)
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (7 preceding siblings ...)
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 8/8] tests/i915/kms_dsc: Add test summary Swati Sharma
@ 2023-01-12  8:51 ` Patchwork
  2023-01-12 14:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
  2023-01-12 17:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  10 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2023-01-12  8:51 UTC (permalink / raw)
  To: Swati Sharma; +Cc: igt-dev

== Series Details ==

Series: VDSC YCbCr420 + Fractional BPP (rev3)
URL   : https://patchwork.freedesktop.org/series/111342/
State : warning

== Summary ==

Pipeline status: FAILED.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/782234 for the overview.

build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600528):
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    uint32_t lessees[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    uint32_t count;
    ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    uint32_t objects[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’; did you mean ‘intptr_t’?
   extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
                                         ^~~~~~~~
                                         intptr_t
  ninja: build stopped: subcommand failed.
  section_end:1673513396:step_script
  section_start:1673513396:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513398:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-arm64 has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600531):
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    uint32_t lessees[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    uint32_t count;
    ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    uint32_t objects[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’; did you mean ‘intptr_t’?
   extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
                                         ^~~~~~~~
                                         intptr_t
  ninja: build stopped: subcommand failed.
  section_end:1673513405:step_script
  section_start:1673513405:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513406:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-armhf has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600530):
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    uint32_t lessees[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    uint32_t count;
    ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    uint32_t objects[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’; did you mean ‘intptr_t’?
   extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
                                         ^~~~~~~~
                                         intptr_t
  ninja: build stopped: subcommand failed.
  section_end:1673513415:step_script
  section_start:1673513415:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513416:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-meson-mips has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600532):
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    uint32_t lessees[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    uint32_t count;
    ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    uint32_t objects[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’; did you mean ‘intptr_t’?
   extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
                                         ^~~~~~~~
                                         intptr_t
  ninja: build stopped: subcommand failed.
  section_end:1673513418:step_script
  section_start:1673513418:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513419:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-debian-minimal has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600529):
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    uint32_t lessees[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    uint32_t count;
    ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    uint32_t objects[0];
    ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’; did you mean ‘intptr_t’?
   extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
                                         ^~~~~~~~
                                         intptr_t
  ninja: build stopped: subcommand failed.
  section_end:1673513386:step_script
  section_start:1673513386:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513387:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600523):
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    533 |  uint32_t lessees[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    539 |  uint32_t count;
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    540 |  uint32_t objects[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’
    545 | extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
        |                                       ^~~~~~~~
  ninja: build stopped: subcommand failed.
  section_end:1673513377:step_script
  section_start:1673513377:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513378:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600527):
          uint32_t bpp;
          ^
  /usr/include/xf86drmMode.h:221:2: error: unknown type name 'uint32_t'
          uint32_t depth;
          ^
  /usr/include/xf86drmMode.h:223:2: error: unknown type name 'uint32_t'
          uint32_t handle;
          ^
  /usr/include/xf86drmMode.h:229:2: error: unknown type name 'uint32_t'
          uint32_t id;
          ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  ninja: build stopped: subcommand failed.
  section_end:1673513392:step_script
  section_start:1673513392:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513393:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600526):
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    533 |  uint32_t lessees[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    539 |  uint32_t count;
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    540 |  uint32_t objects[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’
    545 | extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
        |                                       ^~~~~~~~
  ninja: build stopped: subcommand failed.
  section_end:1673513386:step_script
  section_start:1673513386:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513387:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600524):
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    533 |  uint32_t lessees[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    539 |  uint32_t count;
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    540 |  uint32_t objects[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’
    545 | extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
        |                                       ^~~~~~~~
  ninja: build stopped: subcommand failed.
  section_end:1673513377:step_script
  section_start:1673513377:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513377:cleanup_file_variables
  ERROR: Job failed: exit code 1
  

build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/34600525):
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:533:2: error: unknown type name ‘uint32_t’
    533 |  uint32_t lessees[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:539:2: error: unknown type name ‘uint32_t’
    539 |  uint32_t count;
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:540:2: error: unknown type name ‘uint32_t’
    540 |  uint32_t objects[0];
        |  ^~~~~~~~
  /usr/include/xf86drmMode.h:545:39: error: unknown type name ‘uint32_t’
    545 | extern int drmModeRevokeLease(int fd, uint32_t lessee_id);
        |                                       ^~~~~~~~
  ninja: build stopped: subcommand failed.
  section_end:1673513391:step_script
  section_start:1673513391:cleanup_file_variables
  Cleaning up project directory and file based variables
  section_end:1673513392:cleanup_file_variables
  ERROR: Job failed: exit code 1

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/782234

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

* [igt-dev] ✓ Fi.CI.BAT: success for VDSC YCbCr420 + Fractional BPP (rev3)
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (8 preceding siblings ...)
  2023-01-12  8:51 ` [igt-dev] ✗ GitLab.Pipeline: warning for VDSC YCbCr420 + Fractional BPP (rev3) Patchwork
@ 2023-01-12 14:56 ` Patchwork
  2023-01-12 17:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  10 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2023-01-12 14:56 UTC (permalink / raw)
  To: Swati Sharma; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 6871 bytes --]

== Series Details ==

Series: VDSC YCbCr420 + Fractional BPP (rev3)
URL   : https://patchwork.freedesktop.org/series/111342/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12575 -> IGTPW_8328
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

Participating hosts (34 -> 34)
------------------------------

  Additional (1): fi-rkl-11600 
  Missing    (1): fi-snb-2520m 

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

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

### IGT changes ###

#### Issues hit ####

  * igt@debugfs_test@basic-hwmon:
    - fi-rkl-11600:       NOTRUN -> [SKIP][1] ([i915#7456])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@debugfs_test@basic-hwmon.html

  * igt@gem_exec_gttfill@basic:
    - fi-pnv-d510:        [PASS][2] -> [FAIL][3] ([i915#7229])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/fi-pnv-d510/igt@gem_exec_gttfill@basic.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-pnv-d510/igt@gem_exec_gttfill@basic.html

  * igt@gem_huc_copy@huc-copy:
    - fi-rkl-11600:       NOTRUN -> [SKIP][4] ([i915#2190])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - fi-rkl-11600:       NOTRUN -> [SKIP][5] ([i915#4613]) +3 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_tiled_pread_basic:
    - fi-rkl-11600:       NOTRUN -> [SKIP][6] ([i915#3282])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_backlight@basic-brightness:
    - fi-rkl-11600:       NOTRUN -> [SKIP][7] ([i915#7561])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@i915_pm_backlight@basic-brightness.html

  * igt@i915_suspend@basic-s3-without-i915:
    - fi-rkl-11600:       NOTRUN -> [INCOMPLETE][8] ([i915#4817])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@i915_suspend@basic-s3-without-i915.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - fi-rkl-guc:         NOTRUN -> [SKIP][9] ([i915#7828])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-guc/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_chamelium_hpd@dp-hpd-fast:
    - fi-rkl-11600:       NOTRUN -> [SKIP][10] ([i915#7828]) +7 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@kms_chamelium_hpd@dp-hpd-fast.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
    - fi-rkl-11600:       NOTRUN -> [SKIP][11] ([i915#4103])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html

  * igt@kms_force_connector_basic@force-load-detect:
    - fi-rkl-11600:       NOTRUN -> [SKIP][12] ([fdo#109285] / [i915#4098])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_psr@sprite_plane_onoff:
    - fi-rkl-11600:       NOTRUN -> [SKIP][13] ([i915#1072]) +3 similar issues
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@kms_psr@sprite_plane_onoff.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - fi-snb-2600:        NOTRUN -> [SKIP][14] ([fdo#109271])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-snb-2600/igt@kms_setmode@basic-clone-single-crtc.html
    - fi-rkl-11600:       NOTRUN -> [SKIP][15] ([i915#3555] / [i915#4098])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-read:
    - fi-rkl-11600:       NOTRUN -> [SKIP][16] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@prime_vgem@basic-read.html

  * igt@prime_vgem@basic-userptr:
    - fi-rkl-11600:       NOTRUN -> [SKIP][17] ([fdo#109295] / [i915#3301] / [i915#3708])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-11600/igt@prime_vgem@basic-userptr.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_lrc:
    - fi-rkl-guc:         [INCOMPLETE][18] ([i915#4983]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.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
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
  [i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7117 -> IGTPW_8328

  CI-20190529: 20190529
  CI_DRM_12575: 52754fc9f57a4e13ccd1ce908d5d86219121e1b9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8328: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/index.html
  IGT_7117: 67669415954a763e2d1aa1bed6ef3786c0d17807 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

+igt@kms_dsc@dsc-fractional-bpp
-igt@kms_async_flips@async-flip-with-page-flip-events-linear

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 8086 bytes --]

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

* [igt-dev] ✗ Fi.CI.IGT: failure for VDSC YCbCr420 + Fractional BPP (rev3)
  2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
                   ` (9 preceding siblings ...)
  2023-01-12 14:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2023-01-12 17:56 ` Patchwork
  10 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2023-01-12 17:56 UTC (permalink / raw)
  To: Swati Sharma; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 23545 bytes --]

== Series Details ==

Series: VDSC YCbCr420 + Fractional BPP (rev3)
URL   : https://patchwork.freedesktop.org/series/111342/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12575_full -> IGTPW_8328_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_8328_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_8328_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (14 -> 10)
------------------------------

  Missing    (4): shard-rkl0 pig-kbl-iris pig-glk-j5005 pig-skl-6260u 

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

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

### IGT changes ###

#### Possible regressions ####

  * {igt@kms_dsc@dsc-fractional-bpp} (NEW):
    - {shard-dg1}:        NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-dg1-18/igt@kms_dsc@dsc-fractional-bpp.html
    - {shard-tglu-10}:    NOTRUN -> [SKIP][2]
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-10/igt@kms_dsc@dsc-fractional-bpp.html

  * igt@kms_plane_cursor@viewport@pipe-a-hdmi-a-1-size-64:
    - shard-glk:          [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-glk2/igt@kms_plane_cursor@viewport@pipe-a-hdmi-a-1-size-64.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk2/igt@kms_plane_cursor@viewport@pipe-a-hdmi-a-1-size-64.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_exec_whisper@basic-fds-forked-all:
    - {shard-tglu-10}:    [PASS][5] -> [INCOMPLETE][6]
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-tglu-10/igt@gem_exec_whisper@basic-fds-forked-all.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-10/igt@gem_exec_whisper@basic-fds-forked-all.html

  * igt@i915_suspend@basic-s3-without-i915:
    - {shard-tglu}:       NOTRUN -> [INCOMPLETE][7]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-2/igt@i915_suspend@basic-s3-without-i915.html

  
New tests
---------

  New tests have been introduced between CI_DRM_12575_full and IGTPW_8328_full:

### New IGT tests (1) ###

  * igt@kms_dsc@dsc-fractional-bpp:
    - Statuses : 4 skip(s)
    - Exec time: [0.0] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][8] -> [FAIL][9] ([i915#2842]) +2 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html

  * {igt@kms_dsc@dsc-fractional-bpp} (NEW):
    - {shard-rkl}:        NOTRUN -> [SKIP][10] ([i915#4098])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-1/igt@kms_dsc@dsc-fractional-bpp.html
    - shard-glk:          NOTRUN -> [SKIP][11] ([fdo#109271])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk1/igt@kms_dsc@dsc-fractional-bpp.html

  
#### Possible fixes ####

  * igt@drm_fdinfo@idle@rcs0:
    - {shard-rkl}:        [FAIL][12] ([i915#7742]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@drm_fdinfo@idle@rcs0.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@drm_fdinfo@idle@rcs0.html

  * igt@fbdev@unaligned-read:
    - {shard-rkl}:        [SKIP][14] ([i915#2582]) -> [PASS][15] +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-4/igt@fbdev@unaligned-read.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-1/igt@fbdev@unaligned-read.html

  * igt@gem_ctx_exec@basic-nohangcheck:
    - {shard-rkl}:        [FAIL][16] ([i915#6268]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-1/igt@gem_ctx_exec@basic-nohangcheck.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@gem_ctx_exec@basic-nohangcheck.html

  * igt@gem_eio@suspend:
    - {shard-rkl}:        [FAIL][18] ([i915#7052]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-3/igt@gem_eio@suspend.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-2/igt@gem_eio@suspend.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-glk:          [FAIL][20] ([i915#2846]) -> [PASS][21]
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-glk1/igt@gem_exec_fair@basic-deadline.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk9/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_reloc@basic-gtt-read:
    - {shard-rkl}:        [SKIP][22] ([i915#3281]) -> [PASS][23] +7 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@gem_exec_reloc@basic-gtt-read.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@gem_exec_reloc@basic-gtt-read.html

  * igt@gem_mmap_wc@set-cache-level:
    - {shard-rkl}:        [SKIP][24] ([i915#1850]) -> [PASS][25]
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-5/igt@gem_mmap_wc@set-cache-level.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@gem_mmap_wc@set-cache-level.html

  * igt@gem_partial_pwrite_pread@reads:
    - {shard-rkl}:        [SKIP][26] ([i915#3282]) -> [PASS][27] +3 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-1/igt@gem_partial_pwrite_pread@reads.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@gem_partial_pwrite_pread@reads.html

  * igt@gen9_exec_parse@valid-registers:
    - {shard-rkl}:        [SKIP][28] ([i915#2527]) -> [PASS][29] +1 similar issue
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-4/igt@gen9_exec_parse@valid-registers.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@gen9_exec_parse@valid-registers.html

  * igt@i915_pm_rpm@dpms-mode-unset-lpsp:
    - {shard-rkl}:        [SKIP][30] ([i915#1397]) -> [PASS][31] +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-5/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html

  * igt@i915_pm_rpm@dpms-non-lpsp:
    - {shard-dg1}:        [SKIP][32] ([i915#1397]) -> [PASS][33]
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-dg1-14/igt@i915_pm_rpm@dpms-non-lpsp.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-dg1-15/igt@i915_pm_rpm@dpms-non-lpsp.html

  * igt@i915_pm_rpm@fences:
    - {shard-rkl}:        [SKIP][34] ([i915#1849]) -> [PASS][35] +2 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-4/igt@i915_pm_rpm@fences.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@i915_pm_rpm@fences.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - {shard-rkl}:        [FAIL][36] ([fdo#103375]) -> [PASS][37] +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-3/igt@i915_suspend@fence-restore-tiled2untiled.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-2/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:
    - {shard-tglu}:       [SKIP][38] ([i915#1845] / [i915#7651]) -> [PASS][39] +4 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-tglu-6/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-7/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - {shard-rkl}:        [SKIP][40] ([i915#1849] / [i915#4098]) -> [PASS][41] +13 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-3/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
    - {shard-tglu}:       [SKIP][42] ([i915#1849]) -> [PASS][43] +2 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html

  * igt@kms_pipe_crc_basic@bad-source:
    - {shard-rkl}:        [SKIP][44] ([i915#1845] / [i915#4098]) -> [PASS][45] +18 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@kms_pipe_crc_basic@bad-source.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@kms_pipe_crc_basic@bad-source.html

  * igt@kms_psr@sprite_mmap_cpu:
    - {shard-rkl}:        [SKIP][46] ([i915#1072]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@kms_psr@sprite_mmap_cpu.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@kms_psr@sprite_mmap_cpu.html

  * igt@kms_vblank@pipe-b-wait-forked-busy-hang:
    - {shard-tglu}:       [SKIP][48] ([i915#7651]) -> [PASS][49] +3 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-tglu-6/igt@kms_vblank@pipe-b-wait-forked-busy-hang.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-tglu-1/igt@kms_vblank@pipe-b-wait-forked-busy-hang.html

  * igt@kms_vblank@pipe-c-query-forked-hang:
    - shard-glk:          [SKIP][50] ([fdo#109271]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-glk8/igt@kms_vblank@pipe-c-query-forked-hang.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk3/igt@kms_vblank@pipe-c-query-forked-hang.html

  * igt@perf@polling-small-buf:
    - {shard-rkl}:        [FAIL][52] ([i915#1722]) -> [PASS][53]
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-1/igt@perf@polling-small-buf.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@perf@polling-small-buf.html

  * igt@perf_pmu@idle@rcs0:
    - {shard-rkl}:        [FAIL][54] ([i915#4349]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@perf_pmu@idle@rcs0.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-3/igt@perf_pmu@idle@rcs0.html

  * igt@prime_vgem@basic-write:
    - {shard-rkl}:        [SKIP][56] ([fdo#109295] / [i915#3291] / [i915#3708]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-6/igt@prime_vgem@basic-write.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@prime_vgem@basic-write.html

  * igt@sysfs_heartbeat_interval@precise@vecs0:
    - {shard-rkl}:        [FAIL][58] ([i915#1755]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@sysfs_heartbeat_interval@precise@vecs0.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-5/igt@sysfs_heartbeat_interval@precise@vecs0.html

  * igt@testdisplay:
    - {shard-rkl}:        [SKIP][60] ([i915#4098]) -> [PASS][61] +2 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-rkl-2/igt@testdisplay.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-rkl-6/igt@testdisplay.html

  
#### Warnings ####

  * igt@kms_dsc@dsc-with-bpc-formats:
    - shard-glk:          [SKIP][62] ([fdo#109271] / [i915#7205]) -> [SKIP][63] ([fdo#109271])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12575/shard-glk8/igt@kms_dsc@dsc-with-bpc-formats.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/shard-glk5/igt@kms_dsc@dsc-with-bpc-formats.html

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

  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
  [fdo#109302]: https://bugs.freedesktop.org/show_bug.cgi?id=109302
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
  [fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
  [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
  [fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
  [i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
  [i915#1755]: https://gitlab.freedesktop.org/drm/intel/issues/1755
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1850]: https://gitlab.freedesktop.org/drm/intel/issues/1850
  [i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2436]: https://gitlab.freedesktop.org/drm/intel/issues/2436
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
  [i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#284]: https://gitlab.freedesktop.org/drm/intel/issues/284
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3116]: https://gitlab.freedesktop.org/drm/intel/issues/3116
  [i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
  [i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#3966]: https://gitlab.freedesktop.org/drm/intel/issues/3966
  [i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
  [i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4767]: https://gitlab.freedesktop.org/drm/intel/issues/4767
  [i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
  [i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
  [i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
  [i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
  [i915#4877]: https://gitlab.freedesktop.org/drm/intel/issues/4877
  [i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
  [i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
  [i915#5234]: https://gitlab.freedesktop.org/drm/intel/issues/5234
  [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
  [i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
  [i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6117]: https://gitlab.freedesktop.org/drm/intel/issues/6117
  [i915#6230]: https://gitlab.freedesktop.org/drm/intel/issues/6230
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
  [i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
  [i915#6334]: https://gitlab.freedesktop.org/drm/intel/issues/6334
  [i915#6403]: https://gitlab.freedesktop.org/drm/intel/issues/6403
  [i915#6412]: https://gitlab.freedesktop.org/drm/intel/issues/6412
  [i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
  [i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
  [i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
  [i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
  [i915#6953]: https://gitlab.freedesktop.org/drm/intel/issues/6953
  [i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
  [i915#7052]: https://gitlab.freedesktop.org/drm/intel/issues/7052
  [i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
  [i915#7205]: https://gitlab.freedesktop.org/drm/intel/issues/7205
  [i915#7294]: https://gitlab.freedesktop.org/drm/intel/issues/7294
  [i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
  [i915#7582]: https://gitlab.freedesktop.org/drm/intel/issues/7582
  [i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
  [i915#7679]: https://gitlab.freedesktop.org/drm/intel/issues/7679
  [i915#7681]: https://gitlab.freedesktop.org/drm/intel/issues/7681
  [i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
  [i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
  [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
  [i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
  [i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7117 -> IGTPW_8328
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_12575: 52754fc9f57a4e13ccd1ce908d5d86219121e1b9 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8328: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8328/index.html
  IGT_7117: 67669415954a763e2d1aa1bed6ef3786c0d17807 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

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

[-- Attachment #2: Type: text/html, Size: 17313 bytes --]

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

* Re: [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper Swati Sharma
@ 2023-01-13  7:55   ` Hogander, Jouni
  0 siblings, 0 replies; 19+ messages in thread
From: Hogander, Jouni @ 2023-01-13  7:55 UTC (permalink / raw)
  To: igt-dev, Sharma, Swati2

Hello Swati,

One comment inline below. Sorry for missing that on first round.

On Thu, 2023-01-12 at 13:05 +0530, Swati Sharma wrote:
> To add dsc concurrent tests, these wrapper functions can be
> reused. Lets create separate helper file to avoid code duplication.
> 
> v2: -use of SPDX licence placeholder
>     -add more parameters to exported functions (Jouni)
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>  tests/i915/kms_dsc.c        | 133 +++-------------------------------
> --
>  tests/i915/kms_dsc_helper.c |  99 +++++++++++++++++++++++++++
>  tests/i915/kms_dsc_helper.h |  35 ++++++++++
>  tests/meson.build           |  10 ++-
>  4 files changed, 152 insertions(+), 125 deletions(-)
>  create mode 100644 tests/i915/kms_dsc_helper.c
>  create mode 100644 tests/i915/kms_dsc_helper.h
> 
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index 330fc050b..22239122c 100644
> --- a/tests/i915/kms_dsc.c
> +++ b/tests/i915/kms_dsc.c
> @@ -29,22 +29,8 @@
>   * Manasi Navare <manasi.d.navare@intel.com>
>   *
>   */
> -#include "igt.h"
> -#include "igt_sysfs.h"
> -#include <errno.h>
> -#include <getopt.h>
> -#include <math.h>
> -#include <stdint.h>
> -#include <stdbool.h>
> -#include <strings.h>
> -#include <unistd.h>
> -#include <stdlib.h>
> -#include <signal.h>
> -#include <time.h>
> -#include <fcntl.h>
> -#include <termios.h>
> -
> -#define HDISPLAY_5K    5120
> +
> +#include "kms_dsc_helper.h"
>  
>  IGT_TEST_DESCRIPTION("Test to validate display stream compression");
>  
> @@ -64,9 +50,6 @@ typedef struct {
>         enum pipe pipe;
>  } data_t;
>  
> -bool force_dsc_en_orig;
> -int force_dsc_restore_fd = -1;
> -
>  const struct {
>         const int format;
>         const char format_str[20];
> @@ -84,56 +67,6 @@ static inline void manual(const char *expected)
>         igt_debug_interactive_mode_check("all", expected);
>  }
>  
> -static void force_dsc_enable(data_t *data)
> -{
> -       int ret;
> -
> -       igt_debug("Forcing DSC enable on %s\n", data->output->name);
> -       ret = igt_force_dsc_enable(data->drm_fd,
> -                                  data->output->name);
> -       igt_assert_f(ret > 0, "debugfs_write failed");
> -}
> -
> -static void force_dsc_enable_bpc(data_t *data)
> -{
> -       int ret;
> -
> -       igt_debug("Forcing input DSC BPC to %d on %s\n",
> -                 data->input_bpc, data->output->name);
> -       ret = igt_force_dsc_enable_bpc(data->drm_fd,
> -                                      data->output->name,
> -                                      data->input_bpc);
> -       igt_assert_f(ret > 0, "debugfs_write failed");
> -}
> -
> -static void save_force_dsc_en(data_t *data)
> -{
> -       force_dsc_en_orig =
> -               igt_is_force_dsc_enabled(data->drm_fd,
> -                                        data->output->name);
> -       force_dsc_restore_fd =
> -               igt_get_dsc_debugfs_fd(data->drm_fd,
> -                                      data->output->name);
> -       igt_assert(force_dsc_restore_fd >= 0);
> -}
> -
> -static void restore_force_dsc_en(void)
> -{
> -       if (force_dsc_restore_fd < 0)
> -               return;
> -
> -       igt_debug("Restoring DSC enable\n");
> -       igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ?
> "1" : "0", 1) == 1);
> -
> -       close(force_dsc_restore_fd);
> -       force_dsc_restore_fd = -1;
> -}
> -
> -static void kms_dsc_exit_handler(int sig)
> -{
> -       restore_force_dsc_en();
> -}
> -
>  static drmModeModeInfo *get_highres_mode(igt_output_t *output)
>  {
>         drmModeConnector *connector = output->config.connector;
> @@ -146,26 +79,6 @@ static drmModeModeInfo
> *get_highres_mode(igt_output_t *output)
>         return highest_mode;
>  }
>  
> -static bool check_dsc_on_connector(data_t *data)
> -{
> -       igt_output_t *output = data->output;
> -
> -       if (!igt_is_dsc_supported(data->drm_fd, output->name)) {
> -               igt_debug("DSC not supported on connector %s\n",
> -                         output->name);
> -               return false;
> -       }
> -
> -       if (!output_is_internal_panel(output) &&
> -           !igt_is_fec_supported(data->drm_fd, output->name)) {
> -               igt_debug("DSC cannot be enabled without FEC on
> %s\n",
> -                         output->name);
> -               return false;
> -       }
> -
> -       return true;
> -}
> -
>  static bool check_big_joiner_pipe_constraint(data_t *data)
>  {
>         igt_output_t *output = data->output;
> @@ -181,34 +94,6 @@ static bool
> check_big_joiner_pipe_constraint(data_t *data)
>         return true;
>  }
>  
> -static bool check_gen11_dp_constraint(data_t *data)
> -{
> -       igt_output_t *output = data->output;
> -       uint32_t devid = intel_get_drm_devid(data->drm_fd);
> -       drmModeConnector *connector = output->config.connector;
> -
> -       if ((connector->connector_type ==
> DRM_MODE_CONNECTOR_DisplayPort) &&
> -           (data->pipe == PIPE_A) && IS_GEN11(devid)) {
> -               igt_debug("DSC not supported on pipe A on external DP
> in gen11 platforms\n");
> -               return false;
> -       }
> -
> -       return true;
> -}
> -
> -/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
> -static bool check_gen11_bpc_constraint(data_t *data)
> -{
> -       uint32_t devid = intel_get_drm_devid(data->drm_fd);
> -
> -       if (IS_GEN11(devid) && data->input_bpc == 12) {
> -               igt_debug("Input bpc 12 not supported on gen11
> platforms\n");
> -               return false;
> -       }
> -
> -       return true;
> -}
> -
>  static void test_cleanup(data_t *data)
>  {
>         igt_output_t *output = data->output;
> @@ -235,12 +120,12 @@ static void update_display(data_t *data, enum
> dsc_test_type test_type, unsigned
>         igt_display_commit(display);
>  
>         igt_debug("DSC is supported on %s\n", data->output->name);
> -       save_force_dsc_en(data);
> -       force_dsc_enable(data);
> +       save_force_dsc_en(data->drm_fd, data->output);
> +       force_dsc_enable(data->drm_fd, data->output);
>  
>         if (test_type == TEST_DSC_BPC) {
>                 igt_debug("Trying to set input BPC to %d\n", data-
> >input_bpc);
> -               force_dsc_enable_bpc(data);
> +               force_dsc_enable_bpc(data->drm_fd, data->output,
> data->input_bpc);
>         }
>  
>         igt_output_set_pipe(output, data->pipe);
> @@ -279,7 +164,7 @@ static void update_display(data_t *data, enum
> dsc_test_type test_type, unsigned
>         restore_force_dsc_en();
>         igt_debug("Reset compression BPC\n");
>         data->input_bpc = 0;
> -       force_dsc_enable_bpc(data);
> +       force_dsc_enable_bpc(data->drm_fd, data->output, data-
> >input_bpc);
>  
>         igt_assert_f(enabled,
>                      "Default DSC enable failed on connector: %s
> pipe: %s\n",
> @@ -302,13 +187,13 @@ static void test_dsc(data_t *data, enum
> dsc_test_type test_type, int bpc,
>                 data->output = output;
>                 data->pipe = pipe;
>  
> -               if (!check_dsc_on_connector(data))
> +               if (!check_dsc_on_connector(data->drm_fd, data-
> >output))
>                         continue;
>  
> -               if (!check_gen11_dp_constraint(data))
> +               if (!check_gen11_dp_constraint(data->drm_fd, data-
> >output, data->pipe))
>                         continue;
>  
> -               if (!check_gen11_bpc_constraint(data))
> +               if (!check_gen11_bpc_constraint(data->drm_fd, data-
> >output, data->input_bpc))
>                         continue;
>  
>                 if (!check_big_joiner_pipe_constraint(data))
> diff --git a/tests/i915/kms_dsc_helper.c
> b/tests/i915/kms_dsc_helper.c
> new file mode 100644
> index 000000000..3734b3444
> --- /dev/null
> +++ b/tests/i915/kms_dsc_helper.c
> @@ -0,0 +1,99 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2023 Intel Corporation
> + */
> +
> +#include "kms_dsc_helper.h"
> +
> +bool force_dsc_en_orig;
> +int force_dsc_restore_fd = -1;

These should be static.

> +
> +void force_dsc_enable(int drmfd, igt_output_t *output)
> +{
> +       int ret;
> +
> +       igt_debug("Forcing DSC enable on %s\n", output->name);
> +       ret = igt_force_dsc_enable(drmfd, output->name);
> +       igt_assert_f(ret > 0, "debugfs_write failed");
> +}
> +
> +void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int
> input_bpc)
> +{
> +       int ret;
> +
> +       igt_debug("Forcing input DSC BPC to %d on %s\n",
> +                 input_bpc, output->name);
> +       ret = igt_force_dsc_enable_bpc(drmfd, output->name,
> input_bpc);
> +       igt_assert_f(ret > 0, "debugfs_write failed");
> +}
> +
> +void save_force_dsc_en(int drmfd, igt_output_t *output)
> +{
> +       force_dsc_en_orig =
> +               igt_is_force_dsc_enabled(drmfd, output->name);
> +       force_dsc_restore_fd =
> +               igt_get_dsc_debugfs_fd(drmfd, output->name);
> +       igt_assert(force_dsc_restore_fd >= 0);
> +}
> +
> +void restore_force_dsc_en(void)
> +{
> +       if (force_dsc_restore_fd < 0)
> +               return;
> +
> +       igt_debug("Restoring DSC enable\n");
> +       igt_assert(write(force_dsc_restore_fd, force_dsc_en_orig ?
> "1" : "0", 1) == 1);
> +
> +       close(force_dsc_restore_fd);
> +       force_dsc_restore_fd = -1;
> +}
> +
> +void kms_dsc_exit_handler(int sig)
> +{
> +       restore_force_dsc_en();
> +}
> +
> +bool check_dsc_on_connector(int drmfd, igt_output_t *output)
> +{
> +       if (!igt_is_dsc_supported(drmfd, output->name)) {
> +               igt_debug("DSC not supported on connector %s\n",
> +                         output->name);
> +               return false;
> +       }
> +
> +       if (!output_is_internal_panel(output) &&
> +           !igt_is_fec_supported(drmfd, output->name)) {
> +               igt_debug("DSC cannot be enabled without FEC on
> %s\n",
> +                         output->name);
> +               return false;
> +       }
> +
> +       return true;
> +}
> +
> +bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum
> pipe pipe)
> +{
> +       uint32_t devid = intel_get_drm_devid(drmfd);
> +       drmModeConnector *connector = output->config.connector;
> +
> +       if ((connector->connector_type ==
> DRM_MODE_CONNECTOR_DisplayPort) &&
> +           (pipe == PIPE_A) && IS_GEN11(devid)) {
> +               igt_debug("DSC not supported on pipe A on external DP
> in gen11 platforms\n");
> +               return false;
> +       }
> +
> +       return true;
> +}
> +
> +/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
> +bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int
> input_bpc)
> +{
> +       uint32_t devid = intel_get_drm_devid(drmfd);
> +
> +       if (IS_GEN11(devid) && input_bpc == 12) {
> +               igt_debug("Input bpc 12 not supported on gen11
> platforms\n");
> +               return false;
> +       }
> +
> +       return true;
> +}
> diff --git a/tests/i915/kms_dsc_helper.h
> b/tests/i915/kms_dsc_helper.h
> new file mode 100644
> index 000000000..fe479dac4
> --- /dev/null
> +++ b/tests/i915/kms_dsc_helper.h
> @@ -0,0 +1,35 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2022 Intel Corporation
> + */
> +
> +#ifndef IGT_KMS_DSC_HELPER_H
> +#define IGT_KMS_DSC_HELPER_H
> +
> +#include "igt.h"
> +#include "igt_sysfs.h"
> +#include <errno.h>
> +#include <getopt.h>
> +#include <math.h>
> +#include <stdint.h>
> +#include <stdbool.h>
> +#include <strings.h>
> +#include <unistd.h>
> +#include <stdlib.h>
> +#include <signal.h>
> +#include <time.h>
> +#include <fcntl.h>
> +#include <termios.h>
> +
> +#define HDISPLAY_5K    5120
> +
> +void force_dsc_enable(int drmfd, igt_output_t *output);
> +void force_dsc_enable_bpc(int drmfd, igt_output_t *output, int
> input_bpc);
> +void save_force_dsc_en(int drmfd, igt_output_t *output);
> +void restore_force_dsc_en(void);
> +void kms_dsc_exit_handler(int sig);
> +bool check_dsc_on_connector(int drmfd, igt_output_t *output);
> +bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum
> pipe pipe);
> +bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int
> input_bpc);
> +
> +#endif
> diff --git a/tests/meson.build b/tests/meson.build
> index cb4289985..e63d62249 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -221,7 +221,6 @@ i915_progs = [
>         'kms_ccs',
>         'kms_cdclk',
>         'kms_draw_crc',
> -       'kms_dsc',
>         'kms_fbcon_fbt',
>         'kms_fence_pin_leak',
>         'kms_flip_scaled_crc',
> @@ -424,6 +423,15 @@ test_executables += executable('kms_color',
>            install : true)
>  test_list += 'kms_color'
>  
> +test_executables += executable('kms_dsc',
> +          [ join_paths('i915', 'kms_dsc.c'), join_paths ('i915',
> 'kms_dsc_helper.c')],
> +          dependencies : test_deps,
> +          install_dir : libexecdir,
> +          install_rpath : libexecdir_rpathdir,
> +          install : true)
> +test_list += 'kms_dsc'
> +
> +
>  if chamelium.found()
>         test_executables += executable('kms_color_chamelium',
>                               [ 'chamelium/kms_color_chamelium.c',
> 'kms_color_helper.c' ],


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

* Re: [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
@ 2023-01-13  8:17   ` Hogander, Jouni
  2023-01-18 16:36     ` Swati Sharma
  0 siblings, 1 reply; 19+ messages in thread
From: Hogander, Jouni @ 2023-01-13  8:17 UTC (permalink / raw)
  To: igt-dev, Sharma, Swati2

One comment below which I missed earlier.

On Thu, 2023-01-12 at 13:05 +0530, Swati Sharma wrote:
> Helper functions are added for getting/setting VDSC YCbCr420 debugfs
> entry.
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>  lib/igt_dsc.c | 67
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/igt_dsc.h |  4 +++
>  2 files changed, 71 insertions(+)
> 
> diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
> index 25dcb5840..269d574e9 100644
> --- a/lib/igt_dsc.c
> +++ b/lib/igt_dsc.c
> @@ -131,3 +131,70 @@ int igt_get_dsc_debugfs_fd(int drmfd, char
> *connector_name)
>  
>         return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
>  }
> +
> +static
> +bool check_dsc_ycbcr420_debugfs(int drmfd, char *connector_name,
> +                                const char *check_str)
> +{
> +       char file_name[128] = {0};
> +       char buf[512];
> +
> +       sprintf(file_name, "%s/i915_dsc_ycbcr420", connector_name);
> +
> +       igt_debugfs_read(drmfd, file_name, buf);
> +
> +       return strstr(buf, check_str);
> +}
> +
> +/*
> + * igt_is_dsc_ycbcr420_supported:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: True if DSC YCbCr420 is supported for the given
> connector, false otherwise.
> + */
> +bool igt_is_dsc_ycbcr420_supported(int drmfd, char *connector_name)
> +{
> +       return check_dsc_debugfs(drmfd, connector_name,
> "DSC_YCBCR420_Sink_Support: yes");
> +}
> +
> +/*
> + * igt_is_force_dsc_ycbcr420_enabled:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: True if DSC YCbCr420 is force enabled (via debugfs) for
> the given connector,
> + * false otherwise.
> + */
> +bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char
> *connector_name)
> +{
> +       return check_dsc_ycbcr420_debugfs(drmfd, connector_name,
> "Force_DSC_YCBCR420_Enable: yes");
> +}
> +
> +/*
> + * igt_force_dsc_ycbcr420_enable:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: 1 on success or negative error code, in case of failure.

0 is usually success, < 0 is error. This is also in coding style
document. I see igt_force_dsc_enable is also using 1. Maybe you should
fix that as well in a separate patch.
 
> + */
> +int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name)
> +{
> +       return write_dsc_debugfs(drmfd, connector_name,
> "i915_dsc_ycbcr420", "1");
> +}
> +
> +/*
> + * igt_get_dsc_ycbcr420_debugfs_fd:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: fd of the DSC YCbCr420 debugfs for the given connector,
> else returns -1.
> + */
> +int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char *connector_name)
> +{
> +       char file_name[128] = {0};
> +
> +       sprintf(file_name, "%s/i915_dsc_ycbcr420", connector_name);
> +
> +       return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
> +}
> diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
> index 291c2cdea..e2b039f42 100644
> --- a/lib/igt_dsc.h
> +++ b/lib/igt_dsc.h
> @@ -15,5 +15,9 @@ bool igt_is_force_dsc_enabled(int drmfd, char
> *connector_name);
>  int igt_force_dsc_enable(int drmfd, char *connector_name);
>  int igt_force_dsc_enable_bpc(int drmfd, char *connector_name, int
> bpc);
>  int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
> +bool igt_is_dsc_ycbcr420_supported(int drmfd, char *connector_name);
> +bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char
> *connector_name);
> +int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
> +int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char
> *connector_name);
>  
>  #endif


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

* Re: [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation " Swati Sharma
@ 2023-01-13  8:29   ` Hogander, Jouni
  0 siblings, 0 replies; 19+ messages in thread
From: Hogander, Jouni @ 2023-01-13  8:29 UTC (permalink / raw)
  To: igt-dev, Sharma, Swati2

Hello Swati, couple of inline comments below.

On Thu, 2023-01-12 at 13:05 +0530, Swati Sharma wrote:
> Existing i-g-t is extended to enable validation for VDSC YCbCr420.
> If a mode is supported in both RGB and YCbCr420 output formats by the
> sink, i915 driver policy is to try RGB first and fall back to
> YCbCr420, if
> mode cannot be shown using RGB. To test YCbCr420, we need a debugfs
> entry (force_dsc_ycbcr420) to force this output format; so that
> YCbCr420 code
> gets executed.
> From i-g-t, we have set this debugfs entry. However, before setting
> debugfs entry, we have checked capability i.e. YCbCr420 is supported
> by
> both platform (D14+) and sink.
> Also, all the modes doesn't support both YCbCr420 and RGB formats; so
> if
> sink and platform supports YCbCr420 we will do try commit with each
> mode
> till we get a successful commit.
> 
> v2: -used is_dsc_ycbcr420_supported() (Ankit)
>     -handled try-commit correctly (Ankit)
>     -instead of flag use enum for output formats (Ankit)
> v3: -instead of global count, pass count as para (Ankit)
>     -print output format (Ankit)
> v4: -optimized while loop (Jouni)
>     -used only try commit (Jouni)
>     -fixed get_next_mode() (Jouni)
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>  lib/igt_kms.c               | 17 ++++++++
>  lib/igt_kms.h               |  6 +++
>  tests/i915/kms_dsc.c        | 84 +++++++++++++++++++++++++++--------
> --
>  tests/i915/kms_dsc_helper.c | 45 ++++++++++++++++++++
>  tests/i915/kms_dsc_helper.h |  4 ++
>  5 files changed, 133 insertions(+), 23 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 31e6dfda0..0f1f7c6b9 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -966,6 +966,23 @@ const char *kmstest_scaling_filter_str(int
> filter)
>         return find_type_name(scaling_filter_names, filter);
>  }
>  
> +static const struct type_name dsc_output_format_names[] = {
> +       { DSC_FORMAT_RGB444, "RGB444" },
> +       { DSC_FORMAT_YCBCR420, "YCBCR420" },
> +       {}
> +};
> +
> +/**
> + * kmstest_dsc_output_format_str:
> + * @output_format: DSC_FORMAT_* output format value
> + *
> + * Returns: A string representing the output format @output format.
> + */
> +const char *kmstest_dsc_output_format_str(int output_format)
> +{
> +       return find_type_name(dsc_output_format_names,
> output_format);
> +}
> +
>  static const struct type_name connector_type_names[] = {
>         { DRM_MODE_CONNECTOR_Unknown, "Unknown" },
>         { DRM_MODE_CONNECTOR_VGA, "VGA" },
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index be5482e08..61ec8fbec 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -106,10 +106,16 @@ enum igt_custom_edid_type {
>   */
>  #define kmstest_port_name(port) ((port) + 'A')
>  
> +enum dsc_output_format {
> +       DSC_FORMAT_RGB444,
> +       DSC_FORMAT_YCBCR420
> +};
> +
>  const char *kmstest_encoder_type_str(int type);
>  const char *kmstest_connector_status_str(int status);
>  const char *kmstest_connector_type_str(int type);
>  const char *kmstest_scaling_filter_str(int filter);
> +const char *kmstest_dsc_output_format_str(int output_format);
>  
>  void kmstest_dump_mode(drmModeModeInfo *mode);
>  #define MAX_HDISPLAY_PER_PIPE 5120
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index 0bac9d26b..366205a4e 100644
> --- a/tests/i915/kms_dsc.c
> +++ b/tests/i915/kms_dsc.c
> @@ -80,6 +80,17 @@ static drmModeModeInfo
> *get_highres_mode(igt_output_t *output)
>         return highest_mode;
>  }
>  
> +static drmModeModeInfo *get_next_mode(igt_output_t *output, int
> index)
> +{
> +       drmModeConnector *connector = output->config.connector;
> +       drmModeModeInfo *next_mode = NULL;
> +
> +       if (index < connector->count_modes)
> +               next_mode = &connector->modes[index];
> +
> +       return next_mode;
> +}
> +
>  static bool check_big_joiner_pipe_constraint(data_t *data)
>  {
>         igt_output_t *output = data->output;
> @@ -109,9 +120,11 @@ static void test_cleanup(data_t *data)
>  
>  /* re-probe connectors and do a modeset with DSC */
>  static void update_display(data_t *data, enum dsc_test_type
> test_type,
> -                          unsigned int plane_format)
> +                          unsigned int plane_format, enum
> dsc_output_format output_format)
>  {
> +       int ret;
>         bool enabled;
> +       int index = 0;
>         igt_plane_t *primary;
>         drmModeModeInfo *mode;
>         igt_output_t *output = data->output;
> @@ -125,33 +138,51 @@ static void update_display(data_t *data, enum
> dsc_test_type test_type,
>         save_force_dsc_en(data->drm_fd, data->output);
>         force_dsc_enable(data->drm_fd, data->output);
>  
> +       if (output_format == DSC_FORMAT_YCBCR420) {
> +               igt_debug("DSC YCbCr420 is supported on %s\n", data-
> >output->name);
> +               save_force_dsc_ycbcr420_en(data->drm_fd, data-
> >output);
> +               force_dsc_ycbcr420_enable(data->drm_fd, data-
> >output);
> +       }
> +
>         if (test_type == TEST_DSC_BPC) {
>                 igt_debug("Trying to set input BPC to %d\n", data-
> >input_bpc);
>                 force_dsc_enable_bpc(data->drm_fd, data->output,
> data->input_bpc);
>         }
>  
>         igt_output_set_pipe(output, data->pipe);
> -
> -       mode = get_highres_mode(output);
> -       igt_require(mode != NULL);
> -       igt_output_override_mode(output, mode);
> -
>         primary = igt_output_get_plane_type(output,
> DRM_PLANE_TYPE_PRIMARY);
> -
>         igt_skip_on(!igt_plane_has_format_mod(primary, plane_format,
>                     DRM_FORMAT_MOD_LINEAR));
>  
> -       igt_create_pattern_fb(data->drm_fd,
> -                             mode->hdisplay,
> -                             mode->vdisplay,
> -                             plane_format,
> -                             DRM_FORMAT_MOD_LINEAR,
> -                             &data->fb_test_pattern);
> -
> -       igt_plane_set_fb(primary, &data->fb_test_pattern);
> -       igt_display_commit(display);
> -
> -       /* until we have CRC check support, manually check if RGB
> test
> +       do {
> +               if (output_format == DSC_FORMAT_YCBCR420) {
> +                       mode = get_next_mode(output, index);
> +                       index++;
> +               } else
> +                       mode = get_highres_mode(output);
> +
> +               igt_require(mode != NULL);
> +               igt_output_override_mode(output, mode);
> +               igt_create_pattern_fb(data->drm_fd,
> +                                     mode->hdisplay,
> +                                     mode->vdisplay,
> +                                     plane_format,
> +                                     DRM_FORMAT_MOD_LINEAR,
> +                                     &data->fb_test_pattern);
> +
> +               igt_plane_set_fb(primary, &data->fb_test_pattern);
> +               ret = igt_display_try_commit_atomic(display,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +               if (output_format == DSC_FORMAT_YCBCR420 && ret != 0)
> {
> +                       igt_remove_fb(data->drm_fd, &data-
> >fb_test_pattern);
> +                               continue;

Indentation.

> +               } else
> +                       break;

Else is not necessary. You can just break. I'm fine if you think it's
more clear this way. If you decide to keep it: please add braces to
else as well (coding style).

> +       } while(1);
> +
> +       igt_assert_eq(ret, 0);
> +
> +       /*
> +        * Until we have CRC check support, manually check if RGB
> test
>          * pattern has no corruption.
>          */
>         manual("RGB test pattern without corruption");
> @@ -164,7 +195,10 @@ static void update_display(data_t *data, enum
> dsc_test_type test_type,
>                                 enabled ? "ON" : "OFF");
>  
>         restore_force_dsc_en();
> -       igt_debug("Reset compression BPC\n");
> +       if (output_format == DSC_FORMAT_YCBCR420)
> +               restore_force_dsc_ycbcr420_en();
> +
> +       igt_debug("Reset input BPC\n");
>         data->input_bpc = 0;
>         force_dsc_enable_bpc(data->drm_fd, data->output, data-
> >input_bpc);
>  
> @@ -177,7 +211,7 @@ static void update_display(data_t *data, enum
> dsc_test_type test_type,
>  }
>  
>  static void test_dsc(data_t *data, enum dsc_test_type test_type, int
> bpc,
> -                    unsigned int plane_format)
> +                    unsigned int plane_format, enum
> dsc_output_format output_format)
>  {
>         igt_display_t *display = &data->display;
>         igt_output_t *output;
> @@ -206,15 +240,19 @@ static void test_dsc(data_t *data, enum
> dsc_test_type test_type, int bpc,
>                 else
>                         snprintf(name, sizeof(name), "-%s",
> igt_format_str(plane_format));
>  
> -               igt_dynamic_f("pipe-%s-%s%s", 
> kmstest_pipe_name(data->pipe), data->output->name, name)
> -                       update_display(data, test_type,
> plane_format);
> +               igt_dynamic_f("pipe-%s-%s%s-%s", 
> kmstest_pipe_name(data->pipe), data->output->name, name,
> kmstest_dsc_output_format_str(output_format))
> +                       update_display(data, test_type, plane_format,
> output_format);
>         }
>  }
>  
>  static void run_test(data_t *data, enum dsc_test_type test_type, int
> bpc,
>                      unsigned int plane_format)
>  {
> -       test_dsc(data, test_type, bpc, plane_format);
> +       test_dsc(data, test_type, bpc, plane_format,
> DSC_FORMAT_RGB444);
> +
> +       /* YCbCr420 DSC is supported on display version 14+ */
> +       if ((data->disp_ver >= 14) &&
> (is_dsc_ycbcr420_supported(data->drm_fd, data->output)))
> +               test_dsc(data, test_type, bpc, plane_format,
> DSC_FORMAT_YCBCR420);
>  }
>  
>  igt_main
> diff --git a/tests/i915/kms_dsc_helper.c
> b/tests/i915/kms_dsc_helper.c
> index 1a11f84ef..135e9cf58 100644
> --- a/tests/i915/kms_dsc_helper.c
> +++ b/tests/i915/kms_dsc_helper.c
> @@ -6,7 +6,9 @@
>  #include "kms_dsc_helper.h"
>  
>  bool force_dsc_en_orig;
> +bool force_dsc_ycbcr420_en_orig;
>  int force_dsc_restore_fd = -1;
> +int force_dsc_ycbcr420_restore_fd = -1;

Static

>  
>  void force_dsc_enable(int drmfd, igt_output_t *output)
>  {
> @@ -51,6 +53,7 @@ void restore_force_dsc_en(void)
>  void kms_dsc_exit_handler(int sig)
>  {
>         restore_force_dsc_en();
> +       restore_force_dsc_ycbcr420_en();
>  }
>  
>  bool check_dsc_on_connector(int drmfd, igt_output_t *output)
> @@ -97,3 +100,45 @@ bool check_gen11_bpc_constraint(int drmfd,
> igt_output_t *output, int input_bpc)
>  
>         return true;
>  }
> +
> +void force_dsc_ycbcr420_enable(int drmfd, igt_output_t *output)
> +{
> +       int ret;
> +
> +       igt_debug("Forcing DSC YCbCr420 on %s\n", output->name);
> +       ret = igt_force_dsc_ycbcr420_enable(drmfd,
> +                                           output->name);
> +       igt_assert_f(ret > 0, "forcing dsc ycbcr420 debugfs_write
> failed\n");
> +}
> +
> +void save_force_dsc_ycbcr420_en(int drmfd, igt_output_t *output)
> +{
> +       force_dsc_ycbcr420_en_orig =
> +               igt_is_force_dsc_ycbcr420_enabled(drmfd, output-
> >name);
> +       force_dsc_ycbcr420_restore_fd =
> +               igt_get_dsc_ycbcr420_debugfs_fd(drmfd, output->name);
> +       igt_assert(force_dsc_ycbcr420_restore_fd >= 0);
> +}
> +
> +void restore_force_dsc_ycbcr420_en(void)
> +{
> +       if (force_dsc_ycbcr420_restore_fd < 0)
> +               return;
> +
> +       igt_debug("Restoring DSC YCbCr420 enable\n");
> +       igt_assert(write(force_dsc_ycbcr420_restore_fd,
> force_dsc_ycbcr420_en_orig ? "1" : "0", 1) == 1);
> +
> +       close(force_dsc_ycbcr420_restore_fd);
> +       force_dsc_ycbcr420_restore_fd = -1;
> +}
> +
> +bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output)
> +{
> +       if (!igt_is_dsc_ycbcr420_supported(drmfd, output->name)) {
> +               igt_debug("DSC YCbCr420 not supported on connector
> %s\n",
> +                         output->name);
> +               return false;
> +       }
> +
> +       return true;
> +}
> diff --git a/tests/i915/kms_dsc_helper.h
> b/tests/i915/kms_dsc_helper.h
> index fe479dac4..83905fafe 100644
> --- a/tests/i915/kms_dsc_helper.h
> +++ b/tests/i915/kms_dsc_helper.h
> @@ -31,5 +31,9 @@ void kms_dsc_exit_handler(int sig);
>  bool check_dsc_on_connector(int drmfd, igt_output_t *output);
>  bool check_gen11_dp_constraint(int drmfd, igt_output_t *output, enum
> pipe pipe);
>  bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int
> input_bpc);
> +void force_dsc_ycbcr420_enable(int drmfd, igt_output_t *output);
> +void save_force_dsc_ycbcr420_en(int drmfd, igt_output_t *output);
> +void restore_force_dsc_ycbcr420_en(void);
> +bool is_dsc_ycbcr420_supported(int drmfd, igt_output_t *output);
>  
>  #endif


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

* Re: [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry
  2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry Swati Sharma
@ 2023-01-13  8:31   ` Hogander, Jouni
  0 siblings, 0 replies; 19+ messages in thread
From: Hogander, Jouni @ 2023-01-13  8:31 UTC (permalink / raw)
  To: igt-dev, Sharma, Swati2

Hello Swati. One inline comment below. Sorry for missing it on first
round.

On Thu, 2023-01-12 at 13:05 +0530, Swati Sharma wrote:
> Helper functions are added for getting/setting VDSC Fractional BPP
> debugfs entry.
> 
> v2: -improved func description (Ankit)
>     -increased buff size (Ankit)
>     -asserted bpp_prec (Ankit)
> 
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>  lib/igt_dsc.c | 84
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>  lib/igt_dsc.h |  5 +++
>  2 files changed, 89 insertions(+)
> 
> diff --git a/lib/igt_dsc.c b/lib/igt_dsc.c
> index 269d574e9..e5e67a469 100644
> --- a/lib/igt_dsc.c
> +++ b/lib/igt_dsc.c
> @@ -198,3 +198,87 @@ int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd,
> char *connector_name)
>  
>         return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
>  }
> +
> +static
> +bool check_dsc_fractional_bpp_debugfs(int drmfd, char
> *connector_name,
> +                                     const char *check_str)
> +{
> +       char file_name[128] = {0};
> +       char buf[512];
> +
> +       sprintf(file_name, "%s/i915_dsc_fractional_bpp",
> connector_name);
> +
> +       igt_debugfs_read(drmfd, file_name, buf);
> +
> +       return strstr(buf, check_str);
> +}
> +
> +/*
> + * igt_get_dsc_fractional_bpp_supported:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: The dsc sink bpp precision.
> + *         Precision value of
> + *                             16 => 1/16
> + *                             8  => 1/8
> + *                             1  => fractional bpp not supported
> + */
> +int igt_get_dsc_fractional_bpp_supported(int drmfd, char
> *connector_name)
> +{
> +       char file_name[128] = {0};
> +       char buf[512];
> +       char *start_loc;
> +       int bpp_prec;
> +
> +       sprintf(file_name, "%s/i915_dsc_fec_support",
> connector_name);
> +       igt_debugfs_read(drmfd, file_name, buf);
> +
> +       igt_assert(start_loc = strstr(buf, "DSC_Sink_BPP_Precision:
> "));
> +       igt_assert_eq(sscanf(start_loc, "DSC_Sink_BPP_Precision: %d",
> &bpp_prec), 1);
> +       igt_assert(bpp_prec > 0);
> +
> +       return bpp_prec;
> +}
> +
> +/*
> + * igt_is_force_dsc_fractional_bpp_enabled:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: True if DSC Fractional BPP is force enabled (via
> debugfs) for the given connector,
> + * false otherwise.
> + */
> +bool igt_is_force_dsc_fractional_bpp_enabled(int drmfd, char
> *connector_name)
> +{
> +       return check_dsc_fractional_bpp_debugfs(drmfd,
> connector_name, "Force_DSC_Fractional_BPP_Enable: yes");
> +}
> +
> +/*
> + * igt_force_dsc_fractional_bpp_enable:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: 1 on success or negative error code, in case of failure.

0 = success.

> + */
> +int igt_force_dsc_fractional_bpp_enable(int drmfd, char
> *connector_name)
> +{
> +       return write_dsc_debugfs(drmfd, connector_name,
> "i915_dsc_fractional_bpp", "1");
> +}
> +
> +/*
> + * igt_get_dsc_fractional_bpp_debugfs_fd:
> + * @drmfd: A drm file descriptor
> + * @connector_name: Name of the libdrm connector we're going to use
> + *
> + * Returns: fd of the DSC Fractional BPP debugfs for the given
> connector,
> + * else returns -1.
> + */
> +int igt_get_dsc_fractional_bpp_debugfs_fd(int drmfd, char
> *connector_name)
> +{
> +       char file_name[128] = {0};
> +
> +       sprintf(file_name, "%s/i915_dsc_fractional_bpp",
> connector_name);
> +
> +       return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
> +}
> diff --git a/lib/igt_dsc.h b/lib/igt_dsc.h
> index e2b039f42..7dc958406 100644
> --- a/lib/igt_dsc.h
> +++ b/lib/igt_dsc.h
> @@ -7,6 +7,7 @@
>  #define IGT_DSC_H
>  
>  #include "igt_fb.h"
> +#include "igt_core.h"
>  
>  bool igt_is_dsc_supported(int drmfd, char *connector_name);
>  bool igt_is_fec_supported(int drmfd, char *connector_name);
> @@ -19,5 +20,9 @@ bool igt_is_dsc_ycbcr420_supported(int drmfd, char
> *connector_name);
>  bool igt_is_force_dsc_ycbcr420_enabled(int drmfd, char
> *connector_name);
>  int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
>  int igt_get_dsc_ycbcr420_debugfs_fd(int drmfd, char
> *connector_name);
> +int igt_get_dsc_fractional_bpp_supported(int drmfd, char
> *connector_name);
> +bool igt_is_force_dsc_fractional_bpp_enabled(int drmfd, char
> *connector_name);
> +int igt_force_dsc_fractional_bpp_enable(int drmfd, char
> *connector_name);
> +int igt_get_dsc_fractional_bpp_debugfs_fd(int drmfd, char
> *connector_name);
>  
>  #endif


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

* Re: [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  2023-01-13  8:17   ` Hogander, Jouni
@ 2023-01-18 16:36     ` Swati Sharma
  2023-01-20 11:02       ` Hogander, Jouni
  0 siblings, 1 reply; 19+ messages in thread
From: Swati Sharma @ 2023-01-18 16:36 UTC (permalink / raw)
  To: Hogander, Jouni, igt-dev



On 13-Jan-23 1:47 PM, Hogander, Jouni wrote:
>> + * Returns: 1 on success or negative error code, in case of failure.
> 0 is usually success, < 0 is error. This is also in coding style
> document. I see igt_force_dsc_enable is also using 1. Maybe you should
> fix that as well in a separate patch.
>   
This ret value is returned from igt_sysfs_write() which returns the 
number of bytes written, or -errno on error.

I guess we can't change this.

-- 
~Swati Sharma

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

* Re: [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  2023-01-18 16:36     ` Swati Sharma
@ 2023-01-20 11:02       ` Hogander, Jouni
  2023-01-21  5:28         ` Swati Sharma
  0 siblings, 1 reply; 19+ messages in thread
From: Hogander, Jouni @ 2023-01-20 11:02 UTC (permalink / raw)
  To: igt-dev, Sharma, Swati2

On Wed, 2023-01-18 at 22:06 +0530, Swati Sharma wrote:
> 
> 
> On 13-Jan-23 1:47 PM, Hogander, Jouni wrote:
> > > + * Returns: 1 on success or negative error code, in case of
> > > failure.
> > 0 is usually success, < 0 is error. This is also in coding style
> > document. I see igt_force_dsc_enable is also using 1. Maybe you
> > should
> > fix that as well in a separate patch.
> >   
> This ret value is returned from igt_sysfs_write() which returns the 
> number of bytes written, or -errno on error.
> 
> I guess we can't change this.
> 

No, igt_sysfs_write is logical. It returns bytes written or < 0 on
error. What you could do is to check ret value of igt_sysfs_write and
return 0 if igt_sysfs_write succeeded.

BR,

Jouni Högander


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

* Re: [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry
  2023-01-20 11:02       ` Hogander, Jouni
@ 2023-01-21  5:28         ` Swati Sharma
  0 siblings, 0 replies; 19+ messages in thread
From: Swati Sharma @ 2023-01-21  5:28 UTC (permalink / raw)
  To: Hogander, Jouni, igt-dev

On 20-Jan-23 4:32 PM, Hogander, Jouni wrote:
> On Wed, 2023-01-18 at 22:06 +0530, Swati Sharma wrote:
>>
>>
>> On 13-Jan-23 1:47 PM, Hogander, Jouni wrote:
>>>> + * Returns: 1 on success or negative error code, in case of
>>>> failure.
>>> 0 is usually success, < 0 is error. This is also in coding style
>>> document. I see igt_force_dsc_enable is also using 1. Maybe you
>>> should
>>> fix that as well in a separate patch.
>>>    
>> This ret value is returned from igt_sysfs_write() which returns the
>> number of bytes written, or -errno on error.
>>
>> I guess we can't change this.
>>
> 
> No, igt_sysfs_write is logical. It returns bytes written or < 0 on
> error. What you could do is to check ret value of igt_sysfs_write and
> return 0 if igt_sysfs_write succeeded.

ohh, okay got it.
Will make those changes. Thanks!

> 
> BR,
> 
> Jouni Högander
> 

-- 
~Swati Sharma

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

end of thread, other threads:[~2023-01-21  5:28 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12  7:35 [igt-dev] [PATCH i-g-t v4 0/8] VDSC YCbCr420 + Fractional BPP Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 1/8] lib/dsc: Move VDSC functions to separate lib file Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 2/8] Move wrapper functions from kms_dsc to kms_dsc_helper Swati Sharma
2023-01-13  7:55   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 3/8] lib/dsc: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
2023-01-13  8:17   ` Hogander, Jouni
2023-01-18 16:36     ` Swati Sharma
2023-01-20 11:02       ` Hogander, Jouni
2023-01-21  5:28         ` Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 4/8] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 5/8] tests/i915/kms_dsc: Enable validation " Swati Sharma
2023-01-13  8:29   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 6/8] lib/dsc: Add helpers for VDSC Fractional BPP debugfs entry Swati Sharma
2023-01-13  8:31   ` Hogander, Jouni
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 7/8] tests/i915/kms_dsc: Enable validation for VDSC Fractional BPP Swati Sharma
2023-01-12  7:35 ` [igt-dev] [PATCH i-g-t v4 8/8] tests/i915/kms_dsc: Add test summary Swati Sharma
2023-01-12  8:51 ` [igt-dev] ✗ GitLab.Pipeline: warning for VDSC YCbCr420 + Fractional BPP (rev3) Patchwork
2023-01-12 14:56 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-01-12 17:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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.