public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: igt-dev@lists.freedesktop.org, daniel@ffwll.ch
Subject: Re: [igt-dev] [PATCH i-g-t v3 2/3] kms_content_protection: Test CP along with modeset
Date: Fri, 8 Feb 2019 10:19:10 +0100	[thread overview]
Message-ID: <20190208091910.GJ23159@phenom.ffwll.local> (raw)
In-Reply-To: <1549568337-10572-1-git-send-email-ramalingam.c@intel.com>

On Fri, Feb 08, 2019 at 01:08:57AM +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.
> 
> v2:
>   dpms test is added within existing implementation with a flag [Daniel]
> v3:
>   ret declared.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  tests/kms_content_protection.c | 33 +++++++++++++++++++++++++++------
>  1 file changed, 27 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index f6b441d891e5..7d82c733b378 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -216,11 +216,13 @@ static bool igt_pipe_is_free(igt_display_t *display, enum pipe pipe)
>  
>  
>  static void test_content_protection_on_output(igt_output_t *output,
> -					      enum igt_commit_style s)
> +					      enum igt_commit_style s,
> +					      bool dpms_test)
>  {
>  	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))
> @@ -237,8 +239,22 @@ static void test_content_protection_on_output(igt_output_t *output,
>  
>  		modeset_with_fb(pipe, output, s);
>  		test_cp_enable_with_retry(output, s, 3);
> -		test_cp_disable(output, s);
>  
> +		if (dpms_test) {
> +			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);
> @@ -282,7 +298,7 @@ static bool sink_hdcp_capable(igt_output_t *output)
>  
>  
>  static void
> -test_content_protection(enum igt_commit_style s)
> +test_content_protection(enum igt_commit_style s, bool dpms_test)
>  {
>  	igt_display_t *display = &data.display;
>  	igt_output_t *output;
> @@ -299,7 +315,7 @@ test_content_protection(enum igt_commit_style s)
>  			continue;
>  		}
>  
> -		test_content_protection_on_output(output, s);
> +		test_content_protection_on_output(output, s, dpms_test);
>  		valid_tests++;
>  	}
>  
> @@ -317,11 +333,16 @@ igt_main
>  	}
>  
>  	igt_subtest("legacy")
> -		test_content_protection(COMMIT_LEGACY);
> +		test_content_protection(COMMIT_LEGACY, false);
>  
>  	igt_subtest("atomic") {
>  		igt_require(data.display.is_atomic);
> -		test_content_protection(COMMIT_ATOMIC);
> +		test_content_protection(COMMIT_ATOMIC, false);
> +	}
> +
> +	igt_subtest("atomic-dpms") {
> +		igt_require(data.display.is_atomic);
> +		test_content_protection(COMMIT_ATOMIC, true);
>  	}
>  
>  	igt_fixture
> -- 
> 2.7.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-02-08  9:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 19:31 [igt-dev] [PATCH i-g-t 1/3] kms_content_protection: modularizing the CP test steps 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
2019-02-07 19:38   ` [igt-dev] [PATCH i-g-t v3 " Ramalingam C
2019-02-08  9:19     ` Daniel Vetter [this message]
2019-02-07 19:31 ` [igt-dev] [PATCH i-g-t 3/3] kms_content_protection: Confirm that LIC is passed Ramalingam C
2019-02-08  9:20   ` Daniel Vetter
2019-02-07 19:49 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] kms_content_protection: modularizing the CP test steps (rev2) 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=20190208091910.GJ23159@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ramalingam.c@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