Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
	<igt-dev@lists.freedesktop.org>
Cc: <karthik.b.s@intel.com>
Subject: Re: [PATCH i-g-t 3/3] tests/kms_hdr: Handle HDR panels requiring DSC
Date: Thu, 14 Aug 2025 13:46:28 +0530	[thread overview]
Message-ID: <10fb758a-30a8-49d3-bdaf-30b4fefe207b@intel.com> (raw)
In-Reply-To: <20250811075850.28146-3-chaitanya.kumar.borah@intel.com>

Hi Chaitanya,

On 11-08-2025 01:28 pm, Chaitanya Kumar Borah wrote:
> Some panels needs DSC to support HDR (at least in higher modes).
> In cases like these the output bpc and crc comparison fails if
> the SDR/non-HDR mode does not require DSC. Therefore, force DSC
> when in SDR mode so that output bpc and crc can be compared.
>
> Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
> ---
>   tests/kms_hdr.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 50 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
> index 76e103ac4..c1123531a 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -97,6 +97,7 @@ enum {
>   	TEST_INVALID_METADATA_SIZES = 1 << 4,
>   	TEST_INVALID_HDR = 1 << 5,
>   	TEST_BRIGHTNESS = 1 << 6,
> +	TEST_NEEDS_DSC = 1 << 7,
>   };
>   
>   /* BPC connector state. */
> @@ -491,9 +492,20 @@ static void test_static_toggle(data_t *data, enum pipe pipe,
>   	igt_plane_set_size(data->primary, data->w, data->h);
>   	set_hdr_output_metadata(data, NULL);
>   	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> +
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_enable(data->fd, output->name);
Can you add debug prints in lib func() ?
> +		igt_assert(igt_is_force_dsc_enabled(data->fd, output->name));
> +	}
> +
>   	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>   	igt_assert_output_bpc_equal(data->fd, pipe, output->name, 8);
>   
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_disable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_disabled(data->fd, output->name));
> +	}
> +
>   	/* Apply HDR metadata and 10bpc. We expect a modeset for entering. */
>   	set_hdr_output_metadata(data, &hdr);
>   	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
> @@ -518,11 +530,22 @@ static void test_static_toggle(data_t *data, enum pipe pipe,
>   	/* Disable HDR metadata and drop back to 8bpc. We expect a modeset for exiting. */
>   	set_hdr_output_metadata(data, NULL);
>   	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> +
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_enable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_enabled(data->fd, output->name));
> +	}
> +
>   	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>   	igt_assert_output_bpc_equal(data->fd, pipe, output->name, 8);
>   
>   	igt_assert_crc_equal(&ref_crc, &new_crc);
>   
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_disable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_disabled(data->fd, output->name));
> +	}
> +
>   cleanup:
>   	test_fini(data);
>   	igt_remove_fb(data->fd, &afb);
> @@ -558,7 +581,7 @@ static void fill_hdr_output_metadata_sdr(struct hdr_output_metadata *meta)
>   	meta->hdmi_metadata_type1.max_cll = 0;
>   }
>   
> -static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
> +static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output, uint32_t flags)
>   {
>   	igt_display_t *display = &data->display;
>   	igt_crc_t ref_crc, new_crc;
> @@ -577,9 +600,20 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
>   	igt_plane_set_fb(data->primary, &afb);
>   	igt_plane_set_size(data->primary, data->w, data->h);
>   	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 8);
> +
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_enable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_enabled(data->fd, output->name));
> +	}
> +
>   	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>   	igt_assert_output_bpc_equal(data->fd, pipe, output->name, 8);
>   
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_disable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_disabled(data->fd, output->name));
> +	}
> +
>   	/* Enter HDR, a modeset is allowed here. */
>   	fill_hdr_output_metadata_st2048(&hdr);
>   	set_hdr_output_metadata(data, &hdr);
> @@ -602,6 +636,10 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
>   	else
>   		igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>   
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_enable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_enabled(data->fd, output->name));
> +	}
>   	/* Enter SDR via metadata, no modeset allowed for
>   	 * amd driver, whereas a modeset is required for
>   	 * intel driver. */
> @@ -623,6 +661,11 @@ static void test_static_swap(data_t *data, enum pipe pipe, igt_output_t *output)
>   	/* Verify that the CRC didn't change while cycling metadata. */
>   	igt_assert_crc_equal(&ref_crc, &new_crc);
>   
> +	if (flags & TEST_NEEDS_DSC) {
> +		igt_force_dsc_disable(data->fd, output->name);
> +		igt_assert(igt_is_force_dsc_disabled(data->fd, output->name));
> +	}
> +
>   	test_fini(data);
>   	igt_remove_fb(data->fd, &afb);
>   }
> @@ -714,6 +757,11 @@ static void test_hdr(data_t *data, uint32_t flags)
>   				break;
>   			}
>   
> +			if (igt_is_dsc_enabled(data->fd, output->name))
> +				flags |= TEST_NEEDS_DSC;
> +			else
> +				flags &= ~TEST_NEEDS_DSC;
> +
>   			set_hdr_output_metadata(data, NULL);
>   			igt_display_commit2(display, display->is_atomic ?
>   					    COMMIT_ATOMIC : COMMIT_LEGACY);
> @@ -728,7 +776,7 @@ static void test_hdr(data_t *data, uint32_t flags)
>   					     TEST_INVALID_HDR | TEST_BRIGHTNESS))
>   					test_static_toggle(data, pipe, output, flags);
>   				if (flags & TEST_SWAP)
> -					test_static_swap(data, pipe, output);
> +					test_static_swap(data, pipe, output, flags);
>   				if (flags & TEST_INVALID_METADATA_SIZES)
>   					test_invalid_metadata_sizes(data, output);
>   			}


  reply	other threads:[~2025-08-14  8:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-11  7:58 [PATCH i-g-t 1/3] lib/dsc: Add helpers to disable force dsc Chaitanya Kumar Borah
2025-08-11  7:58 ` [PATCH i-g-t 2/3] tests/kms_hdr: Set HDR meta-data while testing for panel capability Chaitanya Kumar Borah
2025-08-12  9:11   ` Sharma, Swati2
2025-08-21  9:48     ` Borah, Chaitanya Kumar
2025-08-11  7:58 ` [PATCH i-g-t 3/3] tests/kms_hdr: Handle HDR panels requiring DSC Chaitanya Kumar Borah
2025-08-14  8:16   ` Sharma, Swati2 [this message]
2025-08-21  9:51     ` Borah, Chaitanya Kumar
2025-08-11 11:01 ` ✗ i915.CI.BAT: failure for series starting with [i-g-t,1/3] lib/dsc: Add helpers to disable force dsc Patchwork
2025-08-11 11:20 ` ✓ Xe.CI.BAT: success " Patchwork
2025-08-11 12:55 ` ✗ Xe.CI.Full: failure " Patchwork
2025-08-12  6:02 ` [PATCH i-g-t 1/3] " Sharma, Swati2

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=10fb758a-30a8-49d3-bdaf-30b4fefe207b@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@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