* [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry
2022-10-31 18:16 [igt-dev] [PATCH i-g-t 0/3] VDSC YCbCr420 Swati Sharma
@ 2022-10-31 18:16 ` Swati Sharma
0 siblings, 0 replies; 6+ messages in thread
From: Swati Sharma @ 2022-10-31 18:16 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_kms.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++
lib/igt_kms.h | 7 ++++--
2 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 921a623d..cbe2c7e3 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5546,6 +5546,20 @@ bool check_dsc_debugfs(int drmfd, char *connector_name,
return strstr(buf, check_str);
}
+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);
+}
+
static
int write_dsc_debugfs(int drmfd, char *connector_name,
const char *file_name,
@@ -5577,6 +5591,18 @@ bool igt_is_dsc_supported(int drmfd, char *connector_name)
return check_dsc_debugfs(drmfd, connector_name, "DSC_Sink_Support: yes");
}
+/*
+ * 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_fec_supported:
* @drmfd: A drm file descriptor
@@ -5614,6 +5640,19 @@ bool igt_is_force_dsc_enabled(int drmfd, char *connector_name)
return check_dsc_debugfs(drmfd, connector_name, "Force_DSC_Enable: 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_enable:
* @drmfd: A drm file descriptor
@@ -5626,6 +5665,18 @@ 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_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_force_dsc_enable_bpc:
* @drmfd: A drm file descriptor
@@ -5659,6 +5710,22 @@ int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)
return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
}
+/*
+ * 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);
+}
+
/*
* igt_get_output_max_bpc:
* @drmfd: A drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index b09441d0..d5d5aa6c 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -973,13 +973,16 @@ 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_dsc_ycbcr420_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);
+bool igt_is_force_dsc_ycbcr420_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_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc);
+int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
+int igt_get_dsc_ycbcr420_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);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420
@ 2022-11-24 11:57 Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Swati Sharma @ 2022-11-24 11:57 UTC (permalink / raw)
To: igt-dev
Extend validation support for VDSC YCbCr420.
v2: -addressed review comments by Ankit on patch[1][2]
Swati Sharma (3):
lib/kms: 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/igt_kms.c | 67 ++++++++++++++
lib/igt_kms.h | 7 +-
tests/i915/kms_dsc.c | 216 ++++++++++++++++++++++++++++++++-----------
3 files changed, 234 insertions(+), 56 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry
2022-11-24 11:57 [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420 Swati Sharma
@ 2022-11-24 11:57 ` Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Swati Sharma @ 2022-11-24 11:57 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_kms.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++
lib/igt_kms.h | 7 ++++--
2 files changed, 72 insertions(+), 2 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index b4a98ae17..c7135790b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -5578,6 +5578,20 @@ bool check_dsc_debugfs(int drmfd, char *connector_name,
return strstr(buf, check_str);
}
+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);
+}
+
static
int write_dsc_debugfs(int drmfd, char *connector_name,
const char *file_name,
@@ -5609,6 +5623,18 @@ bool igt_is_dsc_supported(int drmfd, char *connector_name)
return check_dsc_debugfs(drmfd, connector_name, "DSC_Sink_Support: yes");
}
+/*
+ * 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_fec_supported:
* @drmfd: A drm file descriptor
@@ -5646,6 +5672,19 @@ bool igt_is_force_dsc_enabled(int drmfd, char *connector_name)
return check_dsc_debugfs(drmfd, connector_name, "Force_DSC_Enable: 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_enable:
* @drmfd: A drm file descriptor
@@ -5658,6 +5697,18 @@ 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_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_force_dsc_enable_bpc:
* @drmfd: A drm file descriptor
@@ -5691,6 +5742,22 @@ int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)
return openat(igt_debugfs_dir(drmfd), file_name, O_WRONLY);
}
+/*
+ * 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);
+}
+
/*
* igt_get_output_max_bpc:
* @drmfd: A drm file descriptor
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 7a00d2045..ccd8adf2c 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -976,13 +976,16 @@ 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_dsc_ycbcr420_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);
+bool igt_is_force_dsc_ycbcr420_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_force_dsc_enable_bpc(int drmfd, char *connector_name, int bpc);
+int igt_force_dsc_ycbcr420_enable(int drmfd, char *connector_name);
int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name);
+int igt_get_dsc_ycbcr420_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);
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t v2 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420
2022-11-24 11:57 [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420 Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
@ 2022-11-24 11:57 ` Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
2022-11-24 14:21 ` [igt-dev] ✓ Fi.CI.BAT: success for VDSC YCbCr420 (rev2) Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Swati Sharma @ 2022-11-24 11:57 UTC (permalink / raw)
To: igt-dev
Functions are modified to accommodate changes for VDSC YCbCr420.
v2: -Removed flag (Ankit)
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/i915/kms_dsc.c | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 330fc050b..6fef764de 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -61,6 +61,7 @@ typedef struct {
igt_output_t *output;
int input_bpc;
int n_pipes;
+ int disp_ver;
enum pipe pipe;
} data_t;
@@ -91,7 +92,7 @@ static void force_dsc_enable(data_t *data)
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");
+ igt_assert_f(ret > 0, "forcing dsc enable debugfs_write failed\n");
}
static void force_dsc_enable_bpc(data_t *data)
@@ -103,7 +104,7 @@ static void force_dsc_enable_bpc(data_t *data)
ret = igt_force_dsc_enable_bpc(data->drm_fd,
data->output->name,
data->input_bpc);
- igt_assert_f(ret > 0, "debugfs_write failed");
+ igt_assert_f(ret > 0, "forcing input dsc bpc debugfs_write failed\n");
}
static void save_force_dsc_en(data_t *data)
@@ -222,7 +223,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;
@@ -324,6 +326,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 = {};
@@ -332,11 +340,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++;
@@ -346,14 +355,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 "
@@ -361,7 +370,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 "
@@ -370,7 +379,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);
}
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t v2 3/3] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
2022-11-24 11:57 [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420 Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
@ 2022-11-24 11:57 ` Swati Sharma
2022-11-24 14:21 ` [igt-dev] ✓ Fi.CI.BAT: success for VDSC YCbCr420 (rev2) Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Swati Sharma @ 2022-11-24 11:57 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)
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/i915/kms_dsc.c | 195 ++++++++++++++++++++++++++++++++-----------
1 file changed, 147 insertions(+), 48 deletions(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 6fef764de..6a3eecdb4 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -53,6 +53,11 @@ enum dsc_test_type {
TEST_DSC_BPC
};
+enum dsc_output_format {
+ DSC_FORMAT_RGB444,
+ DSC_FORMAT_YCBCR420
+};
+
typedef struct {
int drm_fd;
uint32_t devid;
@@ -66,7 +71,10 @@ typedef struct {
} data_t;
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 int count = 0;
const struct {
const int format;
@@ -107,6 +115,16 @@ static void force_dsc_enable_bpc(data_t *data)
igt_assert_f(ret > 0, "forcing input dsc bpc debugfs_write failed\n");
}
+static void force_dsc_ycbcr420_enable(data_t *data)
+{
+ int ret;
+
+ igt_debug("Forcing DSC YCbCr420 on %s\n", data->output->name);
+ ret = igt_force_dsc_ycbcr420_enable(data->drm_fd,
+ data->output->name);
+ igt_assert_f(ret > 0, "forcing dsc ycbcr420 debugfs_write failed\n");
+}
+
static void save_force_dsc_en(data_t *data)
{
force_dsc_en_orig =
@@ -130,9 +148,34 @@ static void restore_force_dsc_en(void)
force_dsc_restore_fd = -1;
}
+static void save_force_dsc_ycbcr420_en(data_t *data)
+{
+ force_dsc_ycbcr420_en_orig =
+ igt_is_force_dsc_ycbcr420_enabled(data->drm_fd,
+ data->output->name);
+ force_dsc_ycbcr420_restore_fd =
+ igt_get_dsc_ycbcr420_debugfs_fd(data->drm_fd,
+ data->output->name);
+ igt_assert(force_dsc_ycbcr420_restore_fd >= 0);
+}
+
+static 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;
+}
+
+
static void kms_dsc_exit_handler(int sig)
{
restore_force_dsc_en();
+ restore_force_dsc_ycbcr420_en();
}
static drmModeModeInfo *get_highres_mode(igt_output_t *output)
@@ -147,6 +190,20 @@ static drmModeModeInfo *get_highres_mode(igt_output_t *output)
return highest_mode;
}
+static drmModeModeInfo *get_next_mode(igt_output_t *output)
+{
+ drmModeConnector *connector = output->config.connector;
+ drmModeModeInfo *next_mode = NULL;
+
+ for (int i = count; i < connector->count_modes; i++) {
+ next_mode = &connector->modes[i];
+ count ++;
+ break;
+ }
+
+ return next_mode;
+}
+
static bool check_dsc_on_connector(data_t *data)
{
igt_output_t *output = data->output;
@@ -167,6 +224,19 @@ static bool check_dsc_on_connector(data_t *data)
return true;
}
+static bool is_dsc_ycbcr420_supported(data_t *data)
+{
+ igt_output_t *output = data->output;
+
+ if (!igt_is_dsc_ycbcr420_supported(data->drm_fd, output->name)) {
+ igt_debug("DSC YCbCr420 not supported on connector %s\n",
+ output->name);
+ return false;
+ }
+
+ return true;
+}
+
static bool check_big_joiner_pipe_constraint(data_t *data)
{
igt_output_t *output = data->output;
@@ -224,75 +294,100 @@ 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;
igt_plane_t *primary;
drmModeModeInfo *mode;
+ bool test_complete = false;
igt_output_t *output = data->output;
igt_display_t *display = &data->display;
- /* sanitize the state before starting the subtest */
- igt_display_reset(display);
- igt_display_commit(display);
+ count = 0;
+ while (!test_complete) {
+ /* sanitize the state before starting the subtest */
+ igt_display_reset(display);
+ igt_display_commit(display);
- igt_debug("DSC is supported on %s\n", data->output->name);
- save_force_dsc_en(data);
- force_dsc_enable(data);
+ igt_debug("DSC is supported on %s\n", data->output->name);
+ save_force_dsc_en(data);
+ force_dsc_enable(data);
- if (test_type == TEST_DSC_BPC) {
- igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
- force_dsc_enable_bpc(data);
- }
+ if (output_format == DSC_FORMAT_YCBCR420) {
+ igt_debug("DSC YCbCr420 is supported on %s\n", data->output->name);
+ save_force_dsc_ycbcr420_en(data);
+ force_dsc_ycbcr420_enable(data);
+ }
- igt_output_set_pipe(output, data->pipe);
+ if (test_type == TEST_DSC_BPC) {
+ igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
+ force_dsc_enable_bpc(data);
+ }
- mode = get_highres_mode(output);
- igt_require(mode != NULL);
- igt_output_override_mode(output, mode);
+ igt_output_set_pipe(output, data->pipe);
- primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+ if (output_format == DSC_FORMAT_YCBCR420)
+ mode = get_next_mode(output);
+ else
+ mode = get_highres_mode(output);
- igt_skip_on(!igt_plane_has_format_mod(primary, plane_format,
- DRM_FORMAT_MOD_LINEAR));
+ 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);
+ primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
- igt_plane_set_fb(primary, &data->fb_test_pattern);
- igt_display_commit(display);
+ igt_skip_on(!igt_plane_has_format_mod(primary, plane_format,
+ DRM_FORMAT_MOD_LINEAR));
- /* until we have CRC check support, manually check if RGB test
- * pattern has no corruption.
- */
- manual("RGB test pattern without corruption");
+ igt_create_pattern_fb(data->drm_fd,
+ mode->hdisplay,
+ mode->vdisplay,
+ plane_format,
+ DRM_FORMAT_MOD_LINEAR,
+ &data->fb_test_pattern);
- enabled = igt_is_dsc_enabled(data->drm_fd, output->name);
- igt_info("Current mode is: %dx%d @%dHz -- DSC is: %s\n",
- mode->hdisplay,
- mode->vdisplay,
- mode->vrefresh,
- enabled ? "ON" : "OFF");
+ igt_plane_set_fb(primary, &data->fb_test_pattern);
+ ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+ if (ret == 0) {
+ igt_display_commit(display);
+ test_complete = true;
+ } else if (output_format == DSC_FORMAT_YCBCR420) {
+ continue;
+ }
- restore_force_dsc_en();
- igt_debug("Reset compression BPC\n");
- data->input_bpc = 0;
- force_dsc_enable_bpc(data);
+ 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");
+
+ enabled = igt_is_dsc_enabled(data->drm_fd, output->name);
+ igt_info("Current mode is: %dx%d @%dHz -- DSC is: %s\n",
+ mode->hdisplay,
+ mode->vdisplay,
+ mode->vrefresh,
+ enabled ? "ON" : "OFF");
+
+ restore_force_dsc_en();
+ if (output_format == DSC_FORMAT_YCBCR420)
+ restore_force_dsc_ycbcr420_en();
+ igt_debug("Reset compression BPC\n");
+ data->input_bpc = 0;
+ force_dsc_enable_bpc(data);
- igt_assert_f(enabled,
- "Default DSC enable failed on connector: %s pipe: %s\n",
- output->name,
- kmstest_pipe_name(data->pipe));
+ igt_assert_f(enabled,
+ "Default DSC enable failed on connector: %s pipe: %s\n",
+ output->name,
+ kmstest_pipe_name(data->pipe));
- test_cleanup(data);
+ test_cleanup(data);
+ }
}
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;
@@ -322,14 +417,18 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
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);
+ 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)))
+ test_dsc(data, test_type, bpc, plane_format, DSC_FORMAT_YCBCR420);
}
igt_main
--
2.25.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for VDSC YCbCr420 (rev2)
2022-11-24 11:57 [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420 Swati Sharma
` (2 preceding siblings ...)
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
@ 2022-11-24 14:21 ` Patchwork
3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2022-11-24 14:21 UTC (permalink / raw)
To: Swati Sharma; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 8283 bytes --]
== Series Details ==
Series: VDSC YCbCr420 (rev2)
URL : https://patchwork.freedesktop.org/series/110336/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12432 -> IGTPW_8150
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/index.html
Participating hosts (36 -> 37)
------------------------------
Additional (2): fi-tgl-dsi bat-dg1-6
Missing (1): fi-ctg-p8600
Known issues
------------
Here are the changes found in IGTPW_8150 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_mmap@basic:
- bat-dg1-6: NOTRUN -> [SKIP][1] ([i915#4083])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@gem_mmap@basic.html
* igt@gem_render_tiled_blits@basic:
- bat-dg1-6: NOTRUN -> [SKIP][2] ([i915#4079]) +1 similar issue
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@gem_render_tiled_blits@basic.html
* igt@gem_tiled_fence_blits@basic:
- bat-dg1-6: NOTRUN -> [SKIP][3] ([i915#4077]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@gem_tiled_fence_blits@basic.html
* igt@i915_pm_backlight@basic-brightness:
- bat-dg1-6: NOTRUN -> [SKIP][4] ([i915#7561])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@i915_pm_backlight@basic-brightness.html
* igt@i915_pm_rps@basic-api:
- bat-dg1-6: NOTRUN -> [SKIP][5] ([i915#6621])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@i915_pm_rps@basic-api.html
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg1-6: NOTRUN -> [SKIP][6] ([i915#4215])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_addfb_basic@basic-y-tiled-legacy.html
* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg1-6: NOTRUN -> [SKIP][7] ([i915#4212]) +7 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_addfb_basic@tile-pitch-mismatch.html
* igt@kms_chamelium@hdmi-crc-fast:
- bat-dg1-6: NOTRUN -> [SKIP][8] ([fdo#111827]) +8 similar issues
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_chamelium@hdmi-crc-fast.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- bat-dg1-6: NOTRUN -> [SKIP][9] ([i915#4103] / [i915#4213])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_cursor_legacy@basic-busy-flip-before-cursor.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [PASS][10] -> [FAIL][11] ([i915#6298])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12432/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
* igt@kms_force_connector_basic@force-load-detect:
- bat-dg1-6: NOTRUN -> [SKIP][12] ([fdo#109285])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_psr@sprite_plane_onoff:
- bat-dg1-6: NOTRUN -> [SKIP][13] ([i915#1072] / [i915#4078]) +3 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg1-6: NOTRUN -> [SKIP][14] ([i915#3555])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-gtt:
- bat-dg1-6: NOTRUN -> [SKIP][15] ([i915#3708] / [i915#4077]) +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@prime_vgem@basic-gtt.html
* igt@prime_vgem@basic-read:
- bat-dg1-6: NOTRUN -> [SKIP][16] ([i915#3708]) +3 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@prime_vgem@basic-read.html
* igt@prime_vgem@basic-userptr:
- bat-dg1-6: NOTRUN -> [SKIP][17] ([i915#3708] / [i915#4873])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-dg1-6/igt@prime_vgem@basic-userptr.html
#### Possible fixes ####
* igt@i915_selftest@live@gt_lrc:
- {bat-adln-1}: [INCOMPLETE][18] ([i915#4983]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12432/bat-adln-1/igt@i915_selftest@live@gt_lrc.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/bat-adln-1/igt@i915_selftest@live@gt_lrc.html
#### Warnings ####
* igt@gem_exec_gttfill@basic:
- fi-pnv-d510: [SKIP][20] ([fdo#109271]) -> [FAIL][21] ([i915#7229])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12432/fi-pnv-d510/igt@gem_exec_gttfill@basic.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/fi-pnv-d510/igt@gem_exec_gttfill@basic.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#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[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#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#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4873]: https://gitlab.freedesktop.org/drm/intel/issues/4873
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6434]: https://gitlab.freedesktop.org/drm/intel/issues/6434
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6856]: https://gitlab.freedesktop.org/drm/intel/issues/6856
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7125]: https://gitlab.freedesktop.org/drm/intel/issues/7125
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7346]: https://gitlab.freedesktop.org/drm/intel/issues/7346
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7072 -> IGTPW_8150
CI-20190529: 20190529
CI_DRM_12432: 751dd27d6cc6adea727c784d7b50bf517e91c026 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8150: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/index.html
IGT_7072: 69ba7163475925cdc69aebbdfa0e87453ae165c7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8150/index.html
[-- Attachment #2: Type: text/html, Size: 8440 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-24 14:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 11:57 [igt-dev] [PATCH i-g-t v2 0/3] VDSC YCbCr420 Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
2022-11-24 11:57 ` [igt-dev] [PATCH i-g-t v2 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
2022-11-24 14:21 ` [igt-dev] ✓ Fi.CI.BAT: success for VDSC YCbCr420 (rev2) Patchwork
-- strict thread matches above, loose matches on Subject: below --
2022-10-31 18:16 [igt-dev] [PATCH i-g-t 0/3] VDSC YCbCr420 Swati Sharma
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 1/3] lib/kms: Add helpers for VDSC YCbCr420 debugfs entry Swati Sharma
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox