From 6f80f6b7aece563a4e85fbed9d957d49e245ab7b Mon Sep 17 00:00:00 2001 From: José Roberto de Souza Date: Thu, 4 Oct 2018 13:32:08 -0700 Subject: tests/psr: Share the code check if sink supports PSR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The same code checking if sink supports PSR was spread into 3 tests, better move it to lib and reuse. v2: splitted previous patch into this one and the next one(Dhinakaran) Cc: Rodrigo Vivi Cc: Dhinakaran Pandiyan Reviewed-by: Dhinakaran Pandiyan Signed-off-by: José Roberto de Souza --- tests/kms_psr.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/kms_psr.c') diff --git a/tests/kms_psr.c b/tests/kms_psr.c index 20b69892..855679b0 100644 --- a/tests/kms_psr.c +++ b/tests/kms_psr.c @@ -191,13 +191,7 @@ static void fill_render(data_t *data, uint32_t handle, unsigned char color) static bool sink_support(data_t *data) { - char buf[PSR_STATUS_MAX_LEN]; - - igt_debugfs_simple_read(data->debugfs_fd, "i915_edp_psr_status", - buf, sizeof(buf)); - - return data->with_psr_disabled || - strstr(buf, "Sink_Support: yes\n"); + return data->with_psr_disabled || psr_sink_support(data->debugfs_fd); } static bool psr_wait_entry_if_enabled(data_t *data) -- cgit v1.2.3