From 813ed5beb507cee596337b9abd584bcbbd8a172c Mon Sep 17 00:00:00 2001 From: "Lofstedt, Marta" Date: Thu, 22 Feb 2018 10:00:11 +0200 Subject: igt/kms_fronbuffer_tracking: Handle ENODEV when checking i915_edp_psr_status for chipset support If the machine doesn't support PSR, it will return -ENODEV from i915_edp_psr_status, which we want to interpret as unsupported. This is in line with what Chris just fixed for FBC. V2: Copy-pasted to the correct place Signed-off-by: Marta Lofstedt Reviewed-by: Chris Wilson --- tests/kms_frontbuffer_tracking.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 57ae047b..1483c228 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -1638,6 +1638,9 @@ static bool psr_sink_has_support(void) char buf[256]; debugfs_read("i915_edp_psr_status", buf); + if (*buf == '\0') /* !HAS_PSR -> -ENODEV*/ + return false; + return strstr(buf, "Sink_Support: yes\n"); } -- cgit v1.2.3