From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/intel/kms_dsc: Store valid DSC outputs
Date: Wed, 12 Mar 2025 11:41:01 +0530 [thread overview]
Message-ID: <ef492188-c3b0-48b8-9e54-b18d55738557@intel.com> (raw)
In-Reply-To: <20250218130337.431624-1-swati2.sharma@intel.com>
On 2/18/2025 6:33 PM, Swati Sharma wrote:
> Instead of repeatedly checking debugfs to determine if a panel
> supports DSC, perform the check once and store valid outputs (those
> that support DSC and meet the required constraints) in an array.
Makes sense.
Patch looks good to me.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/intel/kms_dsc.c | 32 +++++++++++++++++---------------
> 1 file changed, 17 insertions(+), 15 deletions(-)
>
> diff --git a/tests/intel/kms_dsc.c b/tests/intel/kms_dsc.c
> index 5508e7a9e..3f1c93094 100644
> --- a/tests/intel/kms_dsc.c
> +++ b/tests/intel/kms_dsc.c
> @@ -73,12 +73,14 @@ IGT_TEST_DESCRIPTION("Test to validate display stream compression");
>
> typedef struct {
> int drm_fd;
> + int count;
> 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;
> + igt_output_t *valid_output[IGT_MAX_PIPES];
> int input_bpc;
> int disp_ver;
> enum pipe pipe;
> @@ -262,32 +264,21 @@ static void test_dsc(data_t *data, uint32_t test_type, int bpc,
> unsigned int plane_format,
> enum dsc_output_format output_format)
> {
> - igt_display_t *display = &data->display;
> - igt_output_t *output;
> - enum pipe pipe;
> char name[3][LEN] = {
> {0},
> {0},
> {0},
> };
>
> + igt_require_f(data->count > 0, "No dsc output found that meets all constraints\n");
> igt_require(check_gen11_bpc_constraint(data->drm_fd, data->input_bpc));
>
> - for_each_pipe_with_valid_output(display, pipe, output) {
> + for (int i = 0; i < data->count; i++) {
> data->output_format = output_format;
> data->plane_format = plane_format;
> data->input_bpc = bpc;
> - data->output = output;
> - data->pipe = pipe;
> -
> - if (!is_dsc_supported_by_sink(data->drm_fd, data->output) ||
> - !check_gen11_dp_constraint(data->drm_fd, data->output, data->pipe))
> - continue;
> -
> - if (igt_get_output_max_bpc(data->drm_fd, output->name) < MIN_DSC_BPC) {
> - igt_info("Output %s doesn't support min %d-bpc\n", igt_output_name(data->output), MIN_DSC_BPC);
> - continue;
> - }
> + data->output = data->valid_output[i];
> + data->pipe = i;
>
> if ((test_type & TEST_DSC_OUTPUT_FORMAT) &&
> (!is_dsc_output_format_supported(data->drm_fd, data->disp_ver,
> @@ -337,15 +328,26 @@ data_t data = {};
>
> igt_main_args("l", NULL, help_str, opt_handler, &data)
> {
> + igt_output_t *output;
> + enum pipe pipe = PIPE_A;
> +
> igt_fixture {
> data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
> data.devid = intel_get_drm_devid(data.drm_fd);
> data.disp_ver = intel_display_ver(data.devid);
> + data.count = 0;
> 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(is_dsc_supported_by_source(data.drm_fd));
> +
> + for_each_valid_output_on_pipe(&data.display, pipe, output) {
> + if (is_dsc_supported_by_sink(data.drm_fd, output) &&
> + check_gen11_dp_constraint(data.drm_fd, output, pipe) &&
> + igt_get_output_max_bpc(data.drm_fd, output->name) > MIN_DSC_BPC)
> + data.valid_output[data.count++] = output;
> + }
> }
>
> igt_describe("Tests basic display stream compression functionality if supported "
next prev parent reply other threads:[~2025-03-12 6:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 13:03 [PATCH i-g-t] tests/intel/kms_dsc: Store valid DSC outputs Swati Sharma
2025-02-18 14:05 ` ✓ i915.CI.BAT: success for " Patchwork
2025-02-18 14:35 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-18 19:03 ` ✗ i915.CI.Full: failure " Patchwork
2025-02-19 5:49 ` ✗ Xe.CI.Full: " Patchwork
2025-03-12 6:11 ` Nautiyal, Ankit K [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-08 7:26 [PATCH i-g-t] " Swati Sharma
2025-05-08 7:33 ` Nautiyal, Ankit K
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=ef492188-c3b0-48b8-9e54-b18d55738557@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=swati2.sharma@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