igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v2 1/3] tests/psr: Prepare for moving PSR state checking functions into lib
@ 2018-07-16 22:39 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
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Dhinakaran Pandiyan @ 2018-07-16 22:39 UTC (permalink / raw)
  To: igt-dev; +Cc: Dhinakaran Pandiyan, Rodrigo Vivi

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)
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));
 	manual(expected);
 }
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-07-17 20:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [igt-dev] [PATCH i-g-t v2 1/3] tests/psr: Prepare for moving PSR state checking functions into lib Rodrigo Vivi
2018-07-17 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/3] " Patchwork
2018-07-17 20:31 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).