public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "C, Ramalingam" <ramalingam.c@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset
Date: Fri, 8 Feb 2019 00:28:40 +0530	[thread overview]
Message-ID: <02e389be-ce71-ed21-475a-3e44c4bec3fb@intel.com> (raw)
In-Reply-To: <20190207170348.GZ3271@phenom.ffwll.local>



On 2/7/2019 10:33 PM, Daniel Vetter wrote:
> On Thu, Feb 07, 2019 at 09:53:21PM +0530, Ramalingam C wrote:
>> As we have two different patch for commitng the HDCP request
>> 	1. DDI_enable (during the modeset)
>> 	2. update_pipe (during fastset execution)
>>
>> Currently our kms_content_protection covers only fastset path.
>> So this test adds the coverage for the HDCP during the modeset by
>> performing DPMS off-on and check for HDCP status.
>>
>> But with respect to HDCP we allow few retries from userspace before
>> reporting the failure. So only first attempt at kernel will be on
>> modeset path, next retries will become fastset commiting of HDCP.
>>
>> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
>> ---
>>   tests/kms_content_protection.c | 79 ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 79 insertions(+)
>>
>> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
>> index f6b441d891e5..895e9e8d8b11 100644
>> --- a/tests/kms_content_protection.c
>> +++ b/tests/kms_content_protection.c
>> @@ -306,6 +306,80 @@ test_content_protection(enum igt_commit_style s)
>>   	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>>   }
>>   
>> +static void test_cp_dpms_on_output(igt_output_t *output,
>> +				   enum igt_commit_style s)
>> +{
>> +	igt_display_t *display = &data.display;
>> +	igt_plane_t *primary;
>> +	enum pipe pipe;
>> +	bool ret;
>> +
>> +	for_each_pipe(display, pipe) {
>> +		if (!igt_pipe_connector_valid(pipe, output))
>> +			continue;
>> +
>> +		/*
>> +		 * If previous subtest of connector failed, pipe
>> +		 * attached to that connector is not released.
>> +		 * Because of that we have to choose the non
>> +		 * attached pipe for this subtest.
>> +		 */
>> +		if (!igt_pipe_is_free(display, pipe))
>> +			continue;
>> +
>> +		modeset_with_fb(pipe, output, s);
>> +		test_cp_enable_with_retry(output, s, 3);
>> +
>> +		igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 0);
>> +		igt_display_commit2(display, s);
>> +
>> +		igt_pipe_set_prop_value(display, pipe, IGT_CRTC_ACTIVE, 1);
>> +		igt_display_commit2(display, s);
>> +
>> +		ret = wait_for_prop_value(output, 2, 18000);
>> +		if (!ret)
>> +			test_cp_enable_with_retry(output, s, 2);
>> +
>> +		test_cp_disable(output, s);
>> +
>> +		primary = igt_output_get_plane_type(output,
>> +						    DRM_PLANE_TYPE_PRIMARY);
>> +		igt_plane_set_fb(primary, NULL);
>> +		igt_output_set_pipe(output, PIPE_NONE);
>> +
>> +		/*
>> +		 * Testing a output with a pipe is enough for HDCP
>> +		 * testing. No ROI in testing the connector with other
>> +		 * pipes. So Break the loop on pipe.
>> +		 */
>> +		break;
>> +	}
>> +}
>> +
>> +static void test_cp_dpms(enum igt_commit_style s)
>> +{
>> +	igt_display_t *display = &data.display;
>> +	igt_output_t *output;
>> +	int valid_tests = 0;
>> +
>> +	for_each_connected_output(display, output) {
>> +		if (!output->props[IGT_CONNECTOR_CONTENT_PROTECTION])
>> +			continue;
>> +
>> +		igt_info("CP Test execution on %s\n", output->name);
>> +		if (!sink_hdcp_capable(output)) {
>> +			igt_info("\tSkip %s (Sink has no HDCP support)\n",
>> +				 output->name);
>> +			continue;
>> +		}
>> +
>> +		test_cp_dpms_on_output(output, s);
>> +		valid_tests++;
>> +	}
>> +
>> +	igt_require_f(valid_tests, "No connector found with HDCP capability\n");
>> +}
>> +
>>   igt_main
>>   {
>>   	igt_fixture {
>> @@ -324,6 +398,11 @@ igt_main
>>   		test_content_protection(COMMIT_ATOMIC);
>>   	}
>>   
>> +	igt_subtest("atomic-dpms") {
>> +		igt_require(data.display.is_atomic);
>> +		test_cp_dpms(COMMIT_ATOMIC);
> Hm instead of duplicating a bunch of things I'd add a new flag paramater
> to test_content_protection (0 for all existing tests), so that we can
> reuse the code with the same flow, and only do the dpms when a TEST_DPMS
> flag is set.
Ok. sounds good idea. I will do that.

-Ram
> -Daniel
>
>> +	}
>> +
>>   	igt_fixture
>>   		igt_display_fini(&data.display);
>>   }
>> -- 
>> 2.7.4
>>

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-02-07 18:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 16:23 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Ramalingam C
2019-02-07 16:23 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C
2019-02-07 17:03   ` Daniel Vetter
2019-02-07 18:58     ` C, Ramalingam [this message]
2019-02-07 16:23 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
2019-02-07 17:06   ` Daniel Vetter
2019-02-07 19:02     ` C, Ramalingam
2019-02-07 17:02 ` [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps Daniel Vetter
2019-02-07 17:08 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2019-02-07 18:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] " Ramalingam C
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 2/3] kms_content_protection: Test CP along with modeset Ramalingam C

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=02e389be-ce71-ed21-475a-3e44c4bec3fb@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    /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