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_frontbuffer_tracking.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index c366fecf..42f4c289 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1417,17 +1417,6 @@ static void teardown_fbc(void) { } -static bool psr_sink_has_support(void) -{ - char buf[PSR_STATUS_MAX_LEN]; - - debugfs_read("i915_edp_psr_status", buf); - if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/ - return false; - - return strstr(buf, "Sink_Support: yes\n"); -} - static void setup_psr(void) { if (prim_mode_params.output->config.connector->connector_type != @@ -1436,7 +1425,7 @@ static void setup_psr(void) return; } - if (!psr_sink_has_support()) { + if (!psr_sink_support(drm.debugfs)) { igt_info("Can't test PSR: not supported by sink.\n"); return; } -- cgit v1.2.3