diff options
author | Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> | 2018-07-16 15:39:03 -0700 |
---|---|---|
committer | Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> | 2018-07-17 11:11:04 -0700 |
commit | 1a02046973e6d40f0b2d08a8a0370f384c11fbba (patch) | |
tree | 3aa7bda48c6eec863e114a60844c2406a20351eb /tests/kms_psr.c | |
parent | 4c7bad785b778f218e2374b4cf9c5288fa0229aa (diff) |
tests/psr: Prepare for moving PSR state checking functions into lib
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>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'tests/kms_psr.c')
-rw-r--r-- | tests/kms_psr.c | 8 |
1 files 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); } |