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] [PATCH i-g-t v2 1/3] tests/psr: Prepare for moving PSR state checking functions into lib
Date: Mon, 16 Jul 2018 22:06:28 -0700	[thread overview]
Message-ID: <20180717050628.GJ2324@intel.com> (raw)
In-Reply-To: <20180716223905.32087-1-dhinakaran.pandiyan@intel.com>

On Mon, Jul 16, 2018 at 03:39:03PM -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.
> 
> v2: Leave --no-psr intact (Rodrigo)

Thanks...


> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  tests/kms_psr.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/kms_psr.c b/tests/kms_psr.c
> index 4eca51da..9e893ed8 100644
> --- a/tests/kms_psr.c
> +++ b/tests/kms_psr.c
> @@ -197,12 +197,12 @@ static bool sink_support(data_t *data)
>  		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"));
> @@ -214,7 +214,7 @@ static bool wait_psr_entry(data_t *data)
>  	if (data->with_psr_disabled)
>  		return true;
>  
> -	return igt_wait((psr_active(data, true)), 500, 1);
> +	return igt_wait((psr_active(data->drm_fd, true)), 500, 1);
>  }
>  
>  static inline void manual(const char *expected)
> @@ -303,7 +303,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));

I wonder if we shouldn't change it to only get the fd
and here for instance use igt_assert(!psr_active...

anyways this can be in separated patch

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

>  	manual(expected);
>  }
>  
> -- 
> 2.17.1
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2018-07-17  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 22:39 [igt-dev] [PATCH i-g-t v2 1/3] tests/psr: Prepare for moving PSR state checking functions into lib Dhinakaran Pandiyan
2018-07-16 22:39 ` [igt-dev] [PATCH i-g-t v2 2/3] tests/psr: Move PSR state test functions to lib Dhinakaran Pandiyan
2018-07-17  5:07   ` Rodrigo Vivi
2018-07-17 18:57     ` Dhinakaran Pandiyan
2018-07-16 22:39 ` [igt-dev] [PATCH i-g-t v2 3/3] tests/frontbuffer_tracking: Use the library functions to test PSR Dhinakaran Pandiyan
2018-07-17  5:06 ` Rodrigo Vivi [this message]
2018-07-17 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] tests/psr: Prepare for moving PSR state checking functions into lib Patchwork
2018-07-17 20:31 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20180717050628.GJ2324@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.