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 4/5] tests/frontbuffer_tracking: Use the library functions to test PSR.
Date: Mon, 16 Jul 2018 10:39:07 -0700	[thread overview]
Message-ID: <20180716173907.GK4262@intel.com> (raw)
In-Reply-To: <20180714221915.12687-4-dhinakaran.pandiyan@intel.com>

On Sat, Jul 14, 2018 at 03:19:14PM -0700, Dhinakaran Pandiyan wrote:
> kms_frontbuffer_tracking should test PSR the same way that kms_psr does.
> 
> 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_frontbuffer_tracking.c | 42 ++++----------------------------
>  1 file changed, 5 insertions(+), 37 deletions(-)
> 
> diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c
> index 116a95bc..1dfd7c1c 100644
> --- a/tests/kms_frontbuffer_tracking.c
> +++ b/tests/kms_frontbuffer_tracking.c
> @@ -26,6 +26,7 @@
>  
>  #include "igt.h"
>  #include "igt_sysfs.h"
> +#include "igt_psr.h"
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <fcntl.h>
> @@ -756,22 +757,6 @@ static bool fbc_is_enabled(int lvl)
>  	return strstr(buf, "FBC enabled\n");
>  }
>  
> -static bool psr_is_enabled(void)
> -{
> -	char buf[256];
> -
> -	debugfs_read("i915_edp_psr_status", buf);
> -	return strstr(buf, "\nHW Enabled & Active bit: yes\n");
> -}
> -
> -static void psr_print_status(void)
> -{
> -	char buf[256];
> -
> -	debugfs_read("i915_edp_psr_status", buf);
> -	igt_info("PSR status:\n%s\n", buf);
> -}
> -
>  static void drrs_set(unsigned int val)
>  {
>  	char buf[2];
> @@ -949,16 +934,6 @@ static bool fbc_wait_until_enabled(void)
>  	return igt_wait(fbc_is_enabled(IGT_LOG_DEBUG), 2000, 1);
>  }
>  
> -static bool psr_wait_until_enabled(void)
> -{
> -	return igt_wait(psr_is_enabled(), 5000, 1);
> -}
> -
> -static bool psr_wait_until_disabled(void)
> -{
> -	return igt_wait(!psr_is_enabled(), 5000, 1);
> -}
> -
>  static bool drrs_wait_until_rr_switch_to_low(void)
>  {
>  	return igt_wait(is_drrs_low(), 5000, 1);
> @@ -1659,17 +1634,10 @@ static void do_status_assertions(int flags)
>  		igt_assert(!fbc_wait_until_enabled());
>  	}
>  
> -	if (flags & ASSERT_PSR_ENABLED) {
> -		if (!psr_wait_until_enabled()) {
> -			psr_print_status();
> -			igt_assert_f(psr_is_enabled(), "PSR still disabled\n");
> -		}
> -	} else if (flags & ASSERT_PSR_DISABLED) {
> -		if (!psr_wait_until_disabled()) {
> -			psr_print_status();
> -			igt_assert_f(!psr_is_enabled(), "PSR still enabled\n");
> -		}
> -	}
> +	if (flags & ASSERT_PSR_ENABLED)
> +		igt_assert_f(psr_wait_entry(drm.fd), "PSR still disabled\n");
> +	else if (flags & ASSERT_PSR_DISABLED)
> +		igt_assert_f(psr_active(drm.fd, false), "PSR still enabled\n");
>  }
>  
>  static void __do_assertions(const struct test_mode *t, int flags,
> -- 
> 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:39 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
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 [this message]
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=20180716173907.GK4262@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.