Enable VDSC output formats validation
cover Enable VDSC output formats validation
This series is split from
https://patchwork.freedesktop.org/series/111342/
Initial dsc lib related changes got merged. Received review comments on driver debugfs YCBCR420 changes, to make debugfs entry generic so that all supported output formats can be validated.
In this series, review comments from above PW are addressed. Along, with that changes are done to make test generic to validate all supported dsc formats.
Swati Sharma (5):
lib/dsc: Fix return value
tests/i915/kms_dsc: Add plane_format as struct data_t member tests/i915/kms_dsc: Remove pointless struct lib/dsc: Add helpers for VDSC output format debugfs entry tests/i915/kms_dsc: Enable validation for VDSC output formats
lib/igt_dsc.c | 61 ++++++++++++++++- lib/igt_dsc.h | 5 ++ lib/igt_kms.c | 20 ++++++ lib/igt_kms.h | 9 +++ tests/i915/kms_dsc.c | 126 ++++++++++++++++++++++++++---------- tests/i915/kms_dsc_helper.c | 40 +++++++++++- tests/i915/kms_dsc_helper.h | 4 ++ 7 files changed, 226 insertions(+), 39 deletions(-)
Signature · 1 line
2.25.1
PATCH 1/5 lib/dsc: Fix return value
0 is usually success, < 0 is error. Fix this.
--- lib/igt_dsc.c | 7 +++++-- tests/i915/kms_dsc_helper.c | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-)
lib/igt_dsc.c +5 -2
@@ -35,6 +35,9 @@ static int write_dsc_debugfs(int drmfd, char *connector_name, const char *file_nclose (debugfs_fd); +if (ret >0 ) +return 0 ; +return ret; }
@@ -92,7 +95,7 @@ bool igt_is_force_dsc_enabled(int drmfd, char *connector_name)* @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. +* Returns: 0 on success or negative error code, in case of failure. */ int igt_force_dsc_enable (int drmfd,char *connector_name) {
@@ -105,7 +108,7 @@ int igt_force_dsc_enable(int drmfd, char *connector_name)* @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. +* Returns: 0 on success or negative error code, in case of failure. */ int igt_force_dsc_enable_bpc (int drmfd,char *connector_name,int bpc) {
tests/i915/kms_dsc_helper.c +2 -2
@@ -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 ,"forcing dsc enable debugfs_write failed\n" ); +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 ,"forcing input dsc bpc debugfs_write failed\n" ); +igt_assert_f (ret ==0 ,"forcing input dsc bpc debugfs_write failed\n" ); }void save_force_dsc_en (int drmfd,igt_output_t *output)
Signature · 1 line
2.25.1
PATCH 2/5 tests/i915/kms_dsc: Add plane_format as struct data_t member
In reply to Swati Sharmaplane_format is added as struct data_t member. Also, corresponding changes are done to accommodate this change.
--- tests/i915/kms_dsc.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
tests/i915/kms_dsc.c +8 -6
@@ -44,6 +44,7 @@ typedef struct {uint32_t devid;igt_display_t display;struct igt_fb fb_test_pattern; +unsigned int plane_format;igt_output_t *output;int input_bpc;int n_pipes;
@@ -108,7 +109,7 @@ 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) {bool enabled;igt_plane_t *primary;
@@ -137,13 +138,13 @@ static void update_display(data_t *data, enum dsc_test_type test_type, unsigned primary =igt_output_get_plane_type (output,DRM_PLANE_TYPE_PRIMARY ); -igt_skip_on (!igt_plane_has_format_mod (primary, plane_format, +igt_skip_on (!igt_plane_has_format_mod (primary, data->plane_format,DRM_FORMAT_MOD_LINEAR ));igt_create_pattern_fb (data->drm_fd, mode->hdisplay, mode->vdisplay, - plane_format, + data->plane_format,DRM_FORMAT_MOD_LINEAR , &data->fb_test_pattern);
@@ -184,6 +185,7 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,enum pipe pipe;for_each_pipe_with_valid_output (display, pipe, output) { + data->plane_format = plane_format; data->input_bpc = bpc; data->output = output; data->pipe = pipe;
@@ -201,12 +203,12 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,continue ;if (test_type ==TEST_DSC_BPC ) -snprintf (name,sizeof (name),"-%dbpc-%s" , data->input_bpc,igt_format_str (plane_format)); +snprintf (name,sizeof (name),"-%dbpc-%s" , data->input_bpc,igt_format_str (data->plane_format));else -snprintf (name,sizeof (name),"-%s" ,igt_format_str (plane_format)); +snprintf (name,sizeof (name),"-%s" ,igt_format_str (data->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); } }
Signature · 1 line
2.25.1
PATCH 3/5 tests/i915/kms_dsc: Remove pointless struct
In reply to Swati SharmaArray can be used for plane_format. Use that and remove struct.
--- tests/i915/kms_dsc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)
tests/i915/kms_dsc.c +3 -12
@@ -52,16 +52,7 @@ typedef struct {enum pipe pipe; } data_t; -const struct { -const int format; -const char format_str[20 ]; -} format_list[] = { - {DRM_FORMAT_XYUV8888 ,"XYUV8888" }, - {DRM_FORMAT_XRGB2101010 ,"XRGB2101010" }, - {DRM_FORMAT_XRGB16161616F ,"XRGB16161616F" }, - {DRM_FORMAT_YUYV ,"YUYV" }, -}; - +int format_list[] = {DRM_FORMAT_XYUV8888 ,DRM_FORMAT_XRGB2101010 ,DRM_FORMAT_XRGB16161616F ,DRM_FORMAT_YUYV };uint32_t bpc_list[] = {12 ,10 ,8 };static inline void manual (const char *expected)
@@ -242,7 +233,7 @@ igt_main "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); +test_dsc (&data,TEST_DSC_BASIC ,0 , format_list[k]); } igt_describe("Tests basic display stream compression functionality if supported "
@@ -259,7 +250,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); +test_dsc (&data,TEST_DSC_BPC , bpc_list[j], format_list[k]); } } }
Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_dsc: Remove pointless struct
Quoted 27 lines · Swati Sharma
Array can be used for
plane_format. Use that and remove struct.Signed-off-by Swati Sharma <[email protected]>---
tests/i915/kms_dsc.c | 15 +++------------1 file changed, 3 insertions(+), 12 deletions(-)tests/i915/kms_dsc.c +0
-0@@ -52,16 +52,7 @@ typedef struct { enum pipe pipe; } data_t;tests/i915/kms_dsc.c +1
-10-const struct { - const int format; - const char format_str[20]; -} format_list[] = { - {DRM_FORMAT_XYUV8888, "XYUV8888"}, - {DRM_FORMAT_XRGB2101010, "XRGB2101010"}, - {DRM_FORMAT_XRGB16161616F, "XRGB16161616F"}, - {DRM_FORMAT_YUYV, "YUYV"}, -}; - +int format_list[] = {DRM_FORMAT_XYUV8888, DRM_FORMAT_XRGB2101010,
Quoted 2 lines
DRM_FORMAT_XRGB16161616F,DRM_FORMAT_YUYV};
uint32_t bpc_list[] = {12, 10, 8};
I think format_list should be static. Not matter of this patch, but maybe you could change bpc_list as a static too.
Quoted 27 lines
static inline voidmanual(const char *expected)tests/i915/kms_dsc.c +0
-0@@ -242,7 +233,7 @@ igt_main"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);
+ test_dsc(&data,TEST_DSC_BASIC, 0, format_list[k]);
}
igt_describe("Tests basic display stream compression functionality if supported "tests/i915/kms_dsc.c +1
-1@@ -259,7 +250,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); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], format_list[k]);}
}
}
Re: [igt-dev] [PATCH i-g-t 3/5] tests/i915/kms_dsc: Remove pointless struct
Quoted 17 lines · Jouni
Quoted 16 lines · Swati Sharma
Array can be used for
plane_format. Use that and remove struct.Signed-off-by Swati Sharma <[email protected]>--- tests/i915/kms_dsc.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-)tests/i915/kms_dsc.c +0
-0@@ -52,16 +52,7 @@ typedef struct { enum pipe pipe; } data_t;
Quoted 17 lines
tests/i915/kms_dsc.c typedef struct { · line 56
Quoted 13 lines
tests/i915/kms_dsc.c +1
-10-const struct { - const int format; - const char format_str[20]; -} format_list[] = { - {DRM_FORMAT_XYUV8888, "XYUV8888"}, - {DRM_FORMAT_XRGB2101010, "XRGB2101010"}, - {DRM_FORMAT_XRGB16161616F, "XRGB16161616F"}, - {DRM_FORMAT_YUYV, "YUYV"}, -}; - +int format_list[] = {DRM_FORMAT_XYUV8888, DRM_FORMAT_XRGB2101010,DRM_FORMAT_XRGB16161616F ,DRM_FORMAT_YUYV }; uint32_t bpc_list[] = {12, 10, 8};I think
format_listshould be static. Not matter of this patch, but maybe you could changebpc_listas a static too.
Right, will make that change.
Quoted 28 lines
Quoted 27 lines
tests/i915/kms_dsc.c +1
-1static inline void manual(const char *expected)@@ -242,7 +233,7 @@ igt_main "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); + test_dsc(&data, TEST_DSC_BASIC, 0, format_list[k]);}
igt_describe("Tests basic display stream compression
functionality if supported "tests/i915/kms_dsc.c +1
-1@@ -259,7 +250,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); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], format_list[k]);}
}
}
Signature · 1 line
~Swati Sharma
PATCH 4/5 lib/dsc: Add helpers for VDSC output format debugfs entry
In reply to Swati SharmaHelper functions are added for VDSC output format debugfs entry.
--- lib/igt_dsc.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ lib/igt_dsc.h | 5 +++++ lib/igt_kms.h | 8 ++++++++ 3 files changed, 67 insertions(+)
lib/igt_dsc.c +54 -0
@@ -134,3 +134,57 @@ int igt_get_dsc_debugfs_fd(int drmfd, char *connector_name)return openat (igt_debugfs_dir (drmfd), file_name,O_WRONLY ); } + +/* +* igt_is_dsc_output_format_supported_by_sink: +* @drmfd: A drm file descriptor +* @connector_name: Name of the libdrm connector we're going to use +* @output_format: Output format +* +* Returns: True if DSC output format is supported for the given connector, +* false otherwise. +*/ +bool igt_is_dsc_output_format_supported_by_sink (int drmfd,char *connector_name, +enum dsc_output_format output_format) +{ +const char *check_str ="OUTPUTFORMATNOTFOUND" ; + +switch (output_format) { +case DSC_FORMAT_DEFAULT : +return true; +case DSC_FORMAT_RGB : + check_str ="RGB: yes" ; +break ; +case DSC_FORMAT_YCBCR420 : + check_str ="YCBCR420: yes" ; +break ; +case DSC_FORMAT_YCBCR422 : + check_str ="YCBCR422: yes" ; +break ; +case DSC_FORMAT_YCBCR444 : + check_str ="YCBCR444: yes" ; +break ; +default : +break ; + } + +return check_dsc_debugfs (drmfd, connector_name, check_str); +} + +/* +* igt_force_dsc_output_format: +* @drmfd: A drm file descriptor +* @connector_name: Name of the libdrm connector we're going to use +* @output_format: Output format +* +* Returns: 0 on success or negative error code, in case of failure. +*/ +int igt_force_dsc_output_format (int drmfd,char *connector_name, +enum dsc_output_format output_format) +{ +char buf[20 ] = {0 }; + +sprintf (buf,"%d" , output_format); + +return write_dsc_debugfs (drmfd, connector_name,"i915_dsc_output_format" , buf); +}
lib/igt_dsc.h +5 -0
@@ -7,6 +7,7 @@#define IGT_DSC_H #include "igt_fb.h" +#include "igt_kms.h" bool igt_is_dsc_supported (int drmfd,char *connector_name);bool igt_is_fec_supported (int drmfd,char *connector_name);
@@ -15,5 +16,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_output_format_supported_by_sink (int drmfd,char *connector_name, +enum dsc_output_format output_format); +int igt_force_dsc_output_format (int drmfd,char *connector_name, +enum dsc_output_format output_format);#endif
lib/igt_kms.h +8 -0
@@ -106,6 +106,14 @@ enum igt_custom_edid_type {*/ #define kmstest_port_name (port) ((port) + 'A') +enum dsc_output_format { +DSC_FORMAT_DEFAULT , +DSC_FORMAT_RGB , +DSC_FORMAT_YCBCR420 , +DSC_FORMAT_YCBCR422 , +DSC_FORMAT_YCBCR444 +}; +const char *kmstest_encoder_type_str (int type);const char *kmstest_connector_status_str (int status);const char *kmstest_connector_type_str (int type);
Signature · 1 line
2.25.1
PATCH 5/5 tests/i915/kms_dsc: Enable validation for VDSC output formats
In reply to Swati SharmaExisting i-g-t is extended to enable validation for VDSC output formats. Output format is selected as per driver policy. For ex: 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 DSC output format, a debugfs entry is created to force this output format. However, before setting debugfs entry, we have checked capability i.e. output format is supported by both platform and sink.
Also, each mode doesn't support all output formats; so if both sink and platform support an output format, we will do a 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)
v5: -made generic test to validate all output formats (Jani N)
--- lib/igt_kms.c | 20 +++++++ lib/igt_kms.h | 1 + tests/i915/kms_dsc.c | 103 +++++++++++++++++++++++++++++------- tests/i915/kms_dsc_helper.c | 36 +++++++++++++ tests/i915/kms_dsc_helper.h | 4 ++ 5 files changed, 144 insertions(+), 20 deletions(-)
lib/igt_kms.c +20 -0
@@ -966,6 +966,26 @@ 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_DEFAULT ,"DEFAULT" }, + {DSC_FORMAT_RGB ,"RGB" }, + {DSC_FORMAT_YCBCR420 ,"YCBCR420" }, + {DSC_FORMAT_YCBCR422 ,"YCBCR422" }, + {DSC_FORMAT_YCBCR444 ,"YCBCR444" }, + {} +}; + +/** +* 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" },
lib/igt_kms.h +1 -0
@@ -118,6 +118,7 @@ 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
tests/i915/kms_dsc.c +83 -20
208 lines not on this page · raw message
tests/i915/kms_dsc_helper.c +36 -0
@@ -97,3 +97,39 @@ bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc)return true; } + +void force_dsc_output_format (int drmfd,igt_output_t *output, +enum dsc_output_format output_format) +{ +int ret; + +igt_debug ("Forcing DSC %s output format on %s\n" , +kmstest_dsc_output_format_str (output_format), output->name); + ret =igt_force_dsc_output_format (drmfd, output->name, output_format); +igt_assert_f (ret >0 ,"forcing dsc output format debugfs_write failed\n" ); +} + +/* YCbCr420 DSC is supported on display version 14+ with DSC1.2a */ +static bool is_dsc_output_format_supported_by_platform (int disp_ver,enum dsc_output_format output_format) +{ +if (disp_ver <14 && output_format ==DSC_FORMAT_YCBCR420 ) { +igt_debug ("Ouput format DSC YCBCR420 supported on D14+ platforms\n" ); +return false; + } + +return true; +} + +bool is_dsc_output_format_supported (int disp_ver,int drmfd,igt_output_t *output, +enum dsc_output_format output_format) +{ +if (!(igt_is_dsc_output_format_supported_by_sink (drmfd, output->name, output_format)) && + (is_dsc_output_format_supported_by_platform (disp_ver, output_format))) { +igt_debug ("DSC %s output format not supported on connector %s\n" , +kmstest_dsc_output_format_str (output_format), + output->name); +return false; + } + +return true; +}
tests/i915/kms_dsc_helper.h +4 -0
@@ -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_output_format (int drmfd,igt_output_t *output, +enum dsc_output_format output_format); +bool is_dsc_output_format_supported (int disp_ver,int drmfd,igt_output_t *output, +enum dsc_output_format output_format);#endif
Signature · 1 line
2.25.1
Re: [igt-dev] [PATCH i-g-t 5/5] tests/i915/kms_dsc: Enable validation for VDSC output formats
Quoted 112 lines · Swati Sharma
Existing i-g-t is extended to enable validation for VDSC output formats. Output
format is selected as per driver policy. For ex: 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 DSC output format, a debugfs entry is created to force this output format.
However, before setting debugfs entry, we have checked capability i.e. output
format is supported by both platform and sink.Also, each mode doesn't support all output formats; so if both sink and platform
support an output format, we will do a 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)
-fixedget_next_mode()(Jouni)
v5: -made generic test to validate all output formats (Jani N)Signed-off-by Swati Sharma <[email protected]>---
lib/igt_kms.c | 20 +++++++
lib/igt_kms.h | 1 +
tests/i915/kms_dsc.c | 103 +++++++++++++++++++++++++++++----- --
tests/i915/kms_dsc_helper.c | 36 +++++++++++++tests/i915/kms_dsc_helper.h| 4 ++5 files changed, 144 insertions(+), 20 deletions(-)lib/igt_kms.c +0
-0@@ -966,6 +966,26 @@ const char *kmstest_scaling_filter_str(int filter) return find_type_name(scaling_filter_names, filter); }lib/igt_kms.c +18
-0+static const struct type_name dsc_output_format_names[] = { + { DSC_FORMAT_DEFAULT, "DEFAULT" }, + { DSC_FORMAT_RGB, "RGB" }, + { DSC_FORMAT_YCBCR420, "YCBCR420" }, + { DSC_FORMAT_YCBCR422, "YCBCR422" }, + { DSC_FORMAT_YCBCR444, "YCBCR444" }, + {} +}; + +/** +* 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);lib/igt_kms.c +2
-0+} +static const struct
type_nameconnector_type_names[] = { {DRM_MODE_CONNECTOR_Unknown, "Unknown" }, {DRM_MODE_CONNECTOR_VGA, "VGA" },lib/igt_kms.h +1
-0@@ -118,6 +118,7 @@ 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);
voidkmstest_dump_mode(drmModeModeInfo *mode);
#defineMAX_HDISPLAY_PER_PIPE5120tests/i915/kms_dsc.c +0
-0@@ -36,7 +36,8 @@ IGT_TEST_DESCRIPTION("Test to validate display stream compression");
enumdsc_test_type{
TEST_DSC_BASIC,
- TEST_DSC_BPC
+ TEST_DSC_BPC,
+ TEST_DSC_OUTPUT_FORMAT
};
typedef struct {tests/i915/kms_dsc.c +1
-0@@ -44,6 +45,7 @@ typedef struct { uint32_t devid; igt_display_t display; struct igt_fb fb_test_pattern; + enum dsc_output_format output_format; unsigned int plane_format; igt_output_t *output; int input_bpc;@@ -52,6 +54,7 @@ typedef struct { enum pipe pipe; } data_t;
Quoted 3 lines
+int output_format_list[] = {DSC_FORMAT_DEFAULT,DSC_FORMAT_RGB,DSC_FORMAT_YCBCR420,DSC_FORMAT_YCBCR444};
static
Quoted 267 lines
int format_list[] = {
DRM_FORMAT_XYUV8888,DRM_FORMAT_XRGB2101010,DRM_FORMAT_XRGB16161616F,DRM_FORMAT_YUYV};
uint32_t bpc_list[] = {12, 10, 8};tests/i915/kms_dsc.c +0
-0@@ -72,6 +75,17 @@ static drmModeModeInfo *get_highres_mode(igt_output_t *output) return highest_mode; }
+static drmModeModeInfo *get_next_mode(igt_output_t *output, int index)tests/i915/kms_dsc.c +10
-0+{ + 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;tests/i915/kms_dsc.c +0
-0@@ -102,7 +116,9 @@ 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)
{
+ int ret;
bool enabled;
+ int index = 0;
igt_plane_t *primary;
drmModeModeInfo *mode;
igt_output_t *output =data->output;tests/i915/kms_dsc.c +0
-0@@ -121,26 +137,47 @@ static void update_display(data_t *data, enum dsc_test_type test_type) 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);
+ if (test_type==TEST_DSC_OUTPUT_FORMAT) {
+ igt_debug("Trying to set DSC %s output format\n", + kmstest_dsc_output_format_str(data-Quoted 1 line
output_format));+ force_dsc_output_format(data->drm_fd,
data->output,data->output_format);
+ }
+ igt_output_set_pipe(output,data->pipe);
primary =igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
igt_skip_on(!igt_plane_has_format_mod(primary, data-Quoted 1 line
plane_format,
DRM_FORMAT_MOD_LINEAR));
- igt_create_pattern_fb(data->drm_fd,
-mode->hdisplay,
-mode->vdisplay,
-data->plane_format,
-DRM_FORMAT_MOD_LINEAR,
-&data->fb_test_pattern); + do {
+ if (data->output_format==DSC_FORMAT_DEFAULT) { + mode =get_highres_mode(output); + } else {
+ mode =get_next_mode(output, index); + index++;
+ }
- igt_plane_set_fb(primary,&data->fb_test_pattern); - igt_display_commit(display);
+ igt_require(mode != NULL);
+ igt_output_override_mode(output, mode);tests/i915/kms_dsc.c +10
-0+ + igt_create_pattern_fb(data->drm_fd, + mode->hdisplay, + mode->vdisplay, + data->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 (data->output_format!=DSC_FORMAT_DEFAULT&& ret != 0) {
+ igt_remove_fb(data->drm_fd, &data-Quoted 1 line
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.tests/i915/kms_dsc.c +0
-0@@ -155,10 +192,15 @@ 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");
+
+ igt_debug("Reset input BPC\n");data->input_bpc= 0; force_dsc_enable_bpc(data->drm_fd,data->output, data-Quoted 1 line
input_bpc);
+ igt_debug("Reset DSC output format\n");
+ data->output_format =DSC_FORMAT_DEFAULT;
+ force_dsc_output_format(data->drm_fd,data->output, data-Quoted 1 line
output_format);+
igt_assert_f(enabled,
"Default DSC enable failed on connector: %s
pipe: %s\n",
output->name,tests/i915/kms_dsc.c +0
-0@@ -168,7 +210,7 @@ static void update_display(data_t *data, enum dsc_test_type test_type) }
static void test_dsc(data_t *data, enumdsc_test_typetest_type, int bpc,
- unsigned intplane_format)
+ unsigned intplane_format, enumdsc_output_formatoutput_format)
{
igt_display_t *display =&data->display;igt_output_t*output;tests/i915/kms_dsc.c +0
-0@@ -176,6 +218,7 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc, enum pipe pipe;
for_each_pipe_with_valid_output(display, pipe, output) { + data->output_format =output_format;data->plane_format=plane_format;data->input_bpc= bpc;
data->output = output;tests/i915/kms_dsc.c +0
-0@@ -184,6 +227,10 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,if (!check_dsc_on_connector(data->drm_fd, data-
Quoted 1 line
output))
continue;
+ if (!is_dsc_output_format_supported(data->drm_fd,data->disp_ver,
+data->output,data->output_format))
+ continue;
+
if (!check_gen11_dp_constraint(data->drm_fd, data-Quoted 1 line
output,
data->pipe))continue;
tests/i915/kms_dsc.c +0
-0@@ -195,6 +242,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc,
if (test_type==TEST_DSC_BPC)snprintf(name, sizeof(name), "-%dbpc-%s", data->input_bpc, igt_format_str(data->plane_format));
+ else if (test_type==TEST_DSC_OUTPUT_FORMAT) + snprintf(name, sizeof(name), "-%s-%s",kmstest_dsc_output_format_str(data->output_format),
+igt_format_str(data->plane_format));
else
snprintf(name, sizeof(name), "-%s",igt_format_str(data->plane_format));tests/i915/kms_dsc.c +0
-0@@ -226,14 +276,16 @@ 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);
+ test_dsc(&data,TEST_DSC_BASIC, 0, +DRM_FORMAT_XRGB8888,DSC_FORMAT_DEFAULT);
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]);
+ test_dsc(&data,TEST_DSC_BASIC, 0, + format_list[k],DSC_FORMAT_DEFAULT); }
igt_describe("Tests basic display stream compression functionality if supported "tests/i915/kms_dsc.c +2
-1@@ -241,7 +293,8 @@ 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); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], + DRM_FORMAT_XRGB8888,DSC_FORMAT_DEFAULT ); }
igt_describe("Tests basic display stream compression functionality if supported "tests/i915/kms_dsc.c +2
-1@@ -250,11 +303,21 @@ 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]); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], + format_list[k], DSC_FORMAT_DEFAULT); } } }
+ igt_describe("Tests basic display stream compression functionality if supported "
+ "by a connector by forcing DSC and output format on all connectors "
+ "that support it");
+ igt_subtest_with_dynamic("dsc-with-output-formats") { + for (int k = 0; k <ARRAY_SIZE(output_format_list); k++)
+ test_dsc(&data,TEST_DSC_OUTPUT_FORMAT, 0,DRM_FORMAT_XRGB8888,
+ output_format_list[k]);
+ }
+
igt_fixture {
igt_display_fini(&data.display);close(data.drm_fd);tests/i915/kms_dsc_helper.c +0
-0@@ -97,3 +97,39 @@ bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc)
return true;
}tests/i915/kms_dsc_helper.c +8
-0+ +void force_dsc_output_format (int drmfd,igt_output_t *output, + enum dsc_output_format output_format) +{ + int ret; + + igt_debug("Forcing DSC %s output format on %s\n", + kmstest_dsc_output_format_str(output_format),
Quoted 5 lines
output->name);
+ ret =igt_force_dsc_output_format(drmfd, output->name, output_format);
+ igt_assert_f(ret > 0, "forcing dsc output formatdebugfs_writefailed\n");
Isn't it !ret or ret == 0 as you did earlier?
Quoted 53 lines
tests/i915/kms_dsc_helper.c +4
-0+} + +/* YCbCr420 DSC is supported on display version 14+ with DSC1.2a */ +static bool is_dsc_output_format_supported_by_platform(int disp_ver,enum
dsc_output_formatoutput_format)
+{
+ if (disp_ver< 14 &&output_format==DSC_FORMAT_YCBCR420) { + igt_debug("Ouput format DSC YCBCR420 supported on D14+ platforms\n");
+ return false;
+ }tests/i915/kms_dsc_helper.c +5
-0+ + return true; +} + +bool is_dsc_output_format_supported(int disp_ver, int drmfd,
igt_output_t*output,
+ enumdsc_output_formatoutput_format)
+{
+ if (!(igt_is_dsc_output_format_supported_by_sink(drmfd,output->name,output_format)) &&
+ (is_dsc_output_format_supported_by_platform(disp_ver, output_format))) {
+ igt_debug("DSC %s output format not supported on connector %s\n",
+kmstest_dsc_output_format_str(output_format),
+output->name);
+ return false;
+ }tests/i915/kms_dsc_helper.c +3
-0+ + return true; +}tests/i915/kms_dsc_helper.h +0
-0@@ -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);
boolcheck_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc);tests/i915/kms_dsc_helper.h +3
-0+void force_dsc_output_format (int drmfd,igt_output_t *output, + enum dsc_output_format output_format); +bool is_dsc_output_format_supported(int disp_ver, int drmfd,
igt_output_t*output,
+ enumdsc_output_formatoutput_format);
#endif
Re: [igt-dev] [PATCH i-g-t 5/5] tests/i915/kms_dsc: Enable validation for VDSC output formats
Quoted 385 lines · Jouni
Quoted 110 lines · Swati Sharma
Existing i-g-t is extended to enable validation for VDSC output formats. Output
format is selected as per driver policy. For ex: 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 DSC output format, a debugfs entry is created to force this output format.
However, before setting debugfs entry, we have checked capability i.e. output
format is supported by both platform and sink.Also, each mode doesn't support all output formats; so if both sink and platform
support an output format, we will do a 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)
-fixedget_next_mode()(Jouni)
v5: -made generic test to validate all output formats (Jani N)Signed-off-by Swati Sharma <[email protected]>--- lib/igt_kms.c | 20 +++++++ lib/igt_kms.h | 1 + tests/i915/kms_dsc.c | 103 +++++++++++++++++++++++++++++----- -- tests/i915/kms_dsc_helper.c | 36 +++++++++++++ tests/i915/kms_dsc_helper.h | 4 ++ 5 files changed, 144 insertions(+), 20 deletions(-)lib/igt_kms.c +20
-0@@ -966,6 +966,26 @@ 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_DEFAULT, "DEFAULT" }, + { DSC_FORMAT_RGB, "RGB" }, + { DSC_FORMAT_YCBCR420, "YCBCR420" }, + { DSC_FORMAT_YCBCR422, "YCBCR422" }, + { DSC_FORMAT_YCBCR444, "YCBCR444" }, + {} +}; + +/** +* 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" },lib/igt_kms.h +1
-0@@ -118,6 +118,7 @@ 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 5120tests/i915/kms_dsc.c +2
-1@@ -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_OUTPUT_FORMAT };typedef struct {
tests/i915/kms_dsc.c +1
-0@@ -44,6 +45,7 @@ typedef struct { uint32_t devid; igt_display_t display; struct igt_fb fb_test_pattern; + enum dsc_output_format output_format; unsigned int plane_format; igt_output_t *output; int input_bpc;tests/i915/kms_dsc.c typedef struct { · line 58
Quoted 5 lines
tests/i915/kms_dsc.c +1
-0@@ -52,6 +54,7 @@ typedef struct { enum pipe pipe; } data_t; +int output_format_list[] = {DSC_FORMAT_DEFAULT ,DSC_FORMAT_RGB ,DSC_FORMAT_YCBCR420 ,DSC_FORMAT_YCBCR444 };static
Quoted 266 lines
tests/i915/kms_dsc.c +0
-0int format_list[] = {DRM_FORMAT_XYUV8888, DRM_FORMAT_XRGB2101010,DRM_FORMAT_XRGB16161616F ,DRM_FORMAT_YUYV };uint32_t bpc_list[] = {12, 10, 8};
tests/i915/kms_dsc.c +11
-0@@ -72,6 +75,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;tests/i915/kms_dsc.c +2
-0@@ -102,7 +116,9 @@ 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) { + int ret; bool enabled; + int index = 0; igt_plane_t *primary; drmModeModeInfo *mode;igt_output_t *output =
data->output;tests/i915/kms_dsc.c +25
-13@@ -121,26 +137,47 @@ static void update_display(data_t *data, enum dsc_test_type test_type) 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); + if (test_type == TEST_DSC_OUTPUT_FORMAT) { + igt_debug("Trying to set DSC %s output format\n", + kmstest_dsc_output_format_str(data- > output_format)); + force_dsc_output_format(data->drm_fd, data->output, data->output_format); + } + igt_output_set_pipe(output, data->pipe); primary = igt_output_get_plane_type(output,DRM_PLANE_TYPE_PRIMARY ); igt_skip_on(!igt_plane_has_format_mod(primary, data- > plane_format, DRM_FORMAT_MOD_LINEAR)); - igt_create_pattern_fb(data->drm_fd, - mode->hdisplay, - mode->vdisplay, - data->plane_format, - DRM_FORMAT_MOD_LINEAR, - &data->fb_test_pattern); + do { + if (data->output_format == DSC_FORMAT_DEFAULT) { + mode = get_highres_mode(output); + } else { + mode = get_next_mode(output, index); + index++; + } - igt_plane_set_fb(primary, &data->fb_test_pattern); - igt_display_commit(display); + igt_require(mode != NULL); + igt_output_override_mode(output, mode); + + igt_create_pattern_fb(data->drm_fd, + mode->hdisplay, + mode->vdisplay, + data->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 (data->output_format!=DSC_FORMAT_DEFAULT&& ret != 0) {
+ igt_remove_fb(data->drm_fd, &data-Quoted 1 line
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.tests/i915/kms_dsc.c +6
-1@@ -155,10 +192,15 @@ 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"); + + igt_debug("Reset input BPC\n"); data->input_bpc = 0; force_dsc_enable_bpc(data->drm_fd, data->output, data- > input_bpc); + igt_debug("Reset DSC output format\n"); + data->output_format = DSC_FORMAT_DEFAULT; + force_dsc_output_format(data->drm_fd, data->output, data- > output_format); +igt_assert_f(enabled,
"Default DSC enable failed on connector: %s
pipe: %s\n",
output->name,tests/i915/kms_dsc.c +1
-1@@ -168,7 +210,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, enumdsc_output_format output_format){
igt_display_t *display =&data->display;
igt_output_t *output;tests/i915/kms_dsc.c +1
-0@@ -176,6 +218,7 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc, enum pipe pipe; for_each_pipe_with_valid_output(display, pipe, output) { + data->output_format = output_format; data->plane_format = plane_format; data->input_bpc = bpc;data->output = output;
tests/i915/kms_dsc.c +2
-0@@ -184,6 +227,10 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc, if (!check_dsc_on_connector(data->drm_fd, data- > output)) continue; + if (!is_dsc_output_format_supported(data->drm_fd, data->disp_ver, + data->output,
data->output_format))
+ continue;
+
if (!check_gen11_dp_constraint(data->drm_fd, data-Quoted 1 line
output,
data->pipe))continue;
tests/i915/kms_dsc.c +3
-0@@ -195,6 +242,9 @@ static void test_dsc(data_t *data, enum dsc_test_type test_type, int bpc, if (test_type == TEST_DSC_BPC) snprintf(name, sizeof(name), "-%dbpc-%s", data->input_bpc, igt_format_str(data->plane_format)); + else if (test_type == TEST_DSC_OUTPUT_FORMAT) + snprintf(name, sizeof(name), "-%s-%s", kmstest_dsc_output_format_str(data->output_format), +
igt_format_str(data->plane_format));
else
snprintf(name, sizeof(name), "-%s",igt_format_str(data->plane_format));tests/i915/kms_dsc.c +0
-0@@ -226,14 +276,16 @@ igt_main "by a connector by forcing DSC on all connectorsthat support it "
"with default parameters");igt_subtest_with_dynamic("basic-dsc")
- test_dsc(&data,TEST_DSC_BASIC, 0,DRM_FORMAT_XRGB8888);
+ test_dsc(&data,TEST_DSC_BASIC, 0, +DRM_FORMAT_XRGB8888,DSC_FORMAT_DEFAULT);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]);
+ test_dsc(&data,TEST_DSC_BASIC, 0, + format_list[k],DSC_FORMAT_DEFAULT);
}igt_describe("Tests basic display stream compression
functionality if supported "tests/i915/kms_dsc.c +2
-1@@ -241,7 +293,8 @@ 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); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], + DRM_FORMAT_XRGB8888,DSC_FORMAT_DEFAULT ); }igt_describe("Tests basic display stream compression
functionality if supported "tests/i915/kms_dsc.c +3
-1@@ -250,11 +303,21 @@ 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]); + test_dsc(&data, TEST_DSC_BPC, bpc_list[j], + format_list[k], DSC_FORMAT_DEFAULT); } } } + igt_describe("Tests basic display stream compressionfunctionality if supported "
+ "by a connector by forcing DSC and output format on all connectors "
+ "that support it");
+ igt_subtest_with_dynamic("dsc-with-output-formats") { + for (int k = 0; k <ARRAY_SIZE(output_format_list); k++)
+ test_dsc(&data,TEST_DSC_OUTPUT_FORMAT, 0,DRM_FORMAT_XRGB8888,
+ output_format_list[k]);
+ }tests/i915/kms_dsc.c +1
-0+ igt_fixture { igt_display_fini(&data.display); close(data.drm_fd);tests/i915/kms_dsc_helper.c +7
-0@@ -97,3 +97,39 @@ bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc) return true; } + +void force_dsc_output_format (int drmfd,igt_output_t *output, + enum dsc_output_format output_format) +{ + int ret; + + igt_debug("Forcing DSC %s output format on %s\n",
Quoted 8 lines
Quoted 6 lines
+
kmstest_dsc_output_format_str(output_format),output->name);
+ ret =igt_force_dsc_output_format(drmfd, output->name, output_format);
+ igt_assert_f(ret > 0, "forcing dsc output formatdebugfs_writefailed\n");Isn't it !ret or ret == 0 as you did earlier?
Yes, it should be changed. Missed by mistake.
Quoted 55 lines
Quoted 54 lines
tests/i915/kms_dsc_helper.c +4
-0+} + +/* YCbCr420 DSC is supported on display version 14+ with DSC1.2a */ +static bool is_dsc_output_format_supported_by_platform(int disp_ver,enum
dsc_output_formatoutput_format)
+{
+ if (disp_ver< 14 &&output_format==DSC_FORMAT_YCBCR420) { + igt_debug("Ouput format DSC YCBCR420 supported on D14+ platforms\n");
+ return false;
+ }tests/i915/kms_dsc_helper.c +5
-0+ + return true; +} + +bool is_dsc_output_format_supported(int disp_ver, int drmfd,
igt_output_t*output,
+ enumdsc_output_formatoutput_format)
+{
+ if (!(igt_is_dsc_output_format_supported_by_sink(drmfd,output->name,output_format)) &&
+ (is_dsc_output_format_supported_by_platform(disp_ver, output_format))) {
+ igt_debug("DSC %s output format not supported on connector %s\n",
+kmstest_dsc_output_format_str(output_format),
+output->name);
+ return false;
+ }tests/i915/kms_dsc_helper.c +3
-0+ + return true; +}tests/i915/kms_dsc_helper.h +3
-0@@ -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, enumpipe pipe); bool check_gen11_bpc_constraint(int drmfd, igt_output_t *output, int input_bpc); +void force_dsc_output_format (int drmfd,igt_output_t *output, + enum dsc_output_format output_format); +bool is_dsc_output_format_supported(int disp_ver, int drmfd,
igt_output_t*output,
+ enumdsc_output_formatoutput_format);#endif
Signature · 1 line
~Swati Sharma
Patchwork
CI[igt-dev] ✗ Fi.CI.BAT: failure for Enable VDSC output formats validation
In reply to Swati Sharma== Series Details ==
== Series Details ==
Series: Enable VDSC output formats validation
URL : https://patchwork.freedesktop.org/series/113253/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12625 -> IGTPW_8396
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_8396 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in IGTPW_8396, 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_8396/index.html
Participating hosts (39 -> 38)
------------------------------
Additional (1): fi-kbl-soraka
Missing (2): fi-bsw-kefka fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_8396:
### IGT changes ###
#### Possible regressions ####
* igt@kms_cursor_legacy@basic-flip-after-cursor@atomic-transitions-varying-size:
- fi-kbl-soraka: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-kbl-soraka/igt@kms_cursor_legacy@[email protected]
Known issues
------------
Here are the changes found in IGTPW_8396 that come from known issues:
### IGT changes ###
#### Issues hit ####
* 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_12625/fi-pnv-d510/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-pnv-d510/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#2190])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-kbl-soraka/igt@[email protected]
* 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_8396/fi-kbl-soraka/igt@[email protected]
* igt@i915_module_load@load:
- fi-ctg-p8600: [PASS][6] -> [DMESG-WARN][7] ([i915#6020])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/fi-ctg-p8600/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-ctg-p8600/igt@[email protected]
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][8] ([i915#1886])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@i915_selftest@live@slpc:
- fi-kbl-soraka: NOTRUN -> [INCOMPLETE][9] ([i915#7913])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-kbl-soraka/igt@i915_selftest@[email protected]
* igt@kms_chamelium_frames@hdmi-crc-fast:
- fi-kbl-soraka: NOTRUN -> [SKIP][10] ([fdo#109271]) +15 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-kbl-soraka/igt@[email protected]
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- fi-rkl-guc: NOTRUN -> [SKIP][11] ([i915#7828])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-rkl-guc/igt@[email protected]
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s0@smem:
- {bat-rpls-1}: [DMESG-WARN][12] ([i915#7359] / [i915#7625]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/bat-rpls-1/igt@gem_exec_suspend@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/bat-rpls-1/igt@gem_exec_suspend@[email protected]
* igt@i915_selftest@live@gt_lrc:
- fi-rkl-guc: [INCOMPLETE][14] ([i915#4983]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
* igt@i915_selftest@live@gt_mocs:
- {bat-rpls-2}: [DMESG-FAIL][16] ([i915#7059]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/bat-rpls-2/igt@i915_selftest@live@gt_mocs.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/bat-rpls-2/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@migrate:
- {bat-dg2-11}: [DMESG-WARN][18] ([i915#2867]) -> [PASS][19] +4 similar issues
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/bat-dg2-11/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/bat-dg2-11/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@requests:
- {bat-rplp-1}: [INCOMPLETE][20] ([i915#7609]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12625/bat-rplp-1/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/bat-rplp-1/igt@i915_selftest@[email protected]
{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#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[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#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6020]: https://gitlab.freedesktop.org/drm/intel/issues/6020
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
[i915#7229]: https://gitlab.freedesktop.org/drm/intel/issues/7229
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7456]: https://gitlab.freedesktop.org/drm/intel/issues/7456
[i915#7609]: https://gitlab.freedesktop.org/drm/intel/issues/7609
[i915#7625]: https://gitlab.freedesktop.org/drm/intel/issues/7625
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7134 -> IGTPW_8396
CI-20190529: 20190529
CI_DRM_12625: 6a023df4443d313724dc96d1fff15193bb7ec5b8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8396: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/index.html
IGT_7134: 61b8c0a0c8a9611c47749c0b1a262843892cccd7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@kms_dsc@dsc-with-output-formats
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8396/index.html