All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib
Date: Mon, 16 Jul 2018 10:35:42 -0700	[thread overview]
Message-ID: <20180716173542.GI4262@intel.com> (raw)
In-Reply-To: <20180714221915.12687-2-dhinakaran.pandiyan@intel.com>

On Sat, Jul 14, 2018 at 03:19:12PM -0700, Dhinakaran Pandiyan wrote:
> Change the function arguments to not rely on test specific data as
> the following patches change kms_frontbuffer_tracking to reuse PSR
> functions.
> 
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  tests/kms_psr.c | 30 +++++++++++++++---------------
>  1 file changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index aace884c..ded8346a 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -195,21 +195,21 @@ static bool sink_support(data_t *data)
>  	return strstr(buf, "Sink_Support: yes\n");
>  }
>  
> -static bool psr_active(data_t *data, bool check_active)
> +static bool psr_active(int fd, bool check_active)
>  {
>  	bool active;
>  	char buf[512];
>  
> -	igt_debugfs_read(data->drm_fd, "i915_edp_psr_status", buf);
> +	igt_debugfs_read(fd, "i915_edp_psr_status", buf);
>  
>  	active = strstr(buf, "HW Enabled & Active bit: yes\n") &&
>  		 (strstr(buf, "SRDENT") || strstr(buf, "SLEEP"));
>  	return check_active ? active : !active;
>  }
>  
> -static bool wait_psr_entry(data_t *data)
> +static bool wait_psr_entry(int fd)
>  {
> -	return igt_wait((psr_active(data, true)), 500, 1);
> +	return igt_wait((psr_active(fd, true)), 500, 1);
>  }
>  
>  static inline void manual(const char *expected)
> @@ -237,7 +237,7 @@ static void run_test(data_t *data)
>  	manual("screen GREEN");
>  
>  	/* Confirm screen stays Green after PSR got active */
> -	igt_assert(wait_psr_entry(data));
> +	igt_assert(wait_psr_entry(data->drm_fd));
>  	manual("screen GREEN");
>  
>  	/* Setting a secondary fb/plane */
> @@ -250,7 +250,7 @@ static void run_test(data_t *data)
>  	else
>  		manual("GREEN background with WHITE box");
>  
> -	igt_assert(wait_psr_entry(data));
> +	igt_assert(wait_psr_entry(data->drm_fd));
>  	switch (data->op) {
>  	case PAGE_FLIP:
>  		/* Only in use when testing primary plane */
> @@ -298,7 +298,7 @@ static void run_test(data_t *data)
>  		expected = "screen GREEN";
>  		break;
>  	}
> -	igt_assert(psr_active(data, false));
> +	igt_assert(psr_active(data->drm_fd, false));
>  	manual(expected);
>  }
>  
> @@ -408,13 +408,13 @@ igt_main
>  
>  	igt_subtest("basic") {
>  		setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> -		igt_assert(wait_psr_entry(&data));
> +		igt_assert(wait_psr_entry(data.drm_fd));
>  		test_cleanup(&data);
>  	}
>  
>  	igt_subtest("no_drrs") {
>  		setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> -		igt_assert(wait_psr_entry(&data));
> +		igt_assert(wait_psr_entry(data.drm_fd));
>  		igt_assert(drrs_disabled(&data));
>  		test_cleanup(&data);
>  	}
> @@ -423,7 +423,7 @@ igt_main
>  		igt_subtest_f("primary_%s", op_str(op)) {
>  			data.op = op;
>  			setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> -			igt_assert(wait_psr_entry(&data));
> +			igt_assert(wait_psr_entry(data.drm_fd));
>  			run_test(&data);
>  			test_cleanup(&data);
>  		}
> @@ -433,7 +433,7 @@ igt_main
>  		igt_subtest_f("sprite_%s", op_str(op)) {
>  			data.op = op;
>  			setup_test_plane(&data, DRM_PLANE_TYPE_OVERLAY);
> -			igt_assert(wait_psr_entry(&data));
> +			igt_assert(wait_psr_entry(data.drm_fd));
>  			run_test(&data);
>  			test_cleanup(&data);
>  		}
> @@ -443,7 +443,7 @@ igt_main
>  		igt_subtest_f("cursor_%s", op_str(op)) {
>  			data.op = op;
>  			setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> -			igt_assert(wait_psr_entry(&data));
> +			igt_assert(wait_psr_entry(data.drm_fd));
>  			run_test(&data);
>  			test_cleanup(&data);
>  		}
> @@ -452,7 +452,7 @@ igt_main
>  	igt_subtest_f("dpms") {
>  		data.op = RENDER;
>  		setup_test_plane(&data, DRM_PLANE_TYPE_PRIMARY);
> -		igt_assert(wait_psr_entry(&data));
> +		igt_assert(wait_psr_entry(data.drm_fd));
>  		dpms_off_on(&data);
>  		run_test(&data);
>  		test_cleanup(&data);
> @@ -461,10 +461,10 @@ igt_main
>  	igt_subtest_f("suspend") {
>  		data.op = PLANE_ONOFF;
>  		setup_test_plane(&data, DRM_PLANE_TYPE_CURSOR);
> -		igt_assert(wait_psr_entry(&data));
> +		igt_assert(wait_psr_entry(data.drm_fd));
>  		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
>  					      SUSPEND_TEST_NONE);
> -		igt_assert(wait_psr_entry(&data));
> +		igt_assert(wait_psr_entry(data.drm_fd));
>  		run_test(&data);
>  		test_cleanup(&data);
>  	}
> -- 
> 2.17.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-07-16 17:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 22:19 [igt-dev] [CI 1/5] tests/psr: Remove option to run test with PSR disabled Dhinakaran Pandiyan
2018-07-14 22:19 ` [igt-dev] [CI 2/5] tests/psr: Prepare for moving PSR state checking functions into lib Dhinakaran Pandiyan
2018-07-16 17:35   ` Rodrigo Vivi [this message]
2018-07-14 22:19 ` [igt-dev] [CI 3/5] tests/psr: Move PSR state test functions to lib Dhinakaran Pandiyan
2018-07-16 17:38   ` Rodrigo Vivi
2018-07-14 22:19 ` [igt-dev] [CI 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR Dhinakaran Pandiyan
2018-07-16 17:39   ` Rodrigo Vivi
2018-07-14 22:19 ` [igt-dev] [CI 5/5] DEBUG/psr: Test fix for fdo #105450 Dhinakaran Pandiyan
2018-07-16 17:41   ` Rodrigo Vivi
2018-07-14 22:40 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/5] tests/psr: Remove option to run test with PSR disabled Patchwork
2018-07-14 23:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-07-16 17:31 ` [igt-dev] [CI 1/5] " Rodrigo Vivi
2018-07-16 17:35   ` Rodrigo Vivi
2018-07-16 21:20     ` Dhinakaran Pandiyan

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=20180716173542.GI4262@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.