Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Joshi, Kunal1" <kunal1.joshi@intel.com>
To: Swati Sharma <swati2.sharma@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [i-g-t, 3/3] tests/intel/kms_dsc_helper: add dsc+big joiner helper func
Date: Wed, 10 Jan 2024 11:31:42 +0530	[thread overview]
Message-ID: <078f8a4d-56ea-4b3b-9f5b-2a69853696ba@intel.com> (raw)
In-Reply-To: <20240105155951.124374-4-swati2.sharma@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2238 bytes --]


On 1/5/2024 9:29 PM, Swati Sharma wrote:
> Add helper functions dsc with big joiner helper functions.
>
> Signed-off-by: Swati Sharma<swati2.sharma@intel.com>
> ---
>   tests/intel/kms_dsc_helper.c | 32 ++++++++++++++++++++++++++++++++
>   tests/intel/kms_dsc_helper.h |  3 +++
>   2 files changed, 35 insertions(+)
>
> diff --git a/tests/intel/kms_dsc_helper.c b/tests/intel/kms_dsc_helper.c
> index 58057aca3..91ce21062 100644
> --- a/tests/intel/kms_dsc_helper.c
> +++ b/tests/intel/kms_dsc_helper.c
> @@ -7,8 +7,10 @@
>   
>   static bool force_dsc_en_orig;
>   static bool force_dsc_fractional_bpp_en_orig;
> +static bool force_dsc_bigjoiner_en_orig;
>   static int force_dsc_restore_fd = -1;
>   static int force_dsc_fractional_bpp_restore_fd = -1;
> +static int force_dsc_bigjoiner_restore_fd = -1;
>   
>   void force_dsc_enable(int drmfd, igt_output_t *output)
>   {
> @@ -201,3 +203,33 @@ bool is_dsc_fractional_bpp_supported(int disp_ver, int drmfd, igt_output_t *outp
>   
>   	return true;
>   }
> +
> +void force_dsc_bigjoiner_enable(int drmfd, igt_output_t *output)
> +{
> +	int ret;
> +
> +	igt_debug("Forcing DSC Big Joiner on %s\n", output->name);
> +	ret = igt_force_bigjoiner_enable(drmfd, output->name);
> +	igt_assert_f(ret == 0, "forcing dsc big joiner debugfs_write failed\n");
> +}
> +
> +void save_force_dsc_bigjoiner_en(int drmfd, igt_output_t *output)
> +{
> +	force_dsc_bigjoiner_en_orig =
> +		igt_is_force_bigjoiner_enabled(drmfd, output->name);
> +	force_dsc_bigjoiner_restore_fd =
> +		igt_get_bigjoiner_debugfs_fd(drmfd, output->name);
> +	igt_assert(force_dsc_bigjoiner_restore_fd >= 0);
> +}
> +
> +void restore_force_dsc_bigjoiner_en(void)
> +{
> +	if (force_dsc_bigjoiner_restore_fd < 0)
> +		return;
> +
> +	igt_debug("Restoring DSC Big Joiner enable\n");
> +	igt_assert(write(force_dsc_bigjoiner_restore_fd, force_dsc_bigjoiner_en_orig ? "1" : "0", 1) == 1);
> +
> +	close(force_dsc_bigjoiner_restore_fd);
> +	force_dsc_bigjoiner_restore_fd = -1;
> +}


Hello Swati,

These functions (force_dsc_enable, save_force_dsc_bigjoiner_en and restore_force_dsc_bigjoiner_en) seems to be generic and not dsc specific.
Can this be somewhere where other IGT"s can use them?


Thanks and Regards
Kunal Joshi


[-- Attachment #2: Type: text/html, Size: 2755 bytes --]

  reply	other threads:[~2024-01-10  6:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 15:59 [PATCH i-g-t 0/3] Add dsc+bigjoiner subtest Swati Sharma
2024-01-05 15:59 ` [PATCH i-g-t 1/3] lib/igt_kms: add helpers for big joiner debugfs Swati Sharma
2024-01-05 15:59 ` [PATCH i-g-t 2/3] tests/intel/kms_dsc: add new subtest Swati Sharma
2024-01-05 19:40   ` Kamil Konieczny
2024-01-05 15:59 ` [PATCH i-g-t 3/3] tests/intel/kms_dsc_helper: add dsc+big joiner helper func Swati Sharma
2024-01-10  6:01   ` Joshi, Kunal1 [this message]
2024-01-05 17:41 ` ✗ Fi.CI.BAT: failure for Add dsc+bigjoiner subtest Patchwork
2024-01-05 19:44 ` ✓ CI.xeBAT: success " 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=078f8a4d-56ea-4b3b-9f5b-2a69853696ba@intel.com \
    --to=kunal1.joshi@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