From: Karthik B S <karthik.b.s@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t,v7 4/5] tests/intel/kms_dsc_helper: Add helper func()
Date: Thu, 4 Jun 2026 10:57:20 +0530 [thread overview]
Message-ID: <d9cf9efc-81fc-47c8-a533-da18c4d02d4c@intel.com> (raw)
In-Reply-To: <20260530193640.2551688-5-swati2.sharma@intel.com>
Hi Swati,
On 5/31/2026 1:06 AM, Swati Sharma wrote:
> Introduce check_dsc_joiner_constraints() to validate minimum pipe
> count, consecutive HW pipe availability, DSC slice requirements, and
> joiner support for DSC joiner scenarios.
>
> Update meson.build to link kms_joiner_helper.c into DSC-related
> tests so the new helper can call igt_is_joiner_supported_by_source().
>
> v2: -Avoid hardcoding min_pipes/min_slices, use enum values (Santhosh)
> v3: -Handle JOINED_PIPES_NONE/DEFAULT explicitly, return true (Karthik)
> -Fix indentation/style issues (Karthik)
> v4: -Move consecutive pipe check (igt_crtc_for_pipe) into helper
> rather than having it in the test (Karthik)
>
> Co-developed-by: Claude Opus 4.6
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
> tests/intel/kms_dsc_helper.c | 67 ++++++++++++++++++++++++++++++++++++
> tests/intel/kms_dsc_helper.h | 5 +++
> tests/meson.build | 17 +++++----
> 3 files changed, 83 insertions(+), 6 deletions(-)
>
> diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
> index 29b998c2f..7856e33ef 100644
> --- a/tests/intel/kms_dsc_helper.c
> +++ b/tests/intel/kms_dsc_helper.c
> @@ -203,3 +203,70 @@ bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *outp
>
> return true;
> }
> +
Please add a description as to what constraints are being checked here?
> +bool check_dsc_joiner_constraints(int drm_fd,
> + igt_output_t *output,
> + igt_display_t *display,
> + enum pipe pipe,
> + int num_pipes,
> + enum joined_pipes type)
> +{
> + int min_pipes = 0, min_slices = 0;
> +
> + if (!igt_is_joiner_supported_by_source(drm_fd, type))
> + return false;
> +
> + /*
> + * For joiner, 2 slices per pipe is used
> + * i.e. min_slices = 2 * min_pipes
> + */
> + switch (type) {
> + case JOINED_PIPES_BIG_JOINER:
> + min_pipes = JOINED_PIPES_BIG_JOINER;
> + min_slices = min_pipes * 2;
> + break;
> + case JOINED_PIPES_ULTRA_JOINER:
> + min_pipes = JOINED_PIPES_ULTRA_JOINER;
> + min_slices = min_pipes * 2;
> + break;
> + case JOINED_PIPES_NONE:
> + case JOINED_PIPES_DEFAULT:
> + return true;
> + default:
> + igt_info("Unknown joiner type: %d\n", type);
> + return false;
> + }
> +
> + if (num_pipes < min_pipes) {
> + igt_info("%s requires minimum %d pipes\n",
> + igt_get_joined_pipes_name(type), min_pipes);
> + return false;
> + }
> +
> + /* Verify consecutive HW pipes are available from this pipe */
> + if (type == JOINED_PIPES_BIG_JOINER &&
> + !igt_crtc_for_pipe(display, pipe + 1))
> + return false;
> +
> + if (type == JOINED_PIPES_ULTRA_JOINER &&
> + (!igt_crtc_for_pipe(display, pipe + 1) ||
> + !igt_crtc_for_pipe(display, pipe + 2) ||
> + !igt_crtc_for_pipe(display, pipe + 3)))
> + return false;
> +
> + if (igt_get_dsc_sink_max_slice_count(drm_fd, output->name) < min_slices) {
> + igt_info("Output %s doesn't support minimum %d slice count for %s\n",
> + igt_output_name(output), min_slices,
> + igt_get_joined_pipes_name(type));
> + return false;
> + }
> +
> + if (!igt_has_force_joiner_debugfs(drm_fd, output->name)) {
> + igt_info("Output %s doesn't support force_joiner debugfs for %s\n",
> + igt_output_name(output),
> + igt_get_joined_pipes_name(type));
> + return false;
Is this check required inside the helper? Is the test fully blocked
without force_joiner_debugfs?
Regards,
Karthik.B.S
> + }
> +
> + return true;
> +}
> diff --git a/tests/intel/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
> index ee419c849..542fe46de 100644
> --- a/tests/intel/kms_dsc_helper.h
> +++ b/tests/intel/kms_dsc_helper.h
> @@ -8,6 +8,7 @@
>
> #include "igt.h"
> #include "igt_sysfs.h"
> +#include "kms_joiner_helper.h"
> #include <errno.h>
> #include <getopt.h>
> #include <math.h>
> @@ -39,5 +40,9 @@ void force_dsc_fractional_bpp_enable(int drmfd, igt_output_t *output);
> void save_force_dsc_fractional_bpp_en(int drmfd, igt_output_t *output);
> void restore_force_dsc_fractional_bpp_en(void);
> bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *output);
> +bool check_dsc_joiner_constraints(int drm_fd, igt_output_t *output,
> + igt_display_t *display, enum pipe pipe,
> + int num_pipes,
> + enum joined_pipes type);
>
> #endif
> diff --git a/tests/meson.build b/tests/meson.build
> index fe0818118..3255e9282 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -399,14 +399,19 @@ extra_sources = {
> 'kms_chamelium_hpd': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
> 'kms_chamelium_sharpness_filter': [ join_paths ('chamelium', 'kms_chamelium_helper.c') ],
> 'kms_dp_linktrain_fallback': [
> - join_paths ('intel', 'kms_mst_helper.c'),
> - join_paths ('intel', 'kms_dsc_helper.c') ],
> + join_paths ('intel', 'kms_mst_helper.c'),
> + join_paths ('intel', 'kms_dsc_helper.c'),
> + join_paths ('intel', 'kms_joiner_helper.c') ],
> 'kms_dp_link_training': [
> - join_paths ('intel', 'kms_mst_helper.c'),
> - join_paths ('intel', 'kms_joiner_helper.c') ],
> - 'kms_dsc': [ join_paths ('intel', 'kms_dsc_helper.c') ],
> + join_paths ('intel', 'kms_mst_helper.c'),
> + join_paths ('intel', 'kms_joiner_helper.c') ],
> + 'kms_dsc': [
> + join_paths ('intel', 'kms_dsc_helper.c'),
> + join_paths ('intel', 'kms_joiner_helper.c') ],
> 'kms_joiner': [ join_paths ('intel', 'kms_joiner_helper.c') ],
> - 'kms_psr2_sf': [ join_paths ('intel', 'kms_dsc_helper.c') ],
> + 'kms_psr2_sf': [
> + join_paths ('intel', 'kms_dsc_helper.c'),
> + join_paths ('intel', 'kms_joiner_helper.c') ],
> }
>
> # Extra dependencies used on core and Intel drivers
next prev parent reply other threads:[~2026-06-04 5:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 19:36 [PATCH i-g-t,v7 0/5] Add dsc+bigjoiner subtest Swati Sharma
2026-05-30 19:36 ` [PATCH i-g-t,v7 1/5] tests/intel/kms_dsc: Store valid DSC outputs Swati Sharma
2026-06-04 4:57 ` [PATCH i-g-t, v7 " Karthik B S
2026-05-30 19:36 ` [PATCH i-g-t, v7 2/5] tests/intel/kms_joiner_helper: Add igt_get_joined_pipes_name() Swati Sharma
2026-05-30 19:36 ` [PATCH i-g-t, v7 3/5] tests/kms_joiner_helper: Add igt_is_joiner_supported_by_source() Swati Sharma
2026-05-30 19:36 ` [PATCH i-g-t,v7 4/5] tests/intel/kms_dsc_helper: Add helper func() Swati Sharma
2026-06-04 5:27 ` Karthik B S [this message]
2026-05-30 19:36 ` [PATCH i-g-t,v7 5/5] tests/intel/kms_dsc: Add force dsc and Swati Sharma
2026-06-04 5:21 ` Karthik B S
2026-05-30 20:12 ` ✗ Xe.CI.BAT: failure for Add dsc+bigjoiner subtest (rev9) Patchwork
2026-05-30 20:28 ` ✓ i915.CI.BAT: success " Patchwork
2026-05-30 21:15 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-30 22:28 ` ✗ i915.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=d9cf9efc-81fc-47c8-a533-da18c4d02d4c@intel.com \
--to=karthik.b.s@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