Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Swati Sharma <swati2.sharma@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org,
	Uma Shankar <uma.shankar@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/2] tests/kms_hdr: Add negative test to enforce HDR on non-HDR panel
Date: Thu, 23 Feb 2023 12:56:21 +0530	[thread overview]
Message-ID: <d7394dfa-5cb0-d771-a286-03625cfaccf3@intel.com> (raw)
In-Reply-To: <20230222143557.qwh5oj57uljzw4lq@kamilkon-desk1>

Thanks for the reviews! Patch pushed.

On 22-Feb-23 8:05 PM, Kamil Konieczny wrote:
> On 2023-02-22 at 16:18:06 +0530, Swati Sharma wrote:
>> Negative test is added to ensure HDR is not enabled on
>> a non-HDR panel.
>> Commit/modeset won't fail. However, in dmesg we can find
>>
>> [drm:drm_hdmi_infoframe_set_hdr_metadata [drm_display_helper]]
>> EOTF Not Supported
>>
>> v2: -fixed nitpicks (Kamil)
>>
>> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
>> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
> 
> Acked-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> 
>> ---
>>   tests/kms_hdr.c | 18 ++++++++++++++++--
>>   1 file changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
>> index 63b03089b..901b1da78 100644
>> --- a/tests/kms_hdr.c
>> +++ b/tests/kms_hdr.c
>> @@ -51,6 +51,7 @@ enum {
>>   	TEST_SUSPEND = 1 << 2,
>>   	TEST_SWAP = 1 << 3,
>>   	TEST_INVALID_METADATA_SIZES = 1 << 4,
>> +	TEST_INVALID_HDR = 1 << 5,
>>   };
>>   
>>   /* BPC connector state. */
>> @@ -414,6 +415,10 @@ static void test_static_toggle(data_t *data, enum pipe pipe,
>>   	set_hdr_output_metadata(data, &hdr);
>>   	igt_output_set_prop_value(data->output, IGT_CONNECTOR_MAX_BPC, 10);
>>   	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>> +	if (flags & TEST_INVALID_HDR) {
>> +		igt_assert_eq(system("dmesg|tail -n 1000|grep -E \"EOTF Not Supported\""), 0);
>> +		goto cleanup;
>> +	}
>>   	igt_assert_output_bpc_equal(data->fd, pipe, output->name, 10);
>>   
>>   	/* Verify that the CRC are equal after DPMS or suspend. */
>> @@ -429,6 +434,7 @@ static void test_static_toggle(data_t *data, enum pipe pipe,
>>   
>>   	igt_assert_crc_equal(&ref_crc, &new_crc);
>>   
>> +cleanup:
>>   	test_fini(data);
>>   	igt_remove_fb(data->fd, &afb);
>>   }
>> @@ -568,7 +574,11 @@ static void test_hdr(data_t *data, uint32_t flags)
>>   		if (!has_max_bpc(output) || !has_hdr(output))
>>   			continue;
>>   
>> -		if (!is_panel_hdr(data, output))
>> +		/* For negative test, panel should be non-hdr. */
>> +		if ((flags & TEST_INVALID_HDR) && is_panel_hdr(data, output))
>> +			continue;
>> +
>> +		if ((flags & ~TEST_INVALID_HDR) && !is_panel_hdr(data, output))
>>   			continue;
>>   
>>   		if (igt_get_output_max_bpc(data->fd, output->name) < 10)
>> @@ -590,7 +600,7 @@ static void test_hdr(data_t *data, uint32_t flags)
>>   
>>   				igt_dynamic_f("pipe-%s-%s",
>>   					      kmstest_pipe_name(pipe), output->name) {
>> -					if (flags & TEST_NONE || flags & TEST_DPMS || flags & TEST_SUSPEND)
>> +					if (flags & (TEST_NONE | TEST_DPMS | TEST_SUSPEND | TEST_INVALID_HDR))
>>   						test_static_toggle(data, pipe, output, flags);
>>   					if (flags & TEST_SWAP)
>>   						test_static_swap(data, pipe, output);
>> @@ -648,6 +658,10 @@ igt_main
>>   	igt_subtest_with_dynamic("invalid-metadata-sizes")
>>   		test_hdr(&data, TEST_INVALID_METADATA_SIZES);
>>   
>> +	igt_describe("Test to ensure HDR is not enabled on non-HDR panel");
>> +	igt_subtest_with_dynamic("invalid-hdr")
>> +		test_hdr(&data, TEST_INVALID_HDR);
>> +
>>   	igt_fixture {
>>   		igt_display_fini(&data.display);
>>   		close(data.fd);
>> -- 
>> 2.25.1
>>

-- 
~Swati Sharma

  reply	other threads:[~2023-02-23  7:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 10:48 [igt-dev] [PATCH i-g-t v2 0/2] Add HDR negative tests Swati Sharma
2023-02-22 10:48 ` [igt-dev] [PATCH i-g-t v2 1/2] tests/kms_hdr: Add negative test for invalid metadata sizes Swati Sharma
2023-02-22 14:35   ` Kamil Konieczny
2023-02-23  7:26     ` Swati Sharma
2023-02-22 10:48 ` [igt-dev] [PATCH i-g-t v2 2/2] tests/kms_hdr: Add negative test to enforce HDR on non-HDR panel Swati Sharma
2023-02-22 14:35   ` Kamil Konieczny
2023-02-23  7:26     ` Swati Sharma [this message]
2023-02-22 11:19 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add HDR negative tests (rev3) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-02-22 11:55 [igt-dev] [PATCH i-g-t v2 0/2] Add HDR negative tests Swati Sharma
2023-02-22 11:55 ` [igt-dev] [PATCH i-g-t v2 2/2] tests/kms_hdr: Add negative test to enforce HDR on non-HDR panel Swati Sharma

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=d7394dfa-5cb0-d771-a286-03625cfaccf3@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=uma.shankar@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