* [igt-dev] [PATCH i-g-t 0/3] VDSC YCbCr420
@ 2022-10-31 18:16 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
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Swati Sharma @ 2022-10-31 18:16 UTC (permalink / raw)
To: igt-dev
Extend validation support for VDSC YCbCr420.
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 | 219 ++++++++++++++++++++++++++++++++-----------
3 files changed, 237 insertions(+), 56 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [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
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ 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] 7+ messages in thread
* [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420
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
@ 2022-10-31 18:16 ` Swati Sharma
2022-11-07 12:55 ` Nautiyal, Ankit K
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
2022-10-31 19:32 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
3 siblings, 1 reply; 7+ messages in thread
From: Swati Sharma @ 2022-10-31 18:16 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 | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index 330fc050..b162f93d 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, int flag)
{
bool enabled;
igt_plane_t *primary;
@@ -290,7 +292,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
}
static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
- unsigned int plane_format)
+ unsigned int plane_format, int flag)
{
igt_display_t *display = &data->display;
igt_output_t *output;
@@ -320,10 +322,16 @@ 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, flag);
}
}
+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, 0);
+}
+
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] 7+ messages in thread
* [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
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
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
@ 2022-10-31 18:16 ` Swati Sharma
2022-11-07 12:54 ` Nautiyal, Ankit K
2022-10-31 19:32 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
3 siblings, 1 reply; 7+ messages in thread
From: Swati Sharma @ 2022-10-31 18:16 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.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/i915/kms_dsc.c | 190 +++++++++++++++++++++++++++++++++----------
1 file changed, 146 insertions(+), 44 deletions(-)
diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
index b162f93d..5e0f4c61 100644
--- a/tests/i915/kms_dsc.c
+++ b/tests/i915/kms_dsc.c
@@ -66,7 +66,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 +110,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 +143,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 +185,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 +219,29 @@ static bool check_dsc_on_connector(data_t *data)
return true;
}
+static bool check_dsc_ycbcr420_on_connector(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;
+}
+
+/* YCbCr420 DSC is supported on disp ver 14+ */
+static bool check_ycbcr420_constraint(data_t *data, int flag)
+{
+ if (data->disp_ver >= 14 && flag)
+ return check_dsc_ycbcr420_on_connector(data);
+ else
+ return true;
+}
+
+
static bool check_big_joiner_pipe_constraint(data_t *data)
{
igt_output_t *output = data->output;
@@ -226,69 +301,90 @@ static void test_cleanup(data_t *data)
static void update_display(data_t *data, enum dsc_test_type test_type,
unsigned int plane_format, int flag)
{
+ 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 (flag) {
+ 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 (flag)
+ 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 != -EINVAL) {
+ igt_display_commit(display);
+ test_complete = true;
+ }
- restore_force_dsc_en();
- igt_debug("Reset compression BPC\n");
- data->input_bpc = 0;
- force_dsc_enable_bpc(data);
+ /*
+ * 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 (flag)
+ 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,
@@ -307,6 +403,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
if (!check_dsc_on_connector(data))
continue;
+ if (!check_ycbcr420_constraint(data, flag))
+ continue;
+
if (!check_gen11_dp_constraint(data))
continue;
@@ -330,6 +429,9 @@ 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, 0);
+
+ if (data->disp_ver >= 14)
+ test_dsc(data, test_type, bpc, plane_format, 1);
}
igt_main
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for VDSC YCbCr420
2022-10-31 18:16 [igt-dev] [PATCH i-g-t 0/3] VDSC YCbCr420 Swati Sharma
` (2 preceding siblings ...)
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
@ 2022-10-31 19:32 ` Patchwork
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2022-10-31 19:32 UTC (permalink / raw)
To: Swati Sharma; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 8527 bytes --]
== Series Details ==
Series: VDSC YCbCr420
URL : https://patchwork.freedesktop.org/series/110336/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12325 -> IGTPW_8019
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8019 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_8019, 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_8019/index.html
Participating hosts (40 -> 29)
------------------------------
Additional (2): fi-kbl-soraka fi-rkl-11600
Missing (13): fi-cml-u2 bat-dg2-8 bat-adlm-1 bat-dg2-9 bat-adlp-6 bat-adlp-4 fi-hsw-4770 bat-adln-1 bat-rplp-1 bat-rpls-1 bat-rpls-2 bat-dg2-11 bat-jsl-1
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8019:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@gem_contexts:
- fi-kbl-soraka: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@i915_selftest@live@gem_contexts.html
Known issues
------------
Here are the changes found in IGTPW_8019 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_gttfill@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][2] ([fdo#109271]) +8 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@gem_exec_gttfill@basic.html
* igt@gem_huc_copy@huc-copy:
- fi-rkl-11600: NOTRUN -> [SKIP][3] ([i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@gem_huc_copy@huc-copy.html
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#4613]) +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@gem_lmem_swapping@parallel-random-engines:
- fi-rkl-11600: NOTRUN -> [SKIP][6] ([i915#4613]) +3 similar issues
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@gem_tiled_pread_basic:
- fi-rkl-11600: NOTRUN -> [SKIP][7] ([i915#3282])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@gem_tiled_pread_basic.html
* igt@i915_pm_backlight@basic-brightness:
- fi-rkl-11600: NOTRUN -> [SKIP][8] ([i915#3012])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@i915_pm_backlight@basic-brightness.html
* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][9] ([i915#5334])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][10] ([i915#1886])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_suspend@basic-s3-without-i915:
- fi-rkl-11600: NOTRUN -> [INCOMPLETE][11] ([i915#4817])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@i915_suspend@basic-s3-without-i915.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-rkl-11600: NOTRUN -> [SKIP][12] ([fdo#111827]) +7 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@kms_chamelium@hdmi-hpd-fast.html
- fi-kbl-soraka: NOTRUN -> [SKIP][13] ([fdo#109271] / [fdo#111827]) +7 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-kbl-soraka/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor:
- fi-rkl-11600: NOTRUN -> [SKIP][14] ([i915#4103])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/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][15] ([fdo#109285] / [i915#4098])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@kms_force_connector_basic@force-load-detect.html
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-edp-1:
- fi-icl-u2: [PASS][16] -> [DMESG-WARN][17] ([i915#4890])
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12325/fi-icl-u2/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-edp-1.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-icl-u2/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-edp-1.html
* igt@kms_psr@sprite_plane_onoff:
- fi-rkl-11600: NOTRUN -> [SKIP][18] ([i915#1072]) +3 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@kms_psr@sprite_plane_onoff.html
* igt@kms_setmode@basic-clone-single-crtc:
- fi-rkl-11600: NOTRUN -> [SKIP][19] ([i915#3555] / [i915#4098])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@kms_setmode@basic-clone-single-crtc.html
* igt@prime_vgem@basic-read:
- fi-rkl-11600: NOTRUN -> [SKIP][20] ([fdo#109295] / [i915#3291] / [i915#3708]) +2 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@prime_vgem@basic-read.html
* igt@prime_vgem@basic-userptr:
- fi-rkl-11600: NOTRUN -> [SKIP][21] ([fdo#109295] / [i915#3301] / [i915#3708])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-rkl-11600/igt@prime_vgem@basic-userptr.html
* igt@runner@aborted:
- fi-icl-u2: NOTRUN -> [FAIL][22] ([i915#4312])
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-icl-u2/igt@runner@aborted.html
#### Possible fixes ####
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-kefka: [FAIL][23] ([i915#6298]) -> [PASS][24]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12325/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/fi-bsw-kefka/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[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
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[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#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
[i915#4890]: https://gitlab.freedesktop.org/drm/intel/issues/4890
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7032 -> IGTPW_8019
CI-20190529: 20190529
CI_DRM_12325: 1a90222aa5e5bb86ffcbde5ba9611659a23f0df6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8019: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/index.html
IGT_7032: 372c56225e12578a7a4a6bcc5b79eb40b643fcde @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8019/index.html
[-- Attachment #2: Type: text/html, Size: 10260 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation for VDSC YCbCr420
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
@ 2022-11-07 12:54 ` Nautiyal, Ankit K
0 siblings, 0 replies; 7+ messages in thread
From: Nautiyal, Ankit K @ 2022-11-07 12:54 UTC (permalink / raw)
To: Swati Sharma, igt-dev
Hi Swati,
The approach looks fine, but the way to loop through all modes and
try-commit seems wrong.
Please find few comments inline:
On 10/31/2022 11:46 PM, 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.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/i915/kms_dsc.c | 190 +++++++++++++++++++++++++++++++++----------
> 1 file changed, 146 insertions(+), 44 deletions(-)
>
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index b162f93d..5e0f4c61 100644
> --- a/tests/i915/kms_dsc.c
> +++ b/tests/i915/kms_dsc.c
> @@ -66,7 +66,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 +110,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 +143,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 +185,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 +219,29 @@ static bool check_dsc_on_connector(data_t *data)
> return true;
> }
>
> +static bool check_dsc_ycbcr420_on_connector(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;
> +}
> +
> +/* YCbCr420 DSC is supported on disp ver 14+ */
> +static bool check_ycbcr420_constraint(data_t *data, int flag)
> +{
> + if (data->disp_ver >= 14 && flag)
> + return check_dsc_ycbcr420_on_connector(data);
> + else
> + return true;
> +}
> +
> +
> static bool check_big_joiner_pipe_constraint(data_t *data)
> {
> igt_output_t *output = data->output;
> @@ -226,69 +301,90 @@ static void test_cleanup(data_t *data)
> static void update_display(data_t *data, enum dsc_test_type test_type,
> unsigned int plane_format, int flag)
> {
> + 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) {
This loop only makes sense for the case where we are trying to check DSC
with YCBCR420 for every mode.
For the regular case, if the try-commit fails with highest mode for some
reason, it will keep on looping because test_complete will never become
true.
> + /* 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 (flag) {
> + 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 (flag)
> + 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 != -EINVAL) {
> + igt_display_commit(display);
> + test_complete = true;
> + }
>
> - restore_force_dsc_en();
> - igt_debug("Reset compression BPC\n");
> - data->input_bpc = 0;
> - force_dsc_enable_bpc(data);
> + /*
> + * 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 (flag)
> + 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));
This will fail when the try-commit fails, as enabled will be false. May
be check for DSC enabled only when test_complete is true.
Also after the loop, assert for test_complete, if it fails, then the
test fails.
>
> - test_cleanup(data);
> + test_cleanup(data);
> + }
> }
>
> static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
> @@ -307,6 +403,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
> if (!check_dsc_on_connector(data))
> continue;
>
> + if (!check_ycbcr420_constraint(data, flag))
> + continue;
> +
> if (!check_gen11_dp_constraint(data))
> continue;
>
> @@ -330,6 +429,9 @@ 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, 0);
> +
> + if (data->disp_ver >= 14)
> + test_dsc(data, test_type, bpc, plane_format, 1);
The flag should be set, when we know that DSC YCBCR420 is supported by
source and sink.
Instead of check_ycbcr420_constraint, use is_dsc_ycbcr420_supported, and
call the test_dsc with
the dsc_ycbcr420 flag set.
Regards,
Ankit
> }
>
> igt_main
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
@ 2022-11-07 12:55 ` Nautiyal, Ankit K
0 siblings, 0 replies; 7+ messages in thread
From: Nautiyal, Ankit K @ 2022-11-07 12:55 UTC (permalink / raw)
To: Swati Sharma, igt-dev
Hi Swati,
Please find the comments inline:
On 10/31/2022 11:46 PM, Swati Sharma wrote:
> Functions are modified to accommodate changes for VDSC YCbCr420.
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/i915/kms_dsc.c | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)
>
> diff --git a/tests/i915/kms_dsc.c b/tests/i915/kms_dsc.c
> index 330fc050..b162f93d 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, int flag)
Flag here doesnt seem to have any meaning here. Perhaps use bool
test_dsc_ycbcr420.
IMHO, If source and sink both support ycbcr420 then call test_dsc with
the flag set.
Or otherwise define a u8 test_flag, with each bit representing some test
configuration like DSC+Ycbcr420, DSC+Fractional etc and other future
uses perhaps.
In that case too the bits of test flag should be set in run_test, based
on source+sink support.
Regards,
Ankit
> {
> bool enabled;
> igt_plane_t *primary;
> @@ -290,7 +292,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned
> }
>
> static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
> - unsigned int plane_format)
> + unsigned int plane_format, int flag)
> {
> igt_display_t *display = &data->display;
> igt_output_t *output;
> @@ -320,10 +322,16 @@ 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, flag);
> }
> }
>
> +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, 0);
> +}
> +
> 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);
> }
> }
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-07 12:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/i915/kms_dsc: Prep work for extending val support for VDSC YCbCr420 Swati Sharma
2022-11-07 12:55 ` Nautiyal, Ankit K
2022-10-31 18:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/i915/kms_dsc: Enable validation " Swati Sharma
2022-11-07 12:54 ` Nautiyal, Ankit K
2022-10-31 19:32 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox