Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t, v5 4/4] tests/intel/kms_dsc: Add force dsc and joiner test cases
Date: Thu, 30 Apr 2026 15:34:03 +0530	[thread overview]
Message-ID: <3ea30cc5-22da-49b0-8b3a-3f4c9272da0f@intel.com> (raw)
In-Reply-To: <2ae52502a329392abcf7c1c76224e35e18335dfb@intel.com>

Hi Jani,

On 30-04-2026 01:03 pm, Jani Nikula wrote:
> On Thu, 30 Apr 2026, Swati Sharma <swati2.sharma@intel.com> wrote:
>> Add test cases where we are validating force dsc and force
>> joiner.
>>
>> v2: -fix if() for ultra/big joiner (Ankit)
>> v3: -Add '-' separator in subtest names when using
>>       igt_get_joined_pipes_name (Santhosh)
>> v4: -Use 'enum joined_pipes force_joined_pipes' in data_t (Ankit)
>>      -Use dsc-basic-%s format for subtest names (Ankit)
>>      -Use igt_crtc_for_pipe() to check consecutive HW pipes,
>>       handling fused pipe holes properly (Ankit)
>>
>> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
>> ---
>>   tests/intel/kms_dsc.c | 206 +++++++++++++++++++++++++++---------------
>>   1 file changed, 134 insertions(+), 72 deletions(-)
>>
>> diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
>> index 69f335da3..bfd84e59a 100644
>> --- a/tests/intel/kms_dsc.c
>> +++ b/tests/intel/kms_dsc.c
>> @@ -55,7 +55,27 @@
>>    * @with-output-formats-with-bpc: DSC with output formats with certain input BPC for the connector
>>    * @fractional-bpp:               DSC with fractional bpp with default parameters
>>    * @fractional-bpp-with-bpc:      DSC with fractional bpp with certain input BPC for the connector
>> - */
>> + *
>> + * SUBTEST: dsc-%s-%s
>> + * Description: Tests Display Stream Compression functionality if supported by a
>> + *              connector by forcing %arg[1] and %arg[2] on all connectors that support it
>> + *
>> + * arg[1]:
>> + *
>> + * @basic:                        DSC with default parameters
>> + * @with-bpc:                     DSC with certain input BPC for the connector
>> + * @with-bpc-formats:             DSC with certain input BPC for the connector and diff formats
>> + * @with-formats:                 DSC with default parameters and creating fb with diff formats
>> + * @with-output-formats:          DSC with output formats
>> + * @with-output-formats-with-bpc: DSC with output formats with certain input BPC for the connector
>> + * @fractional-bpp:               DSC with fractional bpp with default parameters
>> + * @fractional-bpp-with-bpc:      DSC with fractional bpp with certain input BPC for the connector
>> + *
>> + * arg[2]:
>> + *
>> + * @bigjoiner:			  big joiner
>> + * @ultrajoiner:		  ultra joiner
>> +*/
>>   
>>   IGT_TEST_DESCRIPTION("Test to validate display stream compression");
>>   
>> @@ -81,11 +101,13 @@ typedef struct {
>>   	int disp_ver;
>>   	igt_crtc_t *crtc;
>>   	bool limited;
>> +	enum joined_pipes force_joined_pipes;
>>   } data_t;
>>   
>>   static int output_format_list[] = {DSC_FORMAT_YCBCR420, DSC_FORMAT_YCBCR444};
>>   static int format_list[] = {DRM_FORMAT_XYUV8888, DRM_FORMAT_XRGB2101010, DRM_FORMAT_XRGB16161616F, DRM_FORMAT_YUYV};
>>   static uint32_t bpc_list[] = {8, 10, 12};
>> +static enum joined_pipes joiner_tests[] = {JOINED_PIPES_DEFAULT, JOINED_PIPES_BIG_JOINER, JOINED_PIPES_ULTRA_JOINER};
>>   
>>   static inline void manual(const char *expected)
>>   {
>> @@ -135,6 +157,7 @@ static void update_display(data_t *data, uint32_t test_type)
>>   	int current_bpc = 0;
>>   	igt_plane_t *primary;
>>   	drmModeModeInfo *mode;
>> +	bool status;
>>   	igt_output_t *output = data->output;
>>   	igt_display_t *display = &data->display;
>>   	drmModeConnector *connector = output->config.connector;
>> @@ -147,6 +170,11 @@ static void update_display(data_t *data, uint32_t test_type)
>>   	save_force_dsc_en(data->drm_fd, data->output);
>>   	force_dsc_enable(data->drm_fd, data->output);
>>   
>> +	if (data->force_joined_pipes == JOINED_PIPES_BIG_JOINER || data->force_joined_pipes == JOINED_PIPES_ULTRA_JOINER) {
>> +		status = kmstest_force_connector_joiner(data->drm_fd, connector, data->force_joined_pipes);
>> +		igt_assert_f(status, "Failed to toggle force joiner\n");
>> +	}
>> +
>>   	if (test_type & TEST_DSC_BPC) {
>>   		igt_debug("Trying to set input BPC to %d\n", data->input_bpc);
>>   		force_dsc_enable_bpc(data->drm_fd, data->output, data->input_bpc);
>> @@ -246,25 +274,35 @@ reset:
>>   
>>   static void test_dsc(data_t *data, uint32_t test_type, int bpc,
>>   		     unsigned int plane_format,
>> -		     enum dsc_output_format output_format)
>> +		     enum dsc_output_format output_format,
>> +		     enum joined_pipes joined_pipes)
>>   {
>>   	igt_display_t *display = &data->display;
>>   	igt_output_t *output;
>>   	igt_crtc_t *crtc;
>> +	int n_pipes = 0;
>>   	char name[3][LEN] = {
>>   				{0},
>>   				{0},
>>   				{0},
>>   			    };
>>   
>> +	for_each_crtc(display, crtc)
>> +		n_pipes++;
> Nowadays that's just igt_display_n_crtcs().
Ack
>
>> +
>>   	igt_require(check_gen11_bpc_constraint(data->drm_fd, data->input_bpc));
>>   
>> +	if (joined_pipes != JOINED_PIPES_DEFAULT &&
>> +	    !igt_is_joiner_supported_by_source(data->drm_fd, joined_pipes))
>> +		return;
>> +
>>   	for_each_crtc_with_valid_output(display, crtc, output) {
>>   		data->output_format = output_format;
>>   		data->plane_format = plane_format;
>>   		data->input_bpc = bpc;
>>   		data->output = output;
>>   		data->crtc = crtc;
>> +		data->force_joined_pipes = joined_pipes;
>>   
>>   		if (!is_dsc_supported_by_sink(data->drm_fd, data->output) ||
>>   		    !check_gen11_dp_constraint(data->drm_fd, data->output, data->crtc))
>> @@ -285,6 +323,26 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
>>   						      data->drm_fd, data->output)))
>>   			continue;
>>   
>> +		/*
>> +		 * Check joiner constraints and verify that we have
>> +		 * enough consecutive HW pipes starting from this crtc.
>> +		 * Use igt_crtc_for_pipe() to handle fused pipe holes.
>> +		 */
>> +		if (joined_pipes != JOINED_PIPES_DEFAULT &&
>> +		    !check_dsc_joiner_constraints(data->drm_fd, data->output,
>> +						  n_pipes, joined_pipes))
>> +			continue;
>> +
>> +		if (joined_pipes == JOINED_PIPES_BIG_JOINER &&
>> +		    !igt_crtc_for_pipe(display, crtc->pipe + 1))
>> +			continue;
>> +
>> +		if (joined_pipes == JOINED_PIPES_ULTRA_JOINER &&
>> +		    (!igt_crtc_for_pipe(display, crtc->pipe + 1) ||
>> +		     !igt_crtc_for_pipe(display, crtc->pipe + 2) ||
>> +		     !igt_crtc_for_pipe(display, crtc->pipe + 3)))
>> +			continue;
> I don't have the time to look into all of this properly, but I have a
> feeling it would be worth it to add a coherent set of joiner helpers
> under lib/intel, consoditating the joiner stuff from lib/igt_kms.c and
> tests/intel/kms_joiner_helper.c, and possibly kms_dsc_helper.c etc.
>
> It's just not tenable for tests to be checking the above.
>
> That said, it takes time and effort, and I'm not insisting on it. It's
> just something to think of, and maybe start moving stuff to a single
> location to make it easier to re-use.
>
> BR,
> Jani.

Agreed, consolidating joiner helpers under lib/intel/ would be the right 
long-term direction.

For this series we'll keep it as-is and file a follow-up to refactor the 
joiner helpers into a common library.

Happy to do that as a separate patch series once this lands.

Have created WI#205: 
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/work_items/205

>> +
>>   		if (test_type & TEST_DSC_OUTPUT_FORMAT)
>>   			snprintf(&name[0][0], LEN, "-%s", kmstest_dsc_output_format_str(data->output_format));
>>   		if (test_type & TEST_DSC_FORMAT)
>> @@ -334,85 +392,89 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
>>   		igt_require(is_dsc_supported_by_source(data.drm_fd));
>>   	}
>>   
>> -	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");
>> -	igt_subtest_with_dynamic("dsc-basic")
>> -			test_dsc(&data, TEST_DSC_BASIC, DEFAULT_BPC,
>> -				 DRM_FORMAT_XRGB8888, DSC_FORMAT_RGB);
>> -
>> -	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_FORMAT, DEFAULT_BPC,
>> -				 format_list[k], DSC_FORMAT_RGB);
>> -	}
>>   
>> -	igt_describe("Tests basic display stream compression functionality if supported "
>> -		     "by a connector by forcing DSC on all connectors that support it "
>> -		     "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, DSC_FORMAT_RGB);
>> -	}
>> +	for (int i = 0; i < ARRAY_SIZE(joiner_tests) ; i++) {
>> +		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");
>> +		igt_subtest_with_dynamic_f("dsc-basic%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +				test_dsc(&data, TEST_DSC_BASIC, DEFAULT_BPC,
>> +					 DRM_FORMAT_XRGB8888, DSC_FORMAT_RGB, joiner_tests[i]);
>> +		}
>>   
>> -	igt_describe("Tests basic display stream compression functionality if supported "
>> -		     "by a connector by forcing DSC on all connectors that support it "
>> -		     "with certain input BPC for the connector with diff formats");
>> -	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 | TEST_DSC_FORMAT,
>> -				bpc_list[j], format_list[k],
>> -				DSC_FORMAT_RGB);
>> -			}
>> +		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_f("dsc-with-formats%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +			for (int k = 0; k < ARRAY_SIZE(format_list); k++)
>> +				test_dsc(&data, TEST_DSC_FORMAT, DEFAULT_BPC,
>> +					 format_list[k], DSC_FORMAT_RGB, joiner_tests[i]);
>>   		}
>> -	}
>>   
>> -	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, DEFAULT_BPC,
>> -				 DRM_FORMAT_XRGB8888,
>> -				 output_format_list[k]);
>> -	}
>> +		igt_describe("Tests basic display stream compression functionality if supported "
>> +			     "by a connector by forcing DSC on all connectors that support it "
>> +			     "with certain input BPC for the connector");
>> +		igt_subtest_with_dynamic_f("dsc-with-bpc%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +			for (int j = 0; j < ARRAY_SIZE(bpc_list); j++)
>> +				test_dsc(&data, TEST_DSC_BPC, bpc_list[j],
>> +					 DRM_FORMAT_XRGB8888, DSC_FORMAT_RGB, joiner_tests[i]);
>> +		}
>>   
>> -	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 with certain input BPC for the connector");
>> -	igt_subtest_with_dynamic("dsc-with-output-formats-with-bpc") {
>> -		for (int k = 0; k < ARRAY_SIZE(output_format_list); k++) {
>> +		igt_describe("Tests basic display stream compression functionality if supported "
>> +			     "by a connector by forcing DSC on all connectors that support it "
>> +			     "with certain input BPC for the connector with diff formats");
>> +		igt_subtest_with_dynamic_f("dsc-with-bpc-formats%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>>   			for (int j = 0; j < ARRAY_SIZE(bpc_list); j++) {
>> -				test_dsc(&data, TEST_DSC_OUTPUT_FORMAT | TEST_DSC_BPC,
>> -					 bpc_list[j], DRM_FORMAT_XRGB8888,
>> -					 output_format_list[k]);
>> +				for (int k = 0; k < ARRAY_SIZE(format_list); k++) {
>> +					test_dsc(&data, TEST_DSC_BPC | TEST_DSC_FORMAT,
>> +					bpc_list[j], format_list[k],
>> +					DSC_FORMAT_RGB, joiner_tests[i]);
>> +				}
>>   			}
>>   		}
>> -	}
>>   
>> -	igt_describe("Tests fractional compressed bpp functionality if supported "
>> -		     "by a connector by forcing fractional_bpp on all connectors that support it "
>> -		     "with default parameter. While finding the optimum compressed bpp, driver will "
>> -		     "skip over the compressed bpps with integer values. It will go ahead with DSC, "
>> -		     "iff compressed bpp is fractional, failing in which, it will fail the commit.");
>> -	igt_subtest_with_dynamic("dsc-fractional-bpp")
>> -			test_dsc(&data, TEST_DSC_FRACTIONAL_BPP,
>> -				 DEFAULT_BPC, DRM_FORMAT_XRGB8888,
>> -				 DSC_FORMAT_RGB);
>> -
>> -	igt_describe("Tests fractional compressed bpp functionality if supported "
>> -		     "by a connector by forcing fractional_bpp on all connectors that support it "
>> -		     "with certain input BPC for the connector.");
>> -	igt_subtest_with_dynamic("dsc-fractional-bpp-with-bpc") {
>> -		for (int j = 0; j < ARRAY_SIZE(bpc_list); j++)
>> -			test_dsc(&data, TEST_DSC_FRACTIONAL_BPP | TEST_DSC_BPC,
>> -				 bpc_list[j], DRM_FORMAT_XRGB8888,
>> -				 DSC_FORMAT_RGB);
>> +		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_f("dsc-with-output-formats%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +			for (int k = 0; k < ARRAY_SIZE(output_format_list); k++)
>> +				test_dsc(&data, TEST_DSC_OUTPUT_FORMAT, DEFAULT_BPC,
>> +					 DRM_FORMAT_XRGB8888,
>> +					 output_format_list[k], joiner_tests[i]);
>> +		}
>> +
>> +		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 with certain input BPC for the connector");
>> +		igt_subtest_with_dynamic_f("dsc-with-output-formats-with-bpc%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +			for (int k = 0; k < ARRAY_SIZE(output_format_list); k++) {
>> +				for (int j = 0; j < ARRAY_SIZE(bpc_list); j++) {
>> +					test_dsc(&data, TEST_DSC_OUTPUT_FORMAT | TEST_DSC_BPC,
>> +						 bpc_list[j], DRM_FORMAT_XRGB8888,
>> +						 output_format_list[k], joiner_tests[i]);
>> +				}
>> +			}
>> +		}
>> +
>> +		igt_describe("Tests fractional compressed bpp functionality if supported "
>> +			     "by a connector by forcing fractional_bpp on all connectors that support it "
>> +			     "with default parameter. While finding the optimum compressed bpp, driver will "
>> +			     "skip over the compressed bpps with integer values. It will go ahead with DSC, "
>> +			     "iff compressed bpp is fractional, failing in which, it will fail the commit.");
>> +		igt_subtest_with_dynamic_f("dsc-fractional-bpp%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i]))
>> +				test_dsc(&data, TEST_DSC_FRACTIONAL_BPP,
>> +					 DEFAULT_BPC, DRM_FORMAT_XRGB8888,
>> +					 DSC_FORMAT_RGB, joiner_tests[i]);
>> +
>> +		igt_describe("Tests fractional compressed bpp functionality if supported "
>> +			     "by a connector by forcing fractional_bpp on all connectors that support it "
>> +			     "with certain input BPC for the connector.");
>> +		igt_subtest_with_dynamic_f("dsc-fractional-bpp-with-bpc%s%s", joiner_tests[i] ? "-" : "", igt_get_joined_pipes_name(joiner_tests[i])) {
>> +			for (int j = 0; j < ARRAY_SIZE(bpc_list); j++)
>> +				test_dsc(&data, TEST_DSC_FRACTIONAL_BPP | TEST_DSC_BPC,
>> +					 bpc_list[j], DRM_FORMAT_XRGB8888,
>> +					 DSC_FORMAT_RGB, joiner_tests[i]);
>> +			}
>>   	}
>>   
>>   	igt_fixture() {

  reply	other threads:[~2026-04-30 10:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-29 19:51 [PATCH i-g-t,v5 0/4] Add dsc+bigjoiner subtest Swati Sharma
2026-04-29 19:51 ` [PATCH i-g-t,v5 1/4] lib/igt_kms: Add igt_get_joined_pipes_name() Swati Sharma
2026-04-30  7:22   ` [PATCH i-g-t, v5 " Jani Nikula
2026-04-30 10:00     ` Sharma, Swati2
2026-04-29 19:51 ` [PATCH i-g-t, v5 2/4] tests/kms_joiner_helper: Add igt_is_joiner_supported_by_source() Swati Sharma
2026-04-29 19:51 ` [PATCH i-g-t,v5 3/4] tests/intel/kms_dsc_helper: Add helper func() Swati Sharma
2026-04-29 19:51 ` [PATCH i-g-t, v5 4/4] tests/intel/kms_dsc: Add force dsc and joiner test cases Swati Sharma
2026-04-30  7:33   ` Jani Nikula
2026-04-30 10:04     ` Sharma, Swati2 [this message]
2026-04-29 21:24 ` ✓ Xe.CI.BAT: success for Add dsc+bigjoiner subtest (rev7) Patchwork
2026-04-29 21:33 ` ✓ i915.CI.BAT: " Patchwork
2026-04-30  7:03 ` ✗ i915.CI.Full: failure " Patchwork
2026-04-30  9:29 ` ✗ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ea30cc5-22da-49b0-8b3a-3f4c9272da0f@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox