Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 3/4] tests/intel/kms_dsc_helper: Add helper func()
Date: Wed, 12 Mar 2025 14:16:03 +0530	[thread overview]
Message-ID: <4da26f32-8234-427c-9ed0-d685163367b1@intel.com> (raw)
In-Reply-To: <20250107185709.116756-4-swati2.sharma@intel.com>


On 1/8/2025 12:27 AM, Swati Sharma wrote:
> Add (big|ultra) joiner helper functions.

Need to mention what the helper functions will do.


>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>   tests/intel/kms_dsc_helper.c | 46 ++++++++++++++++++++++++++++++++++++
>   tests/intel/kms_dsc_helper.h |  2 ++
>   2 files changed, 48 insertions(+)
>
> diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
> index cea4304e4..8543498a7 100644
> --- a/tests/intel/kms_dsc_helper.c
> +++ b/tests/intel/kms_dsc_helper.c
> @@ -201,3 +201,49 @@ bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *outp
>   
>   	return true;
>   }
> +
> +bool check_bigjoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output)

disp_ver is unused.


> +{
> +	if (!igt_is_bigjoiner_supported_by_source(drmfd))
> +		return false;
> +
> +	if (n_pipes < 2) {
Can use JOINED_PIPES_BIG_JOINER here instead of hard coding.
> +		igt_info("Bigjoiner requires minimum 2 pipes\n");
> +		return false;
> +	}
> +
> +	if (igt_get_dsc_sink_max_slice_count(drmfd, output->name) < 4) {
This can be again based on the above 2* JOINED_PIPES_BIG_JOINER with an 
explanation that for joiner, 2 slices per pipe is used.
> +		igt_info("Output %s doesn't support minimum 4 slice count\n", igt_output_name(output));
> +		return false;
> +	}
> +
> +	if (!igt_has_force_joiner_debugfs(drmfd, output->name)) {
> +		igt_info("Output %s doesn't support force_joiner debugfs\n", igt_output_name(output));
> +		return false;
> +	}
> +
> +	return true;
> +}
> +
> +bool check_ultrajoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output)
> +{
> +	if (!igt_is_ultrajoiner_supported_by_source(drmfd))
> +		return false;
> +
> +	if (n_pipes < 4) {
Can use JOINED_PIPES_ULTRA_JOINER here.
> +		igt_info("Ultrajoiner requires minimum 4 pipes\n");
> +		return false;
> +	}
> +
> +	if (igt_get_dsc_sink_max_slice_count(drmfd, output->name) < 8) {

Same as above.

I think there can be a common function something like:

static bool check_dsc_joiner_constraints(int num_pipes,  const char 
*joiner_type)

the min_pipes and min_dsc_slices can be derived based on joiner_type 
"Bigjoiner" or "Ultrajoiner"

and so on.

the helpers can call:

check_dsc_joiner_constraints(num_pipes,  "Bigjoiner");

or

check_dsc_joiner_constraints(num_pipes,  "Ultrajoiner");


> +		igt_info("Output %s doesn't support minimum 8 slice count\n", igt_output_name(output));
> +		return false;
> +	}
> +
> +	if (!igt_has_force_joiner_debugfs(drmfd, output->name)) {
> +		igt_info("Output %s doesn't support force_joiner debugfs\n", igt_output_name(output));
> +		return false;
> +	}
> +
> +	return true;
> +}
> diff --git a/tests/intel/kms_dsc_helper.h b/tests/intel/kms_dsc_helper.h
> index 4dbd88fe7..a24696640 100644
> --- a/tests/intel/kms_dsc_helper.h
> +++ b/tests/intel/kms_dsc_helper.h
> @@ -38,5 +38,7 @@ 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_bigjoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output);
> +bool check_ultrajoiner_constraints(int disp_ver, int n_pipes, int drmfd, igt_output_t *output);

The names should have 'dsc' to signify that these are the constraints 
when dsc is required/forced.


Regards,

Ankit

>   
>   #endif

  reply	other threads:[~2025-03-12  8:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 18:57 [PATCH i-g-t 0/4] Add dsc+bigjoiner subtest Swati Sharma
2025-01-07 18:57 ` [PATCH i-g-t 1/4] lib/igt_kms: Add igt_get_joined_pipes_name() Swati Sharma
2025-01-08 18:21   ` B, Jeevan
2025-01-07 18:57 ` [PATCH i-g-t 2/4] lib/igt_kms: Add igt_is_(big|ultra)_joiner_supported_by_source() Swati Sharma
2025-01-08 18:26   ` B, Jeevan
2025-01-07 18:57 ` [PATCH i-g-t 3/4] tests/intel/kms_dsc_helper: Add helper func() Swati Sharma
2025-03-12  8:46   ` Nautiyal, Ankit K [this message]
2025-01-07 18:57 ` [PATCH i-g-t 4/4] tests/intel/kms_dsc: Add force dsc and joiner test cases Swati Sharma
2025-03-12  9:09   ` Nautiyal, Ankit K
2025-03-12 12:51     ` Nautiyal, Ankit K
2025-01-07 22:56 ` ✗ Xe.CI.BAT: failure for Add dsc+bigjoiner subtest (rev4) Patchwork
2025-01-07 22:57 ` ✓ i915.CI.BAT: success " Patchwork
2025-01-08  6:21 ` ✗ i915.CI.Full: failure " Patchwork
2025-01-09 14:20 ` ✗ 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=4da26f32-8234-427c-9ed0-d685163367b1@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